diff --git a/.github/actions/aws/k8s-versions.yaml b/.github/actions/aws/k8s-versions.yaml index bbaeee8f764b0..713c81c0f7e58 100644 --- a/.github/actions/aws/k8s-versions.yaml +++ b/.github/actions/aws/k8s-versions.yaml @@ -1,4 +1,4 @@ -# List of k8s version for GKE tests +# List of k8s version for EKS tests --- include: - version: "1.23" diff --git a/.github/actions/azure/k8s-versions-schema.yaml b/.github/actions/azure/k8s-versions-schema.yaml deleted file mode 100644 index ee81303017e26..0000000000000 --- a/.github/actions/azure/k8s-versions-schema.yaml +++ /dev/null @@ -1,6 +0,0 @@ -include: list(include('includeItem')) ---- -includeItem: - version: str() - location: str() - default: bool(required=False) diff --git a/.github/actions/azure/k8s-versions.yaml b/.github/actions/azure/k8s-versions.yaml deleted file mode 100644 index fa83fc74d7225..0000000000000 --- a/.github/actions/azure/k8s-versions.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# List of k8s version for AKS tests ---- -include: - - version: "1.25" - location: westeurope - index: 1 - default: true diff --git a/.github/actions/conn-disrupt-test/action.yaml b/.github/actions/conn-disrupt-test/action.yaml new file mode 100644 index 0000000000000..d57e5da625898 --- /dev/null +++ b/.github/actions/conn-disrupt-test/action.yaml @@ -0,0 +1,49 @@ +name: Cilium Conn Disrupt Test +description: Setup and test cilium connectivity and connection disruption status after a caller-provided risky operation, such as upgrade or IPsec key rotation. + +inputs: + job-name: + required: true + type: string + operation-cmd: + required: true + type: string + extra-connectivity-test-flags: + required: false + type: string + +runs: + using: composite + steps: + - name: Setup Conn Disrupt Test + uses: cilium/little-vm-helper@0fcaa3fed17811fcd8b6f1b0dc1f24e5f4ff6b13 # v0.0.7 + with: + provision: 'false' + cmd: | + cd /host/ + # Create pods which establish long lived connections. It will be used by + # subsequent connectivity tests with --include-conn-disrupt-test to catch any + # interruption in such flows. + ./cilium-cli connectivity test --include-conn-disrupt-test --conn-disrupt-test-setup + + - name: Operate Cilium + uses: cilium/little-vm-helper@0fcaa3fed17811fcd8b6f1b0dc1f24e5f4ff6b13 # v0.0.7 + with: + provision: 'false' + cmd: | + ${{ inputs.operation-cmd }} + + - name: Perform Conn Disrupt Test + uses: cilium/little-vm-helper@0fcaa3fed17811fcd8b6f1b0dc1f24e5f4ff6b13 # v0.0.7 + with: + provision: 'false' + cmd: | + cd /host/ + ./cilium-cli connectivity test --include-unsafe-tests --collect-sysdump-on-failure \ + --include-conn-disrupt-test \ + --flush-ct \ + --sysdump-hubble-flows-count=1000000 --sysdump-hubble-flows-timeout=5m \ + --sysdump-output-filename "cilium-sysdump-${{ inputs.job-name }}-" \ + --junit-file "cilium-junits/${{ inputs.job-name }}.xml" \ + ${{ inputs.extra-connectivity-test-flags }} \ + --junit-property github_job_step="Run conn disrupt tests (${{ inputs.job-name }})" diff --git a/.github/ariane-config.yaml b/.github/ariane-config.yaml index 21d0823a8e216..3bdbb1b2761d4 100644 --- a/.github/ariane-config.yaml +++ b/.github/ariane-config.yaml @@ -1,26 +1,28 @@ triggers: /test-backport-1.12: workflows: - - conformance-aks.yaml - conformance-aws-cni.yaml - conformance-clustermesh.yaml + - conformance-ipsec-e2e.yaml - conformance-eks.yaml - conformance-externalworkloads.yaml - conformance-gke.yaml - conformance-ingress.yaml + - tests-clustermesh-upgrade.yaml - tests-l4lb.yaml - /ci-aks: - workflows: - - conformance-aks.yaml /ci-awscni: workflows: - conformance-aws-cni.yaml /ci-clustermesh: workflows: - conformance-clustermesh.yaml + - tests-clustermesh-upgrade.yaml /ci-ipsec-upgrade: workflows: - tests-ipsec-upgrade.yaml + /ci-ipsec-e2e: + workflows: + - conformance-ipsec-e2e.yaml /ci-eks: workflows: - conformance-eks.yaml @@ -38,12 +40,12 @@ triggers: - tests-l4lb.yaml workflows: - conformance-aks.yaml: - paths-ignore-regex: (test|Documentation)/ conformance-aws-cni.yaml: paths-ignore-regex: (test|Documentation)/ conformance-clustermesh.yaml: paths-ignore-regex: (test|Documentation)/ + conformance-ipsec-e2e.yaml: + paths-ignore-regex: (test|Documentation)/ conformance-eks.yaml: paths-ignore-regex: (test|Documentation)/ conformance-externalworkloads.yaml: @@ -52,6 +54,8 @@ workflows: paths-ignore-regex: (test|Documentation)/ conformance-ingress.yaml: paths-ignore-regex: (test|Documentation)/ + tests-clustermesh-upgrade.yaml: + paths-ignore-regex: (test|Documentation)/ tests-l4lb.yaml: paths-regex: (bpf|daemon|images|pkg|test/l4lb|vendor)/ tests-ipsec-upgrade.yaml: diff --git a/.github/maintainers-little-helper.yaml b/.github/maintainers-little-helper.yaml index deb6318020482..226d33fff0278 100644 --- a/.github/maintainers-little-helper.yaml +++ b/.github/maintainers-little-helper.yaml @@ -1,4 +1,4 @@ -project: "https://github.com/cilium/cilium/projects/251" +project: "https://github.com/cilium/cilium/projects/253" column: "In progress" auto-label: - "kind/backports" diff --git a/.github/workflows/build-images-base.yaml b/.github/workflows/build-images-base.yaml index cd680d75a87a1..dd97184632592 100644 --- a/.github/workflows/build-images-base.yaml +++ b/.github/workflows/build-images-base.yaml @@ -25,13 +25,15 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Set up Docker Buildx - uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0 + uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - name: Set up QEMU id: qemu - uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 + uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 - - name: Checkout Source Code + # Warning: since this is a privileged workflow, subsequent workflow job + # steps must take care not to execute untrusted code. + - name: Checkout pull request branch (NOT TRUSTED) uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: persist-credentials: false @@ -59,7 +61,7 @@ jobs: - name: Login to quay.io if: ${{ steps.cilium-runtime-tag-in-repositories.outputs.exists == 'false' }} - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 with: registry: quay.io username: ${{ secrets.QUAY_BASE_RELEASE_USERNAME }} @@ -67,7 +69,7 @@ jobs: - name: Release build cilium-runtime if: ${{ steps.cilium-runtime-tag-in-repositories.outputs.exists == 'false' }} - uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1 + uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 id: docker_build_release_runtime with: provenance: false @@ -90,7 +92,7 @@ jobs: - name: Upload artifact digests runtime if: ${{ steps.cilium-runtime-tag-in-repositories.outputs.exists == 'false' }} - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: image-digest cilium-runtime path: image-digest @@ -119,7 +121,7 @@ jobs: - name: Login to quay.io if: ${{ steps.cilium-builder-tag-in-repositories.outputs.exists == 'false' && steps.cilium-runtime-tag-in-repositories.outputs.exists != 'false' }} - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 with: registry: quay.io username: ${{ secrets.QUAY_BASE_RELEASE_USERNAME }} @@ -127,7 +129,7 @@ jobs: - name: Release build cilium-builder if: ${{ steps.cilium-builder-tag-in-repositories.outputs.exists == 'false' }} - uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1 + uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 id: docker_build_release_builder with: provenance: false @@ -150,7 +152,7 @@ jobs: - name: Upload artifact digests builder if: ${{ steps.cilium-builder-tag-in-repositories.outputs.exists == 'false' }} - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: image-digest cilium-builder path: image-digest diff --git a/.github/workflows/build-images-beta.yaml b/.github/workflows/build-images-beta.yaml index b022c754d9694..309d83423f8a2 100644 --- a/.github/workflows/build-images-beta.yaml +++ b/.github/workflows/build-images-beta.yaml @@ -50,10 +50,10 @@ jobs: steps: - name: Set up Docker Buildx - uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0 + uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - name: Login to quay.io - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 with: registry: quay.io username: ${{ secrets.QUAY_BETA_USERNAME }} @@ -79,7 +79,7 @@ jobs: persist-credentials: false - name: Release Build ${{ matrix.name }} - uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1 + uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 id: docker_build_release with: provenance: false @@ -105,7 +105,7 @@ jobs: # Upload artifact digests - name: Upload artifact digests - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: image-digest ${{ matrix.name }} path: image-digest diff --git a/.github/workflows/build-images-ci.yaml b/.github/workflows/build-images-ci.yaml index 12bd328f20ce7..81b16832b3f74 100644 --- a/.github/workflows/build-images-ci.yaml +++ b/.github/workflows/build-images-ci.yaml @@ -51,10 +51,10 @@ jobs: steps: - name: Set up Docker Buildx - uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0 + uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - name: Login to quay.io for CI - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 with: registry: quay.io username: ${{ secrets.QUAY_USERNAME_CI }} @@ -69,7 +69,9 @@ jobs: echo tag=${{ github.sha }} >> $GITHUB_OUTPUT fi - - name: Checkout Source Code + # Warning: since this is a privileged workflow, subsequent workflow job + # steps must take care not to execute untrusted code. + - name: Checkout pull request branch (NOT TRUSTED) uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: persist-credentials: false @@ -78,7 +80,7 @@ jobs: # v1.12 branch pushes - name: CI Build ${{ matrix.name }} if: ${{ github.event_name != 'pull_request_target' }} - uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1 + uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 id: docker_build_ci_v1_12 with: provenance: false @@ -97,7 +99,7 @@ jobs: - name: CI race detection Build ${{ matrix.name }} if: ${{ github.event_name != 'pull_request_target' }} - uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1 + uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 id: docker_build_ci_v1_12_detect_race_condition with: provenance: false @@ -119,7 +121,7 @@ jobs: - name: CI Unstripped Binaries Build ${{ matrix.name }} if: ${{ github.event_name != 'pull_request_target' }} - uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1 + uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 id: docker_build_ci_v1_12_unstripped with: provenance: false @@ -152,7 +154,7 @@ jobs: # PR updates - name: CI Build ${{ matrix.name }} if: ${{ github.event_name == 'pull_request_target' }} - uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1 + uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 id: docker_build_ci_pr with: provenance: false @@ -174,7 +176,7 @@ jobs: - name: CI race detection Build ${{ matrix.name }} if: ${{ github.event_name == 'pull_request_target' }} - uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1 + uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 id: docker_build_ci_pr_detect_race_condition with: provenance: false @@ -192,7 +194,7 @@ jobs: - name: CI Unstripped Binaries Build ${{ matrix.name }} if: ${{ github.event_name == 'pull_request_target' }} - uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1 + uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 id: docker_build_ci_pr_unstripped with: provenance: false @@ -217,7 +219,7 @@ jobs: # Upload artifact digests - name: Upload artifact digests - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: image-digest ${{ matrix.name }} path: image-digest @@ -239,13 +241,13 @@ jobs: steps: - name: Set up QEMU - uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 + uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0 + uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - name: Login to quay.io for CI - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 with: registry: quay.io username: ${{ secrets.QUAY_USERNAME_CI }} @@ -259,7 +261,7 @@ jobs: # v1.12 branch pushes - name: CI Build ${{ matrix.name }} - uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1 + uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 id: docker_build_ci_v1_12 with: provenance: false @@ -280,7 +282,7 @@ jobs: # Upload artifact digests - name: Upload artifact digests - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: image-digest ${{ matrix.name }} path: image-digest diff --git a/.github/workflows/build-images-hotfixes.yaml b/.github/workflows/build-images-hotfixes.yaml index 6dd35acf864a2..04824e5c0ecdf 100644 --- a/.github/workflows/build-images-hotfixes.yaml +++ b/.github/workflows/build-images-hotfixes.yaml @@ -44,10 +44,10 @@ jobs: steps: - name: Set up Docker Buildx - uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0 + uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - name: Login to quay.io - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 with: registry: quay.io username: ${{ secrets.QUAY_DEVELOPER_USERNAME }} @@ -73,7 +73,7 @@ jobs: persist-credentials: false - name: Release Build ${{ matrix.name }} - uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1 + uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 id: docker_build_release with: provenance: false @@ -99,7 +99,7 @@ jobs: # Upload artifact digests - name: Upload artifact digests - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: image-digest ${{ matrix.name }} path: image-digest diff --git a/.github/workflows/build-images-releases.yaml b/.github/workflows/build-images-releases.yaml index 7bcef391a8863..159821c911666 100644 --- a/.github/workflows/build-images-releases.yaml +++ b/.github/workflows/build-images-releases.yaml @@ -45,16 +45,16 @@ jobs: steps: - name: Set up Docker Buildx - uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0 + uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - name: Login to DockerHub - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 with: username: ${{ secrets.DOCKER_HUB_RELEASE_USERNAME }} password: ${{ secrets.DOCKER_HUB_RELEASE_PASSWORD }} - name: Login to quay.io - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 with: registry: quay.io username: ${{ secrets.QUAY_USERNAME_RELEASE_USERNAME }} @@ -71,7 +71,7 @@ jobs: persist-credentials: false - name: Release Build ${{ matrix.name }} - uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1 + uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 id: docker_build_release with: provenance: false @@ -103,7 +103,7 @@ jobs: # Upload artifact digests - name: Upload artifact digests - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: image-digest ${{ matrix.name }} path: image-digest @@ -148,7 +148,7 @@ jobs: # Upload artifact digests - name: Upload artifact digests - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: image-digest-output.txt-${{ steps.tag.outputs.tag }} path: image-digest-output.txt @@ -156,7 +156,7 @@ jobs: # Upload artifact digests - name: Upload artifact digests - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: Makefile.digests-${{ steps.tag.outputs.tag }} path: Makefile.digests diff --git a/.github/workflows/call-backport-label-updater.yaml b/.github/workflows/call-backport-label-updater.yaml new file mode 100644 index 0000000000000..c6b1b7d75f81e --- /dev/null +++ b/.github/workflows/call-backport-label-updater.yaml @@ -0,0 +1,19 @@ +--- + name: Call Backport Label Updater + on: + pull_request: + types: + - closed + branches: + - v1.12 + jobs: + call-backport-label-updater: + if: | + github.event.pull_request.merged == true && + contains(github.event.pull_request.body, 'upstream-prs') && + contains(github.event.pull_request.labels.*.name, 'backport/1.12') + uses: cilium/cilium/.github/workflows/update-label-backport-pr.yaml@main + with: + pr-body: ${{ github.event.pull_request.body }} + branch: 1.12 + secrets: inherit diff --git a/.github/workflows/conformance-aks.yaml b/.github/workflows/conformance-aks.yaml deleted file mode 100644 index 5641dc49329e5..0000000000000 --- a/.github/workflows/conformance-aks.yaml +++ /dev/null @@ -1,343 +0,0 @@ -name: Conformance AKS (ci-aks) - -# Any change in triggers needs to be reflected in the concurrency group. -on: - workflow_dispatch: - inputs: - PR-number: - description: "Pull request number." - required: true - context-ref: - description: "Context in which the workflow runs. If PR is from a fork, will be the PR target branch (general case). If PR is NOT from a fork, will be the PR branch itself (this allows committers to test changes to workflows directly from PRs)." - required: true - SHA: - description: "SHA under test (head of the PR branch)." - required: true - extra-args: - description: "[JSON object] Arbitrary arguments passed from the trigger comment via regex capture group. Parse with 'fromJson(inputs.extra-args).argName' in workflow." - required: false - default: '{}' - # Run once a day - schedule: - - cron: '0 12 * * *' - -# By specifying the access of one of the scopes, all of those that are not -# specified are set to 'none'. -permissions: - # To be able to access the repository with actions/checkout - contents: read - # To allow retrieving information from the PR API - pull-requests: read - # To be able to set commit status - statuses: write - # Required to generate OIDC tokens for `az` authentication - id-token: write - -concurrency: - # Structure: - # - Workflow name - # - Event type - # - A unique identifier depending on event type: - # - schedule: SHA - # - workflow_dispatch: PR number - # - # This structure ensures a unique concurrency group name is generated for each - # type of testing, such that re-runs will cancel the previous run. - group: | - ${{ github.workflow }} - ${{ github.event_name }} - ${{ - (github.event_name == 'schedule' && github.sha) || - (github.event_name == 'workflow_dispatch' && github.event.inputs.PR-number) - }} - cancel-in-progress: true - -env: - name: ${{ github.repository_owner }}-${{ github.event.repository.name }}-${{ github.run_id }}-${{ github.run_attempt }} - cost_reduction: --node-vm-size Standard_B2s --node-osdisk-size 30 - # renovate: datasource=github-releases depName=cilium/cilium-cli - cilium_cli_version: v0.14.8 - cilium_cli_ci_version: - check_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} - -jobs: - commit-status-start: - name: Commit Status Start - runs-on: ubuntu-latest - steps: - - name: Set initial commit status - uses: myrotvorets/set-commit-status-action@243b4f7e597f62335408d58001edf8a02cf3e1fd # v1.1.7 - with: - sha: ${{ inputs.SHA || github.sha }} - - generate-matrix: - name: Generate Matrix - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} - steps: - - name: Checkout context ref - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - with: - ref: ${{ inputs.context-ref || github.sha }} - persist-credentials: false - - - name: Convert YAML to JSON - run: | - work_dir=".github/actions/azure" - destination_directory="/tmp/generated/azure" - mkdir -p "${destination_directory}" - - yq -o=json "${work_dir}/k8s-versions.yaml" | jq . > "${destination_directory}/azure.json" - - - name: Generate Matrix - id: set-matrix - run: | - cd /tmp/generated/azure - - if [ "${{ github.event_name }}" == "schedule" ];then - cp azure.json /tmp/matrix.json - else - jq '{ "include": [ .include[] | select(.default) ] }' azure.json > /tmp/matrix.json - fi - - echo "Generated matrix:" - cat /tmp/matrix.json - echo "matrix=$(jq -c . < /tmp/matrix.json)" >> $GITHUB_OUTPUT - - installation-and-connectivity: - name: Installation and Connectivity Test - needs: generate-matrix - runs-on: ubuntu-latest - timeout-minutes: 60 - env: - job_name: "Installation and Connectivity Test" - strategy: - fail-fast: false - matrix: ${{fromJson(needs.generate-matrix.outputs.matrix)}} - - steps: - - name: Checkout context ref - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - with: - ref: ${{ inputs.context-ref || github.sha }} - persist-credentials: false - - - name: Set Environment Variables - uses: ./.github/actions/set-env-variables - - - name: Override cluster name - run: | - # Extend default name with matrix index to avoid cluster name conflicts - NAME=${{ env.name }}-${{ matrix.index }} - echo "name=${NAME}" >> "$GITHUB_ENV" - - - name: Set up job variables - id: vars - run: | - if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - SHA="${{ inputs.SHA }}" - OWNER="${{ inputs.PR-number }}" - else - SHA="${{ github.sha }}" - OWNER="${{ github.ref_name }}" - OWNER="${OWNER/./-}" - fi - - CILIUM_INSTALL_DEFAULTS="--cluster-name=${{ env.name }} \ - --chart-directory=install/kubernetes/cilium \ - --helm-set=image.repository=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/cilium-ci \ - --helm-set=image.useDigest=false \ - --helm-set=image.tag=${SHA} \ - --helm-set=operator.image.repository=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/operator \ - --helm-set=operator.image.suffix=-ci \ - --helm-set=operator.image.tag=${SHA} \ - --helm-set=operator.image.useDigest=false \ - --helm-set=clustermesh.apiserver.image.repository=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/clustermesh-apiserver-ci \ - --helm-set=clustermesh.apiserver.image.tag=${SHA} \ - --helm-set=clustermesh.apiserver.image.useDigest=false \ - --helm-set=hubble.relay.image.repository=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/hubble-relay-ci \ - --helm-set=hubble.relay.image.tag=${SHA} \ - --helm-set=debug.enabled=true \ - --azure-resource-group ${{ env.name }} \ - --wait=false \ - --rollback=false \ - --config monitor-aggregation=none \ - --version=" - HUBBLE_ENABLE_DEFAULTS="--chart-directory=install/kubernetes/cilium \ - --relay-image=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/hubble-relay-ci:${SHA} \ - --relay-version=${SHA}" - CONNECTIVITY_TEST_DEFAULTS="--flow-validation=disabled \ - --hubble=false --collect-sysdump-on-failure --external-target bing.com --external-cidr 8.0.0.0/8 --external-ip 8.8.4.4 --external-other-ip 8.8.8.8" - echo cilium_install_defaults=${CILIUM_INSTALL_DEFAULTS} >> $GITHUB_OUTPUT - echo hubble_enable_defaults=${HUBBLE_ENABLE_DEFAULTS} >> $GITHUB_OUTPUT - echo connectivity_test_defaults=${CONNECTIVITY_TEST_DEFAULTS} >> $GITHUB_OUTPUT - echo sha=${SHA} >> $GITHUB_OUTPUT - echo owner=${OWNER} >> $GITHUB_OUTPUT - - - name: Install Cilium CLI - uses: cilium/cilium-cli@5362f383942260c0aed4f3876e09c3452435577a # v0.14.8 - with: - release-version: ${{ env.cilium_cli_version }} - ci-version: ${{ env.cilium_cli_ci_version }} - - - name: Login to Azure - uses: azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7 - with: - creds: ${{ secrets.AZURE_PR_SP_CREDS }} - - - name: Install aks-preview CLI extension - run: | - az extension add --name aks-preview - az extension update --name aks-preview - az version - - - name: Create AKS cluster - run: | - # Create group - az group create \ - --name ${{ env.name }} \ - --location ${{ matrix.location }} \ - --tags usage=${{ github.repository_owner }}-${{ github.event.repository.name }} owner=${{ steps.vars.outputs.owner }} - - # Create AKS cluster - az aks create \ - --resource-group ${{ env.name }} \ - --name ${{ env.name }} \ - --location ${{ matrix.location }} \ - --kubernetes-version ${{ matrix.version }} \ - --network-plugin none \ - --node-count 2 \ - ${{ env.cost_reduction }} \ - --generate-ssh-keys - - - name: Get cluster credentials - run: | - az aks get-credentials \ - --resource-group ${{ env.name }} \ - --name ${{ env.name }} - - - name: Wait for images to be available - timeout-minutes: 30 - shell: bash - run: | - for image in cilium-ci operator-azure-ci hubble-relay-ci ; do - until docker manifest inspect quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/$image:${{ steps.vars.outputs.sha }} &> /dev/null; do sleep 45s; done - done - - # Checkout source code to install Cilium using local Helm chart. - - name: Checkout code - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - with: - ref: ${{ steps.vars.outputs.sha }} - persist-credentials: false - - - name: Install Cilium - run: | - cilium install ${{ steps.vars.outputs.cilium_install_defaults }} - - - name: Enable Relay - run: | - cilium hubble enable ${{ steps.vars.outputs.hubble_enable_defaults }} - - - name: Wait for Cilium status to be ready - run: | - cilium status --wait - - - name: Port forward Relay - run: | - cilium hubble port-forward& - sleep 10s - [[ $(pgrep -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay" | wc -l) == 2 ]] - - - name: Make JUnit report directory - run: | - mkdir -p cilium-junits - - - name: Run connectivity test (${{ join(matrix.*, ', ') }}) - run: | - cilium connectivity test ${{ steps.vars.outputs.connectivity_test_defaults }} \ - --junit-file "cilium-junits/${{ env.job_name }} (${{ join(matrix.*, ', ') }}) - 1.xml" \ - --junit-property github_job_step="Run connectivity test (${{ join(matrix.*, ', ') }})" - - - name: Clean up Cilium - run: | - pkill -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay" || test $? -eq 1 - cilium uninstall --chart-directory=install/kubernetes/cilium --wait - - - name: Create custom IPsec secret - run: | - kubectl create -n kube-system secret generic cilium-ipsec-keys --from-literal=keys="15 rfc4106(gcm(aes)) $(echo $(dd if=/dev/urandom count=20 bs=1 2> /dev/null | xxd -p -c 64)) 128" - - - name: Install Cilium with encryption - run: | - cilium install ${{ steps.vars.outputs.cilium_install_defaults }} \ - --encryption=ipsec - - - name: Enable Relay - run: | - cilium hubble enable ${{ steps.vars.outputs.hubble_enable_defaults }} - - - name: Wait for Cilium status to be ready - run: | - cilium status --wait - - - name: Port forward Relay - run: | - cilium hubble port-forward& - sleep 10s - [[ $(pgrep -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay" | wc -l) == 2 ]] - - - name: Run connectivity test with IPSec (${{ join(matrix.*, ', ') }}) - run: | - cilium connectivity test ${{ steps.vars.outputs.connectivity_test_defaults }} --force-deploy \ - --junit-file "cilium-junits/${{ env.job_name }} (${{ join(matrix.*, ', ') }}) - 2.xml" \ - --junit-property github_job_step="Run connectivity test with IPSec (${{ join(matrix.*, ', ') }})" - - - name: Post-test information gathering - if: ${{ !success() }} - run: | - kubectl get pods --all-namespaces -o wide - cilium status - cilium sysdump --output-filename cilium-sysdump-final-${{ join(matrix.*, '-') }} - shell: bash {0} # Disable default fail-fast behaviour so that all commands run independently - - - name: Clean up AKS - if: ${{ always() }} - run: | - az group delete --name ${{ env.name }} --yes --no-wait - shell: bash {0} # Disable default fail-fast behaviour so that all commands run independently - - - name: Upload artifacts - if: ${{ !success() }} - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 - with: - name: cilium-sysdumps - path: cilium-sysdump-*.zip - retention-days: 5 - - - name: Upload JUnits [junit] - if: ${{ always() }} - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 - with: - name: cilium-junits - path: cilium-junits/*.xml - retention-days: 2 - - - name: Publish Test Results As GitHub Summary - if: ${{ always() }} - uses: aanm/junit2md@332ebf0fddd34e91b03a832cfafaa826306558f9 # v0.0.3 - with: - junit-directory: "cilium-junits" - - commit-status-final: - if: ${{ always() }} - name: Commit Status Final - needs: installation-and-connectivity - runs-on: ubuntu-latest - steps: - - name: Set final commit status - uses: myrotvorets/set-commit-status-action@243b4f7e597f62335408d58001edf8a02cf3e1fd # v1.1.7 - with: - sha: ${{ inputs.SHA || github.sha }} - status: ${{ needs.installation-and-connectivity.result }} diff --git a/.github/workflows/conformance-aws-cni.yaml b/.github/workflows/conformance-aws-cni.yaml index b20428eda1708..15986ca28ed79 100644 --- a/.github/workflows/conformance-aws-cni.yaml +++ b/.github/workflows/conformance-aws-cni.yaml @@ -65,7 +65,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set initial commit status - uses: myrotvorets/set-commit-status-action@243b4f7e597f62335408d58001edf8a02cf3e1fd # v1.1.7 + uses: myrotvorets/set-commit-status-action@38f3f27c7d52fb381273e95542f07f0fba301307 # v2.0.0 with: sha: ${{ inputs.SHA || github.sha }} @@ -75,7 +75,7 @@ jobs: outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - - name: Checkout context ref + - name: Checkout context ref (trusted) uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: ref: ${{ inputs.context-ref || github.sha }} @@ -116,7 +116,7 @@ jobs: matrix: ${{fromJson(needs.generate-matrix.outputs.matrix)}} steps: - - name: Checkout context ref + - name: Checkout context ref (trusted) uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: ref: ${{ inputs.context-ref || github.sha }} @@ -197,7 +197,7 @@ jobs: rm eksctl_$(uname -s)_amd64.tar.gz - name: Set up AWS CLI credentials - uses: aws-actions/configure-aws-credentials@04b98b3f9e85f563fb061be8751a0352327246b0 # v3.0.1 + uses: aws-actions/configure-aws-credentials@8c3f20df09ac63af7b3ae3d7c91f105f857d8497 # v4.0.0 with: aws-access-key-id: ${{ secrets.AWS_PR_SA_ID }} aws-secret-access-key: ${{ secrets.AWS_PR_SA_KEY }} @@ -211,10 +211,6 @@ jobs: owner: "${{ steps.vars.outputs.owner }}" version: ${{ matrix.version }} - - name: Update AWS VPC CNI plugin - run: | - kubectl apply -f https://raw.githubusercontent.com/aws/amazon-vpc-cni-k8s/release-1.11/config/master/aws-k8s-cni.yaml - - name: Wait for images to be available timeout-minutes: 30 shell: bash @@ -223,8 +219,9 @@ jobs: until docker manifest inspect quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/$image:${{ steps.vars.outputs.sha }} &> /dev/null; do sleep 45s; done done - # Checkout source code to install Cilium using local Helm chart. - - name: Checkout code + # Warning: since this is a privileged workflow, subsequent workflow job + # steps must take care not to execute untrusted code. + - name: Checkout pull request branch (NOT TRUSTED) uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: ref: ${{ steps.vars.outputs.sha }} @@ -274,7 +271,7 @@ jobs: - name: Upload artifacts if: ${{ !success() }} - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: cilium-sysdumps path: cilium-sysdump-*.zip @@ -282,7 +279,7 @@ jobs: - name: Upload JUnits [junit] if: ${{ always() }} - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: cilium-junits path: cilium-junits/*.xml @@ -301,7 +298,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set final commit status - uses: myrotvorets/set-commit-status-action@243b4f7e597f62335408d58001edf8a02cf3e1fd # v1.1.7 + uses: myrotvorets/set-commit-status-action@38f3f27c7d52fb381273e95542f07f0fba301307 # v2.0.0 with: sha: ${{ inputs.SHA || github.sha }} status: ${{ needs.installation-and-connectivity.result }} diff --git a/.github/workflows/conformance-clustermesh.yaml b/.github/workflows/conformance-clustermesh.yaml index e6fa9c80bc109..8ca9e396da9d3 100644 --- a/.github/workflows/conformance-clustermesh.yaml +++ b/.github/workflows/conformance-clustermesh.yaml @@ -69,7 +69,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set initial commit status - uses: myrotvorets/set-commit-status-action@243b4f7e597f62335408d58001edf8a02cf3e1fd # v1.1.7 + uses: myrotvorets/set-commit-status-action@38f3f27c7d52fb381273e95542f07f0fba301307 # v2.0.0 with: sha: ${{ inputs.SHA || github.sha }} @@ -151,301 +151,297 @@ jobs: kube-proxy: 'iptables' steps: - - name: Checkout context ref - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - with: - ref: ${{ inputs.context-ref || github.sha }} - persist-credentials: false - - - name: Set Environment Variables - uses: ./.github/actions/set-env-variables - - - name: Set up job variables for GHA environment - id: vars - run: | - if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - SHA="${{ inputs.SHA }}" - else - SHA="${{ github.sha }}" - fi - - # bpf.masquerade is disabled due to #23283 - CILIUM_INSTALL_DEFAULTS="--chart-directory=install/kubernetes/cilium \ - --helm-set=debug.enabled=true \ - --helm-set=image.repository=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/cilium-ci \ - --helm-set=image.useDigest=false \ - --helm-set=image.tag=${SHA} \ - --helm-set=operator.image.repository=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/operator \ - --helm-set=operator.image.suffix=-ci \ - --helm-set=operator.image.tag=${SHA} \ - --helm-set=operator.image.useDigest=false \ - --helm-set=bpf.masquerade=false \ - --config monitor-aggregation=none \ - --rollback=false \ - --version=" - - CILIUM_INSTALL_TUNNEL="--helm-set=tunnel=vxlan" - if [ "${{ matrix.tunnel }}" == "disabled" ]; then - CILIUM_INSTALL_TUNNEL="--helm-set-string=tunnel=disabled \ - --helm-set=autoDirectNodeRoutes=true \ - --helm-set=ipv4NativeRoutingCIDR=10.240.0.0/12 \ - --helm-set=ipv6NativeRoutingCIDR=fd00:10:240::/44" - fi - - case "${{ matrix.ipFamily }}" in - ipv4) - CILIUM_INSTALL_IPFAMILY="--helm-set=ipv4.enabled=true --helm-set=ipv6.enabled=false" - KIND_POD_CIDR_1="10.242.0.0/16" - KIND_SVC_CIDR_1="10.243.0.0/16" - KIND_POD_CIDR_2="10.244.0.0/16" - KIND_SVC_CIDR_2="10.245.0.0/16" - ;; - ipv6) - CILIUM_INSTALL_IPFAMILY="--helm-set=ipv4.enabled=false --helm-set=ipv6.enabled=true" - KIND_POD_CIDR_1="fd00:10:242::/48" - KIND_SVC_CIDR_1="fd00:10:243::/112" - KIND_POD_CIDR_2="fd00:10:244::/48" - KIND_SVC_CIDR_2="fd00:10:245::/112" - ;; - dual) - CILIUM_INSTALL_IPFAMILY="--helm-set=ipv4.enabled=true --helm-set=ipv6.enabled=true" - KIND_POD_CIDR_1="10.242.0.0/16,fd00:10:242::/48" - KIND_SVC_CIDR_1="10.243.0.0/16,fd00:10:243::/112" - KIND_POD_CIDR_2="10.244.0.0/16,fd00:10:244::/48" - KIND_SVC_CIDR_2="10.245.0.0/16,fd00:10:245::/112" - ;; - *) - echo "Unknown IP family '${{ matrix.ipFamily }}'" && false - ;; - esac - - CILIUM_INSTALL_L7_PROXY="--helm-set=l7Proxy=true" - if [ "${{ matrix.encryption }}" == "wireguard" ]; then - # Wireguard (--enable-wireguard) is not compatible with L7 proxy (--enable-l7-proxy) - CILIUM_INSTALL_L7_PROXY="--helm-set=l7Proxy=false" - fi - - HUBBLE_ENABLE_DEFAULTS="--chart-directory=install/kubernetes/cilium \ - --helm-set=hubble.relay.image.override=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/hubble-relay-ci:${SHA} \ - --helm-set=hubble.relay.image.useDigest=false" - CLUSTERMESH_ENABLE_DEFAULTS="--apiserver-image=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/clustermesh-apiserver-ci \ - --apiserver-version=${SHA} --service-type=NodePort" - - CONNECTIVITY_TEST_DEFAULTS="--hubble=false \ - --flow-validation=disabled \ - --multi-cluster=${{ env.contextName2 }} \ - --external-target=google.com \ - --collect-sysdump-on-failure" - - # Skip external traffic (e.g. 1.1.1.1 and www.google.com) tests as IPv6 is not supported - # in GitHub runners: https://github.com/actions/runner-images/issues/668 - if [[ "${{ matrix.ipFamily }}" == "ipv6" ]]; then - CONNECTIVITY_TEST_DEFAULTS="$CONNECTIVITY_TEST_DEFAULTS \ - --test='!/pod-to-world' \ - --test='!/pod-to-cidr'" - fi - - echo cilium_install_defaults="${CILIUM_INSTALL_DEFAULTS} ${CILIUM_INSTALL_TUNNEL} ${CILIUM_INSTALL_IPFAMILY} ${CILIUM_INSTALL_L7_PROXY}" >> $GITHUB_OUTPUT - echo hubble_enable_defaults=${HUBBLE_ENABLE_DEFAULTS} >> $GITHUB_OUTPUT - echo connectivity_test_defaults=${CONNECTIVITY_TEST_DEFAULTS} >> $GITHUB_OUTPUT - echo clustermesh_enable_defaults=${CLUSTERMESH_ENABLE_DEFAULTS} >> $GITHUB_OUTPUT - echo sha=${SHA} >> $GITHUB_OUTPUT - - echo kind_pod_cidr_1=${KIND_POD_CIDR_1} >> $GITHUB_OUTPUT - echo kind_svc_cidr_1=${KIND_SVC_CIDR_1} >> $GITHUB_OUTPUT - echo kind_pod_cidr_2=${KIND_POD_CIDR_2} >> $GITHUB_OUTPUT - echo kind_svc_cidr_2=${KIND_SVC_CIDR_2} >> $GITHUB_OUTPUT - - - name: Install Cilium CLI - uses: cilium/cilium-cli@5362f383942260c0aed4f3876e09c3452435577a # v0.14.8 - with: - release-version: ${{ env.cilium_cli_version }} - ci-version: ${{ env.cilium_cli_ci_version }} - - - name: Generate Kind configuration files - run: | - K8S_VERSION=${{ env.k8s_version }} \ - PODCIDR=${{ steps.vars.outputs.kind_pod_cidr_1 }} \ - SVCCIDR=${{ steps.vars.outputs.kind_svc_cidr_1 }} \ - IPFAMILY=${{ matrix.ipFamily }} \ - KUBEPROXYMODE=${{ matrix.kube-proxy }} \ - envsubst < ./.github/kind-config.yaml.tmpl > ./.github/kind-config-cluster1.yaml - - K8S_VERSION=${{ env.k8s_version }} \ - PODCIDR=${{ steps.vars.outputs.kind_pod_cidr_2 }} \ - SVCCIDR=${{ steps.vars.outputs.kind_svc_cidr_2 }} \ - IPFAMILY=${{ matrix.ipFamily }} \ - KUBEPROXYMODE=${{ matrix.kube-proxy }} \ - envsubst < ./.github/kind-config.yaml.tmpl > ./.github/kind-config-cluster2.yaml - - - name: Create Kind cluster 1 - uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0 - with: - cluster_name: ${{ env.clusterName1 }} - version: ${{ env.kind_version }} - kubectl_version: ${{ env.k8s_version }} - config: ./.github/kind-config-cluster1.yaml - wait: 0 # The control-plane never becomes ready, since no CNI is present - - - name: Create Kind cluster 2 - uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0 - with: - cluster_name: ${{ env.clusterName2 }} - version: ${{ env.kind_version }} - kubectl_version: ${{ env.k8s_version }} - config: ./.github/kind-config-cluster2.yaml - wait: 0 # The control-plane never becomes ready, since no CNI is present - - # Make sure that coredns uses IPv4-only upstream DNS servers also in case of clusters - # with IP family dual, since IPv6 ones are not reachable and cause spurious failures. - - name: Configure the coredns nameservers - if: matrix.ipfamily == 'dual' - run: | - COREDNS_PATCH=" - spec: - template: - spec: - dnsPolicy: None - dnsConfig: - nameservers: - - 8.8.4.4 - - 8.8.8.8 - " - - kubectl --context ${{ env.contextName1 }} patch deployment -n kube-system coredns --patch="$COREDNS_PATCH" - kubectl --context ${{ env.contextName2 }} patch deployment -n kube-system coredns --patch="$COREDNS_PATCH" - - - name: Wait for images to be available - timeout-minutes: 30 - shell: bash - run: | - for image in cilium-ci operator-generic-ci hubble-relay-ci clustermesh-apiserver-ci ; do - until docker manifest inspect quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/$image:${{ steps.vars.outputs.sha }} &> /dev/null; do sleep 45s; done - done - - # We need to checkout the SHA to retrieve the Helm chart - # Warning: since this is a privileged workflow, we should be careful NOT to - # use anything coming from an external contributor in a privileged - # environment. Here it's fine because we pass the Helm chart to be installed - # in a Kubernetes cluster, so it won't have access to the privileged - # environment from there. - - name: Checkout SHA - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 - with: - ref: ${{ steps.vars.outputs.sha }} - persist-credentials: false - - - name: Install Cilium in cluster1 - run: | - # Using the deprecated flag --cluster-name due to cilium/cilium-cli#1347 - # --helm-set cluster.name ${{ env.clusterName1 }} - cilium --context ${{ env.contextName1 }} install \ - ${{ steps.vars.outputs.cilium_install_defaults }} \ - --encryption ${{ matrix.encryption }} \ - --cluster-name ${{ env.clusterName1 }} \ - --helm-set cluster.id=1 - - - name: Copy the IPsec secret to cluster2, as they must match - if: matrix.encryption == 'ipsec' - run: | - kubectl --context ${{ env.contextName1 }} get secret -n kube-system cilium-ipsec-keys -o yaml | - kubectl --context ${{ env.contextName2 }} create -f - - - - name: Install Cilium in cluster2 - run: | - # Using the deprecated form --cluster-name due to cilium/cilium-cli#1347 - # --helm-set cluster.name ${{ env.clusterName2 }} - cilium --context ${{ env.contextName2 }} install \ - ${{ steps.vars.outputs.cilium_install_defaults }} \ - --encryption ${{ matrix.encryption }} \ - --cluster-name ${{ env.clusterName2 }} \ - --helm-set cluster.id=255 \ - --inherit-ca ${{ env.contextName1 }} - - - name: Enable Hubble - run: | - cilium --context ${{ env.contextName1 }} hubble enable ${{ steps.vars.outputs.hubble_enable_defaults }} --wait=false - cilium --context ${{ env.contextName2 }} hubble enable ${{ steps.vars.outputs.hubble_enable_defaults }} --wait=false --relay=false - cilium --context ${{ env.contextName1 }} status --wait - cilium --context ${{ env.contextName2 }} status --wait - - - name: Enable Cluster Mesh - run: | - cilium --context ${{ env.contextName1 }} clustermesh enable ${{ steps.vars.outputs.clustermesh_enable_defaults }} - cilium --context ${{ env.contextName2 }} clustermesh enable ${{ steps.vars.outputs.clustermesh_enable_defaults }} - - - name: Wait for cluster mesh status to be ready - run: | - cilium --context ${{ env.contextName1 }} status --wait - cilium --context ${{ env.contextName2 }} status --wait - cilium --context ${{ env.contextName1 }} clustermesh status --wait - cilium --context ${{ env.contextName2 }} clustermesh status --wait - - - name: Connect clusters - run: | - cilium --context ${{ env.contextName1 }} clustermesh connect --destination-context ${{ env.contextName2 }} - - - name: Wait for cluster mesh status to be ready - run: | - cilium --context ${{ env.contextName1 }} status --wait - cilium --context ${{ env.contextName2 }} status --wait - cilium --context ${{ env.contextName1 }} clustermesh status --wait - cilium --context ${{ env.contextName2 }} clustermesh status --wait - - - name: Port forward Relay - run: | - cilium --context ${{ env.contextName1 }} hubble port-forward & - sleep 10s - [[ $(pgrep -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay" | wc -l) == 2 ]] - - - name: Make JUnit report directory - run: | - mkdir -p cilium-junits - - - name: Run connectivity test (${{ join(matrix.*, ', ') }}) - run: | - cilium --context ${{ env.contextName1 }} connectivity test ${{ steps.vars.outputs.connectivity_test_defaults }} \ - --junit-file "cilium-junits/${{ env.job_name }} (${{ join(matrix.*, ', ') }}).xml" \ - --junit-property github_job_step="Run connectivity test (${{ join(matrix.*, ', ') }})" - - - name: Post-test information gathering - if: ${{ !success() }} - run: | - cilium --context ${{ env.contextName1 }} status - cilium --context ${{ env.contextName1 }} clustermesh status - cilium --context ${{ env.contextName2 }} status - cilium --context ${{ env.contextName2 }} clustermesh status - - kubectl config use-context ${{ env.contextName1 }} - kubectl get pods --all-namespaces -o wide - cilium sysdump --output-filename cilium-sysdump-context1-final-${{ join(matrix.*, '-') }} - - kubectl config use-context ${{ env.contextName2 }} - kubectl get pods --all-namespaces -o wide - cilium sysdump --output-filename cilium-sysdump-context2-final-${{ join(matrix.*, '-') }} - shell: bash {0} # Disable default fail-fast behaviour so that all commands run independently - - - name: Upload artifacts - if: ${{ !success() }} - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 - with: - name: cilium-sysdumps - path: cilium-sysdump-*.zip - retention-days: 5 - - - name: Upload JUnits [junit] - if: ${{ always() }} - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 - with: - name: cilium-junits - path: cilium-junits/*.xml - retention-days: 2 - - - name: Publish Test Results As GitHub Summary - if: ${{ always() }} - uses: aanm/junit2md@332ebf0fddd34e91b03a832cfafaa826306558f9 # v0.0.3 - with: - junit-directory: "cilium-junits" + - name: Checkout context ref (trusted) + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + with: + ref: ${{ inputs.context-ref || github.sha }} + persist-credentials: false + + - name: Set Environment Variables + uses: ./.github/actions/set-env-variables + + - name: Set up job variables for GHA environment + id: vars + run: | + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + SHA="${{ inputs.SHA }}" + else + SHA="${{ github.sha }}" + fi + + # bpf.masquerade is disabled due to #23283 + CILIUM_INSTALL_DEFAULTS="--chart-directory=install/kubernetes/cilium \ + --helm-set=debug.enabled=true \ + --helm-set=image.repository=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/cilium-ci \ + --helm-set=image.useDigest=false \ + --helm-set=image.tag=${SHA} \ + --helm-set=operator.image.repository=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/operator \ + --helm-set=operator.image.suffix=-ci \ + --helm-set=operator.image.tag=${SHA} \ + --helm-set=operator.image.useDigest=false \ + --helm-set=bpf.masquerade=false \ + --config monitor-aggregation=none \ + --rollback=false \ + --version=" + + CILIUM_INSTALL_TUNNEL="--helm-set=tunnel=vxlan" + if [ "${{ matrix.tunnel }}" == "disabled" ]; then + CILIUM_INSTALL_TUNNEL="--helm-set-string=tunnel=disabled \ + --helm-set=autoDirectNodeRoutes=true \ + --helm-set=ipv4NativeRoutingCIDR=10.240.0.0/12 \ + --helm-set=ipv6NativeRoutingCIDR=fd00:10:240::/44" + fi + + case "${{ matrix.ipFamily }}" in + ipv4) + CILIUM_INSTALL_IPFAMILY="--helm-set=ipv4.enabled=true --helm-set=ipv6.enabled=false" + KIND_POD_CIDR_1="10.242.0.0/16" + KIND_SVC_CIDR_1="10.243.0.0/16" + KIND_POD_CIDR_2="10.244.0.0/16" + KIND_SVC_CIDR_2="10.245.0.0/16" + ;; + ipv6) + CILIUM_INSTALL_IPFAMILY="--helm-set=ipv4.enabled=false --helm-set=ipv6.enabled=true" + KIND_POD_CIDR_1="fd00:10:242::/48" + KIND_SVC_CIDR_1="fd00:10:243::/112" + KIND_POD_CIDR_2="fd00:10:244::/48" + KIND_SVC_CIDR_2="fd00:10:245::/112" + ;; + dual) + CILIUM_INSTALL_IPFAMILY="--helm-set=ipv4.enabled=true --helm-set=ipv6.enabled=true" + KIND_POD_CIDR_1="10.242.0.0/16,fd00:10:242::/48" + KIND_SVC_CIDR_1="10.243.0.0/16,fd00:10:243::/112" + KIND_POD_CIDR_2="10.244.0.0/16,fd00:10:244::/48" + KIND_SVC_CIDR_2="10.245.0.0/16,fd00:10:245::/112" + ;; + *) + echo "Unknown IP family '${{ matrix.ipFamily }}'" && false + ;; + esac + + CILIUM_INSTALL_L7_PROXY="--helm-set=l7Proxy=true" + if [ "${{ matrix.encryption }}" == "wireguard" ]; then + # Wireguard (--enable-wireguard) is not compatible with L7 proxy (--enable-l7-proxy) + CILIUM_INSTALL_L7_PROXY="--helm-set=l7Proxy=false" + fi + + HUBBLE_ENABLE_DEFAULTS="--chart-directory=install/kubernetes/cilium \ + --helm-set=hubble.relay.image.override=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/hubble-relay-ci:${SHA} \ + --helm-set=hubble.relay.image.useDigest=false" + CLUSTERMESH_ENABLE_DEFAULTS="--apiserver-image=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/clustermesh-apiserver-ci \ + --apiserver-version=${SHA} --service-type=NodePort" + + CONNECTIVITY_TEST_DEFAULTS="--hubble=false \ + --flow-validation=disabled \ + --multi-cluster=${{ env.contextName2 }} \ + --external-target=google.com \ + --collect-sysdump-on-failure" + + # Skip external traffic (e.g. 1.1.1.1 and www.google.com) tests as IPv6 is not supported + # in GitHub runners: https://github.com/actions/runner-images/issues/668 + if [[ "${{ matrix.ipFamily }}" == "ipv6" ]]; then + CONNECTIVITY_TEST_DEFAULTS="$CONNECTIVITY_TEST_DEFAULTS \ + --test='!/pod-to-world' \ + --test='!/pod-to-cidr'" + fi + + echo cilium_install_defaults="${CILIUM_INSTALL_DEFAULTS} ${CILIUM_INSTALL_TUNNEL} ${CILIUM_INSTALL_IPFAMILY} ${CILIUM_INSTALL_L7_PROXY}" >> $GITHUB_OUTPUT + echo hubble_enable_defaults=${HUBBLE_ENABLE_DEFAULTS} >> $GITHUB_OUTPUT + echo connectivity_test_defaults=${CONNECTIVITY_TEST_DEFAULTS} >> $GITHUB_OUTPUT + echo clustermesh_enable_defaults=${CLUSTERMESH_ENABLE_DEFAULTS} >> $GITHUB_OUTPUT + echo sha=${SHA} >> $GITHUB_OUTPUT + + echo kind_pod_cidr_1=${KIND_POD_CIDR_1} >> $GITHUB_OUTPUT + echo kind_svc_cidr_1=${KIND_SVC_CIDR_1} >> $GITHUB_OUTPUT + echo kind_pod_cidr_2=${KIND_POD_CIDR_2} >> $GITHUB_OUTPUT + echo kind_svc_cidr_2=${KIND_SVC_CIDR_2} >> $GITHUB_OUTPUT + + - name: Install Cilium CLI + uses: cilium/cilium-cli@5362f383942260c0aed4f3876e09c3452435577a # v0.14.8 + with: + release-version: ${{ env.cilium_cli_version }} + ci-version: ${{ env.cilium_cli_ci_version }} + + - name: Generate Kind configuration files + run: | + K8S_VERSION=${{ env.k8s_version }} \ + PODCIDR=${{ steps.vars.outputs.kind_pod_cidr_1 }} \ + SVCCIDR=${{ steps.vars.outputs.kind_svc_cidr_1 }} \ + IPFAMILY=${{ matrix.ipFamily }} \ + KUBEPROXYMODE=${{ matrix.kube-proxy }} \ + envsubst < ./.github/kind-config.yaml.tmpl > ./.github/kind-config-cluster1.yaml + + K8S_VERSION=${{ env.k8s_version }} \ + PODCIDR=${{ steps.vars.outputs.kind_pod_cidr_2 }} \ + SVCCIDR=${{ steps.vars.outputs.kind_svc_cidr_2 }} \ + IPFAMILY=${{ matrix.ipFamily }} \ + KUBEPROXYMODE=${{ matrix.kube-proxy }} \ + envsubst < ./.github/kind-config.yaml.tmpl > ./.github/kind-config-cluster2.yaml + + - name: Create Kind cluster 1 + uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0 + with: + cluster_name: ${{ env.clusterName1 }} + version: ${{ env.kind_version }} + kubectl_version: ${{ env.k8s_version }} + config: ./.github/kind-config-cluster1.yaml + wait: 0 # The control-plane never becomes ready, since no CNI is present + + - name: Create Kind cluster 2 + uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0 + with: + cluster_name: ${{ env.clusterName2 }} + version: ${{ env.kind_version }} + kubectl_version: ${{ env.k8s_version }} + config: ./.github/kind-config-cluster2.yaml + wait: 0 # The control-plane never becomes ready, since no CNI is present + + # Make sure that coredns uses IPv4-only upstream DNS servers also in case of clusters + # with IP family dual, since IPv6 ones are not reachable and cause spurious failures. + - name: Configure the coredns nameservers + if: matrix.ipfamily == 'dual' + run: | + COREDNS_PATCH=" + spec: + template: + spec: + dnsPolicy: None + dnsConfig: + nameservers: + - 8.8.4.4 + - 8.8.8.8 + " + + kubectl --context ${{ env.contextName1 }} patch deployment -n kube-system coredns --patch="$COREDNS_PATCH" + kubectl --context ${{ env.contextName2 }} patch deployment -n kube-system coredns --patch="$COREDNS_PATCH" + + - name: Wait for images to be available + timeout-minutes: 30 + shell: bash + run: | + for image in cilium-ci operator-generic-ci hubble-relay-ci clustermesh-apiserver-ci ; do + until docker manifest inspect quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/$image:${{ steps.vars.outputs.sha }} &> /dev/null; do sleep 45s; done + done + + # Warning: since this is a privileged workflow, subsequent workflow job + # steps must take care not to execute untrusted code. + - name: Checkout pull request branch (NOT TRUSTED) + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + with: + ref: ${{ steps.vars.outputs.sha }} + persist-credentials: false + + - name: Install Cilium in cluster1 + run: | + # Using the deprecated flag --cluster-name due to cilium/cilium-cli#1347 + # --helm-set cluster.name ${{ env.clusterName1 }} + cilium --context ${{ env.contextName1 }} install \ + ${{ steps.vars.outputs.cilium_install_defaults }} \ + --encryption ${{ matrix.encryption }} \ + --cluster-name ${{ env.clusterName1 }} \ + --helm-set cluster.id=1 + + - name: Copy the IPsec secret to cluster2, as they must match + if: matrix.encryption == 'ipsec' + run: | + kubectl --context ${{ env.contextName1 }} get secret -n kube-system cilium-ipsec-keys -o yaml | + kubectl --context ${{ env.contextName2 }} create -f - + + - name: Install Cilium in cluster2 + run: | + # Using the deprecated form --cluster-name due to cilium/cilium-cli#1347 + # --helm-set cluster.name ${{ env.clusterName2 }} + cilium --context ${{ env.contextName2 }} install \ + ${{ steps.vars.outputs.cilium_install_defaults }} \ + --encryption ${{ matrix.encryption }} \ + --cluster-name ${{ env.clusterName2 }} \ + --helm-set cluster.id=255 \ + --inherit-ca ${{ env.contextName1 }} + + - name: Enable Hubble + run: | + cilium --context ${{ env.contextName1 }} hubble enable ${{ steps.vars.outputs.hubble_enable_defaults }} --wait=false + cilium --context ${{ env.contextName2 }} hubble enable ${{ steps.vars.outputs.hubble_enable_defaults }} --wait=false --relay=false + cilium --context ${{ env.contextName1 }} status --wait + cilium --context ${{ env.contextName2 }} status --wait + + - name: Enable Cluster Mesh + run: | + cilium --context ${{ env.contextName1 }} clustermesh enable ${{ steps.vars.outputs.clustermesh_enable_defaults }} + cilium --context ${{ env.contextName2 }} clustermesh enable ${{ steps.vars.outputs.clustermesh_enable_defaults }} + + - name: Wait for cluster mesh status to be ready + run: | + cilium --context ${{ env.contextName1 }} status --wait + cilium --context ${{ env.contextName2 }} status --wait + cilium --context ${{ env.contextName1 }} clustermesh status --wait + cilium --context ${{ env.contextName2 }} clustermesh status --wait + + - name: Connect clusters + run: | + cilium --context ${{ env.contextName1 }} clustermesh connect --destination-context ${{ env.contextName2 }} + + - name: Wait for cluster mesh status to be ready + run: | + cilium --context ${{ env.contextName1 }} status --wait + cilium --context ${{ env.contextName2 }} status --wait + cilium --context ${{ env.contextName1 }} clustermesh status --wait + cilium --context ${{ env.contextName2 }} clustermesh status --wait + + - name: Port forward Relay + run: | + cilium --context ${{ env.contextName1 }} hubble port-forward & + sleep 10s + [[ $(pgrep -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay" | wc -l) == 2 ]] + + - name: Make JUnit report directory + run: | + mkdir -p cilium-junits + + - name: Run connectivity test (${{ join(matrix.*, ', ') }}) + run: | + cilium --context ${{ env.contextName1 }} connectivity test ${{ steps.vars.outputs.connectivity_test_defaults }} \ + --junit-file "cilium-junits/${{ env.job_name }} (${{ join(matrix.*, ', ') }}).xml" \ + --junit-property github_job_step="Run connectivity test (${{ join(matrix.*, ', ') }})" + + - name: Post-test information gathering + if: ${{ !success() }} + run: | + cilium --context ${{ env.contextName1 }} status + cilium --context ${{ env.contextName1 }} clustermesh status + cilium --context ${{ env.contextName2 }} status + cilium --context ${{ env.contextName2 }} clustermesh status + + kubectl config use-context ${{ env.contextName1 }} + kubectl get pods --all-namespaces -o wide + cilium sysdump --output-filename cilium-sysdump-context1-final-${{ join(matrix.*, '-') }} + + kubectl config use-context ${{ env.contextName2 }} + kubectl get pods --all-namespaces -o wide + cilium sysdump --output-filename cilium-sysdump-context2-final-${{ join(matrix.*, '-') }} + shell: bash {0} # Disable default fail-fast behaviour so that all commands run independently + + - name: Upload artifacts + if: ${{ !success() }} + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + with: + name: cilium-sysdumps + path: cilium-sysdump-*.zip + retention-days: 5 + + - name: Upload JUnits [junit] + if: ${{ always() }} + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + with: + name: cilium-junits + path: cilium-junits/*.xml + retention-days: 2 + + - name: Publish Test Results As GitHub Summary + if: ${{ always() }} + uses: aanm/junit2md@332ebf0fddd34e91b03a832cfafaa826306558f9 # v0.0.3 + with: + junit-directory: "cilium-junits" commit-status-final: if: ${{ always() }} @@ -454,7 +450,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set final commit status - uses: myrotvorets/set-commit-status-action@243b4f7e597f62335408d58001edf8a02cf3e1fd # v1.1.7 + uses: myrotvorets/set-commit-status-action@38f3f27c7d52fb381273e95542f07f0fba301307 # v2.0.0 with: sha: ${{ inputs.SHA || github.sha }} status: ${{ needs.installation-and-connectivity.result }} diff --git a/.github/workflows/conformance-eks.yaml b/.github/workflows/conformance-eks.yaml index 4953a1432e617..277cf0b61e21e 100644 --- a/.github/workflows/conformance-eks.yaml +++ b/.github/workflows/conformance-eks.yaml @@ -65,7 +65,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set initial commit status - uses: myrotvorets/set-commit-status-action@243b4f7e597f62335408d58001edf8a02cf3e1fd # v1.1.7 + uses: myrotvorets/set-commit-status-action@38f3f27c7d52fb381273e95542f07f0fba301307 # v2.0.0 with: sha: ${{ inputs.SHA || github.sha }} @@ -75,7 +75,7 @@ jobs: outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - - name: Checkout context ref + - name: Checkout context ref (trusted) uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: ref: ${{ inputs.context-ref || github.sha }} @@ -116,7 +116,7 @@ jobs: matrix: ${{fromJson(needs.generate-matrix.outputs.matrix)}} steps: - - name: Checkout context ref + - name: Checkout context ref (trusted) uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: ref: ${{ inputs.context-ref || github.sha }} @@ -187,7 +187,7 @@ jobs: rm eksctl_$(uname -s)_amd64.tar.gz - name: Set up AWS CLI credentials - uses: aws-actions/configure-aws-credentials@04b98b3f9e85f563fb061be8751a0352327246b0 # v3.0.1 + uses: aws-actions/configure-aws-credentials@8c3f20df09ac63af7b3ae3d7c91f105f857d8497 # v4.0.0 with: aws-access-key-id: ${{ secrets.AWS_PR_SA_ID }} aws-secret-access-key: ${{ secrets.AWS_PR_SA_KEY }} @@ -214,8 +214,9 @@ jobs: until docker manifest inspect quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/$image:${{ steps.vars.outputs.sha }} &> /dev/null; do sleep 45s; done done - # Checkout source code to install Cilium using local Helm chart. - - name: Checkout code + # Warning: since this is a privileged workflow, subsequent workflow job + # steps must take care not to execute untrusted code. + - name: Checkout pull request branch (NOT TRUSTED) uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: ref: ${{ steps.vars.outputs.sha }} @@ -295,7 +296,7 @@ jobs: - name: Upload artifacts if: ${{ !success() }} - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: cilium-sysdumps path: cilium-sysdump-*.zip @@ -303,7 +304,7 @@ jobs: - name: Upload JUnits [junit] if: ${{ always() }} - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: cilium-junits path: cilium-junits/*.xml @@ -322,7 +323,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set final commit status - uses: myrotvorets/set-commit-status-action@243b4f7e597f62335408d58001edf8a02cf3e1fd # v1.1.7 + uses: myrotvorets/set-commit-status-action@38f3f27c7d52fb381273e95542f07f0fba301307 # v2.0.0 with: sha: ${{ inputs.SHA || github.sha }} status: ${{ needs.installation-and-connectivity.result }} diff --git a/.github/workflows/conformance-externalworkloads.yaml b/.github/workflows/conformance-externalworkloads.yaml index f7ed963a38b61..236afa0e9c3eb 100644 --- a/.github/workflows/conformance-externalworkloads.yaml +++ b/.github/workflows/conformance-externalworkloads.yaml @@ -66,7 +66,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set initial commit status - uses: myrotvorets/set-commit-status-action@243b4f7e597f62335408d58001edf8a02cf3e1fd # v1.1.7 + uses: myrotvorets/set-commit-status-action@38f3f27c7d52fb381273e95542f07f0fba301307 # v2.0.0 with: sha: ${{ inputs.SHA || github.sha }} @@ -76,7 +76,7 @@ jobs: outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - - name: Checkout context ref + - name: Checkout context ref (trusted) uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: ref: ${{ inputs.context-ref || github.sha }} @@ -117,7 +117,7 @@ jobs: matrix: ${{fromJson(needs.generate-matrix.outputs.matrix)}} steps: - - name: Checkout context ref + - name: Checkout context ref (trusted) uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: ref: ${{ inputs.context-ref || github.sha }} @@ -172,7 +172,9 @@ jobs: echo sha=${SHA} >> $GITHUB_OUTPUT echo owner=${OWNER} >> $GITHUB_OUTPUT - - name: Checkout code + # Warning: since this is a privileged workflow, subsequent workflow job + # steps must take care not to execute untrusted code. + - name: Checkout pull request branch (NOT TRUSTED) uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: ref: ${{ steps.vars.outputs.sha }} @@ -326,7 +328,7 @@ jobs: - name: Upload artifacts if: ${{ !success() }} - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: cilium-sysdumps path: cilium-sysdump-*.zip @@ -334,7 +336,7 @@ jobs: - name: Upload JUnits [junit] if: ${{ always() }} - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: cilium-junits path: cilium-junits/*.xml @@ -353,7 +355,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set final commit status - uses: myrotvorets/set-commit-status-action@243b4f7e597f62335408d58001edf8a02cf3e1fd # v1.1.7 + uses: myrotvorets/set-commit-status-action@38f3f27c7d52fb381273e95542f07f0fba301307 # v2.0.0 with: sha: ${{ inputs.SHA || github.sha }} status: ${{ needs.installation-and-connectivity.result }} diff --git a/.github/workflows/conformance-gke.yaml b/.github/workflows/conformance-gke.yaml index e795e08e9808e..fcf92cfc2f325 100644 --- a/.github/workflows/conformance-gke.yaml +++ b/.github/workflows/conformance-gke.yaml @@ -64,7 +64,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set initial commit status - uses: myrotvorets/set-commit-status-action@243b4f7e597f62335408d58001edf8a02cf3e1fd # v1.1.7 + uses: myrotvorets/set-commit-status-action@38f3f27c7d52fb381273e95542f07f0fba301307 # v2.0.0 with: sha: ${{ inputs.SHA || github.sha }} @@ -74,7 +74,7 @@ jobs: outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - - name: Checkout context ref + - name: Checkout context ref (trusted) uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: ref: ${{ inputs.context-ref || github.sha }} @@ -122,7 +122,7 @@ jobs: matrix: ${{fromJson(needs.generate-matrix.outputs.matrix)}} steps: - - name: Checkout context ref + - name: Checkout context ref (trusted) uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: ref: ${{ inputs.context-ref || github.sha }} @@ -171,8 +171,9 @@ jobs: echo sha=${SHA} >> $GITHUB_OUTPUT echo owner=${OWNER} >> $GITHUB_OUTPUT - # Checkout source code to install Cilium using local Helm chart. - - name: Checkout code + # Warning: since this is a privileged workflow, subsequent workflow job + # steps must take care not to execute untrusted code. + - name: Checkout pull request branch (NOT TRUSTED) uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: ref: ${{ steps.vars.outputs.sha }} @@ -286,7 +287,7 @@ jobs: - name: Upload artifacts if: ${{ !success() }} - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: cilium-sysdumps path: cilium-sysdump-*.zip @@ -294,7 +295,7 @@ jobs: - name: Upload JUnits [junit] if: ${{ always() }} - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: cilium-junits path: cilium-junits/*.xml @@ -313,7 +314,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set final commit status - uses: myrotvorets/set-commit-status-action@243b4f7e597f62335408d58001edf8a02cf3e1fd # v1.1.7 + uses: myrotvorets/set-commit-status-action@38f3f27c7d52fb381273e95542f07f0fba301307 # v2.0.0 with: sha: ${{ inputs.SHA || github.sha }} status: ${{ needs.installation-and-connectivity.result }} diff --git a/.github/workflows/conformance-ingress.yaml b/.github/workflows/conformance-ingress.yaml index af2c439b8ae16..e4e6c3d46adb0 100644 --- a/.github/workflows/conformance-ingress.yaml +++ b/.github/workflows/conformance-ingress.yaml @@ -65,7 +65,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set initial commit status - uses: myrotvorets/set-commit-status-action@243b4f7e597f62335408d58001edf8a02cf3e1fd # v1.1.7 + uses: myrotvorets/set-commit-status-action@38f3f27c7d52fb381273e95542f07f0fba301307 # v2.0.0 with: sha: ${{ inputs.SHA || github.sha }} @@ -74,6 +74,14 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 120 steps: + - name: Checkout context ref (trusted) + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + with: + ref: ${{ inputs.context-ref || github.sha }} + persist-credentials: false + + - name: Set Environment Variables + uses: ./.github/actions/set-env-variables - name: Install Cilium CLI run: | @@ -93,7 +101,9 @@ jobs: fi echo sha=${SHA} >> $GITHUB_OUTPUT - - name: Checkout + # Warning: since this is a privileged workflow, subsequent workflow job + # steps must take care not to execute untrusted code. + - name: Checkout pull request branch (NOT TRUSTED) uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: ref: ${{ steps.vars.outputs.sha }} @@ -195,7 +205,7 @@ jobs: - name: Upload artifacts if: ${{ !success() }} - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: cilium-sysdump-out.zip path: cilium-sysdump-out.zip @@ -208,7 +218,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set final commit status - uses: myrotvorets/set-commit-status-action@243b4f7e597f62335408d58001edf8a02cf3e1fd # v1.1.7 + uses: myrotvorets/set-commit-status-action@38f3f27c7d52fb381273e95542f07f0fba301307 # v2.0.0 with: sha: ${{ inputs.SHA || github.sha }} status: ${{ needs.ingress-conformance-test.result }} diff --git a/.github/workflows/conformance-ipsec-e2e.yaml b/.github/workflows/conformance-ipsec-e2e.yaml new file mode 100644 index 0000000000000..d7244462c43fb --- /dev/null +++ b/.github/workflows/conformance-ipsec-e2e.yaml @@ -0,0 +1,350 @@ +name: Cilium Conformance IPsec E2E (ci-ipsec-e2e) + +# Any change in triggers needs to be reflected in the concurrency group. +on: + workflow_dispatch: + inputs: + PR-number: + description: "Pull request number." + required: true + context-ref: + description: "Context in which the workflow runs. If PR is from a fork, will be the PR target branch (general case). If PR is NOT from a fork, will be the PR branch itself (this allows committers to test changes to workflows directly from PRs)." + required: true + SHA: + description: "SHA under test (head of the PR branch)." + required: true + extra-args: + description: "[JSON object] Arbitrary arguments passed from the trigger comment via regex capture group. Parse with 'fromJson(inputs.extra-args).argName' in workflow." + required: false + default: '{}' + # Run every 6 hours + schedule: + - cron: '0 5/6 * * *' + +# By specifying the access of one of the scopes, all of those that are not +# specified are set to 'none'. +permissions: + # To be able to access the repository with actions/checkout + contents: read + # To allow retrieving information from the PR API + pull-requests: read + # To be able to set commit status + statuses: write + +concurrency: + # Structure: + # - Workflow name + # - Event type + # - A unique identifier depending on event type: + # - schedule: SHA + # - workflow_dispatch: PR number + # + # This structure ensures a unique concurrency group name is generated for each + # type of testing, such that re-runs will cancel the previous run. + group: | + ${{ github.workflow }} + ${{ github.event_name }} + ${{ + (github.event_name == 'schedule' && github.sha) || + (github.event_name == 'workflow_dispatch' && github.event.inputs.PR-number) + }} + cancel-in-progress: true + +env: + # renovate: datasource=github-releases depName=cilium/cilium-cli + cilium_cli_version: v0.15.5 + cilium_cli_ci_version: + check_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + +jobs: + commit-status-start: + runs-on: ubuntu-latest + steps: + - name: Set initial commit status + uses: myrotvorets/set-commit-status-action@243b4f7e597f62335408d58001edf8a02cf3e1fd # v1.1.7 + with: + sha: ${{ inputs.SHA || github.sha }} + + setup-and-test: + runs-on: ubuntu-latest-4cores-16gb + env: + job_name: 'Setup & Test' + strategy: + fail-fast: false + max-parallel: 16 + matrix: + include: + # See https://github.com/cilium/cilium/issues/20606 for configuration table + + - name: '1' + kernel: '4.19-20230420.212204' + kube-proxy: 'iptables' + kpr: 'disabled' + tunnel: 'vxlan' + encryption: 'ipsec' + encryption-node: 'false' + ipv6: 'false' # https://github.com/cilium/cilium/issues/23461 + + - name: '2' + kernel: '5.4-20230420.212204' + kube-proxy: 'iptables' + kpr: 'disabled' + tunnel: 'disabled' + encryption: 'ipsec' + encryption-node: 'false' + + - name: '3' + kernel: '5.10-20230420.212204' + kube-proxy: 'iptables' + kpr: 'disabled' + tunnel: 'disabled' + encryption: 'ipsec' + encryption-node: 'false' + endpoint-routes: 'true' + + timeout-minutes: 60 + steps: + - name: Checkout context ref + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + with: + ref: ${{ inputs.context-ref || github.sha }} + persist-credentials: false + + - name: Set Environment Variables + uses: ./.github/actions/set-env-variables + + - name: Set up job variables + id: vars + run: | + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + SHA="${{ inputs.SHA }}" + else + SHA="${{ github.sha }}" + fi + + CILIUM_INSTALL_DEFAULTS="--wait \ + --chart-directory=./install/kubernetes/cilium \ + --helm-set=image.repository=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/cilium-ci \ + --helm-set=image.useDigest=false \ + --helm-set=image.tag=${SHA} \ + --helm-set=operator.image.repository=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/operator \ + --helm-set=operator.image.suffix=-ci \ + --helm-set=operator.image.tag=${SHA} \ + --helm-set=operator.image.useDigest=false \ + --helm-set=hubble.relay.image.repository=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/hubble-relay-ci \ + --helm-set=hubble.relay.image.tag=${SHA} \ + --helm-set=hubble.eventBufferCapacity=65535 \ + --helm-set=bpf.monitorAggregation=none \ + --nodes-without-cilium=kind-worker3 \ + --helm-set-string=kubeProxyReplacement=${{ matrix.kpr }}" + TUNNEL="--helm-set-string=tunnelProtocol=${{ matrix.tunnel }}" + if [ "${{ matrix.tunnel }}" == "disabled" ]; then + TUNNEL="--helm-set-string=routingMode=native --helm-set-string=autoDirectNodeRoutes=true --helm-set-string=ipv4NativeRoutingCIDR=10.244.0.0/16 --helm-set-string=tunnel=disabled" + TUNNEL="${TUNNEL} --helm-set-string=ipv6NativeRoutingCIDR=fd00:10:244::/56" + fi + LB_MODE="" + if [ "${{ matrix.lb-mode }}" != "" ]; then + LB_MODE="--helm-set-string=loadBalancer.mode=${{ matrix.lb-mode }}" + fi + ENDPOINT_ROUTES="" + if [ "${{ matrix.endpoint-routes }}" == "true" ]; then + ENDPOINT_ROUTES="--helm-set-string=endpointRoutes.enabled=true" + fi + IPV6="" + if [ "${{ matrix.ipv6 }}" != "false" ]; then + IPV6="--helm-set=ipv6.enabled=true" + fi + MASQ="" + if [ "${{ matrix.kpr }}" == "true" ]; then + # BPF-masq requires KPR=true. + MASQ="--helm-set=bpf.masquerade=true" + if [ "${{ matrix.host-fw }}" == "true" ]; then + # BPF IPv6 masquerade not currently supported with host firewall - GH-26074 + MASQ="${MASQ} --helm-set=enableIPv6Masquerade=false" + fi + fi + EGRESS_GATEWAY="" + if [ "${{ matrix.egress-gateway }}" == "true" ]; then + EGRESS_GATEWAY="--helm-set=egressGateway.enabled=true --helm-set=debug.enabled=true" + fi + LB_ACCELERATION="" + if [ "${{ matrix.lb-acceleration }}" != "" ]; then + LB_ACCELERATION="--helm-set=loadBalancer.acceleration=${{ matrix.lb-acceleration }}" + fi + + ENCRYPT="" + if [ "${{ matrix.encryption }}" != "" ]; then + ENCRYPT="--helm-set=encryption.enabled=true --helm-set=encryption.type=${{ matrix.encryption }}" + if [ "${{ matrix.encryption-node }}" != "" ]; then + ENCRYPT+=" --helm-set=encryption.nodeEncryption=${{ matrix.encryption-node }}" + fi + fi + + HOST_FW="" + if [ "${{ matrix.host-fw }}" == "true" ]; then + HOST_FW="--helm-set=hostFirewall.enabled=true" + fi + + CONFIG="${CILIUM_INSTALL_DEFAULTS} ${TUNNEL} ${LB_MODE} ${ENDPOINT_ROUTES} ${IPV6} ${MASQ} ${EGRESS_GATEWAY} ${ENCRYPT} ${HOST_FW} ${LB_ACCELERATION}" + echo "cilium_install_defaults=${CONFIG}" >> $GITHUB_OUTPUT + + JUNIT="" + for NAME in ${{ matrix.kube-proxy }} ${{ matrix.tunnel }} ${{ matrix.lb-mode }} ${{ matrix.encryption }} ${{ matrix.endpoint-routes }}; do + if [[ "${NAME}" != "" ]] && [[ "${NAME}" != "disabled" ]] && [[ "${NAME}" != "none" ]]; then + if [[ "${JUNIT}" != "" ]]; then + JUNIT+="-" + fi + if [[ "${NAME}" == "true" ]];then + NAME="endpoint-routes" + fi + JUNIT+="${NAME}" + fi + done + echo junit_type="${JUNIT}" >> $GITHUB_OUTPUT + echo sha=${SHA} >> $GITHUB_OUTPUT + + - name: Checkout pull request for Helm chart + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + with: + ref: ${{ steps.vars.outputs.sha }} + persist-credentials: false + + - name: Install Cilium CLI-cli + uses: cilium/cilium-cli@5362f383942260c0aed4f3876e09c3452435577a # v0.14.8 + with: + release-version: ${{ env.cilium_cli_version }} + ci-version: ${{ env.cilium_cli_ci_version }} + binary-name: cilium-cli + binary-dir: ./ + + - name: Provision LVH VMs + uses: cilium/little-vm-helper@0fcaa3fed17811fcd8b6f1b0dc1f24e5f4ff6b13 # v0.0.7 + with: + test-name: e2e-conformance + image-version: ${{ matrix.kernel }} + host-mount: ./ + cpu: 4 + dns-resolver: '1.1.1.1' + install-dependencies: 'true' + cmd: | + git config --global --add safe.directory /host + + - name: Wait for images to be available + timeout-minutes: 10 + shell: bash + run: | + for image in cilium-ci operator-generic-ci hubble-relay-ci ; do + until docker manifest inspect quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/$image:${{ steps.vars.outputs.sha }} &> /dev/null; do sleep 45s; done + done + + - name: Run tests (${{ join(matrix.*, ', ') }}) + uses: cilium/little-vm-helper@0fcaa3fed17811fcd8b6f1b0dc1f24e5f4ff6b13 # v0.0.7 + with: + provision: 'false' + cmd: | + cd /host/ + ./contrib/scripts/kind.sh "" 3 "" "" "${{ matrix.kube-proxy }}" "dual" + + kubectl taint nodes --all node-role.kubernetes.io/control-plane- || true + kubectl patch node kind-worker3 --type=json -p='[{"op":"add","path":"/metadata/labels/cilium.io~1no-schedule","value":"true"}]' + kubectl create -n kube-system secret generic cilium-ipsec-keys \ + --from-literal=keys="3 rfc4106(gcm(aes)) $(echo $(dd if=/dev/urandom count=20 bs=1 2> /dev/null | xxd -p -c 64)) 128" + + export CILIUM_CLI_MODE=helm + ./cilium-cli install ${{ steps.vars.outputs.cilium_install_defaults }} + + ./cilium-cli status --wait + kubectl get pods --all-namespaces -o wide + kubectl -n kube-system exec daemonset/cilium -- cilium status + + mkdir -p cilium-junits + + ./cilium-cli connectivity test --include-unsafe-tests --collect-sysdump-on-failure \ + --test '!check-log-errors' \ + --sysdump-hubble-flows-count=1000000 --sysdump-hubble-flows-timeout=5m \ + --sysdump-output-filename "cilium-sysdump-${{ matrix.name }}-" \ + --junit-file "cilium-junits/${{ env.job_name }} (${{ join(matrix.*, ', ') }}).xml" \ + --junit-property github_job_step="Run tests (${{ join(matrix.*, ', ') }})" \ + --flush-ct + + - name: Rotate IPsec Key & Test (${{ join(matrix.*, ', ') }}) + uses: ./.github/actions/conn-disrupt-test + with: + job-name: conformance-ipsec-e2e-key-rotation-${{ matrix.name }} + extra-connectivity-test-flags: --test '!check-log-errors' + operation-cmd: | + cd /host/ + + KEYID=\$(kubectl get secret -n kube-system cilium-ipsec-keys -o go-template --template={{.data.keys}} | base64 -d | cut -c 1) + if [[ \$KEYID -ge 15 ]]; then KEYID=0; fi + data=\$(echo "{\"stringData\":{\"keys\":\"\$(((\$KEYID+1))) "rfc4106\(gcm\(aes\)\)" 59f4d92cccede1b1abc920104ca61cd552782e12 128\"}}") + kubectl patch secret -n kube-system cilium-ipsec-keys -p="\$data" -v=1 + + # Wait until key rotation starts + while true; do + keys_in_use=\$(kubectl -n kube-system exec daemonset/cilium -- cilium encrypt status | awk '/Keys in use/ {print \$NF}') + if [[ \$keys_in_use == 2 ]]; then + break + fi + echo "Waiting until key rotation starts" + sleep 30s + done + + # Wait until key rotation completes + # By default the key rotation cleanup delay is 5min, let's sleep 4min before actively polling + sleep \$((4*60)) + while true; do + keys_in_use=\$(kubectl -n kube-system exec daemonset/cilium -- cilium encrypt status | awk '/Keys in use/ {print \$NF}') + if [[ \$keys_in_use == 1 ]]; then + break + fi + echo "Waiting until key rotation completes" + sleep 30s + done + + - name: Fetch artifacts + if: ${{ !success() }} + uses: cilium/little-vm-helper@0fcaa3fed17811fcd8b6f1b0dc1f24e5f4ff6b13 # v0.0.7 + with: + provision: 'false' + cmd: | + cd /host + kubectl get pods --all-namespaces -o wide + ./cilium-cli status + mkdir -p cilium-sysdumps + ./cilium-cli sysdump --output-filename cilium-sysdump-${{ matrix.name }}-final + # To debug https://github.com/cilium/cilium/issues/26062 + head -n -0 /proc/buddyinfo /proc/pagetypeinfo + + - name: Upload artifacts + if: ${{ !success() }} + uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + with: + name: cilium-sysdumps + path: cilium-sysdump-*.zip + retention-days: 5 + + - name: Upload JUnits [junit] + if: ${{ always() }} + uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + with: + name: cilium-junits + path: cilium-junits/*.xml + retention-days: 2 + + - name: Publish Test Results As GitHub Summary + if: ${{ always() }} + uses: aanm/junit2md@332ebf0fddd34e91b03a832cfafaa826306558f9 # v0.0.3 + with: + junit-directory: "cilium-junits" + + commit-status-final: + if: ${{ always() }} + needs: setup-and-test + runs-on: ubuntu-latest + steps: + - name: Set final commit status + uses: myrotvorets/set-commit-status-action@243b4f7e597f62335408d58001edf8a02cf3e1fd # v1.1.7 + with: + sha: ${{ inputs.SHA || github.sha }} + status: ${{ needs.setup-and-test.result }} diff --git a/.github/workflows/conformance-kind.yaml b/.github/workflows/conformance-kind.yaml index 4d239082ce0ac..a9d84f3ac6c54 100644 --- a/.github/workflows/conformance-kind.yaml +++ b/.github/workflows/conformance-kind.yaml @@ -147,7 +147,7 @@ jobs: - name: Upload artifacts if: ${{ !success() }} - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: cilium-sysdump-out.zip path: cilium-sysdump-out.zip diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index 02d3e65da083f..336139ae4e49b 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -58,7 +58,7 @@ jobs: with: persist-credentials: false - name: Build HTML - uses: docker://quay.io/cilium/docs-builder:d5505e230c0164b51855b002c2a0abeeff78870c@sha256:95940ef277ae14c745769e332c968d8357a43e363eab0b088c5d5efa22089260 + uses: docker://quay.io/cilium/docs-builder:b4742c730ff6b05c0b6b3e3383a264bf706aef5e@sha256:28e22c2f0c747216a5216304855be244f44d8d2752c6f810d0da1918712c5f61 with: entrypoint: ./Documentation/check-build.sh args: html diff --git a/.github/workflows/lint-bpf-checks.yaml b/.github/workflows/lint-bpf-checks.yaml index 92db152bce287..cb07715db22e8 100644 --- a/.github/workflows/lint-bpf-checks.yaml +++ b/.github/workflows/lint-bpf-checks.yaml @@ -21,6 +21,7 @@ jobs: outputs: bpf-tree: ${{ steps.changes.outputs.bpf-tree }} coccinelle: ${{ steps.changes.outputs.coccinelle }} + workflow-description: ${{ steps.changes.outputs.workflow-description }} steps: - name: Checkout code if: ${{ !github.event.pull_request }} @@ -39,6 +40,8 @@ jobs: - 'bpf/**' coccinelle: - 'contrib/coccinelle/**' + workflow-description: + - '.github/workflows/lint-bpf-checks.yaml' checkpatch: name: Check Patch @@ -56,7 +59,7 @@ jobs: # Runs only if code under bpf/ or contrib/coccinnelle/ is changed. coccicheck: needs: check_changes - if: ${{ needs.check_changes.outputs.bpf-tree == 'true' || needs.check_changes.outputs.coccinelle == 'true' }} + if: ${{ needs.check_changes.outputs.bpf-tree == 'true' || needs.check_changes.outputs.coccinelle == 'true' || needs.check_changes.outputs.workflow-description == 'true' }} name: Run coccicheck runs-on: ubuntu-latest steps: @@ -68,6 +71,12 @@ jobs: uses: docker://cilium/coccicheck:2.4@sha256:24abe3fbb8e829fa41a68a3b76cb4df84fd5a87a7d1d6254c1c1fe5effb5bd1b with: entrypoint: ./contrib/coccinelle/check-cocci.sh + # Note: Setting COCCINELLE_HOME can be removed, here and in the + # messages in the .cocci files, next time we upgrade coccinelle. + # The issue was fixed, after v1.1.1 that we're using, in + # https://gitlab.inria.fr/coccinelle/coccinelle/-/commit/540888ff426e. + env: + COCCINELLE_HOME: /usr/local/lib/coccinelle set_clang_dir: name: Set clang directory @@ -82,7 +91,7 @@ jobs: # Runs only if code under bpf/ is changed. build_all: needs: [check_changes, set_clang_dir] - if: ${{ needs.check_changes.outputs.bpf-tree == 'true' }} + if: ${{ needs.check_changes.outputs.bpf-tree == 'true' || needs.check_changes.outputs.workflow-description == 'true' }} name: Build Datapath runs-on: ubuntu-22.04 steps: @@ -92,7 +101,7 @@ jobs: go-version: 1.18.10 - name: Cache LLVM and Clang id: cache-llvm - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ${{ needs.set_clang_dir.outputs.clang_dir }} key: llvm-10.0 diff --git a/.github/workflows/lint-build-commits.yaml b/.github/workflows/lint-build-commits.yaml index 1c30af767121e..3aa94c61119b6 100644 --- a/.github/workflows/lint-build-commits.yaml +++ b/.github/workflows/lint-build-commits.yaml @@ -31,7 +31,7 @@ jobs: - name: Cache LLVM and Clang id: cache-llvm - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ${{ steps.set_clang_dir.outputs.clang_dir }} key: llvm-10.0 diff --git a/.github/workflows/tests-clustermesh-upgrade.yaml b/.github/workflows/tests-clustermesh-upgrade.yaml new file mode 100644 index 0000000000000..eddada77e0c3e --- /dev/null +++ b/.github/workflows/tests-clustermesh-upgrade.yaml @@ -0,0 +1,449 @@ +name: Cilium Cluster Mesh upgrade (ci-clustermesh) + +# Any change in triggers needs to be reflected in the concurrency group. +on: + workflow_dispatch: + inputs: + PR-number: + description: "Pull request number." + required: true + context-ref: + description: "Context in which the workflow runs. If PR is from a fork, will be the PR target branch (general case). If PR is NOT from a fork, will be the PR branch itself (this allows committers to test changes to workflows directly from PRs)." + required: true + SHA: + description: "SHA under test (head of the PR branch)." + required: true + extra-args: + description: "[JSON object] Arbitrary arguments passed from the trigger comment via regex capture group. Parse with 'fromJson(inputs.extra-args).argName' in workflow." + required: false + default: '{}' + # Run every 6 hours + schedule: + - cron: '0 3/6 * * *' + +# By specifying the access of one of the scopes, all of those that are not +# specified are set to 'none'. +permissions: + # To be able to access the repository with actions/checkout + contents: read + # To allow retrieving information from the PR API + pull-requests: read + # To be able to set commit status + statuses: write + +concurrency: + # Structure: + # - Workflow name + # - Event type + # - A unique identifier depending on event type: + # - schedule: SHA + # - workflow_dispatch: PR number + # + # This structure ensures a unique concurrency group name is generated for each + # type of testing, such that re-runs will cancel the previous run. + group: | + ${{ github.workflow }} + ${{ github.event_name }} + ${{ + (github.event_name == 'schedule' && github.sha) || + (github.event_name == 'workflow_dispatch' && github.event.inputs.PR-number) + }} + cancel-in-progress: true + +env: + # renovate: datasource=github-releases depName=kubernetes-sigs/kind + kind_version: v0.20.0 + # renovate: datasource=docker depName=kindest/node + k8s_version: v1.27.3 + # renovate: datasource=github-releases depName=cilium/cilium-cli + cilium_cli_version: v0.15.8 + cilium_cli_ci_version: + + clusterName1: cluster1 + clusterName2: cluster2 + contextName1: kind-cluster1 + contextName2: kind-cluster2 + +jobs: + commit-status-start: + name: Commmit Status Start + runs-on: ubuntu-latest + steps: + - name: Set initial commit status + uses: myrotvorets/set-commit-status-action@38f3f27c7d52fb381273e95542f07f0fba301307 # v2.0.0 + with: + sha: ${{ inputs.SHA || github.sha }} + + upgrade-and-downgrade: + name: "Upgrade and Downgrade Test" + runs-on: ubuntu-latest + timeout-minutes: 60 + env: + job_name: "Installation and Connectivity Test" + + strategy: + fail-fast: false + matrix: + include: + - name: '1' + encryption: 'disabled' + kube-proxy: 'iptables' + + steps: + - name: Checkout context ref (trusted) + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + with: + ref: ${{ inputs.context-ref || github.sha }} + persist-credentials: false + + - name: Set Environment Variables + uses: ./.github/actions/set-env-variables + + - name: Set up job variables + id: vars + run: | + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + SHA="${{ inputs.SHA }}" + else + SHA="${{ github.sha }}" + fi + + CILIUM_DOWNGRADE_VERSION=$(contrib/scripts/print-downgrade-version.sh) + + CILIUM_IMAGE_SETTINGS=" \ + --chart-directory=./cilium-newest/install/kubernetes/cilium \ + --set=image.override=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/cilium-ci:${SHA} \ + --set=operator.image.override=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/operator-generic-ci:${SHA} \ + --set=clustermesh.apiserver.image.override=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/clustermesh-apiserver-ci:${SHA} \ + " + + # * bpf.masquerade is disabled due to #23283 + # * IPv6 is disabled because an issue under investigation seems to + # possibly cause seldom and brief connection disruptions on agent + # restart in dual stack clusters, independently of clustermesh. + # * Hubble is disabled to avoid the performance penalty in the testing + # environment due to the relatively high traffic load. + CILIUM_INSTALL_DEFAULTS=" \ + --set=debug.enabled=true \ + --set=bpf.masquerade=false \ + --set=bpf.monitorAggregation=none \ + --set=hubble.enabled=false \ + --set=tunnel=vxlan \ + --set=ipv4.enabled=true \ + --set=ipv6.enabled=false \ + --set=clustermesh.useAPIServer=true \ + --set=clustermesh.config.enabled=true" + + # Run only a limited subset of tests to reduce the amount of time + # required. The full suite is run in conformance-clustermesh. + CONNECTIVITY_TEST_DEFAULTS=" \ + --hubble=false \ + --flow-validation=disabled \ + --test='no-policies/' \ + --test='no-policies-extra/' \ + --test='allow-all-except-world/' \ + --test='client-ingress/' \ + --test='client-egress/' \ + --test='cluster-entity-multicluster/' \ + --test='!/pod-to-world' \ + --test='!/pod-to-cidr' \ + --collect-sysdump-on-failure" + + CILIUM_INSTALL_ENCRYPTION="" + if [ "${{ matrix.encryption }}" != "disabled" ]; then + CILIUM_INSTALL_ENCRYPTION=" \ + --set=encryption.enabled=true \ + --set=encryption.type=${{ matrix.encryption }}" + fi + + echo "sha=${SHA}" >> $GITHUB_OUTPUT + echo "downgrade_version=${CILIUM_DOWNGRADE_VERSION}" >> $GITHUB_OUTPUT + + echo "cilium_image_settings=${CILIUM_IMAGE_SETTINGS}" >> $GITHUB_OUTPUT + echo "cilium_install_defaults=${CILIUM_INSTALL_DEFAULTS} ${CILIUM_INSTALL_ENCRYPTION}" >> $GITHUB_OUTPUT + echo "connectivity_test_defaults=${CONNECTIVITY_TEST_DEFAULTS}" >> $GITHUB_OUTPUT + + - name: Install Cilium CLI + uses: cilium/cilium-cli@7f33713a0710a1fff76cfe1b7fd7fbaea2ce7977 # v0.15.8 + with: + release-version: ${{ env.cilium_cli_version }} + ci-version: ${{ env.cilium_cli_ci_version }} + + - name: Generate Kind configuration files + run: | + K8S_VERSION=${{ env.k8s_version }} \ + PODCIDR=10.242.0.0/16,fd00:10:242::/48 \ + SVCCIDR=10.243.0.0/16,fd00:10:243::/112 \ + IPFAMILY=dual \ + KUBEPROXYMODE=${{ matrix.kube-proxy }} \ + envsubst < ./.github/kind-config.yaml.tmpl > ./.github/kind-config-cluster1.yaml + + K8S_VERSION=${{ env.k8s_version }} \ + PODCIDR=10.244.0.0/16,fd00:10:244::/48 \ + SVCCIDR=10.245.0.0/16,fd00:10:245::/112 \ + IPFAMILY=dual \ + KUBEPROXYMODE=${{ matrix.kube-proxy }} \ + envsubst < ./.github/kind-config.yaml.tmpl > ./.github/kind-config-cluster2.yaml + + - name: Create Kind cluster 1 + uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0 + with: + cluster_name: ${{ env.clusterName1 }} + version: ${{ env.kind_version }} + kubectl_version: ${{ env.k8s_version }} + config: ./.github/kind-config-cluster1.yaml + wait: 0 # The control-plane never becomes ready, since no CNI is present + + - name: Create Kind cluster 2 + uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0 + with: + cluster_name: ${{ env.clusterName2 }} + version: ${{ env.kind_version }} + kubectl_version: ${{ env.k8s_version }} + config: ./.github/kind-config-cluster2.yaml + wait: 0 # The control-plane never becomes ready, since no CNI is present + + - name: Create the IPSec secret in both clusters + if: matrix.encryption == 'ipsec' + run: | + SECRET="3 rfc4106(gcm(aes)) $(openssl rand -hex 20) 128" + kubectl --context ${{ env.contextName1 }} create -n kube-system secret generic cilium-ipsec-keys --from-literal=keys="${SECRET}" + kubectl --context ${{ env.contextName2 }} create -n kube-system secret generic cilium-ipsec-keys --from-literal=keys="${SECRET}" + + - name: Set clustermesh connection parameters + id: clustermesh-vars + run: | + # Let's retrieve in advance the parameters to mesh the two clusters, so + # that we don't need to do that through the CLI in a second step, as it + # would be reset during upgrade (as we are resetting the values). + + IP1=$(kubectl --context ${{ env.contextName1 }} get nodes \ + ${{ env.clusterName1 }}-worker -o wide --no-headers | awk '{ print $6 }') + IP2=$(kubectl --context ${{ env.contextName2 }} get nodes \ + ${{ env.clusterName2 }}-worker -o wide --no-headers | awk '{ print $6 }') + + # Explicitly configure the NodePorts to make sure that they are different + # in each cluster, to workaround #24692 + PORT1=32379 + PORT2=32380 + + # Generate the TLS certificates and explicitly configure them + openssl genrsa 4096 > cilium-ca-key.pem + openssl genrsa 4096 > cm-remote-key.pem + openssl req -new -x509 -nodes -days 1 -key cilium-ca-key.pem -out cilium-ca-crt.pem -subj "/CN=Cilium CA/" + openssl req -new -x509 -nodes -days 1 -subj "/CN=remote/" \ + -key cm-remote-key.pem -out cm-remote-crt.pem \ + -CA cilium-ca-crt.pem -CAkey cilium-ca-key.pem + + CILIUM_INSTALL_TLS=" \ + --set tls.ca.cert=$(base64 -w0 cilium-ca-crt.pem) \ + --set tls.ca.key=$(base64 -w0 cilium-ca-key.pem) \ + --set clustermesh.apiserver.tls.ca.cert=$(base64 -w0 cilium-ca-crt.pem) \ + --set clustermesh.apiserver.tls.ca.key=$(base64 -w0 cilium-ca-key.pem) \ + --set clustermesh.config.clusters[0].tls.cert=$(base64 -w0 cm-remote-crt.pem) \ + --set clustermesh.config.clusters[0].tls.key=$(base64 -w0 cm-remote-key.pem) \ + " + + CILIUM_INSTALL_CLUSTER1=" \ + --set cluster.name=${{ env.clusterName1 }} \ + --set cluster.id=1 \ + --set clustermesh.apiserver.service.nodePort=$PORT1 \ + --set clustermesh.config.clusters[0].name=${{ env.clusterName2 }} \ + --set clustermesh.config.clusters[0].ips={$IP2} \ + --set clustermesh.config.clusters[0].port=$PORT2" + + CILIUM_INSTALL_CLUSTER2=" \ + --set cluster.name=${{ env.clusterName2 }} \ + --set cluster.id=255 \ + --set clustermesh.apiserver.service.nodePort=$PORT2 \ + --set clustermesh.config.clusters[0].name=${{ env.clusterName1 }} \ + --set clustermesh.config.clusters[0].ips={$IP1} \ + --set clustermesh.config.clusters[0].port=$PORT1" + + echo cilium_install_cluster1="$CILIUM_INSTALL_CLUSTER1 $CILIUM_INSTALL_TLS" >> $GITHUB_OUTPUT + echo cilium_install_cluster2="$CILIUM_INSTALL_CLUSTER2 $CILIUM_INSTALL_TLS" >> $GITHUB_OUTPUT + + # Warning: since this is a privileged workflow, subsequent workflow job + # steps must take care not to execute untrusted code. + - name: Checkout pull request branch (NOT TRUSTED) + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + with: + path: cilium-newest + ref: ${{ steps.vars.outputs.sha }} + sparse-checkout: | + install/kubernetes/cilium + persist-credentials: false + + - name: Checkout ${{ steps.vars.outputs.downgrade_version }} branch + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + with: + path: cilium-downgrade + ref: ${{ steps.vars.outputs.downgrade_version }} + sparse-checkout: | + install/kubernetes/cilium + persist-credentials: false + + - name: Set up downgrade settings + id: downgrade-vars + run: | + SHA="$(cd cilium-downgrade && git rev-parse HEAD)" + CILIUM_IMAGE_SETTINGS=" \ + --chart-directory=./cilium-downgrade/install/kubernetes/cilium \ + --set=image.override=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/cilium-ci:${SHA} \ + --set=operator.image.override=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/operator-generic-ci:${SHA} \ + --set=clustermesh.apiserver.image.override=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/clustermesh-apiserver-ci:${SHA} \ + " + echo "cilium_image_settings=${CILIUM_IMAGE_SETTINGS}" >> $GITHUB_OUTPUT + + - name: Wait for images to be available + timeout-minutes: 10 + shell: bash + run: | + for image in cilium-ci operator-generic-ci hubble-relay-ci clustermesh-apiserver-ci ; do + until docker manifest inspect quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/$image:${{ steps.vars.outputs.sha }} &> /dev/null; do sleep 45s; done + done + + + - name: Install Cilium in cluster1 + id: install-cilium-cluster1 + run: | + cilium --context ${{ env.contextName1 }} install \ + ${{ steps.downgrade-vars.outputs.cilium_image_settings }} \ + ${{ steps.vars.outputs.cilium_install_defaults }} \ + ${{ steps.clustermesh-vars.outputs.cilium_install_cluster1 }} + + - name: Install Cilium in cluster2 + run: | + cilium --context ${{ env.contextName2 }} install \ + ${{ steps.vars.outputs.cilium_image_settings }} \ + ${{ steps.vars.outputs.cilium_install_defaults }} \ + ${{ steps.clustermesh-vars.outputs.cilium_install_cluster2 }} + + - name: Wait for cluster mesh status to be ready + run: | + cilium --context ${{ env.contextName1 }} status --wait + cilium --context ${{ env.contextName2 }} status --wait + cilium --context ${{ env.contextName1 }} clustermesh status --wait --wait-duration=5m + cilium --context ${{ env.contextName2 }} clustermesh status --wait --wait-duration=5m + + - name: Make JUnit report directory + run: | + mkdir -p cilium-junits + + - name: Run connectivity test - pre-upgrade (${{ join(matrix.*, ', ') }}) + run: | + cilium --context ${{ env.contextName1 }} connectivity test \ + --multi-cluster=${{ env.contextName2 }} \ + ${{ steps.vars.outputs.connectivity_test_defaults }} \ + --junit-file "cilium-junits/${{ env.job_name }} - pre-upgrade (${{ join(matrix.*, ', ') }}).xml" \ + --junit-property github_job_step="Run tests pre-upgrade (${{ join(matrix.*, ', ') }})" + + + - name: Upgrade Cilium in cluster1 + run: | + cilium --context ${{ env.contextName1 }} upgrade --reset-values \ + ${{ steps.vars.outputs.cilium_image_settings }} \ + ${{ steps.vars.outputs.cilium_install_defaults }} \ + ${{ steps.clustermesh-vars.outputs.cilium_install_cluster1 }} + + - name: Rollout Cilium agents in cluster2 + run: | + # This makes sure that the remote agents reconnect to the new instance of the + # clustermesh-apiserver, without waiting for the watchdog mechanism to kick in. + kubectl --context ${{ env.contextName2 }} rollout restart -n kube-system ds/cilium + + - name: Wait for cluster mesh status to be ready + run: | + cilium --context ${{ env.contextName1 }} status --wait + cilium --context ${{ env.contextName2 }} status --wait + cilium --context ${{ env.contextName1 }} clustermesh status --wait --wait-duration=5m + cilium --context ${{ env.contextName2 }} clustermesh status --wait --wait-duration=5m + + - name: Run connectivity test - post-upgrade (${{ join(matrix.*, ', ') }}) + run: | + cilium --context ${{ env.contextName1 }} connectivity test \ + --multi-cluster=${{ env.contextName2 }} \ + ${{ steps.vars.outputs.connectivity_test_defaults }} \ + --junit-file "cilium-junits/${{ env.job_name }} - post upgrade (${{ join(matrix.*, ', ') }}).xml" \ + --junit-property github_job_step="Run tests post-upgrade (${{ join(matrix.*, ', ') }})" + + + - name: Downgrade Cilium in cluster1 + run: | + cilium --context ${{ env.contextName1 }} upgrade --reset-values \ + ${{ steps.downgrade-vars.outputs.cilium_image_settings }} \ + ${{ steps.vars.outputs.cilium_install_defaults }} \ + ${{ steps.clustermesh-vars.outputs.cilium_install_cluster1 }} + + - name: Rollout Cilium agents in cluster2 + run: | + # This makes sure that the remote agents reconnect to the new instance of the + # clustermesh-apiserver, without waiting for the watchdog mechanism to kick in. + kubectl --context ${{ env.contextName2 }} rollout restart -n kube-system ds/cilium + + - name: Wait for cluster mesh status to be ready + run: | + cilium --context ${{ env.contextName1 }} status --wait + cilium --context ${{ env.contextName2 }} status --wait + cilium --context ${{ env.contextName1 }} clustermesh status --wait --wait-duration=5m + cilium --context ${{ env.contextName2 }} clustermesh status --wait --wait-duration=5m + + - name: Run connectivity test - post-downgrade (${{ join(matrix.*, ', ') }}) + run: | + cilium --context ${{ env.contextName1 }} connectivity test \ + --multi-cluster=${{ env.contextName2 }} \ + ${{ steps.vars.outputs.connectivity_test_defaults }} \ + --junit-file "cilium-junits/${{ env.job_name }} - post downgrade (${{ join(matrix.*, ', ') }}).xml" \ + --junit-property github_job_step="Run tests post-downgrade (${{ join(matrix.*, ', ') }})" + + + - name: Post-test information gathering + if: ${{ !success() && steps.install-cilium-cluster1.outcome != 'skipped' }} + run: | + cilium --context ${{ env.contextName1 }} status + cilium --context ${{ env.contextName1 }} clustermesh status + cilium --context ${{ env.contextName2 }} status + cilium --context ${{ env.contextName2 }} clustermesh status + + kubectl config use-context ${{ env.contextName1 }} + kubectl get pods --all-namespaces -o wide + cilium sysdump --output-filename cilium-sysdump-context1-final-${{ join(matrix.*, '-') }} + + kubectl config use-context ${{ env.contextName2 }} + kubectl get pods --all-namespaces -o wide + cilium sysdump --output-filename cilium-sysdump-context2-final-${{ join(matrix.*, '-') }} + shell: bash {0} # Disable default fail-fast behaviour so that all commands run independently + + - name: Upload artifacts + if: ${{ !success() }} + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + with: + name: cilium-sysdumps + path: cilium-sysdump-*.zip + retention-days: 5 + + - name: Upload JUnits [junit] + if: ${{ always() }} + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + with: + name: cilium-junits + path: cilium-junits/*.xml + retention-days: 2 + + - name: Publish Test Results As GitHub Summary + if: ${{ always() }} + uses: aanm/junit2md@332ebf0fddd34e91b03a832cfafaa826306558f9 # v0.0.3 + with: + junit-directory: "cilium-junits" + + commit-status-final: + if: ${{ always() }} + name: Commit Status Final + needs: upgrade-and-downgrade + runs-on: ubuntu-latest + steps: + - name: Set final commit status + uses: myrotvorets/set-commit-status-action@38f3f27c7d52fb381273e95542f07f0fba301307 # v2.0.0 + with: + sha: ${{ inputs.SHA || github.sha }} + status: ${{ needs.upgrade-and-downgrade.result }} diff --git a/.github/workflows/tests-ipsec-upgrade.yaml b/.github/workflows/tests-ipsec-upgrade.yaml index 10da1e52e8ff1..d80bf05c2f871 100644 --- a/.github/workflows/tests-ipsec-upgrade.yaml +++ b/.github/workflows/tests-ipsec-upgrade.yaml @@ -63,7 +63,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set initial commit status - uses: myrotvorets/set-commit-status-action@243b4f7e597f62335408d58001edf8a02cf3e1fd # v1.1.7 + uses: myrotvorets/set-commit-status-action@38f3f27c7d52fb381273e95542f07f0fba301307 # v2.0.0 with: sha: ${{ inputs.SHA || github.sha }} @@ -79,7 +79,7 @@ jobs: include: - name: '1' # renovate: datasource=docker depName=quay.io/lvh-images/kind - kernel: '5.4-20230824.161940' + kernel: '5.4-20230928.053816' kube-proxy: 'iptables' kpr: 'disabled' tunnel: 'disabled' @@ -88,7 +88,7 @@ jobs: - name: '2' # renovate: datasource=docker depName=quay.io/lvh-images/kind - kernel: '5.10-20230824.161940' + kernel: '5.10-20230928.053816' kube-proxy: 'iptables' kpr: 'disabled' tunnel: 'disabled' @@ -108,7 +108,7 @@ jobs: timeout-minutes: 60 steps: - - name: Checkout context ref + - name: Checkout context ref (trusted) uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: ref: ${{ inputs.context-ref || github.sha }} @@ -261,11 +261,14 @@ jobs: # interruption in such flows. ./cilium-cli connectivity test --include-conn-disrupt-test --conn-disrupt-test-setup - - name: Upgrade Cilium (${{ matrix.name }}) - uses: cilium/little-vm-helper@908ab1ff8a596a03cd5221a1f8602dc44c3f906d # v0.0.12 + - name: Upgrade Cilium & Test (${{ matrix.name }}) + uses: ./.github/actions/conn-disrupt-test with: - provision: 'false' - cmd: | + job-name: ipsec-upgrade-${{ matrix.name }} + # Disable no-missed-tail-calls due to https://github.com/cilium/cilium/issues/26739 + # Disable check-log-errors due to https://github.com/cilium/cilium-cli/issues/1858 + extra-connectivity-test-flags: --test '!no-missed-tail-calls,!check-log-errors' + operation-cmd: | cd /host/ CILIUM_CLI_MODE=helm ./cilium-cli upgrade \ @@ -275,32 +278,14 @@ jobs: kubectl get pods --all-namespaces -o wide kubectl -n kube-system exec daemonset/cilium -- cilium status - - name: Test Cilium after upgrade (${{ matrix.name }}) - uses: cilium/little-vm-helper@908ab1ff8a596a03cd5221a1f8602dc44c3f906d # v0.0.12 - with: - provision: 'false' - cmd: | - cd /host/ - - # Disable no-missed-tail-calls due to https://github.com/cilium/cilium/issues/26739 - # Disable check-log-errors due to https://github.com/cilium/cilium-cli/issues/1858 - ./cilium-cli connectivity test --include-unsafe-tests --collect-sysdump-on-failure \ - --include-conn-disrupt-test \ - --test '!no-missed-tail-calls,!check-log-errors' \ - --flush-ct \ - --sysdump-hubble-flows-count=1000000 --sysdump-hubble-flows-timeout=5m \ - --sysdump-output-filename "cilium-sysdump-${{ matrix.name }}-" \ - --junit-file "cilium-junits/${{ env.job_name }} (${{ join(matrix.*, ', ') }}).xml" \ - --junit-property github_job_step="Run tests upgrade 2 (${{ join(matrix.*, ', ') }})" - - # --flush-ct interrupts the flows, so we need to set up again. - ./cilium-cli connectivity test --include-conn-disrupt-test --conn-disrupt-test-setup - - - name: Downgrade Cilium ${{ env.cilium_stable_version }} (${{ matrix.name }}) - uses: cilium/little-vm-helper@908ab1ff8a596a03cd5221a1f8602dc44c3f906d # v0.0.12 + - name: Downgrade Cilium to ${{ env.cilium_stable_version }} & Test (${{ matrix.name }}) + uses: ./.github/actions/conn-disrupt-test with: - provision: 'false' - cmd: | + job-name: ipsec-downgrade-${{ matrix.name }} + # Disable no-missed-tail-calls due to https://github.com/cilium/cilium/issues/26739 + # Disable check-log-errors due to https://github.com/cilium/cilium-cli/issues/1858 + extra-connectivity-test-flags: --test '!no-missed-tail-calls,!check-log-errors' + operation-cmd: | cd /host/ CILIUM_CLI_MODE=helm ./cilium-cli upgrade \ @@ -310,22 +295,6 @@ jobs: kubectl get pods --all-namespaces -o wide kubectl -n kube-system exec daemonset/cilium -- cilium status - - name: Test Cilium after downgrade to ${{ env.cilium_stable_version }} (${{ matrix.name }}) - uses: cilium/little-vm-helper@908ab1ff8a596a03cd5221a1f8602dc44c3f906d # v0.0.12 - with: - provision: 'false' - cmd: | - cd /host/ - - ./cilium-cli connectivity test --include-unsafe-tests --collect-sysdump-on-failure \ - --include-conn-disrupt-test \ - --test '!no-missed-tail-calls,!check-log-errors' \ - --flush-ct \ - --sysdump-hubble-flows-count=1000000 --sysdump-hubble-flows-timeout=5m \ - --sysdump-output-filename "cilium-sysdump-${{ matrix.name }}-" \ - --junit-file "cilium-junits/${{ env.job_name }} (${{ join(matrix.*, ', ') }}).xml" \ - --junit-property github_job_step="Run tests upgrade 3 (${{ join(matrix.*, ', ') }})" - - name: Fetch artifacts if: ${{ !success() }} uses: cilium/little-vm-helper@908ab1ff8a596a03cd5221a1f8602dc44c3f906d # v0.0.12 @@ -342,7 +311,7 @@ jobs: - name: Upload artifacts if: ${{ !success() }} - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: cilium-sysdumps path: cilium-sysdump-*.zip @@ -350,7 +319,7 @@ jobs: - name: Upload JUnits [junit] if: ${{ always() }} - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: cilium-junits path: cilium-junits/*.xml @@ -369,7 +338,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set final commit status - uses: myrotvorets/set-commit-status-action@243b4f7e597f62335408d58001edf8a02cf3e1fd # v1.1.7 + uses: myrotvorets/set-commit-status-action@38f3f27c7d52fb381273e95542f07f0fba301307 # v2.0.0 with: sha: ${{ inputs.SHA || github.sha }} status: ${{ needs.setup-and-test.result }} diff --git a/.github/workflows/tests-l4lb.yaml b/.github/workflows/tests-l4lb.yaml index efbc3948eddd3..33f18066456c8 100644 --- a/.github/workflows/tests-l4lb.yaml +++ b/.github/workflows/tests-l4lb.yaml @@ -62,7 +62,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set initial commit status - uses: myrotvorets/set-commit-status-action@243b4f7e597f62335408d58001edf8a02cf3e1fd # v1.1.7 + uses: myrotvorets/set-commit-status-action@38f3f27c7d52fb381273e95542f07f0fba301307 # v2.0.0 with: sha: ${{ inputs.SHA || github.sha }} @@ -73,7 +73,7 @@ jobs: runs-on: ubuntu-22.04 timeout-minutes: 45 steps: - - name: Checkout context ref + - name: Checkout context ref (trusted) uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: ref: ${{ inputs.context-ref || github.sha }} @@ -98,7 +98,9 @@ jobs: release-version: ${{ env.cilium_cli_version }} ci-version: ${{ env.cilium_cli_ci_version }} - - name: Checkout upstream for test files + # Warning: since this is a privileged workflow, subsequent workflow job + # steps must take care not to execute untrusted code. + - name: Checkout pull request branch (NOT TRUSTED) uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: # This is intentionally set to stable branch to avoid using test.sh from pull requests. @@ -125,7 +127,7 @@ jobs: sudo cilium sysdump --output-filename cilium-sysdump-out - name: Upload cilium-sysdump - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 if: ${{ !success() }} with: name: cilium-sysdump-out.zip @@ -138,7 +140,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set final commit status - uses: myrotvorets/set-commit-status-action@243b4f7e597f62335408d58001edf8a02cf3e1fd # v1.1.7 + uses: myrotvorets/set-commit-status-action@38f3f27c7d52fb381273e95542f07f0fba301307 # v2.0.0 with: sha: ${{ inputs.SHA || github.sha }} status: ${{ needs.setup-and-test.result }} diff --git a/.github/workflows/tests-smoke-ipv6.yaml b/.github/workflows/tests-smoke-ipv6.yaml index 1ed15a5e7033e..bc653a11708ef 100644 --- a/.github/workflows/tests-smoke-ipv6.yaml +++ b/.github/workflows/tests-smoke-ipv6.yaml @@ -155,7 +155,7 @@ jobs: cilium sysdump --output-filename cilium-sysdump-out - name: Upload cilium-sysdump - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 if: ${{ failure() }} with: name: cilium-sysdump-out.zip diff --git a/.github/workflows/tests-smoke.yaml b/.github/workflows/tests-smoke.yaml index 03f28cf9afc29..e4608db6e18b3 100644 --- a/.github/workflows/tests-smoke.yaml +++ b/.github/workflows/tests-smoke.yaml @@ -200,7 +200,7 @@ jobs: cilium sysdump --output-filename cilium-sysdump-out - name: Upload cilium-sysdump - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 if: ${{ failure() }} with: name: cilium-sysdump-out.zip diff --git a/AUTHORS b/AUTHORS index ce1ed1fcb8c84..6728670f151eb 100644 --- a/AUTHORS +++ b/AUTHORS @@ -62,6 +62,7 @@ Austin Cawley-Edwards austin.cawley@gmail.com Ayush Dwivedi ayush.dwivedi@accuknox.com Barun Acharya barun1024@gmail.com Beatriz Martínez beatriz@isovalent.com +Benjamin Leggett benjamin.leggett@solo.io Benjamin Pineau benjamin.pineau@datadoghq.com Bill Mulligan billmulligan516@gmail.com Bingshen Wang bingshen.wbs@alibaba-inc.com @@ -71,6 +72,7 @@ Bob Bouteillier bob.bouteillier@datadoghq.com Bokang Li libokang.dev@gmail.com Bolun Zhao blzhao@google.com Boran Car boran.car@gmail.com +Boris Petrovic carnerito.b@gmail.com Brad Whitfield bradswhitfield@gmail.com Brian Topping brian@coglative.com brnck a.berneckas@gmail.com @@ -108,6 +110,7 @@ Cynthia Thomas cynthia@covalent.io Cyril Corbon corboncyril@gmail.com Dale Ragan dale.ragan@sap.com Dalton Hubble dghubble@gmail.com +Daneyon Hansen daneyon.hansen@solo.io Đặng Minh Dũng dungdm93@live.com Daniel Borkmann daniel@iogearbox.net Daniel Dao dqminh89@gmail.com @@ -187,7 +190,7 @@ Gilberto Bertin jibi@cilium.io Glib Smaga code@gsmaga.com Gobinath Krishnamoorthy gobinathk@google.com Gowtham Sundara gowtham.sundara@rapyuta-robotics.com -gray gray.liang@isovalent.com +Gray Liang gray.liang@isovalent.com Guilherme Oki guilherme.oki@wildlifestudios.com Guilherme Souza 101073+guilhermef@users.noreply.github.com Gunju Kim gjkim042@gmail.com diff --git a/CHANGELOG.md b/CHANGELOG.md index 92f1c1a07a422..cd900877e28ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,76 @@ # Changelog +## v1.12.15 + +Summary of Changes +------------------ + +**Minor Changes:** +* bump grpc dependency to 1.56.3 to fix security vulnerability https://github.com/advisories/GHSA-qppj-fm5r-hxr3 (#28529, @aanm) +* vendor, azure: Bump Azure SDK to Aug 2021 (Backport PR #28317, Upstream PR #28311, @christarazi) + +**Bugfixes:** +* Add drop notifications for various error paths in the datapath. (Backport PR #28437, Upstream PR #25183, @julianwiedmann) +* Add drop notifications from various error paths in the BPF datapath. (Backport PR #28444, Upstream PR #26956, @julianwiedmann) +* bpf: fix error handling for invoke_tailcall_if() (Backport PR #28414, Upstream PR #26118, @julianwiedmann) +* bpf: lxc: fix one missing drop notification in CT lookup tail calls (Backport PR #28351, Upstream PR #26115, @julianwiedmann) +* envoy: Sync supported resources to fix not found issue (Backport PR #28351, Upstream PR #28272, @sayboras) +* Fix a bug that causes pod-to-pod traffic between nodes to be dropped when IPsec is enabled and kube-proxy installed rules in both iptables-nft and iptables-legacy. (Backport PR #28444, Upstream PR #28258, @pchaigno) +* Fix missing drop notifications on conntrack lookup failures when IPv4 and IPv6 are both enabled or socket-level load balancing is disabled. (Backport PR #28295, Upstream PR #25426, @bleggett) +* Fix the trace notification for hairpinned reply traffic, to indicate the correct security identity for the client. (Backport PR #28295, Upstream PR #28133, @julianwiedmann) +* Fixes a bug causing panic when counting IPsec keys number via "cilium encrypt status". (Backport PR #28295, Upstream PR #27996, @jschwinger233) +* pkg/node: Updates GetIPv6AllocCIDRs() to Properly Return Secondary CIDRs (Backport PR #28104, Upstream PR #27855, @danehans) + +**CI Changes:** +* [v1.12] ci: Add a call to the update label backport action (#27879, @pippolo84) +* [v1.14] GHA: Add clustermesh upgrade and downgrade tests (Backport PR #28564, Upstream PR #28355, @giorio94) +* CI: Add conn-disrupt-test action for reuse (Backport PR #28152, Upstream PR #27567, @jschwinger233) +* CI: Add conn-disrupt-test action for reuse (Backport PR #28295, Upstream PR #27567, @jschwinger233) +* CI: Add IPsec key rotation test (Backport PR #28152, Upstream PR #27203, @jschwinger233) +* CI: Move IPsec CI jobs into separate pipelines (Backport PR #28152, Upstream PR #26730, @jschwinger233) +* ci: Run BPF lints on workflow definition changes (Backport PR #28295, Upstream PR #28122, @qmonnet) +* ci: update k8s versions support for v1.12 (#28246, @nbusseneau) +* Do not hardcode the AWS VPC CNI plugin version in the conformance-aws-cni GHA workflow (Backport PR #28444, Upstream PR #28392, @giorio94) +* Refactor CiliumExecContext() Retry Logic (Backport PR #28295, Upstream PR #28131, @carnerito) +* Update image registry to quay.io (Backport PR #28295, Upstream PR #23093, @oxxenix) +* v1.12: manual backport of #27193 (#28227, @nbusseneau) +* workflows/ipsec: Add missing `--flush-ct` for key rotation (Backport PR #28152, Upstream PR #27883, @pchaigno) + +**Misc Changes:** +* chore(deps): update all github action dependencies (v1.12) (patch) (#28114, @renovate[bot]) +* chore(deps): update all github action dependencies to v3 (v1.12) (major) (#28116, @renovate[bot]) +* chore(deps): update all lvh-images main (v1.12) (patch) (#27948, @renovate[bot]) +* chore(deps): update all lvh-images main (v1.12) (patch) (#28215, @renovate[bot]) +* chore(deps): update aws-actions/configure-aws-credentials action to v4 (v1.12) (#28117, @renovate[bot]) +* chore(deps): update dependency cilium/hubble to v0.12.1 (v1.12) (#28526, @renovate[bot]) +* chore(deps): update dependency cilium/hubble to v0.12.2 (v1.12) (#28568, @renovate[bot]) +* chore(deps): update docker.io/library/golang docker tag to v1.20.10 (v1.12) (#28517, @renovate[bot]) +* chore(deps): update docker.io/library/golang:1.20.8 docker digest to 700d726 (v1.12) (#28113, @renovate[bot]) +* chore(deps): update docker.io/library/ubuntu:20.04 docker digest to 0b5642e (v1.12) (#28582, @renovate[bot]) +* chore(deps): update docker/build-push-action action to v4.2.1 (v1.12) (#28115, @renovate[bot]) +* chore(deps): update docker/build-push-action action to v5 (v1.12) (#28118, @renovate[bot]) +* chore(deps): update myrotvorets/set-commit-status-action action to v2 (v1.12) (#28119, @renovate[bot]) +* chore(deps): update quay.io/cilium/hubble docker tag to v0.12.1 (v1.12) (#28544, @renovate[bot]) +* chore(deps): update quay.io/cilium/hubble docker tag to v0.12.2 (v1.12) (#28573, @renovate[bot]) +* ci: fix AWS EKS K8s versions comment (Backport PR #28295, Upstream PR #28249, @nbusseneau) +* docs: Add more details for the Cluster Mesh key rotation (Backport PR #28295, Upstream PR #28145, @margamanterola) +* docs: egressgw: document incompatibility with Clustermesh (Backport PR #28104, Upstream PR #27918, @julianwiedmann) +* docs: Makefile, check-build.sh clean-ups and perf improvements (Backport PR #28295, Upstream PR #28161, @qmonnet) +* docs: Mention `RouteTableInterfacesOffset` in system requirements (Backport PR #28444, Upstream PR #28358, @gandro) +* docs: Update Sphinx and its dependencies, Cilium theme (Backport PR #28295, Upstream PR #28172, @qmonnet) +* Fix potential nil pointer dereference in SelectorManager implementation (Backport PR #28104, Upstream PR #27805, @learnitall) +* fix(deps): update module golang.org/x/net to v0.17.0 [security] (#28552, @aanm) +* install/kubernetes: add the `cilium/values.yaml` target to `.PHONY` (Backport PR #28295, Upstream PR #28225, @nbusseneau) +* ipsec: Atomically upgrade XFRM states with new output-mark (Backport PR #28564, Upstream PR #28485, @pchaigno) +* Update docs theme (Backport PR #28444, Upstream PR #28403, @raphink) +* Update Hubble UI from v0.11.0 to v0.12.1 (#28536, @rolinh) + +**Other Changes:** +* Backport v1.12: FQDN fixes (#28138, @joamaki) +* cocci: backport fix about incorrect warnings and resolve warning related to a const qualifier (#28287, @giorio94) +* envoy: Bump envoy version to v1.24.11 (#28501, @sayboras) +* install: Update image digests for v1.12.14 (#28130, @michi-covalent) + ## v1.12.14 Summary of Changes diff --git a/Documentation/Makefile b/Documentation/Makefile index 25ece9d38dd3a..dab94a9770a52 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -23,13 +23,20 @@ define build_image | $(CONTAINER_ENGINE) build $(DOCKER_BUILD_FLAGS) --target $(2) --tag $(3) - endef +##@ Development Images + DOCS_BASE_IMG ?= cilium/docs-base base-image: Dockerfile ## Build the docs-base image for updating the requirements.txt file. $(call build_image,$<,docs-base,$(DOCS_BASE_IMG)) DOCS_BUILDER_IMG ?= cilium/docs-builder +ifndef SKIP_BUILDER_IMAGE builder-image: Dockerfile $(REQUIREMENTS) ## Build the docs-builder image for rendering and checking the documentation. $(call build_image,$<,docs-builder,$(DOCS_BUILDER_IMG)) +else +builder-image: + @echo "SKIP_BUILDER_IMAGE set, assuming image is already present and up-to-date." +endif # cilium must have all build artifacts present for # documentation to be generated correctly. @@ -48,9 +55,13 @@ DOCKER_CTR_BASE := $(CONTAINER_ENGINE) container run --rm \ DOCKER_CTR := $(DOCKER_CTR_BASE) \ --env READTHEDOCS_VERSION=$(READTHEDOCS_VERSION) \ --env SKIP_LINT=$(SKIP_LINT) \ + --env INCREMENTAL=$(INCREMENTAL) \ --user "$(shell id -u):$(shell id -g)" DOCKER_RUN := $(DOCKER_CTR) $(DOCS_BUILDER_IMG) +##@ Auto-generated Contents Updates and Validation + +.PHONY: update-cmdref update-cmdref: builder-image cilium-build ## Update the command reference documents (agent, bugtool, operators, etc.). @$(ECHO_GEN)cmdref -$(QUIET)rm -rf cmdref/cilium*.md @@ -61,17 +72,7 @@ codeowners.rst: $(ROOT_DIR)/CODEOWNERS $(QUIET)$(DOCKER_RUN) ./update-codeowners.sh .PHONY: update-codeowners -update-codeowners: codeowners.rst - -check: builder-image update-cmdref update-helm-values update-codeowners ## Validate command and Helm references, as well as policy examples. - @$(ECHO_CHECK) cmdref - $(QUIET) ./check-cmdref.sh - @$(ECHO_CHECK) $(HELM_VALUES) - $(QUIET) ./check-helmvalues.sh - @$(ECHO_CHECK) examples - $(QUIET)$(DOCKER_RUN) ./check-examples.sh - @$(ECHO_CHECK) codeowners.rst - $(QUIET) ./check-codeowners.sh +update-codeowners: codeowners.rst ## Update the description of the code owner teams. ifeq ($(V),0) SPHINX_OPTS += -q @@ -98,7 +99,19 @@ $(HELM_VALUES): FORCE $(QUIET)printf '..\n %s\n\n%s\n' "AUTO-GENERATED. Please DO NOT edit manually." "$$(cat $(TMP_FILE_3))" > $@ $(QUIET)$(RM) -- $(TMP_FILE_1) $(TMP_FILE_2) $(TMP_FILE_3) -epub latex html: builder-image update-helm-values ## Check documentation and render it under the specified format. +check: builder-image update-cmdref update-helm-values update-codeowners ## Validate command and Helm references, policy examples, and others. + @$(ECHO_CHECK) cmdref + $(QUIET) ./check-cmdref.sh + @$(ECHO_CHECK) $(HELM_VALUES) + $(QUIET) ./check-helmvalues.sh + @$(ECHO_CHECK) examples + $(QUIET)$(DOCKER_RUN) ./check-examples.sh + @$(ECHO_CHECK) codeowners.rst + $(QUIET) ./check-codeowners.sh + +##@ Build + +html epub latex: builder-image ## Check documentation and render it under the specified format. @$(ECHO_GEN)_build/$@ $(QUIET)$(DOCKER_RUN) ./check-build.sh $(@) $(SPHINX_OPTS) @@ -115,13 +128,15 @@ live-preview: builder-image ## Build and serve the documentation locally. $(DOCS_BUILDER_IMG) \ sphinx-autobuild --open-browser --host 0.0.0.0 $(SPHINX_OPTS) --ignore *.swp -Q . _preview -update-requirements: base-image $(REQUIREMENTS_NODEP) +##@ Development + +update-requirements: base-image $(REQUIREMENTS_NODEP) ## Regenerate the requirements.txt file from requirements-min/requirements.txt. @echo '## Auto-generated from $(REQUIREMENTS_NODEP) with "make update-requirements"' > $(REQUIREMENTS) $(QUIET)$(DOCKER_CTR_BASE) $(DOCS_BASE_IMG) \ bash -c "pip install -r $(REQUIREMENTS_NODEP) && pip freeze -r $(REQUIREMENTS_NODEP) >> $(REQUIREMENTS)" clean: ## Clean up all artefacts from documentation. - -$(QUIET)rm -rf _build _api _exts/__pycache__ _preview Pipfile Pipfile.lock + -$(QUIET)rm -rf _build _exts/__pycache__ _preview Pipfile Pipfile.lock help: ## Display help for the Makefile. $(call print_help_from_makefile) diff --git a/Documentation/check-build.sh b/Documentation/check-build.sh index 58d89f0e6cb35..86f5c60cf2140 100755 --- a/Documentation/check-build.sh +++ b/Documentation/check-build.sh @@ -31,19 +31,15 @@ has_spelling_errors() { test -n "$(ls "${spelldir}" 2>/dev/null)" } -# Filter out some undesirable warnings: -# - Spelling (we already have individual warnings for each word) +# Filter out some undesirable warnings filter_warnings() { - [ -s "${warnings}" ] || return - grep -v -E \ - -e 'Found .* misspelled words' \ - -e "/_api/v1/.*/README\.md:[0-9]+: WARNING: 'myst' reference target not found:" \ - "${warnings}" + test -s "${warnings}" || return + cat "${warnings}" } # Returns non-0 if we have relevant build warnings has_build_warnings() { - filter_warnings > /dev/null + test -s "${warnings}" } describe_spelling_errors() { @@ -82,13 +78,13 @@ build_with_spellchecker() { set -o nounset rm -rf "${spelldir}" - # Call with -q -W --keep-going: suppresses regular output (keeps warning; + # Call with -W --keep-going: suppresses regular output (keeps warning; # -Q would suppress warnings as well including those we write to a file), # consider warnings as errors for exit status, but keep going on # warning/errors so that we get the full list of errors. sphinx-build -b spelling \ -d "${build_dir}/doctrees" . "${spelldir}" \ - -E -n --color -q -w "${warnings}" -W --keep-going 2>/dev/null + -E -n --color -w "${warnings}" -W --keep-going 2>/dev/null } build_with_linkchecker() { @@ -118,20 +114,25 @@ run_linter() { --ignore-roles "${CONF_PY_ROLES},spelling:ignore" \ --ignore-substitutions "${CONF_PY_SUBSTITUTIONS}" \ -r . ../README.rst 2>&1 | \ - grep -v 'CRITICAL:rstcheck_core.checker:An `AttributeError` error occured. This is most propably due to a code block directive (code/code-block/sourcecode) without a specified language.' + grep -v 'WARNING:rstcheck_core.checker:An `AttributeError` error occured. This is most probably due to a code block directive (code/code-block/sourcecode) without a specified language.' } read_all_opt="" if [ -n "${SKIP_LINT-}" ]; then - # Read all files for final build if we don't read them all with linting - read_all_opt="-E" + if [ -z "${INCREMENTAL-}" ]; then + # Read all files for final build if we don't read them all with linting + read_all_opt="-E" + fi + echo "" echo "Skipping syntax and spelling validations..." else + echo "" echo "Running linter..." run_linter + echo "" echo "Validating documentation (syntax, spelling)..." if ! build_with_spellchecker ; then status_ok=0 @@ -161,9 +162,10 @@ fi # exit 1 # fi +echo "" echo "Building documentation (${target})..." sphinx-build -M "${target}" "${script_dir}" "${build_dir}" $@ \ - ${read_all_opt} -n --color -q -w "${warnings}" 2>/dev/null + ${read_all_opt} -n --color -w "${warnings}" 2>/dev/null # We can have warnings but no errors here, or sphinx-build would return non-0 # and we would have exited because of "set -o errexit". diff --git a/Documentation/cmdref/cilium-agent.md b/Documentation/cmdref/cilium-agent.md index 8c61a9099919b..5191e34d127f3 100644 --- a/Documentation/cmdref/cilium-agent.md +++ b/Documentation/cmdref/cilium-agent.md @@ -65,6 +65,7 @@ cilium-agent [flags] --config string Configuration file (default "$HOME/ciliumd.yaml") --config-dir string Configuration directory that contains a file for each option --conntrack-gc-interval duration Overwrite the connection-tracking garbage collection interval + --conntrack-gc-max-interval duration Set the maximum interval for the connection-tracking garbage collection --crd-wait-timeout duration Cilium will exit if CRDs are not available within this duration upon startup (default 5m0s) --datapath-mode string Datapath mode name (default "veth") -D, --debug Enable debugging mode diff --git a/Documentation/concepts/kubernetes/compatibility-table.rst b/Documentation/concepts/kubernetes/compatibility-table.rst index 37a732bfe0ba1..777e07eb35e84 100644 --- a/Documentation/concepts/kubernetes/compatibility-table.rst +++ b/Documentation/concepts/kubernetes/compatibility-table.rst @@ -140,6 +140,8 @@ +-----------------+----------------+ | v1.12.13 | 1.25.7 | +-----------------+----------------+ +| v1.12.14 | 1.25.7 | ++-----------------+----------------+ | v1.12 | 1.25.7 | +-----------------+----------------+ | latest / master | 1.26.9 | diff --git a/Documentation/conf.py b/Documentation/conf.py index 076fc219288c4..832beb8ac3c26 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -176,7 +176,7 @@ spelling_filters = ["cilium_spellfilters.WireGuardFilter"] # Ignore some warnings from MyST parser -suppress_warnings = ['myst.header'] +suppress_warnings = ['myst.header', 'myst.xref_missing'] googleanalytics_id = 'G-V9SYWYG92Y' diff --git a/Documentation/gettingstarted/egress-gateway.rst b/Documentation/gettingstarted/egress-gateway.rst index cbc348f80fcb5..3192da45470d8 100644 --- a/Documentation/gettingstarted/egress-gateway.rst +++ b/Documentation/gettingstarted/egress-gateway.rst @@ -78,6 +78,12 @@ acceleration (``--bpf-lb-acceleration=native``), the user must ensure that the host Iptables configuration allows packets through the ``FORWARD`` chain. Full support will be added in an upcoming release once :gh-issue:`19717` is resolved. +Cluster Mesh +------------ + +Egress gateway is not compatible with the Cluster Mesh feature. The gateway selected +by an egress gateway policy must be in the same cluster as the selected pods. + Enable egress gateway ===================== diff --git a/Documentation/gettingstarted/encryption-ipsec.rst b/Documentation/gettingstarted/encryption-ipsec.rst index 27be2e0d9a98a..448acfec094e8 100644 --- a/Documentation/gettingstarted/encryption-ipsec.rst +++ b/Documentation/gettingstarted/encryption-ipsec.rst @@ -182,6 +182,11 @@ included and should be monotonically increasing every re-key with a rollover from 15 to 1. The Cilium agent will default to ``KEYID`` of zero if its not specified in the secret. +If you are using Cluster Mesh, you must apply the key rotation procedure +to all clusters in the mesh. You might need to increase the transition time to +allow for the new keys to be deployed and applied across all clusters, +which you can do with the agent flag ``ipsec-key-rotation-duration``. + Troubleshooting =============== @@ -220,6 +225,16 @@ Troubleshooting ``XfrmOutStateSeqError``. A key rotation resets all sequence numbers. Rotate keys frequently to avoid this issue. + * After a key rotation, if the old key is cleaned up before the + configuration of the new key is installed on all nodes, it results in + ``XfrmInNoStates`` errors. The old key is removed from nodes after a default + interval of 5 minutes by default. By default, all agents watch for key + updates and update their configuration within 1 minute after the key is + changed, leaving plenty of time before the old key is removed. If you expect + the key rotation to take longer for some reason (for example, in the case of + Cluster Mesh where several clusters need to be updated), you can increase the + delay before cleanup with agent flag ``ipsec-key-rotation-duration``. + * ``XfrmInStateProtoError`` errors can happen if the key is updated without incrementing the SPI (also called ``KEYID`` in :ref:`ipsec_key_rotation` instructions above). It can be fixed by performing a new key rotation, diff --git a/Documentation/helm-values.rst b/Documentation/helm-values.rst index 086159f69d4d1..e5203332dceca 100644 --- a/Documentation/helm-values.rst +++ b/Documentation/helm-values.rst @@ -192,7 +192,7 @@ * - :spelling:ignore:`clustermesh.apiserver.image` - Clustermesh API server image. - object - - ``{"digest":"","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/clustermesh-apiserver","tag":"v1.12.14","useDigest":false}`` + - ``{"digest":"","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/clustermesh-apiserver","tag":"v1.12.15","useDigest":false}`` * - :spelling:ignore:`clustermesh.apiserver.nodeSelector` - Node labels for pod assignment ref: https://kubernetes.io/docs/user-guide/node-selection/ - object @@ -373,6 +373,10 @@ - Remove the CNI configuration and binary files on agent shutdown. Enable this if you're removing Cilium from the cluster. Disable this to prevent the CNI configuration file from being removed during agent upgrade, which can cause nodes to go unmanageable. - bool - ``true`` + * - :spelling:ignore:`conntrackGCMaxInterval` + - Configure the maximum frequency for the garbage collection of the connection tracking table. Only affects the automatic computation for the frequency and has no effect when 'conntrackGCInterval' is set. This can be set to more frequently clean up unused identities created from ToFQDN policies. + - string + - ``""`` * - :spelling:ignore:`containerRuntime` - Configure container runtime specific integration. - object @@ -812,7 +816,7 @@ * - :spelling:ignore:`hubble.relay.image` - Hubble-relay container image. - object - - ``{"digest":"","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/hubble-relay","tag":"v1.12.14","useDigest":false}`` + - ``{"digest":"","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/hubble-relay","tag":"v1.12.15","useDigest":false}`` * - :spelling:ignore:`hubble.relay.listenHost` - Host to listen to. Specify an empty string to bind to all the interfaces. - string @@ -1040,7 +1044,7 @@ * - :spelling:ignore:`hubble.ui.backend.image` - Hubble-ui backend image. - object - - ``{"override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/hubble-ui-backend","tag":"v0.11.0@sha256:14c04d11f78da5c363f88592abae8d2ecee3cbe009f443ef11df6ac5f692d839"}`` + - ``{"override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/hubble-ui-backend","tag":"v0.12.1@sha256:1f86f3400827a0451e6332262467f894eeb7caf0eb8779bd951e2caa9d027cbe"}`` * - :spelling:ignore:`hubble.ui.backend.resources` - Resource requests and limits for the 'backend' container of the 'hubble-ui' deployment. - object @@ -1072,7 +1076,7 @@ * - :spelling:ignore:`hubble.ui.frontend.image` - Hubble-ui frontend image. - object - - ``{"override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/hubble-ui","tag":"v0.11.0@sha256:bcb369c47cada2d4257d63d3749f7f87c91dde32e010b223597306de95d1ecc8"}`` + - ``{"override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/hubble-ui","tag":"v0.12.1@sha256:9e5f81ee747866480ea1ac4630eb6975ff9227f9782b7c93919c081c33f38267"}`` * - :spelling:ignore:`hubble.ui.frontend.resources` - Resource requests and limits for the 'frontend' container of the 'hubble-ui' deployment. - object @@ -1176,7 +1180,7 @@ * - :spelling:ignore:`image` - Agent container image. - object - - ``{"digest":"","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/cilium","tag":"v1.12.14","useDigest":false}`` + - ``{"digest":"","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/cilium","tag":"v1.12.15","useDigest":false}`` * - :spelling:ignore:`imagePullSecrets` - Configure image pull secrets for pulling container images - string @@ -1448,7 +1452,7 @@ * - :spelling:ignore:`operator.image` - cilium-operator image. - object - - ``{"alibabacloudDigest":"","awsDigest":"","azureDigest":"","genericDigest":"","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/operator","suffix":"","tag":"v1.12.14","useDigest":false}`` + - ``{"alibabacloudDigest":"","awsDigest":"","azureDigest":"","genericDigest":"","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/operator","suffix":"","tag":"v1.12.15","useDigest":false}`` * - :spelling:ignore:`operator.nodeGCInterval` - Interval for cilium node garbage collection. - string @@ -1620,7 +1624,7 @@ * - :spelling:ignore:`preflight.image` - Cilium pre-flight image. - object - - ``{"digest":"","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/cilium","tag":"v1.12.14","useDigest":false}`` + - ``{"digest":"","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/cilium","tag":"v1.12.15","useDigest":false}`` * - :spelling:ignore:`preflight.nodeSelector` - Node labels for preflight pod assignment ref: https://kubernetes.io/docs/user-guide/node-selection/ - object diff --git a/Documentation/operations/system_requirements.rst b/Documentation/operations/system_requirements.rst index 0d7772027fce8..e36704b9d5c85 100644 --- a/Documentation/operations/system_requirements.rst +++ b/Documentation/operations/system_requirements.rst @@ -483,6 +483,17 @@ filesystem to be automatically mounted when the node boots. If you are using systemd to manage the kubelet, see the section :ref:`bpffs_systemd`. +Routing Tables +============== + +When running in :ref:`ipam_eni` IPAM mode, Cilium will install per-ENI routing +tables for each ENI that is used by Cilium for pod IP allocation. +These routing tables are added to the host network namespace and must not be +otherwise used by the system. +The index of those per-ENI routing tables is computed as +``10 + ``. The base offset of 10 is chosen as it is highly +unlikely to collide with the main routing table which is between 253-255. + Privileges ========== diff --git a/Documentation/requirements-min/requirements.txt b/Documentation/requirements-min/requirements.txt index 788b6c6749cd0..813e7c62e0f3d 100644 --- a/Documentation/requirements-min/requirements.txt +++ b/Documentation/requirements-min/requirements.txt @@ -1,15 +1,15 @@ -sphinx==5.3.0 +sphinx==7.1.2 sphinx-autobuild==2021.3.14 # Custom theme, forked from Read the Docs -git+https://github.com/cilium/sphinx_rtd_theme.git@v1.0#egg=sphinx-rtd-theme-cilium +git+https://github.com/cilium/sphinx_rtd_theme.git@cilium/rebase-2023-09#egg=sphinx-rtd-theme-cilium # We use semver to parse Cilium's version in the config file -semver==2.13.0 +semver==3.0.1 # Sphinx extensions -myst-parser==0.18.1 -sphinx-tabs==3.4.0 +myst-parser==2.0.0 +sphinx-tabs==3.4.1 sphinx-version-warning==1.1.2 sphinxcontrib-googleanalytics==0.4 sphinxcontrib-openapi==0.8.1 @@ -17,5 +17,5 @@ sphinxcontrib-spelling==8.0.0 sphinxcontrib-websupport==1.2.4 # Linters -rstcheck==6.1.1 -yamllint==1.29.0 +rstcheck==6.2.0 +yamllint==1.32.0 diff --git a/Documentation/requirements.txt b/Documentation/requirements.txt index 3fc21a61070a7..c602ae0be4e5a 100644 --- a/Documentation/requirements.txt +++ b/Documentation/requirements.txt @@ -1,72 +1,70 @@ ## Auto-generated from requirements-min/requirements.txt with "make update-requirements" -sphinx==5.3.0 +Sphinx==7.1.2 sphinx-autobuild==2021.3.14 # Custom theme, forked from Read the Docs -sphinx-rtd-theme-cilium @ git+https://github.com/cilium/sphinx_rtd_theme.git@518ccd93123244a27c36c99e32b53a0db855e574 +sphinx-rtd-theme-cilium @ git+https://github.com/cilium/sphinx_rtd_theme.git@84a34e7f301e9bfed5330da9acdb65d62020af4d # We use semver to parse Cilium's version in the config file -semver==2.13.0 +semver==3.0.1 # Sphinx extensions -myst-parser==0.18.1 -sphinx-tabs==3.4.0 +myst-parser==2.0.0 +sphinx-tabs==3.4.1 sphinx-version-warning==1.1.2 sphinxcontrib-googleanalytics==0.4 sphinxcontrib-openapi==0.8.1 sphinxcontrib-spelling==8.0.0 sphinxcontrib-websupport==1.2.4 # Linters -rstcheck==6.1.1 -yamllint==1.29.0 +rstcheck==6.2.0 +yamllint==1.32.0 ## The following requirements were added by pip freeze: alabaster==0.7.13 -attrs==22.2.0 +annotated-types==0.5.0 +attrs==23.1.0 Babel==2.12.1 -certifi==2022.12.7 -charset-normalizer==3.0.1 -click==8.1.3 +certifi==2023.7.22 +charset-normalizer==3.2.0 +click==8.1.7 colorama==0.4.6 -commonmark==0.9.1 deepmerge==1.1.0 -docutils==0.17.1 +docutils==0.18.1 idna==3.4 imagesize==1.4.1 -importlib-metadata==4.13.0 -importlib-resources==5.12.0 -Jinja2==3.0.3 -jsonschema==4.17.3 +Jinja2==3.1.2 +jsonschema==4.19.0 +jsonschema-specifications==2023.7.1 livereload==2.6.3 -markdown-it-py==2.2.0 -MarkupSafe==2.1.2 -mdit-py-plugins==0.3.4 +markdown-it-py==3.0.0 +MarkupSafe==2.1.3 +mdit-py-plugins==0.4.0 mdurl==0.1.2 mistune==2.0.5 -packaging==23.0 -pathspec==0.11.0 -picobox==2.2.0 -pkgutil-resolve-name==1.3.10 -pydantic==1.10.5 +packaging==23.1 +pathspec==0.11.2 +picobox==3.0.0 +pydantic==2.3.0 +pydantic_core==2.6.3 pyenchant==3.2.2 -Pygments==2.14.0 -pyrsistent==0.19.3 -pytz==2022.7.1 +Pygments==2.16.1 PyYAML==6.0.1 +referencing==0.30.2 requests==2.31.0 -rich==12.6.0 -rstcheck-core==1.0.3 -shellingham==1.5.0.post1 +rich==13.5.2 +rpds-py==0.10.3 +rstcheck-core==1.1.1 +shellingham==1.5.3 six==1.16.0 snowballstemmer==2.2.0 -sphinx-mdinclude==0.5.3 -sphinxcontrib-applehelp==1.0.2 +sphinx_mdinclude==0.5.3 +sphinxcontrib-applehelp==1.0.4 sphinxcontrib-devhelp==1.0.2 -sphinxcontrib-htmlhelp==2.0.0 +sphinxcontrib-htmlhelp==2.0.1 sphinxcontrib-httpdomain==1.8.1 +sphinxcontrib-jquery==4.1 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 -tornado==6.2 -typer==0.7.0 -types-docutils==0.19.1.6 -typing-extensions==4.5.0 -urllib3==1.26.14 -zipp==3.15.0 +tornado==6.3.3 +typer==0.9.0 +typing_extensions==4.7.1 +urllib3==2.0.4 diff --git a/Documentation/spelling_wordlist.txt b/Documentation/spelling_wordlist.txt index 3254ed1202e88..5ed6cce632901 100644 --- a/Documentation/spelling_wordlist.txt +++ b/Documentation/spelling_wordlist.txt @@ -29,6 +29,7 @@ Dinan Dockerfile Dockerfiles Donenfeld +ENI FIt Fastabend Fosdem @@ -196,6 +197,7 @@ config configmap configs conntrack +conntrackGCInterval containerd contrib coord diff --git a/VERSION b/VERSION index d49ade8e72f02..0c86ae8ce8860 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.12.14 +1.12.15 diff --git a/api/v1/Makefile b/api/v1/Makefile index e068431c72cd5..12c9576bebff7 100644 --- a/api/v1/Makefile +++ b/api/v1/Makefile @@ -3,7 +3,7 @@ include ../../Makefile.defs # Update this via images/scripts/update-cilium-builder-image.sh -CILIUM_BUILDER_IMAGE=quay.io/cilium/cilium-builder:8462634e533ec37894aa2fefb1da093cf4ec662b@sha256:18b40bcc762892c1a47fe369afd87b6d6f07ccdef4de82830930151ee96401b9 +CILIUM_BUILDER_IMAGE=quay.io/cilium/cilium-builder:54d43abf39b5855d3962a88e2911708b653cae9b@sha256:83060d7c62a03b4cdf775031776a303df2ef48382036e22ffceca12663d12e47 .PHONY: proto proto: diff --git a/bpf/bpf_host.c b/bpf/bpf_host.c index 386986cacabe6..1a4adaba48b5e 100644 --- a/bpf/bpf_host.c +++ b/bpf/bpf_host.c @@ -781,10 +781,8 @@ static __always_inline int do_netdev_encrypt_encap(struct __ctx_buff *ctx, __u32 break; # endif /* ENABLE_IPV4 */ } - if (!ep) - return send_drop_notify_error(ctx, src_id, - DROP_NO_TUNNEL_ENDPOINT, - CTX_ACT_DROP, METRIC_EGRESS); + if (!ep || !ep->tunnel_endpoint) + return DROP_NO_TUNNEL_ENDPOINT; ctx->mark = 0; bpf_clear_meta(ctx); @@ -816,7 +814,8 @@ do_netdev(struct __ctx_buff *ctx, __u16 proto, const bool from_host) ctx->mark = 0; tail_call_dynamic(ctx, &POLICY_EGRESSCALL_MAP, lxc_id); - return DROP_MISSED_TAIL_CALL; + return send_drop_notify_error(ctx, identity, DROP_MISSED_TAIL_CALL, + CTX_ACT_DROP, METRIC_EGRESS); } } #endif @@ -839,7 +838,11 @@ do_netdev(struct __ctx_buff *ctx, __u16 proto, const bool from_host) send_trace_notify(ctx, TRACE_FROM_STACK, identity, 0, 0, ctx->ingress_ifindex, TRACE_REASON_ENCRYPTED, TRACE_PAYLOAD_LEN); - return do_netdev_encrypt(ctx, identity); + ret = do_netdev_encrypt(ctx, identity); + if (IS_ERR(ret)) + return send_drop_notify_error(ctx, identity, ret, + CTX_ACT_DROP, METRIC_EGRESS); + return ret; } #endif @@ -1247,20 +1250,20 @@ to_host_from_lxc(struct __ctx_buff *ctx __maybe_unused) # endif # ifdef ENABLE_IPV6 case bpf_htons(ETH_P_IPV6): - invoke_tailcall_if(__or(__and(is_defined(ENABLE_IPV4), - is_defined(ENABLE_IPV6)), - is_defined(DEBUG)), - CILIUM_CALL_IPV6_TO_HOST_POLICY_ONLY, - tail_ipv6_host_policy_ingress); + ret = invoke_tailcall_if(__or(__and(is_defined(ENABLE_IPV4), + is_defined(ENABLE_IPV6)), + is_defined(DEBUG)), + CILIUM_CALL_IPV6_TO_HOST_POLICY_ONLY, + tail_ipv6_host_policy_ingress); break; # endif # ifdef ENABLE_IPV4 case bpf_htons(ETH_P_IP): - invoke_tailcall_if(__or(__and(is_defined(ENABLE_IPV4), - is_defined(ENABLE_IPV6)), - is_defined(DEBUG)), - CILIUM_CALL_IPV4_TO_HOST_POLICY_ONLY, - tail_ipv4_host_policy_ingress); + ret = invoke_tailcall_if(__or(__and(is_defined(ENABLE_IPV4), + is_defined(ENABLE_IPV6)), + is_defined(DEBUG)), + CILIUM_CALL_IPV4_TO_HOST_POLICY_ONLY, + tail_ipv4_host_policy_ingress); break; # endif default: @@ -1344,7 +1347,8 @@ int handle_lxc_traffic(struct __ctx_buff *ctx) lxc_id = ctx_load_meta(ctx, CB_DST_ENDPOINT_ID); ctx_store_meta(ctx, CB_SRC_LABEL, HOST_ID); tail_call_dynamic(ctx, &POLICY_CALL_MAP, lxc_id); - return DROP_MISSED_TAIL_CALL; + return send_drop_notify_error(ctx, HOST_ID, DROP_MISSED_TAIL_CALL, + CTX_ACT_DROP, METRIC_EGRESS); } return to_host_from_lxc(ctx); diff --git a/bpf/bpf_lxc.c b/bpf/bpf_lxc.c index a23796a23d7da..fe59fb94ebe7a 100644 --- a/bpf/bpf_lxc.c +++ b/bpf/bpf_lxc.c @@ -75,6 +75,38 @@ #define HAVE_DIRECT_ACCESS_TO_MAP_VALUES \ HAVE_PROG_TYPE_HELPER(sched_cls, bpf_fib_lookup) +#if defined ENABLE_IPV4 || defined ENABLE_IPV6 +static __always_inline int drop_for_direction(struct __ctx_buff *ctx, + enum ct_dir dir, __u32 reason) +{ + __u32 dst = 0; + __u32 dst_id = 0; + enum metric_dir m_dir = METRIC_EGRESS; + __u32 src_label = 0; + + switch (dir) { + case CT_EGRESS: + dst_id = 0; + dst = 0; + src_label = SECLABEL; + m_dir = METRIC_EGRESS; + break; + case CT_INGRESS: + dst = SECLABEL; + dst_id = LXC_ID; + src_label = ctx_load_meta(ctx, CB_SRC_LABEL); + m_dir = METRIC_INGRESS; + break; + /* ingress/egress only for now */ + default: + __throw_build_bug(); + } + + return send_drop_notify(ctx, src_label, dst, dst_id, reason, + CTX_ACT_DROP, m_dir); +} +#endif /* ENABLE_IPV4 || ENABLE_IPV6 */ + #define TAIL_CT_LOOKUP4(ID, NAME, DIR, CONDITION, TARGET_ID, TARGET_NAME) \ declare_tailcall_if(CONDITION, ID) \ int NAME(struct __ctx_buff *ctx) \ @@ -91,7 +123,7 @@ int NAME(struct __ctx_buff *ctx) \ tuple = (struct ipv4_ct_tuple *)&ct_buffer.tuple; \ \ if (!revalidate_data(ctx, &data, &data_end, &ip4)) \ - return DROP_INVALID; \ + return drop_for_direction(ctx, DIR, DROP_INVALID); \ \ tuple->nexthdr = ip4->protocol; \ tuple->daddr = ip4->daddr; \ @@ -102,12 +134,14 @@ int NAME(struct __ctx_buff *ctx) \ ct_buffer.ret = ct_lookup4(get_ct_map4(tuple), tuple, ctx, l4_off, \ DIR, ct_state, &ct_buffer.monitor); \ if (ct_buffer.ret < 0) \ - return ct_buffer.ret; \ - \ + return drop_for_direction(ctx, DIR, ct_buffer.ret); \ if (map_update_elem(&CT_TAIL_CALL_BUFFER4, &zero, &ct_buffer, 0) < 0) \ - return DROP_INVALID_TC_BUFFER; \ + return drop_for_direction(ctx, DIR, DROP_INVALID_TC_BUFFER); \ + \ + ret = invoke_tailcall_if(CONDITION, TARGET_ID, TARGET_NAME); \ + if (IS_ERR(ret)) \ + return drop_for_direction(ctx, DIR, ret); \ \ - invoke_tailcall_if(CONDITION, TARGET_ID, TARGET_NAME); \ return ret; \ } @@ -127,7 +161,7 @@ int NAME(struct __ctx_buff *ctx) \ tuple = (struct ipv6_ct_tuple *)&ct_buffer.tuple; \ \ if (!revalidate_data(ctx, &data, &data_end, &ip6)) \ - return DROP_INVALID; \ + return drop_for_direction(ctx, DIR, DROP_INVALID); \ \ tuple->nexthdr = ip6->nexthdr; \ ipv6_addr_copy(&tuple->daddr, (union v6addr *)&ip6->daddr); \ @@ -135,19 +169,23 @@ int NAME(struct __ctx_buff *ctx) \ \ hdrlen = ipv6_hdrlen(ctx, &tuple->nexthdr); \ if (hdrlen < 0) \ - return hdrlen; \ + return drop_for_direction(ctx, DIR, hdrlen); \ \ l4_off = ETH_HLEN + hdrlen; \ \ ct_buffer.ret = ct_lookup6(get_ct_map6(tuple), tuple, ctx, l4_off, \ DIR, ct_state, &ct_buffer.monitor); \ if (ct_buffer.ret < 0) \ - return ct_buffer.ret; \ + return drop_for_direction(ctx, DIR, ct_buffer.ret); \ \ if (map_update_elem(&CT_TAIL_CALL_BUFFER6, &zero, &ct_buffer, 0) < 0) \ - return DROP_INVALID_TC_BUFFER; \ + return drop_for_direction(ctx, DIR, \ + DROP_INVALID_TC_BUFFER); \ + \ + ret = invoke_tailcall_if(CONDITION, TARGET_ID, TARGET_NAME); \ + if (IS_ERR(ret)) \ + return drop_for_direction(ctx, DIR, ret); \ \ - invoke_tailcall_if(CONDITION, TARGET_ID, TARGET_NAME); \ return ret; \ } @@ -697,9 +735,8 @@ static __always_inline int __tail_handle_ipv6(struct __ctx_buff *ctx) } #endif /* ENABLE_PER_PACKET_LB */ - invoke_tailcall_if(is_defined(ENABLE_PER_PACKET_LB), - CILIUM_CALL_IPV6_CT_EGRESS, tail_ipv6_ct_egress); - return ret; + return invoke_tailcall_if(is_defined(ENABLE_PER_PACKET_LB), + CILIUM_CALL_IPV6_CT_EGRESS, tail_ipv6_ct_egress); } __section_tail(CILIUM_MAP_CALLS, CILIUM_CALL_IPV6_FROM_LXC) @@ -1213,7 +1250,6 @@ static __always_inline int __tail_handle_ipv4(struct __ctx_buff *ctx) { void *data, *data_end; struct iphdr *ip4; - int ret; if (!revalidate_data_pull(ctx, &data, &data_end, &ip4)) return DROP_INVALID; @@ -1239,7 +1275,7 @@ static __always_inline int __tail_handle_ipv4(struct __ctx_buff *ctx) struct lb4_service *svc; struct lb4_key key = {}; __u16 proxy_port = 0; - int l4_off; + int l4_off, ret; has_l4_header = ipv4_has_l4_header(ip4); tuple.nexthdr = ip4->protocol; @@ -1280,9 +1316,8 @@ static __always_inline int __tail_handle_ipv4(struct __ctx_buff *ctx) } #endif /* ENABLE_PER_PACKET_LB */ - invoke_tailcall_if(is_defined(ENABLE_PER_PACKET_LB), - CILIUM_CALL_IPV4_CT_EGRESS, tail_ipv4_ct_egress); - return ret; + return invoke_tailcall_if(is_defined(ENABLE_PER_PACKET_LB), + CILIUM_CALL_IPV4_CT_EGRESS, tail_ipv4_ct_egress); } __section_tail(CILIUM_MAP_CALLS, CILIUM_CALL_IPV4_FROM_LXC) @@ -2091,7 +2126,7 @@ int tail_ipv4_to_endpoint(struct __ctx_buff *ctx) */ if (ipv4_to_endpoint_is_hairpin_flow(ctx, ip4)) { send_trace_notify4(ctx, TRACE_TO_LXC, - ctx_load_meta(ctx, CB_SRC_LABEL), + src_identity, SECLABEL, ip4->saddr, LXC_ID, ctx->ingress_ifindex, TRACE_REASON_UNKNOWN, 0); @@ -2165,16 +2200,16 @@ int handle_policy(struct __ctx_buff *ctx) switch (proto) { #ifdef ENABLE_IPV6 case bpf_htons(ETH_P_IPV6): - invoke_tailcall_if(__and(is_defined(ENABLE_IPV4), is_defined(ENABLE_IPV6)), - CILIUM_CALL_IPV6_CT_INGRESS_POLICY_ONLY, - tail_ipv6_ct_ingress_policy_only); + ret = invoke_tailcall_if(__and(is_defined(ENABLE_IPV4), is_defined(ENABLE_IPV6)), + CILIUM_CALL_IPV6_CT_INGRESS_POLICY_ONLY, + tail_ipv6_ct_ingress_policy_only); break; #endif /* ENABLE_IPV6 */ #ifdef ENABLE_IPV4 case bpf_htons(ETH_P_IP): - invoke_tailcall_if(__and(is_defined(ENABLE_IPV4), is_defined(ENABLE_IPV6)), - CILIUM_CALL_IPV4_CT_INGRESS_POLICY_ONLY, - tail_ipv4_ct_ingress_policy_only); + ret = invoke_tailcall_if(__and(is_defined(ENABLE_IPV4), is_defined(ENABLE_IPV6)), + CILIUM_CALL_IPV4_CT_INGRESS_POLICY_ONLY, + tail_ipv4_ct_ingress_policy_only); break; #endif /* ENABLE_IPV4 */ default: @@ -2267,7 +2302,9 @@ int handle_to_container(struct __ctx_buff *ctx) #if defined(ENABLE_L7_LB) else if (magic == MARK_MAGIC_PROXY_EGRESS_EPID) { tail_call_dynamic(ctx, &POLICY_EGRESSCALL_MAP, identity); - return DROP_MISSED_TAIL_CALL; + return send_drop_notify(ctx, identity, SECLABEL, LXC_ID, + DROP_MISSED_TAIL_CALL, CTX_ACT_DROP, + METRIC_INGRESS); } #endif @@ -2287,7 +2324,9 @@ int handle_to_container(struct __ctx_buff *ctx) ctx_store_meta(ctx, CB_FROM_HOST, 1); ctx_store_meta(ctx, CB_DST_ENDPOINT_ID, LXC_ID); tail_call_static(ctx, &POLICY_CALL_MAP, HOST_EP_ID); - return DROP_MISSED_TAIL_CALL; + return send_drop_notify(ctx, identity, SECLABEL, LXC_ID, + DROP_MISSED_TAIL_CALL, CTX_ACT_DROP, + METRIC_INGRESS); } #endif /* ENABLE_HOST_FIREWALL && !ENABLE_ROUTING */ diff --git a/bpf/bpf_overlay.c b/bpf/bpf_overlay.c index 508e3cdb037ed..fd8452cd77f9b 100644 --- a/bpf/bpf_overlay.c +++ b/bpf/bpf_overlay.c @@ -373,14 +373,18 @@ int tail_handle_arp(struct __ctx_buff *ctx) ret = arp_prepare_response(ctx, &mac, tip, &smac, sip); if (unlikely(ret != 0)) return send_drop_notify_error(ctx, 0, ret, CTX_ACT_DROP, METRIC_EGRESS); - if (info->tunnel_endpoint) - return __encap_and_redirect_with_nodeid(ctx, - info->tunnel_endpoint, - SECLABEL, - WORLD_ID, - &trace); - - return send_drop_notify_error(ctx, 0, DROP_UNKNOWN_L3, CTX_ACT_DROP, METRIC_EGRESS); + if (info->tunnel_endpoint) { + ret = __encap_and_redirect_with_nodeid(ctx, info->tunnel_endpoint, + SECLABEL, WORLD_ID, &trace); + if (IS_ERR(ret)) + goto drop_err; + + return ret; + } + + ret = DROP_UNKNOWN_L3; +drop_err: + return send_drop_notify_error(ctx, 0, ret, CTX_ACT_DROP, METRIC_EGRESS); pass_to_stack: send_trace_notify(ctx, TRACE_TO_STACK, 0, 0, 0, ctx->ingress_ifindex, diff --git a/bpf/lib/nodeport.h b/bpf/lib/nodeport.h index 38aefef493b03..fddd37425aa76 100644 --- a/bpf/lib/nodeport.h +++ b/bpf/lib/nodeport.h @@ -2154,23 +2154,23 @@ static __always_inline int handle_nat_fwd(struct __ctx_buff *ctx) switch (proto) { #ifdef ENABLE_IPV4 case bpf_htons(ETH_P_IP): - invoke_tailcall_if(__or3(__and(is_defined(ENABLE_IPV4), - is_defined(ENABLE_IPV6)), - __and(is_defined(ENABLE_HOST_FIREWALL), - is_defined(IS_BPF_HOST)), - is_defined(ENABLE_EGRESS_GATEWAY)), - CILIUM_CALL_IPV4_ENCAP_NODEPORT_NAT, - handle_nat_fwd_ipv4); + ret = invoke_tailcall_if(__or3(__and(is_defined(ENABLE_IPV4), + is_defined(ENABLE_IPV6)), + __and(is_defined(ENABLE_HOST_FIREWALL), + is_defined(IS_BPF_HOST)), + is_defined(ENABLE_EGRESS_GATEWAY)), + CILIUM_CALL_IPV4_ENCAP_NODEPORT_NAT, + handle_nat_fwd_ipv4); break; #endif /* ENABLE_IPV4 */ #ifdef ENABLE_IPV6 case bpf_htons(ETH_P_IPV6): - invoke_tailcall_if(__or(__and(is_defined(ENABLE_IPV4), - is_defined(ENABLE_IPV6)), - __and(is_defined(ENABLE_HOST_FIREWALL), - is_defined(IS_BPF_HOST))), - CILIUM_CALL_IPV6_ENCAP_NODEPORT_NAT, - handle_nat_fwd_ipv6); + ret = invoke_tailcall_if(__or(__and(is_defined(ENABLE_IPV4), + is_defined(ENABLE_IPV6)), + __and(is_defined(ENABLE_HOST_FIREWALL), + is_defined(IS_BPF_HOST))), + CILIUM_CALL_IPV6_ENCAP_NODEPORT_NAT, + handle_nat_fwd_ipv6); break; #endif /* ENABLE_IPV6 */ default: diff --git a/bpf/lib/proxy.h b/bpf/lib/proxy.h index adc7caa7172f6..7be46bfa808d8 100644 --- a/bpf/lib/proxy.h +++ b/bpf/lib/proxy.h @@ -107,7 +107,7 @@ combine_ports(__u16 dport, __u16 sport) * ingress. Will modify 'tuple'! \ */ \ static __always_inline int \ -NAME(struct __ctx_buff *ctx, CT_TUPLE_TYPE * ct_tuple, __be16 proxy_port) \ +NAME(struct __ctx_buff *ctx, const CT_TUPLE_TYPE * ct_tuple, __be16 proxy_port) \ { \ struct bpf_sock_tuple *tuple = (struct bpf_sock_tuple *)ct_tuple; \ __u8 nexthdr = ct_tuple->nexthdr; \ diff --git a/bpf/lib/tailcall.h b/bpf/lib/tailcall.h index 4102518c5ac69..1b89704de84b8 100644 --- a/bpf/lib/tailcall.h +++ b/bpf/lib/tailcall.h @@ -98,12 +98,12 @@ __eval(__declare_tailcall_if_, COND)(NAME) #define __invoke_tailcall_if_0(NAME, FUNC) \ - return FUNC(ctx) + FUNC(ctx) #define __invoke_tailcall_if_1(NAME, FUNC) \ - do { \ + ({ \ ep_tail_call(ctx, NAME); \ - ret = DROP_MISSED_TAIL_CALL; \ - } while (0) + DROP_MISSED_TAIL_CALL; \ + }) #define invoke_tailcall_if(COND, NAME, FUNC) \ __eval(__invoke_tailcall_if_, COND)(NAME, FUNC) diff --git a/cilium/cmd/encrypt_status.go b/cilium/cmd/encrypt_status.go index d87cf215d2efe..5173d922229fd 100644 --- a/cilium/cmd/encrypt_status.go +++ b/cilium/cmd/encrypt_status.go @@ -84,6 +84,10 @@ func countUniqueIPsecKeys() int { Fatalf("Cannot get xfrm state: %s", err) } for _, v := range xfrmStates { + if v.Aead == nil { + fmt.Printf("Warning: non-AEAD xfrm state found: %s\n", v.String()) + continue + } keys[string(v.Aead.Key)] = voidType } diff --git a/contrib/coccinelle/aligned.cocci b/contrib/coccinelle/aligned.cocci index 6493700694a2f..9be21fd896727 100644 --- a/contrib/coccinelle/aligned.cocci +++ b/contrib/coccinelle/aligned.cocci @@ -63,7 +63,9 @@ cnt += 1 if cnt > 0: print("""Use the following command to fix the above issues: -docker run --rm --user 1000 --workdir /workspace -v `pwd`:/workspace \\ - -it docker.io/cilium/coccicheck spatch --sp-file contrib/coccinelle/aligned.cocci \\ - --include-headers --very-quiet --in-place bpf/\n +docker run --rm --user 1000 --workdir /workspace -v `pwd`:/workspace \\ + -e COCCINELLE_HOME=/usr/local/lib/coccinelle \\ + -it docker.io/cilium/coccicheck:2.4@sha256:24abe3fbb8e829fa41a68a3b76cb4df84fd5a87a7d1d6254c1c1fe5effb5bd1b \\ + spatch --include-headers --very-quiet --in-place bpf/ \\ + --sp-file contrib/coccinelle/aligned.cocci\n """) diff --git a/contrib/coccinelle/const.cocci b/contrib/coccinelle/const.cocci index ff8f6190f9ea0..c60f55d405df1 100644 --- a/contrib/coccinelle/const.cocci +++ b/contrib/coccinelle/const.cocci @@ -67,7 +67,9 @@ cnt += 1 if cnt > 0: print("""Use the following command to fix the above issues: -docker run --rm --user 1000 --workdir /workspace -v `pwd`:/workspace \\ - -it docker.io/cilium/coccicheck spatch --sp-file contrib/coccinelle/const.cocci \\ - --include-headers --very-quiet --in-place bpf/\n +docker run --rm --user 1000 --workdir /workspace -v `pwd`:/workspace \\ + -e COCCINELLE_HOME=/usr/local/lib/coccinelle \\ + -it docker.io/cilium/coccicheck:2.4@sha256:24abe3fbb8e829fa41a68a3b76cb4df84fd5a87a7d1d6254c1c1fe5effb5bd1b \\ + spatch --include-headers --very-quiet --in-place bpf/ \\ + --sp-file contrib/coccinelle/const.cocci\n """) diff --git a/contrib/coccinelle/identity_is_node.cocci b/contrib/coccinelle/identity_is_node.cocci index 65bede21b7ad3..4273d03f390a0 100644 --- a/contrib/coccinelle/identity_is_node.cocci +++ b/contrib/coccinelle/identity_is_node.cocci @@ -60,7 +60,9 @@ if len(p2) > 0: if cnt > 0: print("""Use the following command to fix the above issues: -docker run --rm --user 1000 --workdir /workspace -v `pwd`:/workspace \\ - -it docker.io/cilium/coccicheck spatch --sp-file contrib/coccinelle/identity_is_node.cocci \\ - --include-headers --very-quiet --in-place bpf/\n +docker run --rm --user 1000 --workdir /workspace -v `pwd`:/workspace \\ + -e COCCINELLE_HOME=/usr/local/lib/coccinelle \\ + -it docker.io/cilium/coccicheck:2.4@sha256:24abe3fbb8e829fa41a68a3b76cb4df84fd5a87a7d1d6254c1c1fe5effb5bd1b \\ + spatch --include-headers --very-quiet --in-place bpf/ \\ + --sp-file contrib/coccinelle/identity_is_node.cocci\n """) diff --git a/contrib/coccinelle/tail_calls.cocci b/contrib/coccinelle/tail_calls.cocci index 09d5e8c07c11e..39f5a1ce6e6d2 100644 --- a/contrib/coccinelle/tail_calls.cocci +++ b/contrib/coccinelle/tail_calls.cocci @@ -109,5 +109,8 @@ cnt += 1 if cnt > 0: print("""Unlogged tail calls found. Please fix and use the following command to check: docker run --rm --user 1000 --workdir /workspace -v `pwd`:/workspace \\ - -it docker.io/cilium/coccicheck make -C bpf coccicheck\n + -e COCCINELLE_HOME=/usr/local/lib/coccinelle \\ + -it docker.io/cilium/coccicheck:2.3@sha256:56c7445e3d0cc37de49750f5dfd154786082c4be6bc17683c231c0445862233a \\ + spatch --include-headers --very-quiet --in-place bpf/ \\ + --sp-file contrib/coccinelle/tail_calls.cocci\n """) diff --git a/contrib/coccinelle/zero_trace_reason.cocci b/contrib/coccinelle/zero_trace_reason.cocci index f26d0fc9210c3..337ac8089c53c 100644 --- a/contrib/coccinelle/zero_trace_reason.cocci +++ b/contrib/coccinelle/zero_trace_reason.cocci @@ -84,7 +84,9 @@ cnt += 1 if cnt > 0: print("""Use the following command to fix the above issues: -docker run --rm --user 1000 --workdir /workspace -v `pwd`:/workspace \\ - -it docker.io/cilium/coccicheck spatch --sp-file contrib/coccinelle/zero_trace_reason.cocci \\ - --include-headers --very-quiet --in-place bpf/\n +docker run --rm --user 1000 --workdir /workspace -v `pwd`:/workspace \\ + -e COCCINELLE_HOME=/usr/local/lib/coccinelle \\ + -it docker.io/cilium/coccicheck:2.3@sha256:56c7445e3d0cc37de49750f5dfd154786082c4be6bc17683c231c0445862233a \\ + spatch --include-headers --very-quiet --in-place bpf/ \\ + --sp-file contrib/coccinelle/zero_trace_reason.cocci\n """) diff --git a/contrib/scripts/print-downgrade-version.sh b/contrib/scripts/print-downgrade-version.sh new file mode 100755 index 0000000000000..adfa58bb147c9 --- /dev/null +++ b/contrib/scripts/print-downgrade-version.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# +# A utility script to print the branch name of the previous stable release. + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +VERSION="$(cat "$SCRIPT_DIR/../../VERSION")" +if [[ $VERSION =~ ([0-9^]+)\.([0-9^]+)\..* ]] ; then + major=${BASH_REMATCH[1]} + minor=${BASH_REMATCH[2]} + ((minor--)) + echo "v${major}.${minor}${BRANCH_SUFFIX:-}" +else + echo "ERROR: failed to parse version '$VERSION'" + exit 1 +fi diff --git a/daemon/cmd/daemon_main.go b/daemon/cmd/daemon_main.go index d0e4d0c19a396..ccec2d11b9db4 100644 --- a/daemon/cmd/daemon_main.go +++ b/daemon/cmd/daemon_main.go @@ -272,6 +272,9 @@ func initializeFlags() { flags.Duration(option.ConntrackGCInterval, time.Duration(0), "Overwrite the connection-tracking garbage collection interval") option.BindEnv(option.ConntrackGCInterval) + flags.Duration(option.ConntrackGCMaxInterval, time.Duration(0), "Set the maximum interval for the connection-tracking garbage collection") + option.BindEnv(option.ConntrackGCMaxInterval) + flags.BoolP(option.DebugArg, "D", false, "Enable debugging mode") option.BindEnv(option.DebugArg) @@ -889,6 +892,10 @@ func initializeFlags() { flags.Int(option.PolicyMapEntriesName, policymap.MaxEntries, "Maximum number of entries in endpoint policy map (per endpoint)") option.BindEnv(option.PolicyMapEntriesName) + flags.Duration(option.PolicyMapFullReconciliationIntervalName, 15*time.Minute, "Interval for full reconciliation of endpoint policy map") + option.BindEnv(option.PolicyMapFullReconciliationIntervalName) + flags.MarkHidden(option.PolicyMapFullReconciliationIntervalName) + flags.Int(option.SockRevNatEntriesName, option.SockRevNATMapEntriesDefault, "Maximum number of entries for the SockRevNAT BPF map") option.BindEnv(option.SockRevNatEntriesName) diff --git a/examples/hubble/hubble-cli.yaml b/examples/hubble/hubble-cli.yaml index 9722ebc73efdd..7be3fdbe07b52 100644 --- a/examples/hubble/hubble-cli.yaml +++ b/examples/hubble/hubble-cli.yaml @@ -17,7 +17,7 @@ spec: spec: containers: - name: hubble-cli - image: quay.io/cilium/hubble:v0.12.0@sha256:1e43b5cd9be0375bb9e0e0f18ad940f0e2a7f47f97ca987be2fe30376da6bc60 + image: quay.io/cilium/hubble:v0.12.2@sha256:e0d11fb8b8f6da5a12817eef1cf6704c98b079da4405e380a98f2b7325a43751 imagePullPolicy: IfNotPresent command: - tail diff --git a/go.mod b/go.mod index fdbd8b3add78a..7b61b26a6d741 100644 --- a/go.mod +++ b/go.mod @@ -40,7 +40,7 @@ require ( github.com/go-openapi/validate v0.22.0 github.com/gogo/protobuf v1.3.2 github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da - github.com/golang/protobuf v1.5.2 + github.com/golang/protobuf v1.5.3 github.com/google/go-cmp v0.5.9 github.com/google/gopacket v1.1.19 github.com/google/gops v0.3.25 @@ -82,18 +82,18 @@ require ( go.uber.org/goleak v1.2.0 go.uber.org/multierr v1.8.0 go.universe.tf/metallb v0.11.0 - golang.org/x/crypto v0.1.0 + golang.org/x/crypto v0.14.0 golang.org/x/exp v0.0.0-20230425010034-47ecfdc1ba53 - golang.org/x/net v0.7.0 - golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 - golang.org/x/sys v0.5.0 + golang.org/x/net v0.17.0 + golang.org/x/sync v0.1.0 + golang.org/x/sys v0.13.0 golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 - golang.org/x/tools v0.2.0 + golang.org/x/tools v0.7.0 golang.zx2c4.com/wireguard v0.0.0-20211017052713-f87e87af0d9a golang.zx2c4.com/wireguard/wgctrl v0.0.0-20211027115401-c9b1ec1aa6d8 - google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd - google.golang.org/grpc v1.47.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 + google.golang.org/grpc v1.56.3 + google.golang.org/protobuf v1.30.0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c gopkg.in/ini.v1 v1.66.6 gopkg.in/yaml.v2 v2.4.0 @@ -126,9 +126,9 @@ require ( github.com/aws/aws-sdk-go-v2/service/sso v1.11.10 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.16.8 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/census-instrumentation/opencensus-proto v0.3.0 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490 // indirect + github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 // indirect github.com/coreos/go-semver v0.3.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect github.com/cyphar/filepath-securejoin v0.2.3 // indirect @@ -140,7 +140,7 @@ require ( github.com/eapache/channels v1.1.0 // indirect github.com/eapache/queue v1.1.0 // indirect github.com/emicklei/go-restful v2.16.0+incompatible // indirect - github.com/envoyproxy/protoc-gen-validate v0.6.2 // indirect + github.com/envoyproxy/protoc-gen-validate v0.10.1 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/fatih/color v1.13.0 // indirect github.com/go-kit/kit v0.12.0 // indirect @@ -215,10 +215,10 @@ require ( go.mongodb.org/mongo-driver v1.8.3 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/zap v1.19.1 // indirect - golang.org/x/mod v0.6.0 // indirect - golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect - golang.org/x/term v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/mod v0.9.0 // indirect + golang.org/x/oauth2 v0.7.0 // indirect + golang.org/x/term v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect google.golang.org/appengine v1.6.7 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect diff --git a/go.sum b/go.sum index 969846acb0b04..84f827dcae9b2 100644 --- a/go.sum +++ b/go.sum @@ -153,12 +153,14 @@ github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnweb github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.3.0 h1:t/LhUZLVitR1Ow2YOnduCsavhwFUklBMoGVYUCqmCqk= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= +github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -197,8 +199,9 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490 h1:KwaoQzs/WeUxxJqiJsZ4euOly1Az/IgZXXSxlD/UBNk= github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= +github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/containernetworking/cni v1.1.1 h1:ky20T7c0MvKvbMOwS/FrlbNwjEoqJEUUYfsL4b0mc4k= github.com/containernetworking/cni v1.1.1/go.mod h1:sDpYKmGVENF3s6uvMvGgldDWeG8dMxakj/u+i9ht9vw= @@ -264,10 +267,10 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.2 h1:JiO+kJTpmYGjEodY7O1Zk8oZcNz1+f30UtwtXoFUPzE= github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= +github.com/envoyproxy/protoc-gen-validate v0.10.1 h1:c0g45+xCJhdgFGw7a5QAfdS4byAbud7miNWJ1WwEVf8= +github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -419,8 +422,9 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -1006,8 +1010,8 @@ golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1048,8 +1052,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I= -golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1112,8 +1116,8 @@ golang.org/x/net v0.0.0-20210927181540-4e4d966f7476/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1132,8 +1136,8 @@ golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g= +golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1146,8 +1150,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1252,14 +1256,14 @@ golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1269,8 +1273,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1345,8 +1349,8 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.2.0 h1:G6AHpWxTMGY1KyEYoAQ5WTtIekUUvDNjan3ugu60JvE= -golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1462,8 +1466,8 @@ google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd h1:e0TwkXOdbnH/1x5rc5MZ/VYyiZ4v+RdVfrGMqEwT68I= -google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1492,9 +1496,8 @@ google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9K google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc= +google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1509,8 +1512,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/images/builder/Dockerfile b/images/builder/Dockerfile index fccecfba5cff6..3ee7c5229a99f 100644 --- a/images/builder/Dockerfile +++ b/images/builder/Dockerfile @@ -2,9 +2,9 @@ # SPDX-License-Identifier: Apache-2.0 ARG COMPILERS_IMAGE=quay.io/cilium/image-compilers:e847f4176cb42ae27fa459a10df6721c43702b64@sha256:78df068553627c53d8dbe0f61275271b597c55c60585f3ea9f6916bd3cfd611a -ARG CILIUM_RUNTIME_IMAGE=quay.io/cilium/cilium-runtime:7dd7ade6f280ab12fec18438fc505ccce6b3e26e@sha256:55a85e7869ae041e1994390bb56bd1a2cb9b0202c61a87d366bc46366f35cb7f +ARG CILIUM_RUNTIME_IMAGE=quay.io/cilium/cilium-runtime:05b71de1d1cba0536dd6a4a9cfd64ea781bce42b@sha256:f558ad8f868857894c8d65474b9bce368487ab66b8ec46e590529436c7f8ece0 ARG TESTER_IMAGE=quay.io/cilium/image-tester:c37f768323abfba87c90cd9c82d37136183457bc@sha256:4c9d640b6379eb4964b8590acc95ca2dfaa71df70f4467fb7d8ac076acf6a8e1 -ARG GOLANG_IMAGE=docker.io/library/golang:1.20.8@sha256:60efa55a44e3bd8418b9dfdf0ecbec4711ea76ad27994cfaaaf3d7c8af8d940f +ARG GOLANG_IMAGE=docker.io/library/golang:1.20.10@sha256:ed6c4a5918b0a1ffb97970f6493d742dc5c7ebf3ccbd417c215d52830b57b994 ARG CILIUM_LLVM_IMAGE=quay.io/cilium/cilium-llvm:547db7ec9a750b8f888a506709adb41f135b952e@sha256:4d6fa0aede3556c5fb5a9c71bc6b9585475ac9b1064f516d4c45c8fb691c9d9e FROM ${COMPILERS_IMAGE} as compilers-image diff --git a/images/cilium-docker-plugin/Dockerfile b/images/cilium-docker-plugin/Dockerfile index 5ae6c9583aae1..17e3214da255e 100644 --- a/images/cilium-docker-plugin/Dockerfile +++ b/images/cilium-docker-plugin/Dockerfile @@ -4,7 +4,7 @@ # SPDX-License-Identifier: Apache-2.0 ARG BASE_IMAGE=scratch -ARG GOLANG_IMAGE=docker.io/library/golang:1.20.8@sha256:60efa55a44e3bd8418b9dfdf0ecbec4711ea76ad27994cfaaaf3d7c8af8d940f +ARG GOLANG_IMAGE=docker.io/library/golang:1.20.10@sha256:ed6c4a5918b0a1ffb97970f6493d742dc5c7ebf3ccbd417c215d52830b57b994 # BUILDPLATFORM is an automatic platform ARG enabled by Docker BuildKit. # Represents the plataform where the build is happening, do not mix with diff --git a/images/cilium-test/Dockerfile b/images/cilium-test/Dockerfile index ae7487aff8b1a..3a5876303fa1f 100644 --- a/images/cilium-test/Dockerfile +++ b/images/cilium-test/Dockerfile @@ -3,7 +3,7 @@ # Copyright Authors of Cilium # SPDX-License-Identifier: Apache-2.0 -ARG CILIUM_BUILDER_IMAGE=quay.io/cilium/cilium-builder:8462634e533ec37894aa2fefb1da093cf4ec662b@sha256:18b40bcc762892c1a47fe369afd87b6d6f07ccdef4de82830930151ee96401b9 +ARG CILIUM_BUILDER_IMAGE=quay.io/cilium/cilium-builder:54d43abf39b5855d3962a88e2911708b653cae9b@sha256:83060d7c62a03b4cdf775031776a303df2ef48382036e22ffceca12663d12e47 ARG UBUNTU_IMAGE=docker.io/library/ubuntu:20.04@sha256:450e066588f42ebe1551f3b1a535034b6aa46cd936fe7f2c6b0d72997ec61dbd FROM ${UBUNTU_IMAGE} as rootfs diff --git a/images/cilium/Dockerfile b/images/cilium/Dockerfile index 85d686981ed74..8f731b4dee4ce 100644 --- a/images/cilium/Dockerfile +++ b/images/cilium/Dockerfile @@ -3,13 +3,13 @@ # Copyright Authors of Cilium # SPDX-License-Identifier: Apache-2.0 -ARG CILIUM_BUILDER_IMAGE=quay.io/cilium/cilium-builder:8462634e533ec37894aa2fefb1da093cf4ec662b@sha256:18b40bcc762892c1a47fe369afd87b6d6f07ccdef4de82830930151ee96401b9 -ARG CILIUM_RUNTIME_IMAGE=quay.io/cilium/cilium-runtime:7dd7ade6f280ab12fec18438fc505ccce6b3e26e@sha256:55a85e7869ae041e1994390bb56bd1a2cb9b0202c61a87d366bc46366f35cb7f +ARG CILIUM_BUILDER_IMAGE=quay.io/cilium/cilium-builder:54d43abf39b5855d3962a88e2911708b653cae9b@sha256:83060d7c62a03b4cdf775031776a303df2ef48382036e22ffceca12663d12e47 +ARG CILIUM_RUNTIME_IMAGE=quay.io/cilium/cilium-runtime:05b71de1d1cba0536dd6a4a9cfd64ea781bce42b@sha256:f558ad8f868857894c8d65474b9bce368487ab66b8ec46e590529436c7f8ece0 # cilium-envoy from github.com/cilium/proxy # -FROM quay.io/cilium/cilium-envoy:v1.24-ad831bdec4c93feeb2378aa9e1847c936ada6ef7@sha256:7e9dd951f251f5aa43c0ec8d62d13bb95cb93776860426e28a9a90d988050868 as cilium-envoy +FROM quay.io/cilium/cilium-envoy:v1.24-55c3011de2cde1c9ab584a6e499ddaf17d6d8b5f@sha256:8684ece2ae991406e8ee7893a6c62b58e848923d09fa34b68e276eaf47a267d7 as cilium-envoy # # Hubble CLI diff --git a/images/cilium/download-hubble.sh b/images/cilium/download-hubble.sh index 37f040e5471ae..5cbf2f46c9f94 100755 --- a/images/cilium/download-hubble.sh +++ b/images/cilium/download-hubble.sh @@ -9,13 +9,13 @@ set -o pipefail set -o nounset # renovate: datasource=github-release-attachments depName=cilium/hubble -hubble_version="v0.12.0" +hubble_version="v0.12.2" declare -A hubble_sha256 -# renovate: datasource=github-release-attachments depName=cilium/hubble digestVersion=v0.12.0 -hubble_sha256[amd64]="286ed8fecdcb552de9bc65aa828fa03722470d4b60af99602f401615bd489719" -# renovate: datasource=github-release-attachments depName=cilium/hubble digestVersion=v0.12.0 -hubble_sha256[arm64]="62d73a73f7baa0e13d1a62a8a2d7475858307e0d762dde55f2c51220e2ae8a61" +# renovate: datasource=github-release-attachments depName=cilium/hubble digestVersion=v0.12.2 +hubble_sha256[amd64]="e0162f4c096a6435cf1e60712448bbaf91d10440b5da1fbb7bd9e711dacd3016" +# renovate: datasource=github-release-attachments depName=cilium/hubble digestVersion=v0.12.2 +hubble_sha256[arm64]="921a23ade725e14c493cf1e9aeefdf185edaf57e487274fec848149375597e2c" for arch in amd64 arm64 ; do curl --fail --show-error --silent --location "https://github.com/cilium/hubble/releases/download/${hubble_version}/hubble-linux-${arch}.tar.gz" --output "/tmp/hubble-${arch}.tgz" diff --git a/images/clustermesh-apiserver/Dockerfile b/images/clustermesh-apiserver/Dockerfile index 0c275c437d6ad..03fd3f83d7ea3 100644 --- a/images/clustermesh-apiserver/Dockerfile +++ b/images/clustermesh-apiserver/Dockerfile @@ -4,7 +4,7 @@ # SPDX-License-Identifier: Apache-2.0 ARG BASE_IMAGE=scratch -ARG GOLANG_IMAGE=docker.io/library/golang:1.20.8@sha256:60efa55a44e3bd8418b9dfdf0ecbec4711ea76ad27994cfaaaf3d7c8af8d940f +ARG GOLANG_IMAGE=docker.io/library/golang:1.20.10@sha256:ed6c4a5918b0a1ffb97970f6493d742dc5c7ebf3ccbd417c215d52830b57b994 ARG ALPINE_IMAGE=docker.io/library/alpine:3.16.7@sha256:a8cbb8c69ee71561f4b69c066bad07f7e510caaa523da26fbfc606b10bd7934b # BUILDPLATFORM is an automatic platform ARG enabled by Docker BuildKit. diff --git a/images/hubble-relay/Dockerfile b/images/hubble-relay/Dockerfile index b8def5923386c..62e696876db14 100644 --- a/images/hubble-relay/Dockerfile +++ b/images/hubble-relay/Dockerfile @@ -4,7 +4,7 @@ # SPDX-License-Identifier: Apache-2.0 ARG BASE_IMAGE=scratch -ARG GOLANG_IMAGE=docker.io/library/golang:1.20.8@sha256:60efa55a44e3bd8418b9dfdf0ecbec4711ea76ad27994cfaaaf3d7c8af8d940f +ARG GOLANG_IMAGE=docker.io/library/golang:1.20.10@sha256:ed6c4a5918b0a1ffb97970f6493d742dc5c7ebf3ccbd417c215d52830b57b994 ARG ALPINE_IMAGE=docker.io/library/alpine:3.16.7@sha256:a8cbb8c69ee71561f4b69c066bad07f7e510caaa523da26fbfc606b10bd7934b # BUILDPLATFORM is an automatic platform ARG enabled by Docker BuildKit. diff --git a/images/operator/Dockerfile b/images/operator/Dockerfile index 70ec2884c7bfa..941168d049465 100644 --- a/images/operator/Dockerfile +++ b/images/operator/Dockerfile @@ -4,7 +4,7 @@ # SPDX-License-Identifier: Apache-2.0 ARG BASE_IMAGE=scratch -ARG GOLANG_IMAGE=docker.io/library/golang:1.20.8@sha256:60efa55a44e3bd8418b9dfdf0ecbec4711ea76ad27994cfaaaf3d7c8af8d940f +ARG GOLANG_IMAGE=docker.io/library/golang:1.20.10@sha256:ed6c4a5918b0a1ffb97970f6493d742dc5c7ebf3ccbd417c215d52830b57b994 ARG ALPINE_IMAGE=docker.io/library/alpine:3.16.7@sha256:a8cbb8c69ee71561f4b69c066bad07f7e510caaa523da26fbfc606b10bd7934b # BUILDPLATFORM is an automatic platform ARG enabled by Docker BuildKit. diff --git a/images/runtime/Dockerfile b/images/runtime/Dockerfile index 7f1b3f504518c..a27b88c4d162d 100644 --- a/images/runtime/Dockerfile +++ b/images/runtime/Dockerfile @@ -4,8 +4,8 @@ # SPDX-License-Identifier: Apache-2.0 ARG TESTER_IMAGE=quay.io/cilium/image-tester:c37f768323abfba87c90cd9c82d37136183457bc@sha256:4c9d640b6379eb4964b8590acc95ca2dfaa71df70f4467fb7d8ac076acf6a8e1 -ARG GOLANG_IMAGE=docker.io/library/golang:1.20.8@sha256:60efa55a44e3bd8418b9dfdf0ecbec4711ea76ad27994cfaaaf3d7c8af8d940f -ARG UBUNTU_IMAGE=docker.io/library/ubuntu:20.04@sha256:33a5cc25d22c45900796a1aca487ad7a7cb09f09ea00b779e3b2026b4fc2faba +ARG GOLANG_IMAGE=docker.io/library/golang:1.20.10@sha256:ed6c4a5918b0a1ffb97970f6493d742dc5c7ebf3ccbd417c215d52830b57b994 +ARG UBUNTU_IMAGE=docker.io/library/ubuntu:20.04@sha256:0b5642e51a93c43da14d8c0322b43739abaa1ddd8b15f2c811175e42b6340d72 ARG CILIUM_LLVM_IMAGE=quay.io/cilium/cilium-llvm:547db7ec9a750b8f888a506709adb41f135b952e@sha256:4d6fa0aede3556c5fb5a9c71bc6b9585475ac9b1064f516d4c45c8fb691c9d9e ARG CILIUM_BPFTOOL_IMAGE=quay.io/cilium/cilium-bpftool:78448c1a37ff2b790d5e25c3d8b8ec3e96e6405f@sha256:99a9453a921a8de99899ef82e0822f0c03f65d97005c064e231c06247ad8597d diff --git a/install/kubernetes/Makefile b/install/kubernetes/Makefile index f2e6538e4e286..487e77aa99658 100644 --- a/install/kubernetes/Makefile +++ b/install/kubernetes/Makefile @@ -62,4 +62,4 @@ docs: check-docker-images: # Check whether docker images are available for the current version. $(QUIET)$(ROOT_DIR)/contrib/release/check-docker-images.sh "$(CILIUM_VERSION)" -.PHONY: all check-docker-images clean docs lint update-chart update-versions +.PHONY: all check-docker-images cilium/values.yaml clean docs lint update-chart update-versions diff --git a/install/kubernetes/Makefile.values b/install/kubernetes/Makefile.values index 7202226ba103f..c4167879b4070 100644 --- a/install/kubernetes/Makefile.values +++ b/install/kubernetes/Makefile.values @@ -25,6 +25,6 @@ export ETCD_VERSION:=v3.5.4@sha256:795d8660c48c439a7c3764c2330ed9222ab5db5bb524d export HUBBLE_RELAY_REPO:=quay.io/cilium/hubble-relay export HUBBLE_UI_BACKEND_REPO:=quay.io/cilium/hubble-ui-backend -export HUBBLE_UI_BACKEND_VERSION:=v0.11.0@sha256:14c04d11f78da5c363f88592abae8d2ecee3cbe009f443ef11df6ac5f692d839 +export HUBBLE_UI_BACKEND_VERSION:=v0.12.1@sha256:1f86f3400827a0451e6332262467f894eeb7caf0eb8779bd951e2caa9d027cbe export HUBBLE_UI_FRONTEND_REPO:=quay.io/cilium/hubble-ui -export HUBBLE_UI_FRONTEND_VERSION:=v0.11.0@sha256:bcb369c47cada2d4257d63d3749f7f87c91dde32e010b223597306de95d1ecc8 +export HUBBLE_UI_FRONTEND_VERSION:=v0.12.1@sha256:9e5f81ee747866480ea1ac4630eb6975ff9227f9782b7c93919c081c33f38267 diff --git a/install/kubernetes/cilium/Chart.yaml b/install/kubernetes/cilium/Chart.yaml index 23233e510ded9..aad26aec33fe5 100644 --- a/install/kubernetes/cilium/Chart.yaml +++ b/install/kubernetes/cilium/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: cilium displayName: Cilium home: https://cilium.io/ -version: 1.12.14 -appVersion: 1.12.14 +version: 1.12.15 +appVersion: 1.12.15 kubeVersion: ">= 1.16.0-0" icon: https://cdn.jsdelivr.net/gh/cilium/cilium@v1.12/Documentation/images/logo-solo.svg description: eBPF-based Networking, Security, and Observability diff --git a/install/kubernetes/cilium/README.md b/install/kubernetes/cilium/README.md index df2fc53953213..fddf758a1b8c7 100644 --- a/install/kubernetes/cilium/README.md +++ b/install/kubernetes/cilium/README.md @@ -1,6 +1,6 @@ # cilium -![Version: 1.12.14](https://img.shields.io/badge/Version-1.12.14-informational?style=flat-square) ![AppVersion: 1.12.14](https://img.shields.io/badge/AppVersion-1.12.14-informational?style=flat-square) +![Version: 1.12.15](https://img.shields.io/badge/Version-1.12.15-informational?style=flat-square) ![AppVersion: 1.12.15](https://img.shields.io/badge/AppVersion-1.12.15-informational?style=flat-square) Cilium is open source software for providing and transparently securing network connectivity and loadbalancing between application workloads such as @@ -98,7 +98,7 @@ contributors across the globe, there is almost always someone available to help. | clustermesh.apiserver.extraEnv | list | `[]` | Additional clustermesh-apiserver environment variables. | | clustermesh.apiserver.extraVolumeMounts | list | `[]` | Additional clustermesh-apiserver volumeMounts. | | clustermesh.apiserver.extraVolumes | list | `[]` | Additional clustermesh-apiserver volumes. | -| clustermesh.apiserver.image | object | `{"digest":"","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/clustermesh-apiserver","tag":"v1.12.14","useDigest":false}` | Clustermesh API server image. | +| clustermesh.apiserver.image | object | `{"digest":"","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/clustermesh-apiserver","tag":"v1.12.15","useDigest":false}` | Clustermesh API server image. | | clustermesh.apiserver.nodeSelector | object | `{"kubernetes.io/os":"linux"}` | Node labels for pod assignment ref: https://kubernetes.io/docs/user-guide/node-selection/ | | clustermesh.apiserver.podAnnotations | object | `{}` | Annotations to be added to clustermesh-apiserver pods | | clustermesh.apiserver.podDisruptionBudget.enabled | bool | `false` | enable PodDisruptionBudget ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ | @@ -144,6 +144,7 @@ contributors across the globe, there is almost always someone available to help. | cni.install | bool | `true` | Install the CNI configuration and binary files into the filesystem. | | cni.logFile | string | `"/var/run/cilium/cilium-cni.log"` | Configure the log file for CNI logging with retention policy of 7 days. Disable CNI file logging by setting this field to empty explicitly. | | cni.uninstall | bool | `true` | Remove the CNI configuration and binary files on agent shutdown. Enable this if you're removing Cilium from the cluster. Disable this to prevent the CNI configuration file from being removed during agent upgrade, which can cause nodes to go unmanageable. | +| conntrackGCMaxInterval | string | `""` | Configure the maximum frequency for the garbage collection of the connection tracking table. Only affects the automatic computation for the frequency and has no effect when 'conntrackGCInterval' is set. This can be set to more frequently clean up unused identities created from ToFQDN policies. | | containerRuntime | object | `{"integration":"none"}` | Configure container runtime specific integration. | | containerRuntime.integration | string | `"none"` | Enables specific integrations for container runtimes. Supported values: - containerd - crio - docker - none - auto (automatically detect the container runtime) | | customCalls | object | `{"enabled":false}` | Tail call hooks for custom eBPF programs. | @@ -253,7 +254,7 @@ contributors across the globe, there is almost always someone available to help. | hubble.relay.dialTimeout | string | `nil` | Dial timeout to connect to the local hubble instance to receive peer information (e.g. "30s"). | | hubble.relay.enabled | bool | `false` | Enable Hubble Relay (requires hubble.enabled=true) | | hubble.relay.extraEnv | list | `[]` | Additional hubble-relay environment variables. | -| hubble.relay.image | object | `{"digest":"","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/hubble-relay","tag":"v1.12.14","useDigest":false}` | Hubble-relay container image. | +| hubble.relay.image | object | `{"digest":"","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/hubble-relay","tag":"v1.12.15","useDigest":false}` | Hubble-relay container image. | | hubble.relay.listenHost | string | `""` | Host to listen to. Specify an empty string to bind to all the interfaces. | | hubble.relay.listenPort | string | `"4245"` | Port to listen to. | | hubble.relay.nodeSelector | object | `{"kubernetes.io/os":"linux"}` | Node labels for pod assignment ref: https://kubernetes.io/docs/user-guide/node-selection/ | @@ -310,7 +311,7 @@ contributors across the globe, there is almost always someone available to help. | hubble.ui.backend.extraEnv | list | `[]` | Additional hubble-ui backend environment variables. | | hubble.ui.backend.extraVolumeMounts | list | `[]` | Additional hubble-ui backend volumeMounts. | | hubble.ui.backend.extraVolumes | list | `[]` | Additional hubble-ui backend volumes. | -| hubble.ui.backend.image | object | `{"override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/hubble-ui-backend","tag":"v0.11.0@sha256:14c04d11f78da5c363f88592abae8d2ecee3cbe009f443ef11df6ac5f692d839"}` | Hubble-ui backend image. | +| hubble.ui.backend.image | object | `{"override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/hubble-ui-backend","tag":"v0.12.1@sha256:1f86f3400827a0451e6332262467f894eeb7caf0eb8779bd951e2caa9d027cbe"}` | Hubble-ui backend image. | | hubble.ui.backend.resources | object | `{}` | Resource requests and limits for the 'backend' container of the 'hubble-ui' deployment. | | hubble.ui.backend.securityContext | object | `{}` | Hubble-ui backend security context. | | hubble.ui.baseUrl | string | `"/"` | Defines base url prefix for all hubble-ui http requests. It needs to be changed in case if ingress for hubble-ui is configured under some sub-path. Trailing `/` is required for custom path, ex. `/service-map/` | @@ -318,7 +319,7 @@ contributors across the globe, there is almost always someone available to help. | hubble.ui.frontend.extraEnv | list | `[]` | Additional hubble-ui frontend environment variables. | | hubble.ui.frontend.extraVolumeMounts | list | `[]` | Additional hubble-ui frontend volumeMounts. | | hubble.ui.frontend.extraVolumes | list | `[]` | Additional hubble-ui frontend volumes. | -| hubble.ui.frontend.image | object | `{"override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/hubble-ui","tag":"v0.11.0@sha256:bcb369c47cada2d4257d63d3749f7f87c91dde32e010b223597306de95d1ecc8"}` | Hubble-ui frontend image. | +| hubble.ui.frontend.image | object | `{"override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/hubble-ui","tag":"v0.12.1@sha256:9e5f81ee747866480ea1ac4630eb6975ff9227f9782b7c93919c081c33f38267"}` | Hubble-ui frontend image. | | hubble.ui.frontend.resources | object | `{}` | Resource requests and limits for the 'frontend' container of the 'hubble-ui' deployment. | | hubble.ui.frontend.securityContext | object | `{}` | Hubble-ui frontend security context. | | hubble.ui.frontend.server.ipv6 | object | `{"enabled":true}` | Controls server listener for ipv6 | @@ -344,7 +345,7 @@ contributors across the globe, there is almost always someone available to help. | hubble.ui.tolerations | list | `[]` | Node tolerations for pod assignment on nodes with taints ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ | | hubble.ui.updateStrategy | object | `{"rollingUpdate":{"maxUnavailable":1},"type":"RollingUpdate"}` | hubble-ui update strategy. | | identityAllocationMode | string | `"crd"` | Method to use for identity allocation (`crd` or `kvstore`). | -| image | object | `{"digest":"","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/cilium","tag":"v1.12.14","useDigest":false}` | Agent container image. | +| image | object | `{"digest":"","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/cilium","tag":"v1.12.15","useDigest":false}` | Agent container image. | | imagePullSecrets | string | `nil` | Configure image pull secrets for pulling container images | | ingressController.enabled | bool | `false` | Enable cilium ingress controller This will automatically set enable-envoy-config as well. | | ingressController.enforceHttps | bool | `true` | Enforce https for host having matching TLS host in Ingress. Incoming traffic to http listener will return 308 http error code with respective location in header. | @@ -412,7 +413,7 @@ contributors across the globe, there is almost always someone available to help. | operator.extraVolumes | list | `[]` | Additional cilium-operator volumes. | | operator.identityGCInterval | string | `"15m0s"` | Interval for identity garbage collection. | | operator.identityHeartbeatTimeout | string | `"30m0s"` | Timeout for identity heartbeats. | -| operator.image | object | `{"alibabacloudDigest":"","awsDigest":"","azureDigest":"","genericDigest":"","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/operator","suffix":"","tag":"v1.12.14","useDigest":false}` | cilium-operator image. | +| operator.image | object | `{"alibabacloudDigest":"","awsDigest":"","azureDigest":"","genericDigest":"","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/operator","suffix":"","tag":"v1.12.15","useDigest":false}` | cilium-operator image. | | operator.nodeGCInterval | string | `"5m0s"` | Interval for cilium node garbage collection. | | operator.nodeSelector | object | `{"kubernetes.io/os":"linux"}` | Node labels for cilium-operator pod assignment ref: https://kubernetes.io/docs/user-guide/node-selection/ | | operator.podAnnotations | object | `{}` | Annotations to be added to cilium-operator pods | @@ -455,7 +456,7 @@ contributors across the globe, there is almost always someone available to help. | preflight.extraEnv | list | `[]` | Additional preflight environment variables. | | preflight.extraVolumeMounts | list | `[]` | Additional preflight volumeMounts. | | preflight.extraVolumes | list | `[]` | Additional preflight volumes. | -| preflight.image | object | `{"digest":"","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/cilium","tag":"v1.12.14","useDigest":false}` | Cilium pre-flight image. | +| preflight.image | object | `{"digest":"","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/cilium","tag":"v1.12.15","useDigest":false}` | Cilium pre-flight image. | | preflight.nodeSelector | object | `{"kubernetes.io/os":"linux"}` | Node labels for preflight pod assignment ref: https://kubernetes.io/docs/user-guide/node-selection/ | | preflight.podAnnotations | object | `{}` | Annotations to be added to preflight pods | | preflight.podDisruptionBudget.enabled | bool | `false` | enable PodDisruptionBudget ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ | diff --git a/install/kubernetes/cilium/templates/cilium-configmap.yaml b/install/kubernetes/cilium/templates/cilium-configmap.yaml index df61639616923..87c7815c69301 100644 --- a/install/kubernetes/cilium/templates/cilium-configmap.yaml +++ b/install/kubernetes/cilium/templates/cilium-configmap.yaml @@ -101,6 +101,10 @@ data: conntrack-gc-interval: {{ .Values.conntrackGCInterval | quote }} {{- end }} +{{- if .Values.conntrackGCMaxInterval }} + conntrack-gc-max-interval: {{ .Values.conntrackGCMaxInterval | quote }} +{{- end }} + {{- if hasKey .Values "disableEnvoyVersionCheck" }} disable-envoy-version-check: {{ .Values.disableEnvoyVersionCheck | quote }} {{- end }} diff --git a/install/kubernetes/cilium/values.yaml b/install/kubernetes/cilium/values.yaml index 013a80cb20d09..8daf13b0a20cb 100644 --- a/install/kubernetes/cilium/values.yaml +++ b/install/kubernetes/cilium/values.yaml @@ -99,7 +99,7 @@ rollOutCiliumPods: false image: override: ~ repository: "quay.io/cilium/cilium" - tag: "v1.12.14" + tag: "v1.12.15" pullPolicy: "IfNotPresent" # cilium-digest digest: "" @@ -434,6 +434,12 @@ cni: # connection tracking table. # conntrackGCInterval: "0s" +# -- (string) Configure the maximum frequency for the garbage collection of the +# connection tracking table. Only affects the automatic computation for the frequency +# and has no effect when 'conntrackGCInterval' is set. This can be set to more frequently +# clean up unused identities created from ToFQDN policies. +conntrackGCMaxInterval: "" + # -- Configure container runtime specific integration. containerRuntime: # -- Enables specific integrations for container runtimes. @@ -828,7 +834,7 @@ hubble: image: override: ~ repository: "quay.io/cilium/hubble-relay" - tag: "v1.12.14" + tag: "v1.12.15" # hubble-relay-digest digest: "" useDigest: false @@ -1024,7 +1030,7 @@ hubble: image: override: ~ repository: "quay.io/cilium/hubble-ui-backend" - tag: "v0.11.0@sha256:14c04d11f78da5c363f88592abae8d2ecee3cbe009f443ef11df6ac5f692d839" + tag: "v0.12.1@sha256:1f86f3400827a0451e6332262467f894eeb7caf0eb8779bd951e2caa9d027cbe" pullPolicy: "IfNotPresent" # -- Hubble-ui backend security context. @@ -1053,7 +1059,7 @@ hubble: image: override: ~ repository: "quay.io/cilium/hubble-ui" - tag: "v0.11.0@sha256:bcb369c47cada2d4257d63d3749f7f87c91dde32e010b223597306de95d1ecc8" + tag: "v0.12.1@sha256:9e5f81ee747866480ea1ac4630eb6975ff9227f9782b7c93919c081c33f38267" pullPolicy: "IfNotPresent" # -- Hubble-ui frontend security context. @@ -1633,7 +1639,7 @@ operator: image: override: ~ repository: "quay.io/cilium/operator" - tag: "v1.12.14" + tag: "v1.12.15" # operator-generic-digest genericDigest: "" # operator-azure-digest @@ -1884,7 +1890,7 @@ preflight: image: override: ~ repository: "quay.io/cilium/cilium" - tag: "v1.12.14" + tag: "v1.12.15" # cilium-digest digest: "" useDigest: false @@ -2030,7 +2036,7 @@ clustermesh: image: override: ~ repository: "quay.io/cilium/clustermesh-apiserver" - tag: "v1.12.14" + tag: "v1.12.15" # clustermesh-apiserver-digest digest: "" useDigest: false diff --git a/install/kubernetes/cilium/values.yaml.tmpl b/install/kubernetes/cilium/values.yaml.tmpl index b6f1743486989..e5dee4081b29b 100644 --- a/install/kubernetes/cilium/values.yaml.tmpl +++ b/install/kubernetes/cilium/values.yaml.tmpl @@ -431,6 +431,12 @@ cni: # connection tracking table. # conntrackGCInterval: "0s" +# -- (string) Configure the maximum frequency for the garbage collection of the +# connection tracking table. Only affects the automatic computation for the frequency +# and has no effect when 'conntrackGCInterval' is set. This can be set to more frequently +# clean up unused identities created from ToFQDN policies. +conntrackGCMaxInterval: "" + # -- Configure container runtime specific integration. containerRuntime: # -- Enables specific integrations for container runtimes. diff --git a/jenkinsfiles/ginkgo-gke.Jenkinsfile b/jenkinsfiles/ginkgo-gke.Jenkinsfile index c0d822049ff19..1038b2df7dce6 100644 --- a/jenkinsfiles/ginkgo-gke.Jenkinsfile +++ b/jenkinsfiles/ginkgo-gke.Jenkinsfile @@ -80,7 +80,7 @@ pipeline { env.DOCKER_TAG = env.DOCKER_TAG + "-race" env.RACE = 1 env.LOCKDEBUG = 1 - env.BASE_IMAGE = "quay.io/cilium/cilium-runtime:7dd7ade6f280ab12fec18438fc505ccce6b3e26e@sha256:55a85e7869ae041e1994390bb56bd1a2cb9b0202c61a87d366bc46366f35cb7f" + env.BASE_IMAGE = "quay.io/cilium/cilium-runtime:05b71de1d1cba0536dd6a4a9cfd64ea781bce42b@sha256:f558ad8f868857894c8d65474b9bce368487ab66b8ec46e590529436c7f8ece0" } } } diff --git a/jenkinsfiles/ginkgo-kernel.Jenkinsfile b/jenkinsfiles/ginkgo-kernel.Jenkinsfile index 9003ad081f9a8..5b7c92a631dda 100644 --- a/jenkinsfiles/ginkgo-kernel.Jenkinsfile +++ b/jenkinsfiles/ginkgo-kernel.Jenkinsfile @@ -97,7 +97,7 @@ pipeline { env.DOCKER_TAG = env.DOCKER_TAG + "-race" env.RACE = 1 env.LOCKDEBUG = 1 - env.BASE_IMAGE = "quay.io/cilium/cilium-runtime:7dd7ade6f280ab12fec18438fc505ccce6b3e26e@sha256:55a85e7869ae041e1994390bb56bd1a2cb9b0202c61a87d366bc46366f35cb7f" + env.BASE_IMAGE = "quay.io/cilium/cilium-runtime:05b71de1d1cba0536dd6a4a9cfd64ea781bce42b@sha256:f558ad8f868857894c8d65474b9bce368487ab66b8ec46e590529436c7f8ece0" } } } diff --git a/jenkinsfiles/ginkgo-runtime-kernel.Jenkinsfile b/jenkinsfiles/ginkgo-runtime-kernel.Jenkinsfile index ff04dc00b72af..76cbdaec03350 100644 --- a/jenkinsfiles/ginkgo-runtime-kernel.Jenkinsfile +++ b/jenkinsfiles/ginkgo-runtime-kernel.Jenkinsfile @@ -34,7 +34,7 @@ pipeline { )}""" BASE_IMAGE="""${sh( returnStdout: true, - script: 'if [ "${run_with_race_detection}" = "" ]; then echo -n "scratch"; else echo -n "quay.io/cilium/cilium-runtime:7dd7ade6f280ab12fec18438fc505ccce6b3e26e@sha256:55a85e7869ae041e1994390bb56bd1a2cb9b0202c61a87d366bc46366f35cb7f"; fi' + script: 'if [ "${run_with_race_detection}" = "" ]; then echo -n "scratch"; else echo -n "quay.io/cilium/cilium-runtime:05b71de1d1cba0536dd6a4a9cfd64ea781bce42b@sha256:f558ad8f868857894c8d65474b9bce368487ab66b8ec46e590529436c7f8ece0"; fi' )}""" } diff --git a/jenkinsfiles/kubernetes-upstream.Jenkinsfile b/jenkinsfiles/kubernetes-upstream.Jenkinsfile index 31c4eb4b3a93c..a0374dc862c0c 100644 --- a/jenkinsfiles/kubernetes-upstream.Jenkinsfile +++ b/jenkinsfiles/kubernetes-upstream.Jenkinsfile @@ -59,7 +59,7 @@ pipeline { env.DOCKER_TAG = env.DOCKER_TAG + "-race" env.RACE = 1 env.LOCKDEBUG = 1 - env.BASE_IMAGE = "quay.io/cilium/cilium-runtime:7dd7ade6f280ab12fec18438fc505ccce6b3e26e@sha256:55a85e7869ae041e1994390bb56bd1a2cb9b0202c61a87d366bc46366f35cb7f" + env.BASE_IMAGE = "quay.io/cilium/cilium-runtime:05b71de1d1cba0536dd6a4a9cfd64ea781bce42b@sha256:f558ad8f868857894c8d65474b9bce368487ab66b8ec46e590529436c7f8ece0" } } } diff --git a/pkg/azure/api/api.go b/pkg/azure/api/api.go index c3c4d56ee6983..4a5c3f24c34d4 100644 --- a/pkg/azure/api/api.go +++ b/pkg/azure/api/api.go @@ -11,8 +11,8 @@ import ( "strings" "time" - "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute" - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network" + "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/adal" "github.com/Azure/go-autorest/autorest/azure" diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index a8cd45ae3f8cb..f691b42b67ff9 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -105,29 +105,29 @@ func NoopFunc(ctx context.Context) error { // Controllers have a name and are tied to a Manager. The manager is typically // bound to higher level objects such as endpoint. These higher level objects // can then run multiple controllers to perform async tasks such as: -// - Annotating k8s resources with values -// - Synchronizing an object with the kvstore -// - Any other async operation to may fail and require retries +// - Annotating k8s resources with values +// - Synchronizing an object with the kvstore +// - Any other async operation to may fail and require retries // // Embedding the Manager into higher level resources allows to bind controllers // to the lifetime of that object. Controllers also have a UUID to allow // correlating all log messages of a controller instance. // // Guidelines to writing controllers: -// * Make sure that the task the controller performs is done in an atomic -// fashion, e.g. if a controller modifies a resource in multiple steps, an -// intermediate manipulation operation failing should not leave behind -// an inconsistent state. This can typically be achieved by locking the -// resource and rolling back or by using transactions. -// * Controllers typically act on behalf of a higher level object such as an -// endpoint. The controller must ensure that the higher level object is -// properly locked when accessing any fields. -// * Controllers run asynchronously in the background, it is the responsibility -// of the controller to be aware of the lifecycle of the owning higher level -// object. This is typically achieved by removing all controllers when the -// owner dies. It is the responsibility of the owner to either lock the owner -// in a way that will delay destruction throughout the controller run or to -// check for the destruction throughout the run. +// - Make sure that the task the controller performs is done in an atomic +// fashion, e.g. if a controller modifies a resource in multiple steps, an +// intermediate manipulation operation failing should not leave behind +// an inconsistent state. This can typically be achieved by locking the +// resource and rolling back or by using transactions. +// - Controllers typically act on behalf of a higher level object such as an +// endpoint. The controller must ensure that the higher level object is +// properly locked when accessing any fields. +// - Controllers run asynchronously in the background, it is the responsibility +// of the controller to be aware of the lifecycle of the owning higher level +// object. This is typically achieved by removing all controllers when the +// owner dies. It is the responsibility of the owner to either lock the owner +// in a way that will delay destruction throughout the controller run or to +// check for the destruction throughout the run. type Controller struct { mutex lock.RWMutex name string diff --git a/pkg/controller/controller_test.go b/pkg/controller/controller_test.go index 66f2a727fac85..63f28e0eeb505 100644 --- a/pkg/controller/controller_test.go +++ b/pkg/controller/controller_test.go @@ -33,6 +33,37 @@ func (b *ControllerSuite) TestUpdateRemoveController(c *C) { c.Assert(mngr.RemoveController("not-exist"), Not(IsNil)) } +func (b *ControllerSuite) TestCreateController(c *C) { + var iterations uint32 + mngr := NewManager() + created := mngr.CreateController("test", ControllerParams{ + DoFunc: func(ctx context.Context) error { + atomic.AddUint32(&iterations, 1) + return nil + }, + StopFunc: func(ctx context.Context) error { + return nil + }, + }) + c.Assert(created, Equals, true) + + // Second creation is a no-op. + created = mngr.CreateController("test", ControllerParams{ + DoFunc: func(ctx context.Context) error { + atomic.AddUint32(&iterations, 1) + return nil + }, + StopFunc: func(ctx context.Context) error { + return nil + }, + }) + c.Assert(created, Equals, false) + + c.Assert(mngr.RemoveControllerAndWait("test"), IsNil) + + c.Assert(atomic.LoadUint32(&iterations), Equals, uint32(1)) +} + func (b *ControllerSuite) TestStopFunc(c *C) { stopFuncRan := false waitChan := make(chan struct{}) diff --git a/pkg/controller/manager.go b/pkg/controller/manager.go index c27bb1d30e51f..8d1a372af7798 100644 --- a/pkg/controller/manager.go +++ b/pkg/controller/manager.go @@ -63,6 +63,7 @@ func (m *Manager) updateController(name string, params ControllerParams) *Contro } m.mutex.Lock() + defer m.mutex.Unlock() if m.controllers == nil { m.controllers = controllerMap{} @@ -70,8 +71,6 @@ func (m *Manager) updateController(name string, params ControllerParams) *Contro ctrl, exists := m.controllers[name] if exists { - m.mutex.Unlock() - ctrl.getLogger().Debug("Updating existing controller") ctrl.mutex.Lock() ctrl.updateParamsLocked(params) @@ -84,36 +83,59 @@ func (m *Manager) updateController(name string, params ControllerParams) *Contro } ctrl.getLogger().Debug("Controller update time: ", time.Since(start)) + return ctrl } else { - ctrl = &Controller{ - name: name, - uuid: uuid.New().String(), - stop: make(chan struct{}), - update: make(chan struct{}, 1), - trigger: make(chan struct{}, 1), - terminated: make(chan struct{}), - } - ctrl.updateParamsLocked(params) - ctrl.getLogger().Debug("Starting new controller") - - if params.Context == nil { - ctrl.ctxDoFunc, ctrl.cancelDoFunc = context.WithCancel(context.Background()) - } else { - ctrl.ctxDoFunc, ctrl.cancelDoFunc = context.WithCancel(params.Context) - } - m.controllers[ctrl.name] = ctrl - m.mutex.Unlock() + return m.createControllerLocked(name, params) + } +} - globalStatus.mutex.Lock() - globalStatus.controllers[ctrl.uuid] = ctrl - globalStatus.mutex.Unlock() +func (m *Manager) createControllerLocked(name string, params ControllerParams) *Controller { + ctrl := &Controller{ + name: name, + uuid: uuid.New().String(), + stop: make(chan struct{}), + update: make(chan struct{}, 1), + trigger: make(chan struct{}, 1), + terminated: make(chan struct{}), + } + ctrl.updateParamsLocked(params) + ctrl.getLogger().Debug("Starting new controller") - go ctrl.runController() + if params.Context == nil { + ctrl.ctxDoFunc, ctrl.cancelDoFunc = context.WithCancel(context.Background()) + } else { + ctrl.ctxDoFunc, ctrl.cancelDoFunc = context.WithCancel(params.Context) } + m.controllers[ctrl.name] = ctrl + + globalStatus.mutex.Lock() + globalStatus.controllers[ctrl.uuid] = ctrl + globalStatus.mutex.Unlock() + + go ctrl.runController() return ctrl } +// CreateController installs a new controller in the +// manager. If a controller with the name already exists +// this method returns false without triggering, otherwise +// creates the controller and runs it immediately. +func (m *Manager) CreateController(name string, params ControllerParams) bool { + m.mutex.Lock() + defer m.mutex.Unlock() + + if m.controllers != nil { + if _, exists := m.controllers[name]; exists { + return false + } + } else { + m.controllers = controllerMap{} + } + m.createControllerLocked(name, params) + return true +} + func (m *Manager) removeController(ctrl *Controller) { ctrl.stopController() delete(m.controllers, ctrl.name) diff --git a/pkg/datapath/linux/ipsec/ipsec_linux.go b/pkg/datapath/linux/ipsec/ipsec_linux.go index 2da83e270bbea..d76da6f0cc57a 100644 --- a/pkg/datapath/linux/ipsec/ipsec_linux.go +++ b/pkg/datapath/linux/ipsec/ipsec_linux.go @@ -199,7 +199,13 @@ func xfrmStateReplace(new *netlink.XfrmState) error { for _, s := range states { if xfrmIPEqual(s.Src, new.Src) && xfrmIPEqual(s.Dst, new.Dst) && xfrmMarkEqual(s.Mark, new.Mark) && s.Spi == new.Spi { - return nil + if xfrmMarkEqual(s.OutputMark, new.OutputMark) { + return nil + } else { + // If only the output-marks differ, then we should be able + // to simply update the XFRM state atomically. + return netlink.XfrmStateUpdate(new) + } } } @@ -321,12 +327,12 @@ func ipSecReplaceStateIn(localIP, remoteIP net.IP, zeroMark bool) (uint8, error) if zeroMark != true { state.OutputMark = &netlink.XfrmMark{ Value: linux_defaults.RouteMarkDecrypt, - Mask: linux_defaults.RouteMarkMask, + Mask: linux_defaults.OutputMarkMask, } } else { state.OutputMark = &netlink.XfrmMark{ Value: 0, - Mask: linux_defaults.RouteMarkMask, + Mask: linux_defaults.OutputMarkMask, } } @@ -345,7 +351,7 @@ func ipSecReplaceStateOut(localIP, remoteIP net.IP, nodeID uint16) (uint8, error state.Mark = generateEncryptMark(key.Spi, nodeID) state.OutputMark = &netlink.XfrmMark{ Value: linux_defaults.RouteMarkEncrypt, - Mask: linux_defaults.RouteMarkMask, + Mask: linux_defaults.OutputMarkMask, } return key.Spi, xfrmStateReplace(state) } diff --git a/pkg/datapath/linux/linux_defaults/linux_defaults.go b/pkg/datapath/linux/linux_defaults/linux_defaults.go index 74f9dc4f6c76b..5110061a19db2 100644 --- a/pkg/datapath/linux/linux_defaults/linux_defaults.go +++ b/pkg/datapath/linux/linux_defaults/linux_defaults.go @@ -43,6 +43,10 @@ const ( // RouteMarkMask is the mask required for the route mark value RouteMarkMask = 0xF00 + // OutputMarkMask is the mask to use in output-mark of XFRM states. It is + // used to clear the node ID and the SPI from the packet mark. + OutputMarkMask = 0xFFFFFF00 + // RouteMarkToProxy is the default route mark to use to indicate // datapath needs to send the packet to the proxy. // diff --git a/pkg/endpoint/bpf.go b/pkg/endpoint/bpf.go index 7c3e0cedfcd1d..cd7a5c2dc3069 100644 --- a/pkg/endpoint/bpf.go +++ b/pkg/endpoint/bpf.go @@ -27,8 +27,6 @@ import ( "github.com/cilium/cilium/pkg/datapath/loader" "github.com/cilium/cilium/pkg/endpoint/regeneration" "github.com/cilium/cilium/pkg/fqdn/restore" - "github.com/cilium/cilium/pkg/identity" - "github.com/cilium/cilium/pkg/labels" "github.com/cilium/cilium/pkg/loadinfo" "github.com/cilium/cilium/pkg/logging/logfields" "github.com/cilium/cilium/pkg/maps/bwmap" @@ -196,24 +194,6 @@ func (e *Endpoint) writeHeaderfile(prefix string) error { return err } -// policyIdentitiesLabelLookup is an implementation of the policy.Identites interface. -type policyIdentitiesLabelLookup struct { - *Endpoint -} - -// GetLabels implements the policy.Identites interface{} method GetLabels, -// which allows Endpoint.addNewRedirectsFromDesiredPolicy to call `l4.ToMapState` -// with a label cache. This enables `l4.ToMapstate` to look up CIDRs associated with -// identites to make a final determination about whether they should even be inserted into -// an Endpoint's policy map. -func (p *policyIdentitiesLabelLookup) GetLabels(id identity.NumericIdentity) labels.LabelArray { - ident := p.allocator.LookupIdentityByID(context.Background(), id) - if ident != nil { - return ident.LabelArray - } - return nil -} - // addNewRedirectsFromDesiredPolicy must be called while holding the endpoint lock for // writing. On success, returns nil; otherwise, returns an error indicating the // problem that occurred while adding an l7 redirect for the specified policy. @@ -240,6 +220,8 @@ func (e *Endpoint) addNewRedirectsFromDesiredPolicy(ingress bool, desiredRedirec adds := make(policy.Keys) old := make(policy.MapState) + selectorCache := e.desiredPolicy.SelectorCache + for _, l4 := range m { // Deny policies do not support redirects if l4.IsRedirect() { @@ -314,13 +296,12 @@ func (e *Endpoint) addNewRedirectsFromDesiredPolicy(ingress bool, desiredRedirec direction = trafficdirection.Egress } - idLookup := &policyIdentitiesLabelLookup{e} - keysFromFilter := l4.ToMapState(e, direction, idLookup) + keysFromFilter := l4.ToMapState(e, direction, selectorCache) for keyFromFilter, entry := range keysFromFilter { if entry.IsRedirectEntry() { entry.ProxyPort = redirectPort } - e.desiredPolicy.PolicyMapState.DenyPreferredInsertWithChanges(keyFromFilter, entry, adds, nil, old, idLookup) + e.desiredPolicy.PolicyMapState.DenyPreferredInsertWithChanges(keyFromFilter, entry, adds, nil, old, selectorCache) } } } @@ -1364,20 +1345,26 @@ func (e *Endpoint) dumpPolicyMapToMapState() (policy.MapState, error) { return currentMap, err } -// syncPolicyMapWithDump attempts to synchronize the PolicyMap for this endpoint to -// contain the set of PolicyKeys represented by the endpoint's desiredMapState. -// It checks the current contents of the endpoint's PolicyMap and deletes any -// PolicyKeys that are not present in the endpoint's desiredMapState. It then -// adds any keys that are not present in the map. When a key from desiredMapState -// is inserted successfully to the endpoint's BPF PolicyMap, it is added to the -// endpoint's realizedMapState field. Returns an error if the endpoint's BPF -// PolicyMap is unable to be dumped, or any update operation to the map fails. +// syncPolicyMapWithDump is invoked periodically to perform a full reconciliation +// of the endpoint's PolicyMap against the BPF maps to catch cases where either +// due to kernel issue or user intervention the agent's view of the PolicyMap +// state has diverged from the kernel. A warning is logged if this method finds +// such an discrepancy. +// +// Returns an error if the endpoint's BPF PolicyMap is unable to be dumped, +// or any update operation to the map fails. // Must be called with e.mutex Lock()ed. func (e *Endpoint) syncPolicyMapWithDump() error { if e.policyMap == nil { return fmt.Errorf("not syncing PolicyMap state for endpoint because PolicyMap is nil") } + // Endpoint not yet fully initialized or currently regenerating. Skip the check + // this round. + if e.getState() != StateReady { + return nil + } + // Apply pending policy map changes first so that desired map is up-to-date before // we diff the maps below. err := e.applyPolicyMapChanges() @@ -1426,11 +1413,11 @@ func (e *Endpoint) syncPolicyMapWithDump() error { return err } -func (e *Endpoint) syncPolicyMapController() { +func (e *Endpoint) startSyncPolicyMapController() { ctrlName := fmt.Sprintf("sync-policymap-%d", e.ID) - e.controllers.UpdateController(ctrlName, + e.controllers.CreateController(ctrlName, controller.ControllerParams{ - DoFunc: func(ctx context.Context) (reterr error) { + DoFunc: func(ctx context.Context) error { // Failure to lock is not an error, it means // that the endpoint was disconnected and we // should exit gracefully. @@ -1440,7 +1427,10 @@ func (e *Endpoint) syncPolicyMapController() { defer e.unlock() return e.syncPolicyMapWithDump() }, - RunInterval: 1 * time.Minute, + StopFunc: func(ctx context.Context) error { + return nil + }, + RunInterval: option.Config.PolicyMapFullReconciliationInterval, Context: e.aliveCtx, }, ) diff --git a/pkg/endpoint/policy.go b/pkg/endpoint/policy.go index 4df232e85ed3e..f35b985ef4b5a 100644 --- a/pkg/endpoint/policy.go +++ b/pkg/endpoint/policy.go @@ -419,9 +419,10 @@ func (e *Endpoint) updateRealizedState(stats *regenerationStatistics, origDir st return fmt.Errorf("error synchronizing endpoint BPF program directories: %s", err) } - // Keep PolicyMap for this endpoint in sync with desired / realized state. + // Start periodic background full reconciliation of the policy map. + // Does nothing if it has already been started. if !option.Config.DryMode { - e.syncPolicyMapController() + e.startSyncPolicyMapController() } if e.desiredPolicy != e.realizedPolicy { diff --git a/pkg/envoy/resource/envoy.go b/pkg/envoy/resource/envoy.go new file mode 100644 index 0000000000000..bacf2bab03b76 --- /dev/null +++ b/pkg/envoy/resource/envoy.go @@ -0,0 +1,223 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright Authors of Cilium + +package resource + +import ( + // Imports for Envoy extensions not used directly from Cilium Agent, but that we want to + // be registered for use in Cilium Envoy Config CRDs. This can be used for any downstream + // project that wants to use Cilium Envoy Config CRDs to generate Envoy configs. + _ "github.com/cilium/proxy/go/envoy/admin/v3" + _ "github.com/cilium/proxy/go/envoy/annotations" + _ "github.com/cilium/proxy/go/envoy/config/accesslog/v3" + _ "github.com/cilium/proxy/go/envoy/config/bootstrap/v3" + _ "github.com/cilium/proxy/go/envoy/config/cluster/redis" + _ "github.com/cilium/proxy/go/envoy/config/cluster/v3" + _ "github.com/cilium/proxy/go/envoy/config/common/key_value/v3" + _ "github.com/cilium/proxy/go/envoy/config/common/matcher/v3" + _ "github.com/cilium/proxy/go/envoy/config/common/mutation_rules/v3" + _ "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cilium/proxy/go/envoy/config/endpoint/v3" + _ "github.com/cilium/proxy/go/envoy/config/grpc_credential/v3" + _ "github.com/cilium/proxy/go/envoy/config/listener/v3" + _ "github.com/cilium/proxy/go/envoy/config/metrics/v3" + _ "github.com/cilium/proxy/go/envoy/config/overload/v3" + _ "github.com/cilium/proxy/go/envoy/config/ratelimit/v3" + _ "github.com/cilium/proxy/go/envoy/config/rbac/v3" + _ "github.com/cilium/proxy/go/envoy/config/retry/previous_priorities" + _ "github.com/cilium/proxy/go/envoy/config/route/v3" + _ "github.com/cilium/proxy/go/envoy/config/tap/v3" + _ "github.com/cilium/proxy/go/envoy/config/trace/v3" + _ "github.com/cilium/proxy/go/envoy/data/accesslog/v3" + _ "github.com/cilium/proxy/go/envoy/data/cluster/v3" + _ "github.com/cilium/proxy/go/envoy/data/core/v3" + _ "github.com/cilium/proxy/go/envoy/data/dns/v3" + _ "github.com/cilium/proxy/go/envoy/data/tap/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/access_loggers/file/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/access_loggers/filters/cel/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/access_loggers/grpc/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/access_loggers/stream/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/access_loggers/wasm/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/bootstrap/internal_listener/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/cache/simple_http_cache/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/clusters/aggregate/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/clusters/dynamic_forward_proxy/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/clusters/redis/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/common/async_files/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/common/dynamic_forward_proxy/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/common/matching/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/common/ratelimit/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/common/tap/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/compression/brotli/compressor/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/compression/brotli/decompressor/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/compression/gzip/compressor/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/compression/gzip/decompressor/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/compression/zstd/compressor/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/compression/zstd/decompressor/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/config/validators/minimum_clusters/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/early_data/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/common/dependency/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/common/fault/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/common/matcher/action/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/adaptive_concurrency/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/admission_control/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/alternate_protocols_cache/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/aws_lambda/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/aws_request_signing/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/bandwidth_limit/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/buffer/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/cache/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/cdn_loop/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/composite/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/compressor/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/cors/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/csrf/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/decompressor/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/dynamic_forward_proxy/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/ext_authz/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/ext_proc/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/fault/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/file_system_buffer/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/gcp_authn/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_http1_bridge/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_json_transcoder/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_stats/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_web/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/gzip/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/header_to_metadata/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/health_check/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/ip_tagging/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/jwt_authn/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/kill_request/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/local_ratelimit/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/lua/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/oauth2/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/on_demand/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/original_src/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/rate_limit_quota/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/ratelimit/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/rbac/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/router/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/set_metadata/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/stateful_session/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/tap/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/http/wasm/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/listener/http_inspector/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/listener/original_dst/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/listener/original_src/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/listener/proxy_protocol/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/listener/tls_inspector/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/connection_limit/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/direct_response/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/dubbo_proxy/router/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/dubbo_proxy/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/echo/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/ext_authz/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/http_connection_manager/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/local_ratelimit/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/matcher/action/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/matcher/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/mongo_proxy/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/ratelimit/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/rbac/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/redis_proxy/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/sni_cluster/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/tcp_proxy/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/router/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/wasm/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/network/zookeeper_proxy/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/udp/dns_filter/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/filters/udp/udp_proxy/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/formatter/metadata/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/formatter/req_without_query/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/health_checkers/redis/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/http/header_formatters/preserve_case/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/http/header_validators/envoy_default/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/http/original_ip_detection/custom_header/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/http/original_ip_detection/xff/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/http/stateful_session/cookie/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/internal_redirect/allow_listed_routes/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/internal_redirect/previous_routes/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/internal_redirect/safe_cross_scheme/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/key_value/file_based/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/least_request/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/ring_hash/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/round_robin/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/wrr_locality/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/environment_variable/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/network/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/ssl/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/matching/input_matchers/consistent_hashing/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/matching/input_matchers/ip/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/apple/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/cares/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/getaddrinfo/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/network/socket_interface/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/quic/crypto_stream/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/quic/proof_source/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/rate_limit_descriptors/expr/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/rbac/matchers/upstream_ip_port/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/regex_engines/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/request_id/uuid/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/resource_monitors/fixed_heap/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/resource_monitors/injected_resource/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/retry/host/omit_canary_hosts/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/retry/host/omit_host_metadata/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/retry/host/previous_hosts/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/retry/priority/previous_priorities/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/stat_sinks/graphite_statsd/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/stat_sinks/wasm/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/transport_sockets/alts/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/transport_sockets/http_11_proxy/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/transport_sockets/internal_upstream/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/transport_sockets/proxy_protocol/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/transport_sockets/quic/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/transport_sockets/raw_buffer/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/transport_sockets/s2a/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/transport_sockets/starttls/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/transport_sockets/tap/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/transport_sockets/tcp_stats/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/transport_sockets/tls/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/udp_packet_writer/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/upstreams/http/generic/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/upstreams/http/http/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/upstreams/http/tcp/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/upstreams/http/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/upstreams/tcp/generic/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/wasm/v3" + _ "github.com/cilium/proxy/go/envoy/extensions/watchdog/profile_action/v3" + _ "github.com/cilium/proxy/go/envoy/service/accesslog/v3" + _ "github.com/cilium/proxy/go/envoy/service/auth/v3" + _ "github.com/cilium/proxy/go/envoy/service/cluster/v3" + _ "github.com/cilium/proxy/go/envoy/service/discovery/v3" + _ "github.com/cilium/proxy/go/envoy/service/endpoint/v3" + _ "github.com/cilium/proxy/go/envoy/service/event_reporting/v3" + _ "github.com/cilium/proxy/go/envoy/service/ext_proc/v3" + _ "github.com/cilium/proxy/go/envoy/service/extension/v3" + _ "github.com/cilium/proxy/go/envoy/service/health/v3" + _ "github.com/cilium/proxy/go/envoy/service/listener/v3" + _ "github.com/cilium/proxy/go/envoy/service/load_stats/v3" + _ "github.com/cilium/proxy/go/envoy/service/metrics/v3" + _ "github.com/cilium/proxy/go/envoy/service/rate_limit_quota/v3" + _ "github.com/cilium/proxy/go/envoy/service/ratelimit/v3" + _ "github.com/cilium/proxy/go/envoy/service/route/v3" + _ "github.com/cilium/proxy/go/envoy/service/runtime/v3" + _ "github.com/cilium/proxy/go/envoy/service/secret/v3" + _ "github.com/cilium/proxy/go/envoy/service/status/v3" + _ "github.com/cilium/proxy/go/envoy/service/tap/v3" + _ "github.com/cilium/proxy/go/envoy/service/trace/v3" + _ "github.com/cilium/proxy/go/envoy/type" + _ "github.com/cilium/proxy/go/envoy/type/http/v3" + _ "github.com/cilium/proxy/go/envoy/type/matcher" + _ "github.com/cilium/proxy/go/envoy/type/matcher/v3" + _ "github.com/cilium/proxy/go/envoy/type/metadata/v3" + _ "github.com/cilium/proxy/go/envoy/type/tracing/v3" + _ "github.com/cilium/proxy/go/envoy/type/v3" + _ "github.com/cilium/proxy/go/envoy/watchdog/v3" +) diff --git a/pkg/identity/cache/local.go b/pkg/identity/cache/local.go index 4576d4dfd004e..6c302ff83df96 100644 --- a/pkg/identity/cache/local.go +++ b/pkg/identity/cache/local.go @@ -80,11 +80,15 @@ func (l *localIdentityCache) getNextFreeNumericIdentity(idCandidate identity.Num // in as the 'oldNID' parameter; identity.InvalidIdentity must be passed if no // previous numeric identity exists. 'oldNID' will be reallocated if available. func (l *localIdentityCache) lookupOrCreate(lbls labels.Labels, oldNID identity.NumericIdentity) (*identity.Identity, bool, error) { + // Not converting to string saves an allocation, as byte key lookups into + // string maps are optimized by the compiler, see + // https://github.com/golang/go/issues/3512. + repr := lbls.SortedList() + l.mutex.Lock() defer l.mutex.Unlock() - stringRepresentation := string(lbls.SortedList()) - if id, ok := l.identitiesByLabels[stringRepresentation]; ok { + if id, ok := l.identitiesByLabels[string(repr)]; ok { id.ReferenceCount++ return id, false, nil } @@ -101,7 +105,7 @@ func (l *localIdentityCache) lookupOrCreate(lbls labels.Labels, oldNID identity. ReferenceCount: 1, } - l.identitiesByLabels[stringRepresentation] = id + l.identitiesByLabels[string(repr)] = id l.identitiesByID[numericIdentity] = id if l.events != nil { @@ -122,7 +126,7 @@ func (l *localIdentityCache) release(id *identity.Identity) bool { l.mutex.Lock() defer l.mutex.Unlock() - if id, ok := l.identitiesByLabels[string(id.Labels.SortedList())]; ok { + if id, ok := l.identitiesByID[id.ID]; ok { switch { case id.ReferenceCount > 1: id.ReferenceCount-- @@ -131,8 +135,7 @@ func (l *localIdentityCache) release(id *identity.Identity) bool { case id.ReferenceCount == 1: // Release is only attempted once, when the reference count is // hitting the last use - stringRepresentation := string(id.Labels.SortedList()) - delete(l.identitiesByLabels, stringRepresentation) + delete(l.identitiesByLabels, string(id.Labels.SortedList())) delete(l.identitiesByID, id.ID) if l.events != nil { diff --git a/pkg/labels/labels.go b/pkg/labels/labels.go index aefe524d1303d..b468923086368 100644 --- a/pkg/labels/labels.go +++ b/pkg/labels/labels.go @@ -464,13 +464,24 @@ func (l Label) FormatForKVStore() []byte { // kvstore.prefixMatchesKey()) b := make([]byte, 0, len(l.Source)+len(l.Key)+len(l.Value)+3) buf := bytes.NewBuffer(b) + l.formatForKVStoreInto(buf) + return buf.Bytes() +} + +// formatForKVStoreInto writes the label as a formatted string, ending in +// a semicolon into buf. +// +// DO NOT BREAK THE FORMAT OF THIS. THE RETURNED STRING IS USED AS +// PART OF THE KEY IN THE KEY-VALUE STORE. +// +// Non-pointer receiver allows this to be called on a value in a map. +func (l Label) formatForKVStoreInto(buf *bytes.Buffer) { buf.WriteString(l.Source) buf.WriteRune(':') buf.WriteString(l.Key) buf.WriteRune('=') buf.WriteString(l.Value) buf.WriteRune(';') - return buf.Bytes() } // SortedList returns the labels as a sorted list, separated by semicolon @@ -484,10 +495,21 @@ func (l Labels) SortedList() []byte { } sort.Strings(keys) - b := make([]byte, 0, len(keys)*2) + // Labels can have arbitrary size. However, when many CIDR identities are in + // the system, for example due to a FQDN policy matching S3, CIDR labels + // dominate in number. IPv4 CIDR labels in serialized form are max 25 bytes + // long. Allocate slightly more to avoid having a realloc if there's some + // other labels which may longer, since the cost of allocating a few bytes + // more is dominated by a second allocation, especially since these + // allocations are short-lived. + // + // cidr:123.123.123.123/32=; + // 0 1 2 + // 1234567890123456789012345 + b := make([]byte, 0, len(keys)*30) buf := bytes.NewBuffer(b) for _, k := range keys { - buf.Write(l[k].FormatForKVStore()) + l[k].formatForKVStoreInto(buf) } return buf.Bytes() diff --git a/pkg/maps/ctmap/ctmap.go b/pkg/maps/ctmap/ctmap.go index 868871811b1fd..b2ed43c08dd72 100644 --- a/pkg/maps/ctmap/ctmap.go +++ b/pkg/maps/ctmap/ctmap.go @@ -566,13 +566,13 @@ func GC(m *Map, filter *GCFilter) int { // The consumer of the buffer invokes the function. // // The SNAT is being used for the following cases: -// 1. By NodePort BPF on an intermediate node before fwd'ing request from outside +// 1. By NodePort BPF on an intermediate node before fwd'ing request from outside // to a destination node. -// 2. A packet from local endpoint sent to outside (BPF-masq). -// 3. A packet from a host local application (i.e. running in the host netns) -// This is needed to prevent SNAT from hijacking such connections. -// 4. By DSR on a backend node to SNAT responses with service IP+port before -// sending to a client. +// 2. A packet from local endpoint sent to outside (BPF-masq). +// 3. A packet from a host local application (i.e. running in the host netns) +// This is needed to prevent SNAT from hijacking such connections. +// 4. By DSR on a backend node to SNAT responses with service IP+port before +// sending to a client. // // In the case of 1-3, we always create a CT_EGRESS CT entry. This allows the // CT GC to remove corresponding SNAT entries. In the case of 4, will create @@ -784,15 +784,27 @@ var cachedGCInterval time.Duration // last run func GetInterval(mapType bpf.MapType, maxDeleteRatio float64) (interval time.Duration) { if val := option.Config.ConntrackGCInterval; val != time.Duration(0) { - interval = val - return + return val + } + + prevInterval := cachedGCInterval + if prevInterval == time.Duration(0) { + prevInterval = defaults.ConntrackGCStartingInterval } - if interval = cachedGCInterval; interval == time.Duration(0) { - interval = defaults.ConntrackGCStartingInterval + newInterval := calculateInterval(mapType, prevInterval, maxDeleteRatio) + if val := option.Config.ConntrackGCMaxInterval; val != time.Duration(0) && newInterval > val { + newInterval = val } - return calculateInterval(mapType, interval, maxDeleteRatio) + if newInterval != prevInterval { + log.WithFields(logrus.Fields{ + "newInterval": newInterval, + "deleteRatio": maxDeleteRatio, + }).Info("Conntrack garbage collector interval recalculated") + } + + return newInterval } func calculateInterval(mapType bpf.MapType, prevInterval time.Duration, maxDeleteRatio float64) (interval time.Duration) { @@ -833,13 +845,6 @@ func calculateInterval(mapType bpf.MapType, prevInterval time.Duration, maxDelet } } - if interval != prevInterval { - log.WithFields(logrus.Fields{ - "newInterval": interval, - "deleteRatio": maxDeleteRatio, - }).Info("Conntrack garbage collector interval recalculated") - } - cachedGCInterval = interval return diff --git a/pkg/maps/ctmap/ctmap_test.go b/pkg/maps/ctmap/ctmap_test.go index 763f4a5bf5372..40b2dac4a36f2 100644 --- a/pkg/maps/ctmap/ctmap_test.go +++ b/pkg/maps/ctmap/ctmap_test.go @@ -63,6 +63,8 @@ func (t *CTMapTestSuite) TestInit(c *C) { } func (t *CTMapTestSuite) TestCalculateInterval(c *C) { + cachedGCInterval = time.Duration(0) + c.Assert(calculateInterval(bpf.MapTypeLRUHash, time.Minute, 0.1), Equals, time.Minute) // no change c.Assert(calculateInterval(bpf.MapTypeLRUHash, time.Minute, 0.2), Equals, time.Minute) // no change c.Assert(calculateInterval(bpf.MapTypeLRUHash, time.Minute, 0.25), Equals, time.Minute) // no change @@ -80,6 +82,27 @@ func (t *CTMapTestSuite) TestCalculateInterval(c *C) { c.Assert(calculateInterval(bpf.MapTypeHash, 24*time.Hour, 0.01), Equals, defaults.ConntrackGCMaxInterval) } +func (t *CTMapTestSuite) TestGetInterval(c *C) { + cachedGCInterval = time.Minute + c.Assert(GetInterval(bpf.MapTypeLRUHash, 0.1), Equals, time.Minute) + + // Setting ConntrackGCInterval overrides the calculation + oldInterval := option.Config.ConntrackGCInterval + option.Config.ConntrackGCInterval = 10 * time.Second + c.Assert(GetInterval(bpf.MapTypeLRUHash, 0.1), Equals, 10*time.Second) + option.Config.ConntrackGCInterval = oldInterval + c.Assert(GetInterval(bpf.MapTypeLRUHash, 0.1), Equals, time.Minute) + + // Setting ConntrackGCMaxInterval limits the maximum interval + oldMaxInterval := option.Config.ConntrackGCMaxInterval + option.Config.ConntrackGCMaxInterval = 20 * time.Second + c.Assert(GetInterval(bpf.MapTypeLRUHash, 0.1), Equals, 20*time.Second) + option.Config.ConntrackGCMaxInterval = oldMaxInterval + c.Assert(GetInterval(bpf.MapTypeLRUHash, 0.1), Equals, time.Minute) + + cachedGCInterval = time.Duration(0) +} + func (t *CTMapTestSuite) TestFilterMapsByProto(c *C) { maps := []*Map{ newMap("tcp4", mapTypeIPv4TCPGlobal), diff --git a/pkg/node/types/node.go b/pkg/node/types/node.go index df0f3724cfed8..0e07797fe6d2b 100644 --- a/pkg/node/types/node.go +++ b/pkg/node/types/node.go @@ -495,7 +495,7 @@ func (n *Node) GetIPv6AllocCIDRs() []*cidr.CIDR { if n.IPv6AllocCIDR != nil { result = append(result, n.IPv6AllocCIDR) } - if len(n.IPv4SecondaryAllocCIDRs) > 0 { + if len(n.IPv6SecondaryAllocCIDRs) > 0 { result = append(result, n.IPv6SecondaryAllocCIDRs...) } return result diff --git a/pkg/node/types/node_test.go b/pkg/node/types/node_test.go index 649c084675f28..841cc60fc4ab4 100644 --- a/pkg/node/types/node_test.go +++ b/pkg/node/types/node_test.go @@ -6,9 +6,11 @@ package types import ( + "fmt" "net" "testing" + "github.com/stretchr/testify/assert" . "gopkg.in/check.v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -240,3 +242,115 @@ func (s *NodeSuite) TestNode_ToCiliumNode(c *C) { }, }) } + +func TestGetIPv4AllocCIDRs(t *testing.T) { + var ( + cidr1 = cidr.MustParseCIDR("1.0.0.0/24") + cidr2 = cidr.MustParseCIDR("2.0.0.0/24") + cidr3 = cidr.MustParseCIDR("3.0.0.0/24") + ) + + var tests = []struct { + // name of test + name string + // primary ipv4 allocation cidr + allocCIDR *cidr.CIDR + // secondary ipv4 allocation cidrs + secAllocCIDRs []*cidr.CIDR + // expected ipv4 cidrs + expectedCIDRs []*cidr.CIDR + }{ + { + name: "nil cidrs", + allocCIDR: nil, + secAllocCIDRs: nil, + expectedCIDRs: make([]*cidr.CIDR, 0), + }, + { + name: "one primary and no secondary cidrs", + allocCIDR: cidr1, + secAllocCIDRs: nil, + expectedCIDRs: []*cidr.CIDR{cidr1}, + }, + { + name: "one primary and one secondary cidr", + allocCIDR: cidr1, + secAllocCIDRs: []*cidr.CIDR{cidr2}, + expectedCIDRs: []*cidr.CIDR{cidr1, cidr2}, + }, + { + name: "one primary and multiple secondary cidrs", + allocCIDR: cidr1, + secAllocCIDRs: []*cidr.CIDR{cidr2, cidr3}, + expectedCIDRs: []*cidr.CIDR{cidr1, cidr2, cidr3}, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + n := Node{ + Name: fmt.Sprintf("node-%s", tt.name), + IPv4AllocCIDR: tt.allocCIDR, + IPv4SecondaryAllocCIDRs: tt.secAllocCIDRs, + } + + actual := n.GetIPv4AllocCIDRs() + assert.Equal(t, actual, tt.expectedCIDRs) + }) + } +} + +func TestGetIPv6AllocCIDRs(t *testing.T) { + var ( + cidr2001 = cidr.MustParseCIDR("2001:db8::/32") + cidr2002 = cidr.MustParseCIDR("2002:db8::/32") + cidr2003 = cidr.MustParseCIDR("2003:db8::/32") + ) + + var tests = []struct { + // name of test + name string + // primary ipv6 allocation cidr + allocCIDR *cidr.CIDR + // secondary ipv6 allocation cidrs + secAllocCIDRs []*cidr.CIDR + // expected ipv6 cidrs + expectedCIDRs []*cidr.CIDR + }{ + { + name: "nil cidrs", + allocCIDR: nil, + secAllocCIDRs: nil, + expectedCIDRs: make([]*cidr.CIDR, 0), + }, + { + name: "one primary and no secondary cidrs", + allocCIDR: cidr2001, + secAllocCIDRs: nil, + expectedCIDRs: []*cidr.CIDR{cidr2001}, + }, + { + name: "one primary and one secondary cidr", + allocCIDR: cidr2001, + secAllocCIDRs: []*cidr.CIDR{cidr2002}, + expectedCIDRs: []*cidr.CIDR{cidr2001, cidr2002}, + }, + { + name: "one primary and multiple secondary cidrs", + allocCIDR: cidr2001, + secAllocCIDRs: []*cidr.CIDR{cidr2002, cidr2003}, + expectedCIDRs: []*cidr.CIDR{cidr2001, cidr2002, cidr2003}, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + n := Node{ + Name: fmt.Sprintf("node-%s", tt.name), + IPv6AllocCIDR: tt.allocCIDR, + IPv6SecondaryAllocCIDRs: tt.secAllocCIDRs, + } + + actual := n.GetIPv6AllocCIDRs() + assert.Equal(t, actual, tt.expectedCIDRs) + }) + } +} diff --git a/pkg/option/config.go b/pkg/option/config.go index d602f9ed9b4ae..a268fed15aada 100644 --- a/pkg/option/config.go +++ b/pkg/option/config.go @@ -111,6 +111,9 @@ const ( // ConntrackGCInterval is the name of the ConntrackGCInterval option ConntrackGCInterval = "conntrack-gc-interval" + // ConntrackGCMaxInterval is the name of the ConntrackGCMaxInterval option + ConntrackGCMaxInterval = "conntrack-gc-max-interval" + // DebugArg is the argument enables debugging mode DebugArg = "debug" @@ -627,6 +630,10 @@ const ( // PolicyMapEntriesName configures max entries for BPF policymap. PolicyMapEntriesName = "bpf-policy-map-max" + // PolicyMapFullReconciliationInterval sets the interval for performing the full + // reconciliation of the endpoint policy map. + PolicyMapFullReconciliationIntervalName = "bpf-policy-map-full-reconciliation-interval" + // SockRevNatEntriesName configures max entries for BPF sock reverse nat // entries. SockRevNatEntriesName = "bpf-sock-rev-map-max" @@ -1460,6 +1467,10 @@ type DaemonConfig struct { // endpoint may allow traffic to exchange traffic with. PolicyMapEntries int + // PolicyMapFullReconciliationInterval is the interval at which to perform + // the full reconciliation of the endpoint policy map. + PolicyMapFullReconciliationInterval time.Duration + // SockRevNatEntries is the maximum number of sock rev nat mappings // allowed in the BPF rev nat table SockRevNatEntries int @@ -1808,6 +1819,10 @@ type DaemonConfig struct { // interval ConntrackGCInterval time.Duration + // ConntrackGCMaxInterval if set limits the automatic GC interval calculation to + // the specified maximum value. + ConntrackGCMaxInterval time.Duration + // K8sEventHandover enables use of the kvstore to optimize Kubernetes // event handling by listening for k8s events in the operator and // mirroring it into the kvstore for reduced overhead in large @@ -3135,6 +3150,7 @@ func (c *DaemonConfig) Populate() { } c.ConntrackGCInterval = viper.GetDuration(ConntrackGCInterval) + c.ConntrackGCMaxInterval = viper.GetDuration(ConntrackGCMaxInterval) if m, err := command.GetStringMapStringE(viper.GetViper(), KVStoreOpt); err != nil { log.Fatalf("unable to parse %s: %s", KVStoreOpt, err) @@ -3530,6 +3546,7 @@ func (c *DaemonConfig) calculateBPFMapSizes() error { c.NATMapEntriesGlobal = viper.GetInt(NATMapEntriesGlobalName) c.NeighMapEntriesGlobal = viper.GetInt(NeighMapEntriesGlobalName) c.PolicyMapEntries = viper.GetInt(PolicyMapEntriesName) + c.PolicyMapFullReconciliationInterval = viper.GetDuration(PolicyMapFullReconciliationIntervalName) c.SockRevNatEntries = viper.GetInt(SockRevNatEntriesName) c.LBMapEntries = viper.GetInt(LBMapEntriesName) c.LBServiceMapEntries = viper.GetInt(LBServiceMapMaxEntries) diff --git a/pkg/policy/distillery_test.go b/pkg/policy/distillery_test.go index b255aeba36a5a..5c29875a201e7 100644 --- a/pkg/policy/distillery_test.go +++ b/pkg/policy/distillery_test.go @@ -40,6 +40,10 @@ var ( ep2 = testutils.NewTestEndpoint() ) +func localIdentity(n uint32) identity.NumericIdentity { + return identity.NumericIdentity(n) | identity.LocalIdentityFlag + +} func (s *DistilleryTestSuite) TestCacheManagement(c *C) { repo := NewPolicyRepository(nil, nil, nil) cache := repo.policyCache @@ -449,7 +453,6 @@ func (d *policyDistillery) distillPolicy(owner PolicyOwner, epLabels labels.Labe func (m MapState) clearCaches() { for k, v := range m { v.owners = make(map[MapStateOwner]struct{}) - v.cachedNets = nil m[k] = v } } @@ -1206,7 +1209,7 @@ var ( owners: map[MapStateOwner]struct{}{}, } - worldIPIdentity = identity.NumericIdentity(16324) + worldIPIdentity = localIdentity(16324) worldCIDR = api.CIDR("192.0.2.3/32") lblWorldIP = labels.ParseSelectLabelArray(fmt.Sprintf("%s:%s", labels.LabelSourceCIDR, worldCIDR)) ruleL3AllowWorldIP = api.NewRule().WithIngressRules([]api.IngressRule{{ @@ -1219,7 +1222,7 @@ var ( }, }}).WithEndpointSelector(api.WildcardEndpointSelector) - worldSubnetIdentity = identity.NumericIdentity(16325) + worldSubnetIdentity = localIdentity(16325) worldSubnet = api.CIDR("192.0.2.0/24") worldSubnetRule = api.CIDRRule{ Cidr: worldSubnet, diff --git a/pkg/policy/mapstate.go b/pkg/policy/mapstate.go index d0c94069d733f..1db06a196ddb8 100644 --- a/pkg/policy/mapstate.go +++ b/pkg/policy/mapstate.go @@ -48,7 +48,7 @@ const ( type MapState map[Key]MapStateEntry type Identities interface { - GetLabels(identity.NumericIdentity) labels.LabelArray + GetNetsLocked(identity.NumericIdentity) []*net.IPNet } // Key is the userspace representation of a policy key in BPF. It is @@ -122,9 +122,6 @@ type MapStateEntry struct { // dependents contains the keys for entries create based on this entry. These entries // will be deleted once all of the owners are deleted. dependents Keys - - // cachedNets caches the subnets (if any) associated with this MapStateEntry. - cachedNets []*net.IPNet } // NewMapStateEntry creates a map state entry. If redirect is true, the @@ -179,46 +176,22 @@ func (e *MapStateEntry) HasDependent(key Key) bool { // getNets returns the most specific CIDR for an identity. For the "World" identity // it returns both IPv4 and IPv6. -func (e *MapStateEntry) getNets(identities Identities, ident uint32) []*net.IPNet { - // Caching results is not dangerous in this situation as the entry - // is ephemerally tied to the lifecycle of the MapState object that - // it will be in. - if e.cachedNets != nil { - return e.cachedNets - } +func getNets(identities Identities, ident uint32) []*net.IPNet { + // World identities are handled explicitly for two reasons: + // 1. 'identities' may be nil, but world identities are still expected to be considered + // 2. SelectorCache is not be informed of reserved/world identities in all test cases id := identity.NumericIdentity(ident) if id == identity.ReservedIdentityWorld { - e.cachedNets = []*net.IPNet{ + return []*net.IPNet{ {IP: net.IPv4zero, Mask: net.CIDRMask(0, net.IPv4len*8)}, {IP: net.IPv6zero, Mask: net.CIDRMask(0, net.IPv6len*8)}, } - return e.cachedNets } - if identities == nil { + // CIDR identities have a local scope, so we can skip the rest if id is not of local scope. + if !id.HasLocalScope() || identities == nil { return nil } - lbls := identities.GetLabels(id) - nets := make([]*net.IPNet, 0, 1) - var ( - maskSize int - mostSpecificCidr *net.IPNet - ) - for _, lbl := range lbls { - if lbl.Source == labels.LabelSourceCIDR { - _, netIP, err := net.ParseCIDR(lbl.Key) - if err == nil { - if ms, _ := netIP.Mask.Size(); ms > maskSize { - mostSpecificCidr = netIP - maskSize = ms - } - } - } - } - if mostSpecificCidr != nil { - nets = append(nets, mostSpecificCidr) - } - e.cachedNets = nets - return nets + return identities.GetNetsLocked(id) } // AddDependent adds 'key' to the set of dependent keys. @@ -413,18 +386,18 @@ func (keys MapState) deleteKeyWithChanges(key Key, owner MapStateOwner, adds, de } } -// entryIdentityIsSupersetOf compares two entries and keys to see if the primary identity contains +// identityIsSupersetOf compares two entries and keys to see if the primary identity contains // the compared identity. This means that either that primary identity is 0 (i.e. it is a superset // of every other identity), or one of the subnets of the primary identity fully contains or is // equal to one of the subnets in the compared identity (note:this covers cases like "reserved:world"). -func entryIdentityIsSupersetOf(primaryKey Key, primaryEntry MapStateEntry, compareKey Key, compareEntry MapStateEntry, identities Identities) bool { +func identityIsSupersetOf(primaryIdentity, compareIdentity uint32, identities Identities) bool { // If the identities are equal then neither is a superset (for the purposes of our business logic). - if primaryKey.Identity == compareKey.Identity { + if primaryIdentity == compareIdentity { return false } - return primaryKey.Identity == 0 && compareKey.Identity != 0 || - ip.NetsContainsAny(primaryEntry.getNets(identities, primaryKey.Identity), - compareEntry.getNets(identities, compareKey.Identity)) + return primaryIdentity == 0 && compareIdentity != 0 || + ip.NetsContainsAny(getNets(identities, primaryIdentity), + getNets(identities, compareIdentity)) } // protocolsMatch checks to see if two given keys match on protocol. @@ -465,7 +438,7 @@ func (keys MapState) DenyPreferredInsertWithChanges(newKey Key, newEntry MapStat continue } if !v.IsDeny { - if entryIdentityIsSupersetOf(k, v, newKey, newEntry, identities) { + if identityIsSupersetOf(k.Identity, newKey.Identity, identities) { if newKey.PortProtoIsBroader(k) { // If this iterated-allow-entry is a superset of the new-entry // and it has a more specific port-protocol than the new-entry @@ -482,7 +455,7 @@ func (keys MapState) DenyPreferredInsertWithChanges(newKey Key, newEntry MapStat newEntry.AddDependent(newKeyCpy) } } else if (newKey.Identity == k.Identity || - entryIdentityIsSupersetOf(newKey, newEntry, k, v, identities)) && + identityIsSupersetOf(newKey.Identity, k.Identity, identities)) && (newKey.PortProtoIsBroader(k) || newKey.PortProtoIsEqual(k)) { // If the new-entry is a superset (or equal) of the iterated-allow-entry and // the new-entry has a broader (or equal) port-protocol then we @@ -490,7 +463,7 @@ func (keys MapState) DenyPreferredInsertWithChanges(newKey Key, newEntry MapStat keys.deleteKeyWithChanges(k, nil, adds, deletes, old) } } else if (newKey.Identity == k.Identity || - entryIdentityIsSupersetOf(k, v, newKey, newEntry, identities)) && + identityIsSupersetOf(k.Identity, newKey.Identity, identities)) && k.DestPort == 0 && k.Nexthdr == 0 && !v.HasDependent(newKey) { // If this iterated-deny-entry is a supserset (or equal) of the new-entry and @@ -503,7 +476,7 @@ func (keys MapState) DenyPreferredInsertWithChanges(newKey Key, newEntry MapStat // but there *may* be performance tradeoffs. return } else if (newKey.Identity == k.Identity || - entryIdentityIsSupersetOf(newKey, newEntry, k, v, identities)) && + identityIsSupersetOf(newKey.Identity, k.Identity, identities)) && newKey.DestPort == 0 && newKey.Nexthdr == 0 && !newEntry.HasDependent(k) { // If this iterated-deny-entry is a subset (or equal) of the new-entry and @@ -527,7 +500,7 @@ func (keys MapState) DenyPreferredInsertWithChanges(newKey Key, newEntry MapStat } // NOTE: We do not delete redundant allow entries. if v.IsDeny { - if entryIdentityIsSupersetOf(newKey, newEntry, k, v, identities) { + if identityIsSupersetOf(newKey.Identity, k.Identity, identities) { if k.PortProtoIsBroader(newKey) { // If the new-entry is *only* superset of the iterated-deny-entry // and the new-entry has a more specific port-protocol than the @@ -546,7 +519,7 @@ func (keys MapState) DenyPreferredInsertWithChanges(newKey Key, newEntry MapStat keys[k] = v } } else if (k.Identity == newKey.Identity || - entryIdentityIsSupersetOf(k, v, newKey, newEntry, identities)) && + identityIsSupersetOf(k.Identity, newKey.Identity, identities)) && (k.PortProtoIsBroader(newKey) || k.PortProtoIsEqual(newKey)) && !v.HasDependent(newKey) { // If the iterated-deny-entry is a superset (or equal) of the new-entry and has a diff --git a/pkg/policy/selectorcache.go b/pkg/policy/selectorcache.go index afcccc054b79a..b277d7353b2c5 100644 --- a/pkg/policy/selectorcache.go +++ b/pkg/policy/selectorcache.go @@ -162,7 +162,9 @@ type identitySelector interface { type scIdentity struct { NID identity.NumericIdentity lbls labels.LabelArray - namespace string // value of the namespace label, or "" + nets []*net.IPNet // Most specific CIDR for the identity, if any. + computed bool // nets has been computed + namespace string // value of the namespace label, or "" } // scIdentityCache is a cache of Identities keyed by the numeric identity @@ -172,10 +174,37 @@ func newIdentity(nid identity.NumericIdentity, lbls labels.LabelArray) scIdentit return scIdentity{ NID: nid, lbls: lbls, + nets: getLocalScopeNets(nid, lbls), namespace: lbls.Get(labels.LabelSourceK8sKeyPrefix + k8sConst.PodNamespaceLabel), + computed: true, } } +// getLocalScopeNets returns the most specific CIDR for a local scope identity. +func getLocalScopeNets(id identity.NumericIdentity, lbls labels.LabelArray) []*net.IPNet { + if id.HasLocalScope() { + var ( + maskSize int + mostSpecificCidr *net.IPNet + ) + for _, lbl := range lbls { + if lbl.Source == labels.LabelSourceCIDR { + _, netIP, err := net.ParseCIDR(lbl.Key) + if err == nil { + if ms, _ := netIP.Mask.Size(); ms > maskSize { + mostSpecificCidr = netIP + maskSize = ms + } + } + } + } + if mostSpecificCidr != nil { + return []*net.IPNet{mostSpecificCidr} + } + } + return nil +} + func getIdentityCache(ids cache.IdentityCache) scIdentityCache { idCache := make(map[identity.NumericIdentity]scIdentity, len(ids)) for nid, lbls := range ids { @@ -337,7 +366,11 @@ func (s *selectorManager) Equal(b *selectorManager) bool { // of the selections. If the old version is returned, the user is // guaranteed to receive a notification including the update. func (s *selectorManager) GetSelections() []identity.NumericIdentity { - return *(*[]identity.NumericIdentity)(atomic.LoadPointer(&s.selections)) + selections := (*[]identity.NumericIdentity)(atomic.LoadPointer(&s.selections)) + if selections == nil { + return emptySelection + } + return *selections } // Selects return 'true' if the CachedSelector selects the given @@ -1080,10 +1113,18 @@ func (sc *SelectorCache) RemoveIdentitiesFQDNSelectors(fqdnSels []api.FQDNSelect sc.releaseIdentityMappings(identitiesToRelease) } -func (sc *SelectorCache) GetLabels(id identity.NumericIdentity) labels.LabelArray { +// GetNetsLocked returns the most specific CIDR for an identity. For the "World" identity +// it returns both IPv4 and IPv6. +func (sc *SelectorCache) GetNetsLocked(id identity.NumericIdentity) []*net.IPNet { ident, ok := sc.idCache[id] if !ok { - return labels.LabelArray{} + return nil + } + if !ident.computed { + log.WithFields(logrus.Fields{ + logfields.Identity: id, + logfields.Labels: ident.lbls, + }).Warning("GetNetsLocked: Identity with missing nets!") } - return ident.lbls + return ident.nets } diff --git a/pkg/policy/selectorcache_test.go b/pkg/policy/selectorcache_test.go index 45cf402c9c636..398d8714d3f26 100644 --- a/pkg/policy/selectorcache_test.go +++ b/pkg/policy/selectorcache_test.go @@ -612,6 +612,21 @@ func (ds *SelectorCacheTestSuite) TestIdentityUpdatesMultipleUsers(c *C) { c.Assert(len(sc.selectors), Equals, 0) } +func (ds *SelectorCacheTestSuite) TestSelectorManagerCanGetBeforeSet(c *C) { + defer func() { + r := recover() + c.Assert(r, Equals, nil) + }() + + selectorManager := selectorManager{ + key: "test", + users: make(map[CachedSelectionUser]struct{}), + } + selections := selectorManager.GetSelections() + c.Assert(selections, Not(Equals), nil) + c.Assert(len(selections), Equals, 0) +} + func testNewSelectorCache(ids cache.IdentityCache) *SelectorCache { sc := NewSelectorCache(testidentity.NewMockIdentityAllocator(ids), ids) sc.SetLocalIdentityNotifier(testidentity.NewDummyIdentityNotifier()) diff --git a/test/helpers/kubectl.go b/test/helpers/kubectl.go index 7cf78e1781c9e..fff8d7397ac93 100644 --- a/test/helpers/kubectl.go +++ b/test/helpers/kubectl.go @@ -2843,9 +2843,15 @@ func (kub *Kubectl) CiliumExecContext(ctx context.Context, pod string, cmd strin for i := 0; i < limitTimes; i++ { res = execute() switch res.GetExitCode() { + case 0: + // Command succeeded. Return the result. + return res case -1, 126: - // Retry. + // The preceding comments indicate that these return codes may occur frequently. + // To prevent excessive log entries in the default case, we catch these errors here + // and retry the command without generating additional log entries. default: + // Command failed. Log failure and retry. kub.Logger().Warningf("command terminated with exit code %d on try %d", res.GetExitCode(), i) break } diff --git a/test/k8s/manifests/demo-customcalls.yaml b/test/k8s/manifests/demo-customcalls.yaml index de3e9896f346a..fa4192f2ea379 100644 --- a/test/k8s/manifests/demo-customcalls.yaml +++ b/test/k8s/manifests/demo-customcalls.yaml @@ -52,7 +52,7 @@ spec: path: / port: 80 - name: udp - image: docker.io/cilium/echoserver-udp:v2020.01.30 + image: quay.io/cilium/echoserver-udp:v2020.01.30 imagePullPolicy: IfNotPresent ports: - containerPort: 69 @@ -82,7 +82,7 @@ spec: terminationGracePeriodSeconds: 0 containers: - name: app-frontend - image: docker.io/cilium/demo-client:1.0 + image: quay.io/cilium/demo-client:1.0 imagePullPolicy: IfNotPresent command: [ "sleep" ] args: @@ -99,7 +99,7 @@ metadata: spec: containers: - name: cilium-builder - image: quay.io/cilium/cilium-builder:8462634e533ec37894aa2fefb1da093cf4ec662b@sha256:18b40bcc762892c1a47fe369afd87b6d6f07ccdef4de82830930151ee96401b9 + image: quay.io/cilium/cilium-builder:54d43abf39b5855d3962a88e2911708b653cae9b@sha256:83060d7c62a03b4cdf775031776a303df2ef48382036e22ffceca12663d12e47 workingDir: /cilium command: ["sleep"] args: diff --git a/test/k8s/manifests/demo-named-port.yaml b/test/k8s/manifests/demo-named-port.yaml index 6364befc512d4..ca61af448924a 100644 --- a/test/k8s/manifests/demo-named-port.yaml +++ b/test/k8s/manifests/demo-named-port.yaml @@ -53,7 +53,7 @@ spec: path: / port: 80 - name: udp - image: docker.io/cilium/echoserver-udp:v2020.01.30 + image: quay.io/cilium/echoserver-udp:v2020.01.30 imagePullPolicy: IfNotPresent ports: - containerPort: 69 @@ -83,7 +83,7 @@ spec: terminationGracePeriodSeconds: 0 containers: - name: app-frontend - image: docker.io/cilium/demo-client:1.0 + image: quay.io/cilium/demo-client:1.0 imagePullPolicy: IfNotPresent command: [ "sleep" ] args: @@ -112,7 +112,7 @@ spec: terminationGracePeriodSeconds: 0 containers: - name: app-frontend - image: docker.io/cilium/demo-client:1.0 + image: quay.io/cilium/demo-client:1.0 imagePullPolicy: IfNotPresent command: [ "sleep" ] args: diff --git a/test/k8s/manifests/demo.yaml b/test/k8s/manifests/demo.yaml index 4751df6b618cf..7171fc1031ce1 100644 --- a/test/k8s/manifests/demo.yaml +++ b/test/k8s/manifests/demo.yaml @@ -52,7 +52,7 @@ spec: path: / port: 80 - name: udp - image: docker.io/cilium/echoserver-udp:v2020.01.30 + image: quay.io/cilium/echoserver-udp:v2020.01.30 imagePullPolicy: IfNotPresent ports: - containerPort: 69 @@ -82,7 +82,7 @@ spec: terminationGracePeriodSeconds: 0 containers: - name: app-frontend - image: docker.io/cilium/demo-client:1.0 + image: quay.io/cilium/demo-client:1.0 imagePullPolicy: IfNotPresent command: [ "sleep" ] args: @@ -111,7 +111,7 @@ spec: terminationGracePeriodSeconds: 0 containers: - name: app-frontend - image: docker.io/cilium/demo-client:1.0 + image: quay.io/cilium/demo-client:1.0 imagePullPolicy: IfNotPresent command: [ "sleep" ] args: diff --git a/test/k8s/manifests/demo_ds.yaml b/test/k8s/manifests/demo_ds.yaml index 85235d5c1e180..2b9fc8de8d75a 100644 --- a/test/k8s/manifests/demo_ds.yaml +++ b/test/k8s/manifests/demo_ds.yaml @@ -14,7 +14,7 @@ spec: spec: containers: - name: web - image: docker.io/cilium/echoserver:1.10.1 + image: quay.io/cilium/echoserver:1.10.1 imagePullPolicy: IfNotPresent ports: - containerPort: 80 @@ -23,7 +23,7 @@ spec: path: / port: 80 - name: udp - image: docker.io/cilium/echoserver-udp:v2020.01.30 + image: quay.io/cilium/echoserver-udp:v2020.01.30 imagePullPolicy: IfNotPresent ports: - containerPort: 69 @@ -52,7 +52,7 @@ spec: terminationGracePeriodSeconds: 0 containers: - name: web - image: docker.io/cilium/demo-client:1.0 + image: quay.io/cilium/demo-client:1.0 imagePullPolicy: IfNotPresent command: [ "sleep" ] args: @@ -74,7 +74,7 @@ spec: terminationGracePeriodSeconds: 0 containers: - name: web - image: docker.io/cilium/demo-client:1.0 + image: quay.io/cilium/demo-client:1.0 imagePullPolicy: IfNotPresent command: [ "sleep" ] args: @@ -95,7 +95,7 @@ spec: spec: containers: - name: web - image: docker.io/cilium/echoserver:1.10.1 + image: quay.io/cilium/echoserver:1.10.1 imagePullPolicy: IfNotPresent ports: - containerPort: 80 @@ -105,7 +105,7 @@ spec: path: / port: 80 - name: udp - image: docker.io/cilium/echoserver-udp:v2020.01.30 + image: quay.io/cilium/echoserver-udp:v2020.01.30 imagePullPolicy: IfNotPresent ports: - containerPort: 69 diff --git a/test/k8s/manifests/demo_ds_local.yaml b/test/k8s/manifests/demo_ds_local.yaml index f06d8c03db43c..e974527fc8781 100644 --- a/test/k8s/manifests/demo_ds_local.yaml +++ b/test/k8s/manifests/demo_ds_local.yaml @@ -14,7 +14,7 @@ spec: spec: containers: - name: web - image: docker.io/cilium/echoserver:1.10.1 + image: quay.io/cilium/echoserver:1.10.1 imagePullPolicy: IfNotPresent ports: - containerPort: 80 @@ -23,7 +23,7 @@ spec: path: / port: 80 - name: udp - image: docker.io/cilium/echoserver-udp:v2020.01.30 + image: quay.io/cilium/echoserver-udp:v2020.01.30 imagePullPolicy: IfNotPresent ports: - containerPort: 69 @@ -52,7 +52,7 @@ spec: terminationGracePeriodSeconds: 0 containers: - name: web - image: docker.io/cilium/demo-client:1.0 + image: quay.io/cilium/demo-client:1.0 imagePullPolicy: IfNotPresent command: [ "sleep" ] args: @@ -73,7 +73,7 @@ spec: spec: containers: - name: web - image: docker.io/cilium/echoserver:1.10.1 + image: quay.io/cilium/echoserver:1.10.1 imagePullPolicy: IfNotPresent ports: - containerPort: 80 @@ -83,7 +83,7 @@ spec: path: / port: 80 - name: udp - image: docker.io/cilium/echoserver-udp:v2020.01.30 + image: quay.io/cilium/echoserver-udp:v2020.01.30 imagePullPolicy: IfNotPresent ports: - containerPort: 69 diff --git a/test/k8s/manifests/demo_hostfw.yaml b/test/k8s/manifests/demo_hostfw.yaml index e39c5579271d8..11d7960bc8a24 100644 --- a/test/k8s/manifests/demo_hostfw.yaml +++ b/test/k8s/manifests/demo_hostfw.yaml @@ -16,7 +16,7 @@ spec: spec: containers: - name: web - image: docker.io/cilium/echoserver:1.10.1 + image: quay.io/cilium/echoserver:1.10.1 imagePullPolicy: IfNotPresent ports: - containerPort: 80 @@ -25,7 +25,7 @@ spec: path: / port: 80 - name: udp - image: docker.io/cilium/echoserver-udp:v2020.01.30 + image: quay.io/cilium/echoserver-udp:v2020.01.30 imagePullPolicy: IfNotPresent ports: - containerPort: 69 @@ -55,7 +55,7 @@ spec: terminationGracePeriodSeconds: 0 containers: - name: web - image: docker.io/cilium/demo-client:1.0 + image: quay.io/cilium/demo-client:1.0 imagePullPolicy: IfNotPresent command: [ "sleep" ] args: @@ -78,7 +78,7 @@ spec: hostNetwork: true containers: - name: web - image: docker.io/cilium/echoserver:1.10.1 + image: quay.io/cilium/echoserver:1.10.1 imagePullPolicy: IfNotPresent ports: - containerPort: 80 @@ -87,7 +87,7 @@ spec: path: / port: 80 - name: udp - image: docker.io/cilium/echoserver-udp:v2020.01.30 + image: quay.io/cilium/echoserver-udp:v2020.01.30 imagePullPolicy: IfNotPresent ports: - containerPort: 69 @@ -118,7 +118,7 @@ spec: terminationGracePeriodSeconds: 0 containers: - name: web - image: docker.io/cilium/demo-client:1.0 + image: quay.io/cilium/demo-client:1.0 imagePullPolicy: IfNotPresent command: [ "sleep" ] args: diff --git a/test/k8s/manifests/echo-svc.yaml b/test/k8s/manifests/echo-svc.yaml index 80173aaa68252..5d46cef8f0bd4 100644 --- a/test/k8s/manifests/echo-svc.yaml +++ b/test/k8s/manifests/echo-svc.yaml @@ -32,7 +32,7 @@ spec: - /dev/null - localhost - name: echo-container-udp - image: docker.io/cilium/echoserver-udp:v2020.01.30 + image: quay.io/cilium/echoserver-udp:v2020.01.30 --- apiVersion: v1 kind: Service diff --git a/test/k8s/manifests/echoserver-cilium-hostnetns.yaml b/test/k8s/manifests/echoserver-cilium-hostnetns.yaml index e99549f84cbef..d9fb1a76bafee 100644 --- a/test/k8s/manifests/echoserver-cilium-hostnetns.yaml +++ b/test/k8s/manifests/echoserver-cilium-hostnetns.yaml @@ -15,7 +15,7 @@ spec: spec: containers: - name: web - image: docker.io/cilium/echoserver:1.10.1 + image: quay.io/cilium/echoserver:1.10.1 imagePullPolicy: IfNotPresent ports: - containerPort: 80 diff --git a/test/k8s/manifests/echoserver-hostnetns.yaml b/test/k8s/manifests/echoserver-hostnetns.yaml index 5b5e49b1b513a..fd681a711944a 100644 --- a/test/k8s/manifests/echoserver-hostnetns.yaml +++ b/test/k8s/manifests/echoserver-hostnetns.yaml @@ -15,7 +15,7 @@ spec: spec: containers: - name: web - image: docker.io/cilium/echoserver:1.10.1 + image: quay.io/cilium/echoserver:1.10.1 imagePullPolicy: IfNotPresent ports: - containerPort: 80 diff --git a/test/k8s/manifests/external_pod.yaml b/test/k8s/manifests/external_pod.yaml index 2cf5b78b600ba..b3c6a4a735dc6 100644 --- a/test/k8s/manifests/external_pod.yaml +++ b/test/k8s/manifests/external_pod.yaml @@ -8,6 +8,6 @@ metadata: spec: containers: - name: app-reach-services - image: docker.io/cilium/demo-client:1.0 + image: quay.io/cilium/demo-client:1.0 imagePullPolicy: IfNotPresent command: [ "bash", "-c", "while true; do sleep 5; done" ] diff --git a/test/k8s/manifests/graceful-termination.yaml b/test/k8s/manifests/graceful-termination.yaml index 219315228485d..3aa21fc8fbbe9 100644 --- a/test/k8s/manifests/graceful-termination.yaml +++ b/test/k8s/manifests/graceful-termination.yaml @@ -66,7 +66,7 @@ spec: terminationGracePeriodSeconds: 0 containers: - name: web - image: docker.io/cilium/demo-client:1.0 + image: quay.io/cilium/demo-client:1.0 imagePullPolicy: IfNotPresent command: [ "sleep" ] args: diff --git a/test/k8s/manifests/lrp-test.yaml b/test/k8s/manifests/lrp-test.yaml index 6117e646cb855..1cd79867f4455 100644 --- a/test/k8s/manifests/lrp-test.yaml +++ b/test/k8s/manifests/lrp-test.yaml @@ -9,7 +9,7 @@ metadata: spec: containers: - name: web - image: docker.io/cilium/echoserver:1.10.1 + image: quay.io/cilium/echoserver:1.10.1 imagePullPolicy: IfNotPresent ports: - name: http @@ -20,7 +20,7 @@ spec: path: / port: 80 - name: udp - image: docker.io/cilium/echoserver-udp:v2020.01.30 + image: quay.io/cilium/echoserver-udp:v2020.01.30 imagePullPolicy: IfNotPresent ports: - name: tftp @@ -40,7 +40,7 @@ metadata: spec: containers: - name: web - image: docker.io/cilium/echoserver:1.10.1 + image: quay.io/cilium/echoserver:1.10.1 imagePullPolicy: IfNotPresent ports: - name: http @@ -51,7 +51,7 @@ spec: path: / port: 80 - name: udp - image: docker.io/cilium/echoserver-udp:v2020.01.30 + image: quay.io/cilium/echoserver-udp:v2020.01.30 imagePullPolicy: IfNotPresent ports: - name: tftp @@ -71,7 +71,7 @@ metadata: spec: containers: - name: web - image: docker.io/cilium/demo-client:1.0 + image: quay.io/cilium/demo-client:1.0 imagePullPolicy: IfNotPresent command: [ "sleep" ] args: @@ -89,7 +89,7 @@ metadata: spec: containers: - name: web - image: docker.io/cilium/demo-client:1.0 + image: quay.io/cilium/demo-client:1.0 imagePullPolicy: IfNotPresent command: [ "sleep" ] args: @@ -155,7 +155,7 @@ spec: hostNetwork: true containers: - name: web - image: docker.io/cilium/echoserver:1.10.1 + image: quay.io/cilium/echoserver:1.10.1 imagePullPolicy: IfNotPresent ports: - name: http @@ -166,7 +166,7 @@ spec: path: / port: 80 - name: udp - image: docker.io/cilium/echoserver-udp:v2020.01.30 + image: quay.io/cilium/echoserver-udp:v2020.01.30 imagePullPolicy: IfNotPresent ports: - name: tftp @@ -187,7 +187,7 @@ spec: hostNetwork: true containers: - name: web - image: docker.io/cilium/echoserver:1.10.1 + image: quay.io/cilium/echoserver:1.10.1 imagePullPolicy: IfNotPresent ports: - name: http @@ -198,7 +198,7 @@ spec: path: / port: 80 - name: udp - image: docker.io/cilium/echoserver-udp:v2020.01.30 + image: quay.io/cilium/echoserver-udp:v2020.01.30 imagePullPolicy: IfNotPresent ports: - name: tftp diff --git a/test/k8s/manifests/netcat-ds.yaml b/test/k8s/manifests/netcat-ds.yaml index 98ad6a0f29bf6..7fc46c9569f97 100644 --- a/test/k8s/manifests/netcat-ds.yaml +++ b/test/k8s/manifests/netcat-ds.yaml @@ -16,7 +16,7 @@ spec: terminationGracePeriodSeconds: 0 containers: - name: netcat - image: docker.io/cilium/demo-client:1.0 + image: quay.io/cilium/demo-client:1.0 imagePullPolicy: IfNotPresent command: [ "sleep" ] args: diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/CHANGELOG.md deleted file mode 100644 index 52911e4cc5e4c..0000000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Change History - diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/CHANGELOG.md similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/CHANGELOG.md rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/CHANGELOG.md diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/_meta.json b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/_meta.json similarity index 51% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/_meta.json rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/_meta.json index fe6b2a451f2a2..439d41bf9b4ec 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/_meta.json +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/_meta.json @@ -1,11 +1,11 @@ { - "commit": "394395ed0bdc1c5c05cb37a031379ca03bfebbb5", + "commit": "1118376e6b4c59716f4a2bcf3ddea212aeee5536", "readme": "/_/azure-rest-api-specs/specification/compute/resource-manager/readme.md", - "tag": "package-2021-03-01", + "tag": "package-2021-08-01", "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2021-03-01 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/compute/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2021-08-01 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --pass-thru:schema-validator-swagger --enum-prefix /_/azure-rest-api-specs/specification/compute/resource-manager/readme.md", "additional_properties": { - "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix" + "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --pass-thru:schema-validator-swagger --enum-prefix" } } \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/availabilitysets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/availabilitysets.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/availabilitysets.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/availabilitysets.go index 9ceb961d672a1..7953c6555084e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/availabilitysets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/availabilitysets.go @@ -77,7 +77,7 @@ func (client AvailabilitySetsClient) CreateOrUpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -155,7 +155,7 @@ func (client AvailabilitySetsClient) DeletePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -230,7 +230,7 @@ func (client AvailabilitySetsClient) GetPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -309,7 +309,7 @@ func (client AvailabilitySetsClient) ListPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -423,7 +423,7 @@ func (client AvailabilitySetsClient) ListAvailableSizesPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -501,7 +501,7 @@ func (client AvailabilitySetsClient) ListBySubscriptionPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -618,7 +618,7 @@ func (client AvailabilitySetsClient) UpdatePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/capacityreservationgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/capacityreservationgroups.go new file mode 100644 index 0000000000000..a525a29711a9e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/capacityreservationgroups.go @@ -0,0 +1,596 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// CapacityReservationGroupsClient is the compute Client +type CapacityReservationGroupsClient struct { + BaseClient +} + +// NewCapacityReservationGroupsClient creates an instance of the CapacityReservationGroupsClient client. +func NewCapacityReservationGroupsClient(subscriptionID string) CapacityReservationGroupsClient { + return NewCapacityReservationGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewCapacityReservationGroupsClientWithBaseURI creates an instance of the CapacityReservationGroupsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewCapacityReservationGroupsClientWithBaseURI(baseURI string, subscriptionID string) CapacityReservationGroupsClient { + return CapacityReservationGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate the operation to create or update a capacity reservation group. When updating a capacity reservation +// group, only tags may be modified. Please refer to https://aka.ms/CapacityReservation for more details. +// Parameters: +// resourceGroupName - the name of the resource group. +// capacityReservationGroupName - the name of the capacity reservation group. +// parameters - parameters supplied to the Create capacity reservation Group. +func (client CapacityReservationGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, parameters CapacityReservationGroup) (result CapacityReservationGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, capacityReservationGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "CreateOrUpdate", resp, "Failure responding to request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client CapacityReservationGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, parameters CapacityReservationGroup) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client CapacityReservationGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client CapacityReservationGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result CapacityReservationGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to delete a capacity reservation group. This operation is allowed only if all the associated +// resources are disassociated from the reservation group and all capacity reservations under the reservation group +// have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details. +// Parameters: +// resourceGroupName - the name of the resource group. +// capacityReservationGroupName - the name of the capacity reservation group. +func (client CapacityReservationGroupsClient) Delete(ctx context.Context, resourceGroupName string, capacityReservationGroupName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, capacityReservationGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client CapacityReservationGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client CapacityReservationGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client CapacityReservationGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get the operation that retrieves information about a capacity reservation group. +// Parameters: +// resourceGroupName - the name of the resource group. +// capacityReservationGroupName - the name of the capacity reservation group. +// expand - the expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance +// views of the capacity reservations under the capacity reservation group which is a snapshot of the runtime +// properties of a capacity reservation that is managed by the platform and can change outside of control plane +// operations. +func (client CapacityReservationGroupsClient) Get(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, expand CapacityReservationGroupInstanceViewTypes) (result CapacityReservationGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, capacityReservationGroupName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client CapacityReservationGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, expand CapacityReservationGroupInstanceViewTypes) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(expand)) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client CapacityReservationGroupsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client CapacityReservationGroupsClient) GetResponder(resp *http.Response) (result CapacityReservationGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup lists all of the capacity reservation groups in the specified resource group. Use the nextLink +// property in the response to get the next page of capacity reservation groups. +// Parameters: +// resourceGroupName - the name of the resource group. +// expand - the expand expression to apply on the operation. Based on the expand param(s) specified we return +// Virtual Machine or ScaleSet VM Instance or both resource Ids which are associated to capacity reservation +// group in the response. +func (client CapacityReservationGroupsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, expand ExpandTypesForGetCapacityReservationGroups) (result CapacityReservationGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.crglr.Response.Response != nil { + sc = result.crglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.crglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.crglr, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "ListByResourceGroup", resp, "Failure responding to request") + return + } + if result.crglr.hasNextLink() && result.crglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client CapacityReservationGroupsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, expand ExpandTypesForGetCapacityReservationGroups) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(expand)) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client CapacityReservationGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client CapacityReservationGroupsClient) ListByResourceGroupResponder(resp *http.Response) (result CapacityReservationGroupListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client CapacityReservationGroupsClient) listByResourceGroupNextResults(ctx context.Context, lastResults CapacityReservationGroupListResult) (result CapacityReservationGroupListResult, err error) { + req, err := lastResults.capacityReservationGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client CapacityReservationGroupsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, expand ExpandTypesForGetCapacityReservationGroups) (result CapacityReservationGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, expand) + return +} + +// ListBySubscription lists all of the capacity reservation groups in the subscription. Use the nextLink property in +// the response to get the next page of capacity reservation groups. +// Parameters: +// expand - the expand expression to apply on the operation. Based on the expand param(s) specified we return +// Virtual Machine or ScaleSet VM Instance or both resource Ids which are associated to capacity reservation +// group in the response. +func (client CapacityReservationGroupsClient) ListBySubscription(ctx context.Context, expand ExpandTypesForGetCapacityReservationGroups) (result CapacityReservationGroupListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.ListBySubscription") + defer func() { + sc := -1 + if result.crglr.Response.Response != nil { + sc = result.crglr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listBySubscriptionNextResults + req, err := client.ListBySubscriptionPreparer(ctx, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.crglr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "ListBySubscription", resp, "Failure sending request") + return + } + + result.crglr, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "ListBySubscription", resp, "Failure responding to request") + return + } + if result.crglr.hasNextLink() && result.crglr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListBySubscriptionPreparer prepares the ListBySubscription request. +func (client CapacityReservationGroupsClient) ListBySubscriptionPreparer(ctx context.Context, expand ExpandTypesForGetCapacityReservationGroups) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(expand)) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/capacityReservationGroups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListBySubscriptionSender sends the ListBySubscription request. The method will close the +// http.Response Body if it receives an error. +func (client CapacityReservationGroupsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client CapacityReservationGroupsClient) ListBySubscriptionResponder(resp *http.Response) (result CapacityReservationGroupListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listBySubscriptionNextResults retrieves the next set of results, if any. +func (client CapacityReservationGroupsClient) listBySubscriptionNextResults(ctx context.Context, lastResults CapacityReservationGroupListResult) (result CapacityReservationGroupListResult, err error) { + req, err := lastResults.capacityReservationGroupListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request") + } + result, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required. +func (client CapacityReservationGroupsClient) ListBySubscriptionComplete(ctx context.Context, expand ExpandTypesForGetCapacityReservationGroups) (result CapacityReservationGroupListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.ListBySubscription") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListBySubscription(ctx, expand) + return +} + +// Update the operation to update a capacity reservation group. When updating a capacity reservation group, only tags +// may be modified. +// Parameters: +// resourceGroupName - the name of the resource group. +// capacityReservationGroupName - the name of the capacity reservation group. +// parameters - parameters supplied to the Update capacity reservation Group operation. +func (client CapacityReservationGroupsClient) Update(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, parameters CapacityReservationGroupUpdate) (result CapacityReservationGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.Update") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, capacityReservationGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Update", resp, "Failure responding to request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client CapacityReservationGroupsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, parameters CapacityReservationGroupUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client CapacityReservationGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client CapacityReservationGroupsClient) UpdateResponder(resp *http.Response) (result CapacityReservationGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/capacityreservations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/capacityreservations.go new file mode 100644 index 0000000000000..fc894216ae13c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/capacityreservations.go @@ -0,0 +1,493 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// CapacityReservationsClient is the compute Client +type CapacityReservationsClient struct { + BaseClient +} + +// NewCapacityReservationsClient creates an instance of the CapacityReservationsClient client. +func NewCapacityReservationsClient(subscriptionID string) CapacityReservationsClient { + return NewCapacityReservationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewCapacityReservationsClientWithBaseURI creates an instance of the CapacityReservationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewCapacityReservationsClientWithBaseURI(baseURI string, subscriptionID string) CapacityReservationsClient { + return CapacityReservationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate the operation to create or update a capacity reservation. Please note some properties can be set only +// during capacity reservation creation. Please refer to https://aka.ms/CapacityReservation for more details. +// Parameters: +// resourceGroupName - the name of the resource group. +// capacityReservationGroupName - the name of the capacity reservation group. +// capacityReservationName - the name of the capacity reservation. +// parameters - parameters supplied to the Create capacity reservation. +func (client CapacityReservationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservation) (result CapacityReservationsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("compute.CapacityReservationsClient", "CreateOrUpdate", err.Error()) + } + + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, capacityReservationGroupName, capacityReservationName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client CapacityReservationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservation) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName), + "capacityReservationName": autorest.Encode("path", capacityReservationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client CapacityReservationsClient) CreateOrUpdateSender(req *http.Request) (future CapacityReservationsCreateOrUpdateFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client CapacityReservationsClient) CreateOrUpdateResponder(resp *http.Response) (result CapacityReservation, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to delete a capacity reservation. This operation is allowed only when all the associated +// resources are disassociated from the capacity reservation. Please refer to https://aka.ms/CapacityReservation for +// more details. +// Parameters: +// resourceGroupName - the name of the resource group. +// capacityReservationGroupName - the name of the capacity reservation group. +// capacityReservationName - the name of the capacity reservation. +func (client CapacityReservationsClient) Delete(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string) (result CapacityReservationsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, capacityReservationGroupName, capacityReservationName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client CapacityReservationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName), + "capacityReservationName": autorest.Encode("path", capacityReservationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client CapacityReservationsClient) DeleteSender(req *http.Request) (future CapacityReservationsDeleteFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client CapacityReservationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get the operation that retrieves information about the capacity reservation. +// Parameters: +// resourceGroupName - the name of the resource group. +// capacityReservationGroupName - the name of the capacity reservation group. +// capacityReservationName - the name of the capacity reservation. +// expand - the expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the runtime +// properties of the capacity reservation that is managed by the platform and can change outside of control +// plane operations. +func (client CapacityReservationsClient) Get(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, expand CapacityReservationInstanceViewTypes) (result CapacityReservation, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, capacityReservationGroupName, capacityReservationName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client CapacityReservationsClient) GetPreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, expand CapacityReservationInstanceViewTypes) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName), + "capacityReservationName": autorest.Encode("path", capacityReservationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(string(expand)) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client CapacityReservationsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client CapacityReservationsClient) GetResponder(resp *http.Response) (result CapacityReservation, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByCapacityReservationGroup lists all of the capacity reservations in the specified capacity reservation group. +// Use the nextLink property in the response to get the next page of capacity reservations. +// Parameters: +// resourceGroupName - the name of the resource group. +// capacityReservationGroupName - the name of the capacity reservation group. +func (client CapacityReservationsClient) ListByCapacityReservationGroup(ctx context.Context, resourceGroupName string, capacityReservationGroupName string) (result CapacityReservationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationsClient.ListByCapacityReservationGroup") + defer func() { + sc := -1 + if result.crlr.Response.Response != nil { + sc = result.crlr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByCapacityReservationGroupNextResults + req, err := client.ListByCapacityReservationGroupPreparer(ctx, resourceGroupName, capacityReservationGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "ListByCapacityReservationGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByCapacityReservationGroupSender(req) + if err != nil { + result.crlr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "ListByCapacityReservationGroup", resp, "Failure sending request") + return + } + + result.crlr, err = client.ListByCapacityReservationGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "ListByCapacityReservationGroup", resp, "Failure responding to request") + return + } + if result.crlr.hasNextLink() && result.crlr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByCapacityReservationGroupPreparer prepares the ListByCapacityReservationGroup request. +func (client CapacityReservationsClient) ListByCapacityReservationGroupPreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByCapacityReservationGroupSender sends the ListByCapacityReservationGroup request. The method will close the +// http.Response Body if it receives an error. +func (client CapacityReservationsClient) ListByCapacityReservationGroupSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByCapacityReservationGroupResponder handles the response to the ListByCapacityReservationGroup request. The method always +// closes the http.Response Body. +func (client CapacityReservationsClient) ListByCapacityReservationGroupResponder(resp *http.Response) (result CapacityReservationListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByCapacityReservationGroupNextResults retrieves the next set of results, if any. +func (client CapacityReservationsClient) listByCapacityReservationGroupNextResults(ctx context.Context, lastResults CapacityReservationListResult) (result CapacityReservationListResult, err error) { + req, err := lastResults.capacityReservationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "listByCapacityReservationGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByCapacityReservationGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "listByCapacityReservationGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByCapacityReservationGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "listByCapacityReservationGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByCapacityReservationGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client CapacityReservationsClient) ListByCapacityReservationGroupComplete(ctx context.Context, resourceGroupName string, capacityReservationGroupName string) (result CapacityReservationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationsClient.ListByCapacityReservationGroup") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByCapacityReservationGroup(ctx, resourceGroupName, capacityReservationGroupName) + return +} + +// Update the operation to update a capacity reservation. +// Parameters: +// resourceGroupName - the name of the resource group. +// capacityReservationGroupName - the name of the capacity reservation group. +// capacityReservationName - the name of the capacity reservation. +// parameters - parameters supplied to the Update capacity reservation operation. +func (client CapacityReservationsClient) Update(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservationUpdate) (result CapacityReservationsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationsClient.Update") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdatePreparer(ctx, resourceGroupName, capacityReservationGroupName, capacityReservationName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client CapacityReservationsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservationUpdate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName), + "capacityReservationName": autorest.Encode("path", capacityReservationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client CapacityReservationsClient) UpdateSender(req *http.Request) (future CapacityReservationsUpdateFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client CapacityReservationsClient) UpdateResponder(resp *http.Response) (result CapacityReservation, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/client.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/client.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/client.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/cloudserviceoperatingsystems.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/cloudserviceoperatingsystems.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/cloudserviceoperatingsystems.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/cloudserviceoperatingsystems.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/cloudserviceroleinstances.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/cloudserviceroleinstances.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/cloudserviceroleinstances.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/cloudserviceroleinstances.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/cloudserviceroles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/cloudserviceroles.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/cloudserviceroles.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/cloudserviceroles.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/cloudservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/cloudservices.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/cloudservices.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/cloudservices.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/cloudservicesupdatedomain.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/cloudservicesupdatedomain.go similarity index 100% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/cloudservicesupdatedomain.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/cloudservicesupdatedomain.go diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/communitygalleries.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/communitygalleries.go new file mode 100644 index 0000000000000..99596387171dc --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/communitygalleries.go @@ -0,0 +1,108 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// CommunityGalleriesClient is the compute Client +type CommunityGalleriesClient struct { + BaseClient +} + +// NewCommunityGalleriesClient creates an instance of the CommunityGalleriesClient client. +func NewCommunityGalleriesClient(subscriptionID string) CommunityGalleriesClient { + return NewCommunityGalleriesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewCommunityGalleriesClientWithBaseURI creates an instance of the CommunityGalleriesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). +func NewCommunityGalleriesClientWithBaseURI(baseURI string, subscriptionID string) CommunityGalleriesClient { + return CommunityGalleriesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get a community gallery by gallery public name. +// Parameters: +// location - resource location. +// publicGalleryName - the public name of the community gallery. +func (client CommunityGalleriesClient) Get(ctx context.Context, location string, publicGalleryName string) (result CommunityGallery, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CommunityGalleriesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, location, publicGalleryName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CommunityGalleriesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CommunityGalleriesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CommunityGalleriesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client CommunityGalleriesClient) GetPreparer(ctx context.Context, location string, publicGalleryName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "publicGalleryName": autorest.Encode("path", publicGalleryName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client CommunityGalleriesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client CommunityGalleriesClient) GetResponder(resp *http.Response) (result CommunityGallery, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/communitygalleryimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/communitygalleryimages.go new file mode 100644 index 0000000000000..ef82a37bc9414 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/communitygalleryimages.go @@ -0,0 +1,110 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// CommunityGalleryImagesClient is the compute Client +type CommunityGalleryImagesClient struct { + BaseClient +} + +// NewCommunityGalleryImagesClient creates an instance of the CommunityGalleryImagesClient client. +func NewCommunityGalleryImagesClient(subscriptionID string) CommunityGalleryImagesClient { + return NewCommunityGalleryImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewCommunityGalleryImagesClientWithBaseURI creates an instance of the CommunityGalleryImagesClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewCommunityGalleryImagesClientWithBaseURI(baseURI string, subscriptionID string) CommunityGalleryImagesClient { + return CommunityGalleryImagesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get a community gallery image. +// Parameters: +// location - resource location. +// publicGalleryName - the public name of the community gallery. +// galleryImageName - the name of the community gallery image definition. +func (client CommunityGalleryImagesClient) Get(ctx context.Context, location string, publicGalleryName string, galleryImageName string) (result CommunityGalleryImage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CommunityGalleryImagesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, location, publicGalleryName, galleryImageName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CommunityGalleryImagesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CommunityGalleryImagesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CommunityGalleryImagesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client CommunityGalleryImagesClient) GetPreparer(ctx context.Context, location string, publicGalleryName string, galleryImageName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "galleryImageName": autorest.Encode("path", galleryImageName), + "location": autorest.Encode("path", location), + "publicGalleryName": autorest.Encode("path", publicGalleryName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images/{galleryImageName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client CommunityGalleryImagesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client CommunityGalleryImagesClient) GetResponder(resp *http.Response) (result CommunityGalleryImage, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/communitygalleryimageversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/communitygalleryimageversions.go new file mode 100644 index 0000000000000..03d67523dff7a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/communitygalleryimageversions.go @@ -0,0 +1,114 @@ +package compute + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// CommunityGalleryImageVersionsClient is the compute Client +type CommunityGalleryImageVersionsClient struct { + BaseClient +} + +// NewCommunityGalleryImageVersionsClient creates an instance of the CommunityGalleryImageVersionsClient client. +func NewCommunityGalleryImageVersionsClient(subscriptionID string) CommunityGalleryImageVersionsClient { + return NewCommunityGalleryImageVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewCommunityGalleryImageVersionsClientWithBaseURI creates an instance of the CommunityGalleryImageVersionsClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewCommunityGalleryImageVersionsClientWithBaseURI(baseURI string, subscriptionID string) CommunityGalleryImageVersionsClient { + return CommunityGalleryImageVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get a community gallery image version. +// Parameters: +// location - resource location. +// publicGalleryName - the public name of the community gallery. +// galleryImageName - the name of the community gallery image definition. +// galleryImageVersionName - the name of the community gallery image version. Needs to follow semantic version +// name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit +// integer. Format: .. +func (client CommunityGalleryImageVersionsClient) Get(ctx context.Context, location string, publicGalleryName string, galleryImageName string, galleryImageVersionName string) (result CommunityGalleryImageVersion, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CommunityGalleryImageVersionsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, location, publicGalleryName, galleryImageName, galleryImageVersionName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CommunityGalleryImageVersionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.CommunityGalleryImageVersionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CommunityGalleryImageVersionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client CommunityGalleryImageVersionsClient) GetPreparer(ctx context.Context, location string, publicGalleryName string, galleryImageName string, galleryImageVersionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "galleryImageName": autorest.Encode("path", galleryImageName), + "galleryImageVersionName": autorest.Encode("path", galleryImageVersionName), + "location": autorest.Encode("path", location), + "publicGalleryName": autorest.Encode("path", publicGalleryName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client CommunityGalleryImageVersionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client CommunityGalleryImageVersionsClient) GetResponder(resp *http.Response) (result CommunityGalleryImageVersion, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/dedicatedhostgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/dedicatedhostgroups.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/dedicatedhostgroups.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/dedicatedhostgroups.go index aa870bd44495d..67ace3df4d8ed 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/dedicatedhostgroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/dedicatedhostgroups.go @@ -88,7 +88,7 @@ func (client DedicatedHostGroupsClient) CreateOrUpdatePreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -166,7 +166,7 @@ func (client DedicatedHostGroupsClient) DeletePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -244,7 +244,7 @@ func (client DedicatedHostGroupsClient) GetPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -327,7 +327,7 @@ func (client DedicatedHostGroupsClient) ListByResourceGroupPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -441,7 +441,7 @@ func (client DedicatedHostGroupsClient) ListBySubscriptionPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -555,7 +555,7 @@ func (client DedicatedHostGroupsClient) UpdatePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/dedicatedhosts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/dedicatedhosts.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/dedicatedhosts.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/dedicatedhosts.go index be323942263c3..a58e6b2b84bb2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/dedicatedhosts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/dedicatedhosts.go @@ -82,7 +82,7 @@ func (client DedicatedHostsClient) CreateOrUpdatePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -165,7 +165,7 @@ func (client DedicatedHostsClient) DeletePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -254,7 +254,7 @@ func (client DedicatedHostsClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -339,7 +339,7 @@ func (client DedicatedHostsClient) ListByHostGroupPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -448,7 +448,7 @@ func (client DedicatedHostsClient) UpdatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/diskaccesses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/diskaccesses.go similarity index 97% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/diskaccesses.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/diskaccesses.go index 45105cae000ec..6edf4680774a6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/diskaccesses.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/diskaccesses.go @@ -35,8 +35,8 @@ func NewDiskAccessesClientWithBaseURI(baseURI string, subscriptionID string) Dis // Parameters: // resourceGroupName - the name of the resource group. // diskAccessName - the name of the disk access resource that is being created. The name can't be changed after -// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum -// name length is 80 characters. +// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The +// maximum name length is 80 characters. // diskAccess - disk access object supplied in the body of the Put disk access operation. func (client DiskAccessesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, diskAccessName string, diskAccess DiskAccess) (result DiskAccessesCreateOrUpdateFuture, err error) { if tracing.IsEnabled() { @@ -72,7 +72,7 @@ func (client DiskAccessesClient) CreateOrUpdatePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -119,8 +119,8 @@ func (client DiskAccessesClient) CreateOrUpdateResponder(resp *http.Response) (r // Parameters: // resourceGroupName - the name of the resource group. // diskAccessName - the name of the disk access resource that is being created. The name can't be changed after -// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum -// name length is 80 characters. +// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The +// maximum name length is 80 characters. func (client DiskAccessesClient) Delete(ctx context.Context, resourceGroupName string, diskAccessName string) (result DiskAccessesDeleteFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.Delete") @@ -155,7 +155,7 @@ func (client DiskAccessesClient) DeletePreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -199,9 +199,9 @@ func (client DiskAccessesClient) DeleteResponder(resp *http.Response) (result au // Parameters: // resourceGroupName - the name of the resource group. // diskAccessName - the name of the disk access resource that is being created. The name can't be changed after -// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum -// name length is 80 characters. -// privateEndpointConnectionName - the name of the private endpoint connection +// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The +// maximum name length is 80 characters. +// privateEndpointConnectionName - the name of the private endpoint connection. func (client DiskAccessesClient) DeleteAPrivateEndpointConnection(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string) (result DiskAccessesDeleteAPrivateEndpointConnectionFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.DeleteAPrivateEndpointConnection") @@ -237,7 +237,7 @@ func (client DiskAccessesClient) DeleteAPrivateEndpointConnectionPreparer(ctx co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -281,8 +281,8 @@ func (client DiskAccessesClient) DeleteAPrivateEndpointConnectionResponder(resp // Parameters: // resourceGroupName - the name of the resource group. // diskAccessName - the name of the disk access resource that is being created. The name can't be changed after -// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum -// name length is 80 characters. +// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The +// maximum name length is 80 characters. func (client DiskAccessesClient) Get(ctx context.Context, resourceGroupName string, diskAccessName string) (result DiskAccess, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.Get") @@ -324,7 +324,7 @@ func (client DiskAccessesClient) GetPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -359,9 +359,9 @@ func (client DiskAccessesClient) GetResponder(resp *http.Response) (result DiskA // Parameters: // resourceGroupName - the name of the resource group. // diskAccessName - the name of the disk access resource that is being created. The name can't be changed after -// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum -// name length is 80 characters. -// privateEndpointConnectionName - the name of the private endpoint connection +// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The +// maximum name length is 80 characters. +// privateEndpointConnectionName - the name of the private endpoint connection. func (client DiskAccessesClient) GetAPrivateEndpointConnection(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string) (result PrivateEndpointConnection, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.GetAPrivateEndpointConnection") @@ -404,7 +404,7 @@ func (client DiskAccessesClient) GetAPrivateEndpointConnectionPreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -439,8 +439,8 @@ func (client DiskAccessesClient) GetAPrivateEndpointConnectionResponder(resp *ht // Parameters: // resourceGroupName - the name of the resource group. // diskAccessName - the name of the disk access resource that is being created. The name can't be changed after -// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum -// name length is 80 characters. +// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The +// maximum name length is 80 characters. func (client DiskAccessesClient) GetPrivateLinkResources(ctx context.Context, resourceGroupName string, diskAccessName string) (result PrivateLinkResourceListResult, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.GetPrivateLinkResources") @@ -482,7 +482,7 @@ func (client DiskAccessesClient) GetPrivateLinkResourcesPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -558,7 +558,7 @@ func (client DiskAccessesClient) ListPreparer(ctx context.Context) (*http.Reques "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -674,7 +674,7 @@ func (client DiskAccessesClient) ListByResourceGroupPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -746,8 +746,8 @@ func (client DiskAccessesClient) ListByResourceGroupComplete(ctx context.Context // Parameters: // resourceGroupName - the name of the resource group. // diskAccessName - the name of the disk access resource that is being created. The name can't be changed after -// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum -// name length is 80 characters. +// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The +// maximum name length is 80 characters. func (client DiskAccessesClient) ListPrivateEndpointConnections(ctx context.Context, resourceGroupName string, diskAccessName string) (result PrivateEndpointConnectionListResultPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.ListPrivateEndpointConnections") @@ -794,7 +794,7 @@ func (client DiskAccessesClient) ListPrivateEndpointConnectionsPreparer(ctx cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -866,8 +866,8 @@ func (client DiskAccessesClient) ListPrivateEndpointConnectionsComplete(ctx cont // Parameters: // resourceGroupName - the name of the resource group. // diskAccessName - the name of the disk access resource that is being created. The name can't be changed after -// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum -// name length is 80 characters. +// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The +// maximum name length is 80 characters. // diskAccess - disk access object supplied in the body of the Patch disk access operation. func (client DiskAccessesClient) Update(ctx context.Context, resourceGroupName string, diskAccessName string, diskAccess DiskAccessUpdate) (result DiskAccessesUpdateFuture, err error) { if tracing.IsEnabled() { @@ -903,7 +903,7 @@ func (client DiskAccessesClient) UpdatePreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -951,9 +951,9 @@ func (client DiskAccessesClient) UpdateResponder(resp *http.Response) (result Di // Parameters: // resourceGroupName - the name of the resource group. // diskAccessName - the name of the disk access resource that is being created. The name can't be changed after -// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum -// name length is 80 characters. -// privateEndpointConnectionName - the name of the private endpoint connection +// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The +// maximum name length is 80 characters. +// privateEndpointConnectionName - the name of the private endpoint connection. // privateEndpointConnection - private endpoint connection object supplied in the body of the Put private // endpoint connection operation. func (client DiskAccessesClient) UpdateAPrivateEndpointConnection(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string, privateEndpointConnection PrivateEndpointConnection) (result DiskAccessesUpdateAPrivateEndpointConnectionFuture, err error) { @@ -998,7 +998,7 @@ func (client DiskAccessesClient) UpdateAPrivateEndpointConnectionPreparer(ctx co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/diskencryptionsets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/diskencryptionsets.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/diskencryptionsets.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/diskencryptionsets.go index 37f51fe191988..19738c8545ec3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/diskencryptionsets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/diskencryptionsets.go @@ -36,7 +36,7 @@ func NewDiskEncryptionSetsClientWithBaseURI(baseURI string, subscriptionID strin // Parameters: // resourceGroupName - the name of the resource group. // diskEncryptionSetName - the name of the disk encryption set that is being created. The name can't be changed -// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The +// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The // maximum name length is 80 characters. // diskEncryptionSet - disk encryption set object supplied in the body of the Put disk encryption set // operation. @@ -83,7 +83,7 @@ func (client DiskEncryptionSetsClient) CreateOrUpdatePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -130,7 +130,7 @@ func (client DiskEncryptionSetsClient) CreateOrUpdateResponder(resp *http.Respon // Parameters: // resourceGroupName - the name of the resource group. // diskEncryptionSetName - the name of the disk encryption set that is being created. The name can't be changed -// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The +// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The // maximum name length is 80 characters. func (client DiskEncryptionSetsClient) Delete(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (result DiskEncryptionSetsDeleteFuture, err error) { if tracing.IsEnabled() { @@ -166,7 +166,7 @@ func (client DiskEncryptionSetsClient) DeletePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -210,7 +210,7 @@ func (client DiskEncryptionSetsClient) DeleteResponder(resp *http.Response) (res // Parameters: // resourceGroupName - the name of the resource group. // diskEncryptionSetName - the name of the disk encryption set that is being created. The name can't be changed -// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The +// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The // maximum name length is 80 characters. func (client DiskEncryptionSetsClient) Get(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (result DiskEncryptionSet, err error) { if tracing.IsEnabled() { @@ -253,7 +253,7 @@ func (client DiskEncryptionSetsClient) GetPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -329,7 +329,7 @@ func (client DiskEncryptionSetsClient) ListPreparer(ctx context.Context) (*http. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -401,7 +401,7 @@ func (client DiskEncryptionSetsClient) ListComplete(ctx context.Context) (result // Parameters: // resourceGroupName - the name of the resource group. // diskEncryptionSetName - the name of the disk encryption set that is being created. The name can't be changed -// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The +// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The // maximum name length is 80 characters. func (client DiskEncryptionSetsClient) ListAssociatedResources(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (result ResourceURIListPage, err error) { if tracing.IsEnabled() { @@ -449,7 +449,7 @@ func (client DiskEncryptionSetsClient) ListAssociatedResourcesPreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -565,7 +565,7 @@ func (client DiskEncryptionSetsClient) ListByResourceGroupPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -637,7 +637,7 @@ func (client DiskEncryptionSetsClient) ListByResourceGroupComplete(ctx context.C // Parameters: // resourceGroupName - the name of the resource group. // diskEncryptionSetName - the name of the disk encryption set that is being created. The name can't be changed -// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The +// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The // maximum name length is 80 characters. // diskEncryptionSet - disk encryption set object supplied in the body of the Patch disk encryption set // operation. @@ -675,7 +675,7 @@ func (client DiskEncryptionSetsClient) UpdatePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/diskrestorepoint.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/diskrestorepoint.go similarity index 55% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/diskrestorepoint.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/diskrestorepoint.go index 79620d98ae913..56735c4c1c3ac 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/diskrestorepoint.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/diskrestorepoint.go @@ -10,6 +10,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -35,11 +36,8 @@ func NewDiskRestorePointClientWithBaseURI(baseURI string, subscriptionID string) // Parameters: // resourceGroupName - the name of the resource group. // restorePointCollectionName - the name of the restore point collection that the disk restore point belongs. -// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. -// VMRestorePointName - the name of the vm restore point that the disk disk restore point belongs. Supported -// characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. -// diskRestorePointName - the name of the disk restore point created. Supported characters for the name are -// a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. +// VMRestorePointName - the name of the vm restore point that the disk disk restore point belongs. +// diskRestorePointName - the name of the disk restore point created. func (client DiskRestorePointClient) Get(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string) (result DiskRestorePoint, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointClient.Get") @@ -83,7 +81,7 @@ func (client DiskRestorePointClient) GetPreparer(ctx context.Context, resourceGr "vmRestorePointName": autorest.Encode("path", VMRestorePointName), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -114,13 +112,103 @@ func (client DiskRestorePointClient) GetResponder(resp *http.Response) (result D return } +// GrantAccess grants access to a diskRestorePoint. +// Parameters: +// resourceGroupName - the name of the resource group. +// restorePointCollectionName - the name of the restore point collection that the disk restore point belongs. +// VMRestorePointName - the name of the vm restore point that the disk disk restore point belongs. +// diskRestorePointName - the name of the disk restore point created. +// grantAccessData - access data object supplied in the body of the get disk access operation. +func (client DiskRestorePointClient) GrantAccess(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string, grantAccessData GrantAccessData) (result DiskRestorePointGrantAccessFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointClient.GrantAccess") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: grantAccessData, + Constraints: []validation.Constraint{{Target: "grantAccessData.DurationInSeconds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewError("compute.DiskRestorePointClient", "GrantAccess", err.Error()) + } + + req, err := client.GrantAccessPreparer(ctx, resourceGroupName, restorePointCollectionName, VMRestorePointName, diskRestorePointName, grantAccessData) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "GrantAccess", nil, "Failure preparing request") + return + } + + result, err = client.GrantAccessSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "GrantAccess", result.Response(), "Failure sending request") + return + } + + return +} + +// GrantAccessPreparer prepares the GrantAccess request. +func (client DiskRestorePointClient) GrantAccessPreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string, grantAccessData GrantAccessData) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskRestorePointName": autorest.Encode("path", diskRestorePointName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmRestorePointName": autorest.Encode("path", VMRestorePointName), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/beginGetAccess", pathParameters), + autorest.WithJSON(grantAccessData), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GrantAccessSender sends the GrantAccess request. The method will close the +// http.Response Body if it receives an error. +func (client DiskRestorePointClient) GrantAccessSender(req *http.Request) (future DiskRestorePointGrantAccessFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// GrantAccessResponder handles the response to the GrantAccess request. The method always +// closes the http.Response Body. +func (client DiskRestorePointClient) GrantAccessResponder(resp *http.Response) (result AccessURI, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // ListByRestorePoint lists diskRestorePoints under a vmRestorePoint. // Parameters: // resourceGroupName - the name of the resource group. // restorePointCollectionName - the name of the restore point collection that the disk restore point belongs. -// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. -// VMRestorePointName - the name of the vm restore point that the disk disk restore point belongs. Supported -// characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. +// VMRestorePointName - the name of the vm restore point that the disk disk restore point belongs. func (client DiskRestorePointClient) ListByRestorePoint(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string) (result DiskRestorePointListPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointClient.ListByRestorePoint") @@ -168,7 +256,7 @@ func (client DiskRestorePointClient) ListByRestorePointPreparer(ctx context.Cont "vmRestorePointName": autorest.Encode("path", VMRestorePointName), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -235,3 +323,85 @@ func (client DiskRestorePointClient) ListByRestorePointComplete(ctx context.Cont result.page, err = client.ListByRestorePoint(ctx, resourceGroupName, restorePointCollectionName, VMRestorePointName) return } + +// RevokeAccess revokes access to a diskRestorePoint. +// Parameters: +// resourceGroupName - the name of the resource group. +// restorePointCollectionName - the name of the restore point collection that the disk restore point belongs. +// VMRestorePointName - the name of the vm restore point that the disk disk restore point belongs. +// diskRestorePointName - the name of the disk restore point created. +func (client DiskRestorePointClient) RevokeAccess(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string) (result DiskRestorePointRevokeAccessFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointClient.RevokeAccess") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.RevokeAccessPreparer(ctx, resourceGroupName, restorePointCollectionName, VMRestorePointName, diskRestorePointName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "RevokeAccess", nil, "Failure preparing request") + return + } + + result, err = client.RevokeAccessSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "RevokeAccess", result.Response(), "Failure sending request") + return + } + + return +} + +// RevokeAccessPreparer prepares the RevokeAccess request. +func (client DiskRestorePointClient) RevokeAccessPreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskRestorePointName": autorest.Encode("path", diskRestorePointName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmRestorePointName": autorest.Encode("path", VMRestorePointName), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/endGetAccess", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// RevokeAccessSender sends the RevokeAccess request. The method will close the +// http.Response Body if it receives an error. +func (client DiskRestorePointClient) RevokeAccessSender(req *http.Request) (future DiskRestorePointRevokeAccessFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// RevokeAccessResponder handles the response to the RevokeAccess request. The method always +// closes the http.Response Body. +func (client DiskRestorePointClient) RevokeAccessResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/disks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/disks.go similarity index 97% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/disks.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/disks.go index 1080f7b8558e1..41b58a2ef3c94 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/disks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/disks.go @@ -35,7 +35,7 @@ func NewDisksClientWithBaseURI(baseURI string, subscriptionID string) DisksClien // Parameters: // resourceGroupName - the name of the resource group. // diskName - the name of the managed disk that is being created. The name can't be changed after the disk is -// created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 +// created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 // characters. // disk - disk object supplied in the body of the Put disk operation. func (client DisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, diskName string, disk Disk) (result DisksCreateOrUpdateFuture, err error) { @@ -92,7 +92,7 @@ func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -141,7 +141,7 @@ func (client DisksClient) CreateOrUpdateResponder(resp *http.Response) (result D // Parameters: // resourceGroupName - the name of the resource group. // diskName - the name of the managed disk that is being created. The name can't be changed after the disk is -// created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 +// created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 // characters. func (client DisksClient) Delete(ctx context.Context, resourceGroupName string, diskName string) (result DisksDeleteFuture, err error) { if tracing.IsEnabled() { @@ -177,7 +177,7 @@ func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -221,7 +221,7 @@ func (client DisksClient) DeleteResponder(resp *http.Response) (result autorest. // Parameters: // resourceGroupName - the name of the resource group. // diskName - the name of the managed disk that is being created. The name can't be changed after the disk is -// created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 +// created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 // characters. func (client DisksClient) Get(ctx context.Context, resourceGroupName string, diskName string) (result Disk, err error) { if tracing.IsEnabled() { @@ -264,7 +264,7 @@ func (client DisksClient) GetPreparer(ctx context.Context, resourceGroupName str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -299,7 +299,7 @@ func (client DisksClient) GetResponder(resp *http.Response) (result Disk, err er // Parameters: // resourceGroupName - the name of the resource group. // diskName - the name of the managed disk that is being created. The name can't be changed after the disk is -// created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 +// created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 // characters. // grantAccessData - access data object supplied in the body of the get disk access operation. func (client DisksClient) GrantAccess(ctx context.Context, resourceGroupName string, diskName string, grantAccessData GrantAccessData) (result DisksGrantAccessFuture, err error) { @@ -342,7 +342,7 @@ func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -430,7 +430,7 @@ func (client DisksClient) ListPreparer(ctx context.Context) (*http.Request, erro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -546,7 +546,7 @@ func (client DisksClient) ListByResourceGroupPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -618,7 +618,7 @@ func (client DisksClient) ListByResourceGroupComplete(ctx context.Context, resou // Parameters: // resourceGroupName - the name of the resource group. // diskName - the name of the managed disk that is being created. The name can't be changed after the disk is -// created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 +// created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 // characters. func (client DisksClient) RevokeAccess(ctx context.Context, resourceGroupName string, diskName string) (result DisksRevokeAccessFuture, err error) { if tracing.IsEnabled() { @@ -654,7 +654,7 @@ func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -698,7 +698,7 @@ func (client DisksClient) RevokeAccessResponder(resp *http.Response) (result aut // Parameters: // resourceGroupName - the name of the resource group. // diskName - the name of the managed disk that is being created. The name can't be changed after the disk is -// created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 +// created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 // characters. // disk - disk object supplied in the body of the Patch disk operation. func (client DisksClient) Update(ctx context.Context, resourceGroupName string, diskName string, disk DiskUpdate) (result DisksUpdateFuture, err error) { @@ -735,7 +735,7 @@ func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/enums.go similarity index 92% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/enums.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/enums.go index c3cb09d7da30a..1b467ec4d879c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/enums.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/enums.go @@ -74,6 +74,33 @@ func PossibleCachingTypesValues() []CachingTypes { return []CachingTypes{CachingTypesNone, CachingTypesReadOnly, CachingTypesReadWrite} } +// CapacityReservationGroupInstanceViewTypes enumerates the values for capacity reservation group instance view +// types. +type CapacityReservationGroupInstanceViewTypes string + +const ( + // CapacityReservationGroupInstanceViewTypesInstanceView ... + CapacityReservationGroupInstanceViewTypesInstanceView CapacityReservationGroupInstanceViewTypes = "instanceView" +) + +// PossibleCapacityReservationGroupInstanceViewTypesValues returns an array of possible values for the CapacityReservationGroupInstanceViewTypes const type. +func PossibleCapacityReservationGroupInstanceViewTypesValues() []CapacityReservationGroupInstanceViewTypes { + return []CapacityReservationGroupInstanceViewTypes{CapacityReservationGroupInstanceViewTypesInstanceView} +} + +// CapacityReservationInstanceViewTypes enumerates the values for capacity reservation instance view types. +type CapacityReservationInstanceViewTypes string + +const ( + // CapacityReservationInstanceViewTypesInstanceView ... + CapacityReservationInstanceViewTypesInstanceView CapacityReservationInstanceViewTypes = "instanceView" +) + +// PossibleCapacityReservationInstanceViewTypesValues returns an array of possible values for the CapacityReservationInstanceViewTypes const type. +func PossibleCapacityReservationInstanceViewTypesValues() []CapacityReservationInstanceViewTypes { + return []CapacityReservationInstanceViewTypes{CapacityReservationInstanceViewTypesInstanceView} +} + // CloudServiceUpgradeMode enumerates the values for cloud service upgrade mode. type CloudServiceUpgradeMode string @@ -190,6 +217,9 @@ const ( // DiskCreateOptionCopy Create a new disk or snapshot by copying from a disk or snapshot specified by the // given sourceResourceId. DiskCreateOptionCopy DiskCreateOption = "Copy" + // DiskCreateOptionCopyStart Create a new disk by using a deep copy process, where the resource creation is + // considered complete only after all data has been copied from the source. + DiskCreateOptionCopyStart DiskCreateOption = "CopyStart" // DiskCreateOptionEmpty Create an empty data disk of a size given by diskSizeGB. DiskCreateOptionEmpty DiskCreateOption = "Empty" // DiskCreateOptionFromImage Create a new disk from a platform image specified by the given imageReference @@ -198,16 +228,23 @@ const ( // DiskCreateOptionImport Create a disk by importing from a blob specified by a sourceUri in a storage // account specified by storageAccountId. DiskCreateOptionImport DiskCreateOption = "Import" + // DiskCreateOptionImportSecure Similar to Import create option. Create a new Trusted Launch VM or + // Confidential VM supported disk by importing additional blob for VM guest state specified by + // securityDataUri in storage account specified by storageAccountId + DiskCreateOptionImportSecure DiskCreateOption = "ImportSecure" // DiskCreateOptionRestore Create a new disk by copying from a backup recovery point. DiskCreateOptionRestore DiskCreateOption = "Restore" // DiskCreateOptionUpload Create a new disk by obtaining a write token and using it to directly upload the // contents of the disk. DiskCreateOptionUpload DiskCreateOption = "Upload" + // DiskCreateOptionUploadPreparedSecure Similar to Upload create option. Create a new Trusted Launch VM or + // Confidential VM supported disk and upload using write token in both disk and VM guest state + DiskCreateOptionUploadPreparedSecure DiskCreateOption = "UploadPreparedSecure" ) // PossibleDiskCreateOptionValues returns an array of possible values for the DiskCreateOption const type. func PossibleDiskCreateOptionValues() []DiskCreateOption { - return []DiskCreateOption{DiskCreateOptionAttach, DiskCreateOptionCopy, DiskCreateOptionEmpty, DiskCreateOptionFromImage, DiskCreateOptionImport, DiskCreateOptionRestore, DiskCreateOptionUpload} + return []DiskCreateOption{DiskCreateOptionAttach, DiskCreateOptionCopy, DiskCreateOptionCopyStart, DiskCreateOptionEmpty, DiskCreateOptionFromImage, DiskCreateOptionImport, DiskCreateOptionImportSecure, DiskCreateOptionRestore, DiskCreateOptionUpload, DiskCreateOptionUploadPreparedSecure} } // DiskCreateOptionTypes enumerates the values for disk create option types. @@ -274,6 +311,9 @@ func PossibleDiskEncryptionSetIdentityTypeValues() []DiskEncryptionSetIdentityTy type DiskEncryptionSetType string const ( + // DiskEncryptionSetTypeConfidentialVMEncryptedWithCustomerKey Confidential VM supported disk and VM guest + // state would be encrypted with customer managed key. + DiskEncryptionSetTypeConfidentialVMEncryptedWithCustomerKey DiskEncryptionSetType = "ConfidentialVmEncryptedWithCustomerKey" // DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey Resource using diskEncryptionSet would be encrypted // at rest with Customer managed key that can be changed and revoked by a customer. DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey DiskEncryptionSetType = "EncryptionAtRestWithCustomerKey" @@ -285,13 +325,22 @@ const ( // PossibleDiskEncryptionSetTypeValues returns an array of possible values for the DiskEncryptionSetType const type. func PossibleDiskEncryptionSetTypeValues() []DiskEncryptionSetType { - return []DiskEncryptionSetType{DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey, DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys} + return []DiskEncryptionSetType{DiskEncryptionSetTypeConfidentialVMEncryptedWithCustomerKey, DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey, DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys} } // DiskSecurityTypes enumerates the values for disk security types. type DiskSecurityTypes string const ( + // DiskSecurityTypesConfidentialVMDiskEncryptedWithCustomerKey Indicates Confidential VM disk with both OS + // disk and VM guest state encrypted with a customer managed key + DiskSecurityTypesConfidentialVMDiskEncryptedWithCustomerKey DiskSecurityTypes = "ConfidentialVM_DiskEncryptedWithCustomerKey" + // DiskSecurityTypesConfidentialVMDiskEncryptedWithPlatformKey Indicates Confidential VM disk with both OS + // disk and VM guest state encrypted with a platform managed key + DiskSecurityTypesConfidentialVMDiskEncryptedWithPlatformKey DiskSecurityTypes = "ConfidentialVM_DiskEncryptedWithPlatformKey" + // DiskSecurityTypesConfidentialVMVMGuestStateOnlyEncryptedWithPlatformKey Indicates Confidential VM disk + // with only VM guest state encrypted + DiskSecurityTypesConfidentialVMVMGuestStateOnlyEncryptedWithPlatformKey DiskSecurityTypes = "ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey" // DiskSecurityTypesTrustedLaunch Trusted Launch provides security features such as secure boot and virtual // Trusted Platform Module (vTPM) DiskSecurityTypesTrustedLaunch DiskSecurityTypes = "TrustedLaunch" @@ -299,7 +348,7 @@ const ( // PossibleDiskSecurityTypesValues returns an array of possible values for the DiskSecurityTypes const type. func PossibleDiskSecurityTypesValues() []DiskSecurityTypes { - return []DiskSecurityTypes{DiskSecurityTypesTrustedLaunch} + return []DiskSecurityTypes{DiskSecurityTypesConfidentialVMDiskEncryptedWithCustomerKey, DiskSecurityTypesConfidentialVMDiskEncryptedWithPlatformKey, DiskSecurityTypesConfidentialVMVMGuestStateOnlyEncryptedWithPlatformKey, DiskSecurityTypesTrustedLaunch} } // DiskState enumerates the values for disk state. @@ -308,14 +357,19 @@ type DiskState string const ( // DiskStateActiveSAS The disk currently has an Active SAS Uri associated with it. DiskStateActiveSAS DiskState = "ActiveSAS" + // DiskStateActiveSASFrozen The disk is attached to a VM in hibernated state and has an active SAS URI + // associated with it. + DiskStateActiveSASFrozen DiskState = "ActiveSASFrozen" // DiskStateActiveUpload A disk is created for upload and a write token has been issued for uploading to // it. DiskStateActiveUpload DiskState = "ActiveUpload" - // DiskStateAttached The disk is currently mounted to a running VM. + // DiskStateAttached The disk is currently attached to a running VM. DiskStateAttached DiskState = "Attached" + // DiskStateFrozen The disk is attached to a VM which is in hibernated state. + DiskStateFrozen DiskState = "Frozen" // DiskStateReadyToUpload A disk is ready to be created by upload by requesting a write token. DiskStateReadyToUpload DiskState = "ReadyToUpload" - // DiskStateReserved The disk is mounted to a stopped-deallocated VM + // DiskStateReserved The disk is attached to a stopped-deallocated VM. DiskStateReserved DiskState = "Reserved" // DiskStateUnattached The disk is not being used and can be attached to a VM. DiskStateUnattached DiskState = "Unattached" @@ -323,7 +377,7 @@ const ( // PossibleDiskStateValues returns an array of possible values for the DiskState const type. func PossibleDiskStateValues() []DiskState { - return []DiskState{DiskStateActiveSAS, DiskStateActiveUpload, DiskStateAttached, DiskStateReadyToUpload, DiskStateReserved, DiskStateUnattached} + return []DiskState{DiskStateActiveSAS, DiskStateActiveSASFrozen, DiskStateActiveUpload, DiskStateAttached, DiskStateFrozen, DiskStateReadyToUpload, DiskStateReserved, DiskStateUnattached} } // DiskStorageAccountTypes enumerates the values for disk storage account types. @@ -400,6 +454,22 @@ func PossibleExecutionStateValues() []ExecutionState { return []ExecutionState{ExecutionStateCanceled, ExecutionStateFailed, ExecutionStatePending, ExecutionStateRunning, ExecutionStateSucceeded, ExecutionStateTimedOut, ExecutionStateUnknown} } +// ExpandTypesForGetCapacityReservationGroups enumerates the values for expand types for get capacity +// reservation groups. +type ExpandTypesForGetCapacityReservationGroups string + +const ( + // ExpandTypesForGetCapacityReservationGroupsVirtualMachineScaleSetVMsref ... + ExpandTypesForGetCapacityReservationGroupsVirtualMachineScaleSetVMsref ExpandTypesForGetCapacityReservationGroups = "virtualMachineScaleSetVMs/$ref" + // ExpandTypesForGetCapacityReservationGroupsVirtualMachinesref ... + ExpandTypesForGetCapacityReservationGroupsVirtualMachinesref ExpandTypesForGetCapacityReservationGroups = "virtualMachines/$ref" +) + +// PossibleExpandTypesForGetCapacityReservationGroupsValues returns an array of possible values for the ExpandTypesForGetCapacityReservationGroups const type. +func PossibleExpandTypesForGetCapacityReservationGroupsValues() []ExpandTypesForGetCapacityReservationGroups { + return []ExpandTypesForGetCapacityReservationGroups{ExpandTypesForGetCapacityReservationGroupsVirtualMachineScaleSetVMsref, ExpandTypesForGetCapacityReservationGroupsVirtualMachinesref} +} + // ExpandTypesForGetVMScaleSets enumerates the values for expand types for get vm scale sets. type ExpandTypesForGetVMScaleSets string @@ -413,6 +483,19 @@ func PossibleExpandTypesForGetVMScaleSetsValues() []ExpandTypesForGetVMScaleSets return []ExpandTypesForGetVMScaleSets{ExpandTypesForGetVMScaleSetsUserData} } +// ExtendedLocationType enumerates the values for extended location type. +type ExtendedLocationType string + +const ( + // ExtendedLocationTypeEdgeZone ... + ExtendedLocationTypeEdgeZone ExtendedLocationType = "EdgeZone" +) + +// PossibleExtendedLocationTypeValues returns an array of possible values for the ExtendedLocationType const type. +func PossibleExtendedLocationTypeValues() []ExtendedLocationType { + return []ExtendedLocationType{ExtendedLocationTypeEdgeZone} +} + // ExtendedLocationTypes enumerates the values for extended location types. type ExtendedLocationTypes string @@ -1028,6 +1111,40 @@ func PossiblePublicIPAllocationMethodValues() []PublicIPAllocationMethod { return []PublicIPAllocationMethod{PublicIPAllocationMethodDynamic, PublicIPAllocationMethodStatic} } +// PublicNetworkAccess enumerates the values for public network access. +type PublicNetworkAccess string + +const ( + // PublicNetworkAccessDisabled You cannot access the underlying data of the disk publicly on the internet + // even when NetworkAccessPolicy is set to AllowAll. You can access the data via the SAS URI only from your + // trusted Azure VNET when NetworkAccessPolicy is set to AllowPrivate. + PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" + // PublicNetworkAccessEnabled You can generate a SAS URI to access the underlying data of the disk publicly + // on the internet when NetworkAccessPolicy is set to AllowAll. You can access the data via the SAS URI + // only from your trusted Azure VNET when NetworkAccessPolicy is set to AllowPrivate. + PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" +) + +// PossiblePublicNetworkAccessValues returns an array of possible values for the PublicNetworkAccess const type. +func PossiblePublicNetworkAccessValues() []PublicNetworkAccess { + return []PublicNetworkAccess{PublicNetworkAccessDisabled, PublicNetworkAccessEnabled} +} + +// ReplicationMode enumerates the values for replication mode. +type ReplicationMode string + +const ( + // ReplicationModeFull ... + ReplicationModeFull ReplicationMode = "Full" + // ReplicationModeShallow ... + ReplicationModeShallow ReplicationMode = "Shallow" +) + +// PossibleReplicationModeValues returns an array of possible values for the ReplicationMode const type. +func PossibleReplicationModeValues() []ReplicationMode { + return []ReplicationMode{ReplicationModeFull, ReplicationModeShallow} +} + // ReplicationState enumerates the values for replication state. type ReplicationState string diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/galleries.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/galleries.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/galleries.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/galleries.go index 3179f074bdbba..9730526f76056 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/galleries.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/galleries.go @@ -70,7 +70,7 @@ func (client GalleriesClient) CreateOrUpdatePreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -151,7 +151,7 @@ func (client GalleriesClient) DeletePreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -237,7 +237,7 @@ func (client GalleriesClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -316,7 +316,7 @@ func (client GalleriesClient) ListPreparer(ctx context.Context) (*http.Request, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -432,7 +432,7 @@ func (client GalleriesClient) ListByResourceGroupPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -540,7 +540,7 @@ func (client GalleriesClient) UpdatePreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/galleryapplications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/galleryapplications.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/galleryapplications.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/galleryapplications.go index 8ee5fd567a599..f496086291f86 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/galleryapplications.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/galleryapplications.go @@ -75,7 +75,7 @@ func (client GalleryApplicationsClient) CreateOrUpdatePreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client GalleryApplicationsClient) DeletePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -247,7 +247,7 @@ func (client GalleryApplicationsClient) GetPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -329,7 +329,7 @@ func (client GalleryApplicationsClient) ListByGalleryPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -441,7 +441,7 @@ func (client GalleryApplicationsClient) UpdatePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/galleryapplicationversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/galleryapplicationversions.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/galleryapplicationversions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/galleryapplicationversions.go index 937d99506d5e0..947fae104d74b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/galleryapplicationversions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/galleryapplicationversions.go @@ -94,7 +94,7 @@ func (client GalleryApplicationVersionsClient) CreateOrUpdatePreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -180,7 +180,7 @@ func (client GalleryApplicationVersionsClient) DeletePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -271,7 +271,7 @@ func (client GalleryApplicationVersionsClient) GetPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -358,7 +358,7 @@ func (client GalleryApplicationVersionsClient) ListByGalleryApplicationPreparer( "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -472,7 +472,7 @@ func (client GalleryApplicationVersionsClient) UpdatePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/galleryimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/galleryimages.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/galleryimages.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/galleryimages.go index 61b43e5030faf..bf16351b3ec65 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/galleryimages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/galleryimages.go @@ -86,7 +86,7 @@ func (client GalleryImagesClient) CreateOrUpdatePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -169,7 +169,7 @@ func (client GalleryImagesClient) DeletePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -256,7 +256,7 @@ func (client GalleryImagesClient) GetPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -337,7 +337,7 @@ func (client GalleryImagesClient) ListByGalleryPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -448,7 +448,7 @@ func (client GalleryImagesClient) UpdatePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/galleryimageversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/galleryimageversions.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/galleryimageversions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/galleryimageversions.go index afba7cabfb2ec..0ee7a395b9ea8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/galleryimageversions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/galleryimageversions.go @@ -84,7 +84,7 @@ func (client GalleryImageVersionsClient) CreateOrUpdatePreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -169,7 +169,7 @@ func (client GalleryImageVersionsClient) DeletePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -259,7 +259,7 @@ func (client GalleryImageVersionsClient) GetPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -346,7 +346,7 @@ func (client GalleryImageVersionsClient) ListByGalleryImagePreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -459,7 +459,7 @@ func (client GalleryImageVersionsClient) UpdatePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/gallerysharingprofile.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/gallerysharingprofile.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/gallerysharingprofile.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/gallerysharingprofile.go index df47d39b82c2b..eab53278bb401 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/gallerysharingprofile.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/gallerysharingprofile.go @@ -70,7 +70,7 @@ func (client GallerySharingProfileClient) UpdatePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/images.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/images.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/images.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/images.go index 05a65262bcd72..66a9bcbd0c444 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/images.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/images.go @@ -69,7 +69,7 @@ func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -150,7 +150,7 @@ func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -236,7 +236,7 @@ func (client ImagesClient) GetPreparer(ctx context.Context, resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -316,7 +316,7 @@ func (client ImagesClient) ListPreparer(ctx context.Context) (*http.Request, err "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -432,7 +432,7 @@ func (client ImagesClient) ListByResourceGroupPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -539,7 +539,7 @@ func (client ImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/loganalytics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/loganalytics.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/loganalytics.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/loganalytics.go index 7526fdf9add5e..ec30f9cc8c61c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/loganalytics.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/loganalytics.go @@ -75,7 +75,7 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -162,7 +162,7 @@ func (client LogAnalyticsClient) ExportThrottledRequestsPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/models.go similarity index 92% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/models.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/models.go index e5be0f2f6e628..6092674e5e10c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/models.go @@ -19,13 +19,15 @@ import ( ) // The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute" +const fqdn = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute" // AccessURI a disk access SAS uri. type AccessURI struct { autorest.Response `json:"-"` // AccessSAS - READ-ONLY; A SAS uri for accessing a disk. AccessSAS *string `json:"accessSAS,omitempty"` + // SecurityDataAccessSAS - READ-ONLY; A SAS uri for accessing a VM guest state. + SecurityDataAccessSAS *string `json:"securityDataAccessSAS,omitempty"` } // MarshalJSON is the custom marshaler for AccessURI. @@ -39,6 +41,8 @@ func (au AccessURI) MarshalJSON() ([]byte, error) { type AdditionalCapabilities struct { // UltraSSDEnabled - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled. UltraSSDEnabled *bool `json:"ultraSSDEnabled,omitempty"` + // HibernationEnabled - The flag that enables or disables hibernation capability on the VM. + HibernationEnabled *bool `json:"hibernationEnabled,omitempty"` } // AdditionalUnattendContent specifies additional XML formatted information that can be included in the @@ -85,6 +89,13 @@ type APIErrorBase struct { Message *string `json:"message,omitempty"` } +// ApplicationProfile contains the list of gallery applications that should be made available to the +// VM/VMSS +type ApplicationProfile struct { + // GalleryApplications - Specifies the gallery applications that should be made available to the VM/VMSS + GalleryApplications *[]VMGalleryApplication `json:"galleryApplications,omitempty"` +} + // AutomaticOSUpgradePolicy the configuration parameters used for performing automatic OS upgrade. type AutomaticOSUpgradePolicy struct { // EnableAutomaticOSUpgrade - Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false.

If this is set to true for Windows based scale sets, [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) is automatically set to false and cannot be set to true. @@ -521,28 +532,937 @@ type BillingProfile struct { MaxPrice *float64 `json:"maxPrice,omitempty"` } -// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and -// Screenshot to diagnose VM status.

You can easily view the output of your console log.

-// Azure also enables you to see a screenshot of the VM from the hypervisor. -type BootDiagnostics struct { - // Enabled - Whether boot diagnostics should be enabled on the Virtual Machine. - Enabled *bool `json:"enabled,omitempty"` - // StorageURI - Uri of the storage account to use for placing the console output and screenshot.

If storageUri is not specified while enabling boot diagnostics, managed storage will be used. - StorageURI *string `json:"storageUri,omitempty"` +// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and +// Screenshot to diagnose VM status.

You can easily view the output of your console log.

+// Azure also enables you to see a screenshot of the VM from the hypervisor. +type BootDiagnostics struct { + // Enabled - Whether boot diagnostics should be enabled on the Virtual Machine. + Enabled *bool `json:"enabled,omitempty"` + // StorageURI - Uri of the storage account to use for placing the console output and screenshot.

If storageUri is not specified while enabling boot diagnostics, managed storage will be used. + StorageURI *string `json:"storageUri,omitempty"` +} + +// BootDiagnosticsInstanceView the instance view of a virtual machine boot diagnostics. +type BootDiagnosticsInstanceView struct { + // ConsoleScreenshotBlobURI - READ-ONLY; The console screenshot blob URI.

NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage. + ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"` + // SerialConsoleLogBlobURI - READ-ONLY; The serial console log blob Uri.

NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage. + SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"` + // Status - READ-ONLY; The boot diagnostics status information for the VM.

NOTE: It will be set only if there are errors encountered in enabling boot diagnostics. + Status *InstanceViewStatus `json:"status,omitempty"` +} + +// MarshalJSON is the custom marshaler for BootDiagnosticsInstanceView. +func (bdiv BootDiagnosticsInstanceView) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// CapacityReservation specifies information about the capacity reservation. +type CapacityReservation struct { + autorest.Response `json:"-"` + *CapacityReservationProperties `json:"properties,omitempty"` + // Sku - SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values. + Sku *Sku `json:"sku,omitempty"` + // Zones - Availability Zone to use for this capacity reservation. The zone has to be single value and also should be part for the list of zones specified during the capacity reservation group creation. The zone can be assigned only during creation. If not provided, the reservation supports only non-zonal deployments. If provided, enforces VM/VMSS using this capacity reservation to be in same zone. + Zones *[]string `json:"zones,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for CapacityReservation. +func (cr CapacityReservation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cr.CapacityReservationProperties != nil { + objectMap["properties"] = cr.CapacityReservationProperties + } + if cr.Sku != nil { + objectMap["sku"] = cr.Sku + } + if cr.Zones != nil { + objectMap["zones"] = cr.Zones + } + if cr.Location != nil { + objectMap["location"] = cr.Location + } + if cr.Tags != nil { + objectMap["tags"] = cr.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CapacityReservation struct. +func (cr *CapacityReservation) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var capacityReservationProperties CapacityReservationProperties + err = json.Unmarshal(*v, &capacityReservationProperties) + if err != nil { + return err + } + cr.CapacityReservationProperties = &capacityReservationProperties + } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + cr.Sku = &sku + } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + cr.Zones = &zones + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + cr.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cr.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cr.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + cr.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + cr.Tags = tags + } + } + } + + return nil +} + +// CapacityReservationGroup specifies information about the capacity reservation group that the capacity +// reservations should be assigned to.

Currently, a capacity reservation can only be added to a +// capacity reservation group at creation time. An existing capacity reservation cannot be added or moved +// to another capacity reservation group. +type CapacityReservationGroup struct { + autorest.Response `json:"-"` + *CapacityReservationGroupProperties `json:"properties,omitempty"` + // Zones - Availability Zones to use for this capacity reservation group. The zones can be assigned only during creation. If not provided, the group supports only regional resources in the region. If provided, enforces each capacity reservation in the group to be in one of the zones. + Zones *[]string `json:"zones,omitempty"` + // ID - READ-ONLY; Resource Id + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for CapacityReservationGroup. +func (crg CapacityReservationGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if crg.CapacityReservationGroupProperties != nil { + objectMap["properties"] = crg.CapacityReservationGroupProperties + } + if crg.Zones != nil { + objectMap["zones"] = crg.Zones + } + if crg.Location != nil { + objectMap["location"] = crg.Location + } + if crg.Tags != nil { + objectMap["tags"] = crg.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CapacityReservationGroup struct. +func (crg *CapacityReservationGroup) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var capacityReservationGroupProperties CapacityReservationGroupProperties + err = json.Unmarshal(*v, &capacityReservationGroupProperties) + if err != nil { + return err + } + crg.CapacityReservationGroupProperties = &capacityReservationGroupProperties + } + case "zones": + if v != nil { + var zones []string + err = json.Unmarshal(*v, &zones) + if err != nil { + return err + } + crg.Zones = &zones + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + crg.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + crg.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + crg.Type = &typeVar + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + crg.Location = &location + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + crg.Tags = tags + } + } + } + + return nil +} + +// CapacityReservationGroupInstanceView ... +type CapacityReservationGroupInstanceView struct { + // CapacityReservations - READ-ONLY; List of instance view of the capacity reservations under the capacity reservation group. + CapacityReservations *[]CapacityReservationInstanceViewWithName `json:"capacityReservations,omitempty"` +} + +// MarshalJSON is the custom marshaler for CapacityReservationGroupInstanceView. +func (crgiv CapacityReservationGroupInstanceView) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// CapacityReservationGroupListResult the List capacity reservation group with resource group response. +type CapacityReservationGroupListResult struct { + autorest.Response `json:"-"` + // Value - The list of capacity reservation groups + Value *[]CapacityReservationGroup `json:"value,omitempty"` + // NextLink - The URI to fetch the next page of capacity reservation groups. Call ListNext() with this URI to fetch the next page of capacity reservation groups. + NextLink *string `json:"nextLink,omitempty"` +} + +// CapacityReservationGroupListResultIterator provides access to a complete listing of +// CapacityReservationGroup values. +type CapacityReservationGroupListResultIterator struct { + i int + page CapacityReservationGroupListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *CapacityReservationGroupListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *CapacityReservationGroupListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter CapacityReservationGroupListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter CapacityReservationGroupListResultIterator) Response() CapacityReservationGroupListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter CapacityReservationGroupListResultIterator) Value() CapacityReservationGroup { + if !iter.page.NotDone() { + return CapacityReservationGroup{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the CapacityReservationGroupListResultIterator type. +func NewCapacityReservationGroupListResultIterator(page CapacityReservationGroupListResultPage) CapacityReservationGroupListResultIterator { + return CapacityReservationGroupListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (crglr CapacityReservationGroupListResult) IsEmpty() bool { + return crglr.Value == nil || len(*crglr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (crglr CapacityReservationGroupListResult) hasNextLink() bool { + return crglr.NextLink != nil && len(*crglr.NextLink) != 0 +} + +// capacityReservationGroupListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (crglr CapacityReservationGroupListResult) capacityReservationGroupListResultPreparer(ctx context.Context) (*http.Request, error) { + if !crglr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(crglr.NextLink))) +} + +// CapacityReservationGroupListResultPage contains a page of CapacityReservationGroup values. +type CapacityReservationGroupListResultPage struct { + fn func(context.Context, CapacityReservationGroupListResult) (CapacityReservationGroupListResult, error) + crglr CapacityReservationGroupListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *CapacityReservationGroupListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.crglr) + if err != nil { + return err + } + page.crglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *CapacityReservationGroupListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page CapacityReservationGroupListResultPage) NotDone() bool { + return !page.crglr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page CapacityReservationGroupListResultPage) Response() CapacityReservationGroupListResult { + return page.crglr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page CapacityReservationGroupListResultPage) Values() []CapacityReservationGroup { + if page.crglr.IsEmpty() { + return nil + } + return *page.crglr.Value +} + +// Creates a new instance of the CapacityReservationGroupListResultPage type. +func NewCapacityReservationGroupListResultPage(cur CapacityReservationGroupListResult, getNextPage func(context.Context, CapacityReservationGroupListResult) (CapacityReservationGroupListResult, error)) CapacityReservationGroupListResultPage { + return CapacityReservationGroupListResultPage{ + fn: getNextPage, + crglr: cur, + } +} + +// CapacityReservationGroupProperties capacity reservation group Properties. +type CapacityReservationGroupProperties struct { + // CapacityReservations - READ-ONLY; A list of all capacity reservation resource ids that belong to capacity reservation group. + CapacityReservations *[]SubResourceReadOnly `json:"capacityReservations,omitempty"` + // VirtualMachinesAssociated - READ-ONLY; A list of references to all virtual machines associated to the capacity reservation group. + VirtualMachinesAssociated *[]SubResourceReadOnly `json:"virtualMachinesAssociated,omitempty"` + // InstanceView - READ-ONLY; The capacity reservation group instance view which has the list of instance views for all the capacity reservations that belong to the capacity reservation group. + InstanceView *CapacityReservationGroupInstanceView `json:"instanceView,omitempty"` +} + +// MarshalJSON is the custom marshaler for CapacityReservationGroupProperties. +func (crgp CapacityReservationGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// CapacityReservationGroupUpdate specifies information about the capacity reservation group. Only tags can +// be updated. +type CapacityReservationGroupUpdate struct { + *CapacityReservationGroupProperties `json:"properties,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for CapacityReservationGroupUpdate. +func (crgu CapacityReservationGroupUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if crgu.CapacityReservationGroupProperties != nil { + objectMap["properties"] = crgu.CapacityReservationGroupProperties + } + if crgu.Tags != nil { + objectMap["tags"] = crgu.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CapacityReservationGroupUpdate struct. +func (crgu *CapacityReservationGroupUpdate) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var capacityReservationGroupProperties CapacityReservationGroupProperties + err = json.Unmarshal(*v, &capacityReservationGroupProperties) + if err != nil { + return err + } + crgu.CapacityReservationGroupProperties = &capacityReservationGroupProperties + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + crgu.Tags = tags + } + } + } + + return nil +} + +// CapacityReservationInstanceView the instance view of a capacity reservation that provides as snapshot of +// the runtime properties of the capacity reservation that is managed by the platform and can change +// outside of control plane operations. +type CapacityReservationInstanceView struct { + // UtilizationInfo - Unutilized capacity of the capacity reservation. + UtilizationInfo *CapacityReservationUtilization `json:"utilizationInfo,omitempty"` + // Statuses - The resource status information. + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` +} + +// CapacityReservationInstanceViewWithName the instance view of a capacity reservation that includes the +// name of the capacity reservation. It is used for the response to the instance view of a capacity +// reservation group. +type CapacityReservationInstanceViewWithName struct { + // Name - READ-ONLY; The name of the capacity reservation. + Name *string `json:"name,omitempty"` + // UtilizationInfo - Unutilized capacity of the capacity reservation. + UtilizationInfo *CapacityReservationUtilization `json:"utilizationInfo,omitempty"` + // Statuses - The resource status information. + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` +} + +// MarshalJSON is the custom marshaler for CapacityReservationInstanceViewWithName. +func (crivwn CapacityReservationInstanceViewWithName) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if crivwn.UtilizationInfo != nil { + objectMap["utilizationInfo"] = crivwn.UtilizationInfo + } + if crivwn.Statuses != nil { + objectMap["statuses"] = crivwn.Statuses + } + return json.Marshal(objectMap) +} + +// CapacityReservationListResult the list capacity reservation operation response. +type CapacityReservationListResult struct { + autorest.Response `json:"-"` + // Value - The list of capacity reservations + Value *[]CapacityReservation `json:"value,omitempty"` + // NextLink - The URI to fetch the next page of capacity reservations. Call ListNext() with this URI to fetch the next page of capacity reservations. + NextLink *string `json:"nextLink,omitempty"` +} + +// CapacityReservationListResultIterator provides access to a complete listing of CapacityReservation +// values. +type CapacityReservationListResultIterator struct { + i int + page CapacityReservationListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *CapacityReservationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *CapacityReservationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter CapacityReservationListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter CapacityReservationListResultIterator) Response() CapacityReservationListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter CapacityReservationListResultIterator) Value() CapacityReservation { + if !iter.page.NotDone() { + return CapacityReservation{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the CapacityReservationListResultIterator type. +func NewCapacityReservationListResultIterator(page CapacityReservationListResultPage) CapacityReservationListResultIterator { + return CapacityReservationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (crlr CapacityReservationListResult) IsEmpty() bool { + return crlr.Value == nil || len(*crlr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (crlr CapacityReservationListResult) hasNextLink() bool { + return crlr.NextLink != nil && len(*crlr.NextLink) != 0 +} + +// capacityReservationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (crlr CapacityReservationListResult) capacityReservationListResultPreparer(ctx context.Context) (*http.Request, error) { + if !crlr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(crlr.NextLink))) +} + +// CapacityReservationListResultPage contains a page of CapacityReservation values. +type CapacityReservationListResultPage struct { + fn func(context.Context, CapacityReservationListResult) (CapacityReservationListResult, error) + crlr CapacityReservationListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *CapacityReservationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.crlr) + if err != nil { + return err + } + page.crlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *CapacityReservationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page CapacityReservationListResultPage) NotDone() bool { + return !page.crlr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page CapacityReservationListResultPage) Response() CapacityReservationListResult { + return page.crlr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page CapacityReservationListResultPage) Values() []CapacityReservation { + if page.crlr.IsEmpty() { + return nil + } + return *page.crlr.Value +} + +// Creates a new instance of the CapacityReservationListResultPage type. +func NewCapacityReservationListResultPage(cur CapacityReservationListResult, getNextPage func(context.Context, CapacityReservationListResult) (CapacityReservationListResult, error)) CapacityReservationListResultPage { + return CapacityReservationListResultPage{ + fn: getNextPage, + crlr: cur, + } +} + +// CapacityReservationProfile the parameters of a capacity reservation Profile. +type CapacityReservationProfile struct { + // CapacityReservationGroup - Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details. + CapacityReservationGroup *SubResource `json:"capacityReservationGroup,omitempty"` +} + +// CapacityReservationProperties properties of the Capacity reservation. +type CapacityReservationProperties struct { + // ReservationID - READ-ONLY; A unique id generated and assigned to the capacity reservation by the platform which does not change throughout the lifetime of the resource. + ReservationID *string `json:"reservationId,omitempty"` + // VirtualMachinesAssociated - READ-ONLY; A list of all virtual machine resource ids that are associated with the capacity reservation. + VirtualMachinesAssociated *[]SubResourceReadOnly `json:"virtualMachinesAssociated,omitempty"` + // ProvisioningTime - READ-ONLY; The date time when the capacity reservation was last updated. + ProvisioningTime *date.Time `json:"provisioningTime,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. + ProvisioningState *string `json:"provisioningState,omitempty"` + // InstanceView - READ-ONLY; The Capacity reservation instance view. + InstanceView *CapacityReservationInstanceView `json:"instanceView,omitempty"` +} + +// MarshalJSON is the custom marshaler for CapacityReservationProperties. +func (crp CapacityReservationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// CapacityReservationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type CapacityReservationsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CapacityReservationsClient) (CapacityReservation, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CapacityReservationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CapacityReservationsCreateOrUpdateFuture.Result. +func (future *CapacityReservationsCreateOrUpdateFuture) result(client CapacityReservationsClient) (cr CapacityReservation, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + cr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.CapacityReservationsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cr.Response.Response, err = future.GetResult(sender); err == nil && cr.Response.Response.StatusCode != http.StatusNoContent { + cr, err = client.CreateOrUpdateResponder(cr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsCreateOrUpdateFuture", "Result", cr.Response.Response, "Failure responding to request") + } + } + return +} + +// CapacityReservationsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type CapacityReservationsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CapacityReservationsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CapacityReservationsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CapacityReservationsDeleteFuture.Result. +func (future *CapacityReservationsDeleteFuture) result(client CapacityReservationsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.CapacityReservationsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// CapacityReservationsUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type CapacityReservationsUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(CapacityReservationsClient) (CapacityReservation, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *CapacityReservationsUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for CapacityReservationsUpdateFuture.Result. +func (future *CapacityReservationsUpdateFuture) result(client CapacityReservationsClient) (cr CapacityReservation, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + cr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.CapacityReservationsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if cr.Response.Response, err = future.GetResult(sender); err == nil && cr.Response.Response.StatusCode != http.StatusNoContent { + cr, err = client.UpdateResponder(cr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.CapacityReservationsUpdateFuture", "Result", cr.Response.Response, "Failure responding to request") + } + } + return +} + +// CapacityReservationUpdate specifies information about the capacity reservation. Only tags and +// sku.capacity can be updated. +type CapacityReservationUpdate struct { + *CapacityReservationProperties `json:"properties,omitempty"` + // Sku - SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values. + Sku *Sku `json:"sku,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for CapacityReservationUpdate. +func (cru CapacityReservationUpdate) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cru.CapacityReservationProperties != nil { + objectMap["properties"] = cru.CapacityReservationProperties + } + if cru.Sku != nil { + objectMap["sku"] = cru.Sku + } + if cru.Tags != nil { + objectMap["tags"] = cru.Tags + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CapacityReservationUpdate struct. +func (cru *CapacityReservationUpdate) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var capacityReservationProperties CapacityReservationProperties + err = json.Unmarshal(*v, &capacityReservationProperties) + if err != nil { + return err + } + cru.CapacityReservationProperties = &capacityReservationProperties + } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + cru.Sku = &sku + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + cru.Tags = tags + } + } + } + + return nil } -// BootDiagnosticsInstanceView the instance view of a virtual machine boot diagnostics. -type BootDiagnosticsInstanceView struct { - // ConsoleScreenshotBlobURI - READ-ONLY; The console screenshot blob URI.

NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage. - ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"` - // SerialConsoleLogBlobURI - READ-ONLY; The serial console log blob Uri.

NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage. - SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"` - // Status - READ-ONLY; The boot diagnostics status information for the VM.

NOTE: It will be set only if there are errors encountered in enabling boot diagnostics. - Status *InstanceViewStatus `json:"status,omitempty"` +// CapacityReservationUtilization represents the capacity reservation utilization in terms of resources +// allocated. +type CapacityReservationUtilization struct { + // VirtualMachinesAllocated - READ-ONLY; A list of all virtual machines resource ids allocated against the capacity reservation. + VirtualMachinesAllocated *[]SubResourceReadOnly `json:"virtualMachinesAllocated,omitempty"` } -// MarshalJSON is the custom marshaler for BootDiagnosticsInstanceView. -func (bdiv BootDiagnosticsInstanceView) MarshalJSON() ([]byte, error) { +// MarshalJSON is the custom marshaler for CapacityReservationUtilization. +func (cru CapacityReservationUtilization) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) return json.Marshal(objectMap) } @@ -1682,17 +2602,293 @@ type CloudServiceVaultCertificate struct { CertificateURL *string `json:"certificateUrl,omitempty"` } -// CloudServiceVaultSecretGroup describes a set of certificates which are all in the same Key Vault. -type CloudServiceVaultSecretGroup struct { - // SourceVault - The relative URL of the Key Vault containing all of the certificates in VaultCertificates. - SourceVault *SubResource `json:"sourceVault,omitempty"` - // VaultCertificates - The list of key vault references in SourceVault which contain certificates. - VaultCertificates *[]CloudServiceVaultCertificate `json:"vaultCertificates,omitempty"` +// CloudServiceVaultSecretGroup describes a set of certificates which are all in the same Key Vault. +type CloudServiceVaultSecretGroup struct { + // SourceVault - The relative URL of the Key Vault containing all of the certificates in VaultCertificates. + SourceVault *SubResource `json:"sourceVault,omitempty"` + // VaultCertificates - The list of key vault references in SourceVault which contain certificates. + VaultCertificates *[]CloudServiceVaultCertificate `json:"vaultCertificates,omitempty"` +} + +// CommunityGallery specifies information about the Community Gallery that you want to create or update. +type CommunityGallery struct { + autorest.Response `json:"-"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Location - READ-ONLY; Resource location + Location *string `json:"location,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + *CommunityGalleryIdentifier `json:"identifier,omitempty"` +} + +// MarshalJSON is the custom marshaler for CommunityGallery. +func (cg CommunityGallery) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cg.CommunityGalleryIdentifier != nil { + objectMap["identifier"] = cg.CommunityGalleryIdentifier + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CommunityGallery struct. +func (cg *CommunityGallery) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cg.Name = &name + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + cg.Location = &location + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cg.Type = &typeVar + } + case "identifier": + if v != nil { + var communityGalleryIdentifier CommunityGalleryIdentifier + err = json.Unmarshal(*v, &communityGalleryIdentifier) + if err != nil { + return err + } + cg.CommunityGalleryIdentifier = &communityGalleryIdentifier + } + } + } + + return nil +} + +// CommunityGalleryIdentifier the identifier information of community gallery. +type CommunityGalleryIdentifier struct { + // UniqueID - The unique id of this community gallery. + UniqueID *string `json:"uniqueId,omitempty"` +} + +// CommunityGalleryImage specifies information about the gallery image definition that you want to create +// or update. +type CommunityGalleryImage struct { + autorest.Response `json:"-"` + *CommunityGalleryImageProperties `json:"properties,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Location - READ-ONLY; Resource location + Location *string `json:"location,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + *CommunityGalleryIdentifier `json:"identifier,omitempty"` +} + +// MarshalJSON is the custom marshaler for CommunityGalleryImage. +func (cgiVar CommunityGalleryImage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cgiVar.CommunityGalleryImageProperties != nil { + objectMap["properties"] = cgiVar.CommunityGalleryImageProperties + } + if cgiVar.CommunityGalleryIdentifier != nil { + objectMap["identifier"] = cgiVar.CommunityGalleryIdentifier + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CommunityGalleryImage struct. +func (cgiVar *CommunityGalleryImage) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var communityGalleryImageProperties CommunityGalleryImageProperties + err = json.Unmarshal(*v, &communityGalleryImageProperties) + if err != nil { + return err + } + cgiVar.CommunityGalleryImageProperties = &communityGalleryImageProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cgiVar.Name = &name + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + cgiVar.Location = &location + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cgiVar.Type = &typeVar + } + case "identifier": + if v != nil { + var communityGalleryIdentifier CommunityGalleryIdentifier + err = json.Unmarshal(*v, &communityGalleryIdentifier) + if err != nil { + return err + } + cgiVar.CommunityGalleryIdentifier = &communityGalleryIdentifier + } + } + } + + return nil +} + +// CommunityGalleryImageProperties describes the properties of a gallery image definition. +type CommunityGalleryImageProperties struct { + // OsType - This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.

Possible values are:

**Windows**

**Linux**. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux' + OsType OperatingSystemTypes `json:"osType,omitempty"` + // OsState - This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. Possible values include: 'OperatingSystemStateTypesGeneralized', 'OperatingSystemStateTypesSpecialized' + OsState OperatingSystemStateTypes `json:"osState,omitempty"` + // EndOfLifeDate - The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable. + EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` + Identifier *GalleryImageIdentifier `json:"identifier,omitempty"` + Recommended *RecommendedMachineConfiguration `json:"recommended,omitempty"` + Disallowed *Disallowed `json:"disallowed,omitempty"` + // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'HyperVGenerationV1', 'HyperVGenerationV2' + HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"` + // Features - A list of gallery image features. + Features *[]GalleryImageFeature `json:"features,omitempty"` + PurchasePlan *ImagePurchasePlan `json:"purchasePlan,omitempty"` +} + +// CommunityGalleryImageVersion specifies information about the gallery image version that you want to +// create or update. +type CommunityGalleryImageVersion struct { + autorest.Response `json:"-"` + *CommunityGalleryImageVersionProperties `json:"properties,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Location - READ-ONLY; Resource location + Location *string `json:"location,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + *CommunityGalleryIdentifier `json:"identifier,omitempty"` +} + +// MarshalJSON is the custom marshaler for CommunityGalleryImageVersion. +func (cgiv CommunityGalleryImageVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cgiv.CommunityGalleryImageVersionProperties != nil { + objectMap["properties"] = cgiv.CommunityGalleryImageVersionProperties + } + if cgiv.CommunityGalleryIdentifier != nil { + objectMap["identifier"] = cgiv.CommunityGalleryIdentifier + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for CommunityGalleryImageVersion struct. +func (cgiv *CommunityGalleryImageVersion) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var communityGalleryImageVersionProperties CommunityGalleryImageVersionProperties + err = json.Unmarshal(*v, &communityGalleryImageVersionProperties) + if err != nil { + return err + } + cgiv.CommunityGalleryImageVersionProperties = &communityGalleryImageVersionProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + cgiv.Name = &name + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + cgiv.Location = &location + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + cgiv.Type = &typeVar + } + case "identifier": + if v != nil { + var communityGalleryIdentifier CommunityGalleryIdentifier + err = json.Unmarshal(*v, &communityGalleryIdentifier) + if err != nil { + return err + } + cgiv.CommunityGalleryIdentifier = &communityGalleryIdentifier + } + } + } + + return nil +} + +// CommunityGalleryImageVersionProperties describes the properties of a gallery image version. +type CommunityGalleryImageVersionProperties struct { + // PublishedDate - The published date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable. + PublishedDate *date.Time `json:"publishedDate,omitempty"` + // EndOfLifeDate - The end of life date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable. + EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` } // CreationData data used when creating a disk. type CreationData struct { - // CreateOption - This enumerates the possible sources of a disk's creation. Possible values include: 'DiskCreateOptionEmpty', 'DiskCreateOptionAttach', 'DiskCreateOptionFromImage', 'DiskCreateOptionImport', 'DiskCreateOptionCopy', 'DiskCreateOptionRestore', 'DiskCreateOptionUpload' + // CreateOption - This enumerates the possible sources of a disk's creation. Possible values include: 'DiskCreateOptionEmpty', 'DiskCreateOptionAttach', 'DiskCreateOptionFromImage', 'DiskCreateOptionImport', 'DiskCreateOptionCopy', 'DiskCreateOptionRestore', 'DiskCreateOptionUpload', 'DiskCreateOptionCopyStart', 'DiskCreateOptionImportSecure', 'DiskCreateOptionUploadPreparedSecure' CreateOption DiskCreateOption `json:"createOption,omitempty"` // StorageAccountID - Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk. StorageAccountID *string `json:"storageAccountId,omitempty"` @@ -1710,6 +2906,8 @@ type CreationData struct { UploadSizeBytes *int64 `json:"uploadSizeBytes,omitempty"` // LogicalSectorSize - Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default. LogicalSectorSize *int32 `json:"logicalSectorSize,omitempty"` + // SecurityDataURI - If createOption is ImportSecure, this is the URI of a blob to be imported into VM guest state. + SecurityDataURI *string `json:"securityDataUri,omitempty"` } // MarshalJSON is the custom marshaler for CreationData. @@ -1739,6 +2937,9 @@ func (cd CreationData) MarshalJSON() ([]byte, error) { if cd.LogicalSectorSize != nil { objectMap["logicalSectorSize"] = cd.LogicalSectorSize } + if cd.SecurityDataURI != nil { + objectMap["securityDataUri"] = cd.SecurityDataURI + } return json.Marshal(objectMap) } @@ -2757,7 +3958,7 @@ func (dhu *DedicatedHostUpdate) UnmarshalJSON(body []byte) error { // DiagnosticsProfile specifies the boot diagnostic settings state.

Minimum api-version: // 2015-06-15. type DiagnosticsProfile struct { - // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.

You can easily view the output of your console log.

Azure also enables you to see a screenshot of the VM from the hypervisor. + // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
**NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM.

You can easily view the output of your console log.

Azure also enables you to see a screenshot of the VM from the hypervisor. BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"` } @@ -2949,6 +4150,8 @@ func (d *Disk) UnmarshalJSON(body []byte) error { type DiskAccess struct { autorest.Response `json:"-"` *DiskAccessProperties `json:"properties,omitempty"` + // ExtendedLocation - The extended location where the disk access will be created. Extended location cannot be changed. + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -2967,6 +4170,9 @@ func (da DiskAccess) MarshalJSON() ([]byte, error) { if da.DiskAccessProperties != nil { objectMap["properties"] = da.DiskAccessProperties } + if da.ExtendedLocation != nil { + objectMap["extendedLocation"] = da.ExtendedLocation + } if da.Location != nil { objectMap["location"] = da.Location } @@ -2994,6 +4200,15 @@ func (da *DiskAccess) UnmarshalJSON(body []byte) error { } da.DiskAccessProperties = &diskAccessProperties } + case "extendedLocation": + if v != nil { + var extendedLocation ExtendedLocation + err = json.Unmarshal(*v, &extendedLocation) + if err != nil { + return err + } + da.ExtendedLocation = &extendedLocation + } case "id": if v != nil { var ID string @@ -3918,7 +5133,7 @@ func (desu *DiskEncryptionSetUpdate) UnmarshalJSON(body []byte) error { // DiskEncryptionSetUpdateProperties disk encryption set resource update properties. type DiskEncryptionSetUpdateProperties struct { - // EncryptionType - Possible values include: 'DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey', 'DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys' + // EncryptionType - Possible values include: 'DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey', 'DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys', 'DiskEncryptionSetTypeConfidentialVMEncryptedWithCustomerKey' EncryptionType DiskEncryptionSetType `json:"encryptionType,omitempty"` ActiveKey *KeyForDiskEncryptionSet `json:"activeKey,omitempty"` // RotationToLatestKeyVersionEnabled - Set this flag to true to enable auto-updating of this disk encryption set to the latest key version. @@ -4110,6 +5325,8 @@ type DiskProperties struct { HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"` // PurchasePlan - Purchase plan information for the the image from which the OS disk was created. E.g. - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: WindowsServer} PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"` + // SupportedCapabilities - List of supported capabilities for the image from which the OS disk was created. + SupportedCapabilities *SupportedCapabilities `json:"supportedCapabilities,omitempty"` // CreationData - Disk source information. CreationData information cannot be changed after the disk has been created. CreationData *CreationData `json:"creationData,omitempty"` // DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. @@ -4130,7 +5347,7 @@ type DiskProperties struct { DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"` // DiskMBpsReadOnly - The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"` - // DiskState - The state of the disk. Possible values include: 'DiskStateUnattached', 'DiskStateAttached', 'DiskStateReserved', 'DiskStateActiveSAS', 'DiskStateReadyToUpload', 'DiskStateActiveUpload' + // DiskState - The state of the disk. Possible values include: 'DiskStateUnattached', 'DiskStateAttached', 'DiskStateReserved', 'DiskStateFrozen', 'DiskStateActiveSAS', 'DiskStateActiveSASFrozen', 'DiskStateReadyToUpload', 'DiskStateActiveUpload' DiskState DiskState `json:"diskState,omitempty"` // Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. Encryption *Encryption `json:"encryption,omitempty"` @@ -4152,6 +5369,10 @@ type DiskProperties struct { SupportsHibernation *bool `json:"supportsHibernation,omitempty"` // SecurityProfile - Contains the security related information for the resource. SecurityProfile *DiskSecurityProfile `json:"securityProfile,omitempty"` + // CompletionPercent - Percentage complete for the background copy when a resource is created via the CopyStart operation. + CompletionPercent *float64 `json:"completionPercent,omitempty"` + // PublicNetworkAccess - Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled' + PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` } // MarshalJSON is the custom marshaler for DiskProperties. @@ -4166,6 +5387,9 @@ func (dp DiskProperties) MarshalJSON() ([]byte, error) { if dp.PurchasePlan != nil { objectMap["purchasePlan"] = dp.PurchasePlan } + if dp.SupportedCapabilities != nil { + objectMap["supportedCapabilities"] = dp.SupportedCapabilities + } if dp.CreationData != nil { objectMap["creationData"] = dp.CreationData } @@ -4214,6 +5438,12 @@ func (dp DiskProperties) MarshalJSON() ([]byte, error) { if dp.SecurityProfile != nil { objectMap["securityProfile"] = dp.SecurityProfile } + if dp.CompletionPercent != nil { + objectMap["completionPercent"] = dp.CompletionPercent + } + if dp.PublicNetworkAccess != "" { + objectMap["publicNetworkAccess"] = dp.PublicNetworkAccess + } return json.Marshal(objectMap) } @@ -4289,6 +5519,49 @@ func (drp *DiskRestorePoint) UnmarshalJSON(body []byte) error { return nil } +// DiskRestorePointGrantAccessFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DiskRestorePointGrantAccessFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DiskRestorePointClient) (AccessURI, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DiskRestorePointGrantAccessFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DiskRestorePointGrantAccessFuture.Result. +func (future *DiskRestorePointGrantAccessFuture) result(client DiskRestorePointClient) (au AccessURI, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskRestorePointGrantAccessFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + au.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.DiskRestorePointGrantAccessFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent { + au, err = client.GrantAccessResponder(au.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskRestorePointGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request") + } + } + return +} + // DiskRestorePointList the List Disk Restore Points operation response. type DiskRestorePointList struct { autorest.Response `json:"-"` @@ -4452,7 +5725,7 @@ func NewDiskRestorePointListPage(cur DiskRestorePointList, getNextPage func(cont type DiskRestorePointProperties struct { // TimeCreated - READ-ONLY; The timestamp of restorePoint creation TimeCreated *date.Time `json:"timeCreated,omitempty"` - // SourceResourceID - READ-ONLY; arm id of source disk + // SourceResourceID - READ-ONLY; arm id of source disk or source disk restore point. SourceResourceID *string `json:"sourceResourceId,omitempty"` // OsType - READ-ONLY; The Operating System type. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux' OsType OperatingSystemTypes `json:"osType,omitempty"` @@ -4460,6 +5733,8 @@ type DiskRestorePointProperties struct { HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"` // PurchasePlan - Purchase plan information for the the image from which the OS disk was created. PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"` + // SupportedCapabilities - List of supported capabilities (like accelerated networking) for the image from which the OS disk was created. + SupportedCapabilities *SupportedCapabilities `json:"supportedCapabilities,omitempty"` // FamilyID - READ-ONLY; id of the backing snapshot's MIS family FamilyID *string `json:"familyId,omitempty"` // SourceUniqueID - READ-ONLY; unique incarnation id of the source disk @@ -4468,6 +5743,18 @@ type DiskRestorePointProperties struct { Encryption *Encryption `json:"encryption,omitempty"` // SupportsHibernation - Indicates the OS on a disk supports hibernation. SupportsHibernation *bool `json:"supportsHibernation,omitempty"` + // NetworkAccessPolicy - Possible values include: 'NetworkAccessPolicyAllowAll', 'NetworkAccessPolicyAllowPrivate', 'NetworkAccessPolicyDenyAll' + NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"` + // PublicNetworkAccess - Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled' + PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + // DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks. + DiskAccessID *string `json:"diskAccessId,omitempty"` + // CompletionPercent - Percentage complete for the background copy of disk restore point when source resource is from a different region. + CompletionPercent *float64 `json:"completionPercent,omitempty"` + // ReplicationState - READ-ONLY; Replication state of disk restore point when source resource is from a different region. + ReplicationState *string `json:"replicationState,omitempty"` + // SourceResourceLocation - READ-ONLY; Location of source disk or source disk restore point when source resource is from a different region. + SourceResourceLocation *string `json:"sourceResourceLocation,omitempty"` } // MarshalJSON is the custom marshaler for DiskRestorePointProperties. @@ -4479,12 +5766,64 @@ func (drpp DiskRestorePointProperties) MarshalJSON() ([]byte, error) { if drpp.PurchasePlan != nil { objectMap["purchasePlan"] = drpp.PurchasePlan } + if drpp.SupportedCapabilities != nil { + objectMap["supportedCapabilities"] = drpp.SupportedCapabilities + } if drpp.SupportsHibernation != nil { objectMap["supportsHibernation"] = drpp.SupportsHibernation } + if drpp.NetworkAccessPolicy != "" { + objectMap["networkAccessPolicy"] = drpp.NetworkAccessPolicy + } + if drpp.PublicNetworkAccess != "" { + objectMap["publicNetworkAccess"] = drpp.PublicNetworkAccess + } + if drpp.DiskAccessID != nil { + objectMap["diskAccessId"] = drpp.DiskAccessID + } + if drpp.CompletionPercent != nil { + objectMap["completionPercent"] = drpp.CompletionPercent + } return json.Marshal(objectMap) } +// DiskRestorePointRevokeAccessFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type DiskRestorePointRevokeAccessFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(DiskRestorePointClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *DiskRestorePointRevokeAccessFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for DiskRestorePointRevokeAccessFuture.Result. +func (future *DiskRestorePointRevokeAccessFuture) result(client DiskRestorePointClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DiskRestorePointRevokeAccessFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("compute.DiskRestorePointRevokeAccessFuture") + return + } + ar.Response = future.Response() + return +} + // DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running // operation. type DisksCreateOrUpdateFuture struct { @@ -4566,8 +5905,10 @@ func (future *DisksDeleteFuture) result(client DisksClient) (ar autorest.Respons // DiskSecurityProfile contains the security related information for the resource. type DiskSecurityProfile struct { - // SecurityType - Possible values include: 'DiskSecurityTypesTrustedLaunch' + // SecurityType - Possible values include: 'DiskSecurityTypesTrustedLaunch', 'DiskSecurityTypesConfidentialVMVMGuestStateOnlyEncryptedWithPlatformKey', 'DiskSecurityTypesConfidentialVMDiskEncryptedWithPlatformKey', 'DiskSecurityTypesConfidentialVMDiskEncryptedWithCustomerKey' SecurityType DiskSecurityTypes `json:"securityType,omitempty"` + // SecureVMDiskEncryptionSetID - ResourceId of the disk encryption set associated to Confidential VM supported disk encrypted with customer managed key + SecureVMDiskEncryptionSetID *string `json:"secureVMDiskEncryptionSetId,omitempty"` } // DisksGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running @@ -4805,10 +6146,14 @@ type DiskUpdateProperties struct { BurstingEnabled *bool `json:"burstingEnabled,omitempty"` // PurchasePlan - Purchase plan information to be added on the OS disk PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"` + // SupportedCapabilities - List of supported capabilities (like accelerated networking) to be added on the OS disk. + SupportedCapabilities *SupportedCapabilities `json:"supportedCapabilities,omitempty"` // PropertyUpdatesInProgress - READ-ONLY; Properties of the disk for which update is pending. PropertyUpdatesInProgress *PropertyUpdatesInProgress `json:"propertyUpdatesInProgress,omitempty"` // SupportsHibernation - Indicates the OS on a disk supports hibernation. SupportsHibernation *bool `json:"supportsHibernation,omitempty"` + // PublicNetworkAccess - Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled' + PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` } // MarshalJSON is the custom marshaler for DiskUpdateProperties. @@ -4856,9 +6201,15 @@ func (dup DiskUpdateProperties) MarshalJSON() ([]byte, error) { if dup.PurchasePlan != nil { objectMap["purchasePlan"] = dup.PurchasePlan } + if dup.SupportedCapabilities != nil { + objectMap["supportedCapabilities"] = dup.SupportedCapabilities + } if dup.SupportsHibernation != nil { objectMap["supportsHibernation"] = dup.SupportsHibernation } + if dup.PublicNetworkAccess != "" { + objectMap["publicNetworkAccess"] = dup.PublicNetworkAccess + } return json.Marshal(objectMap) } @@ -4900,7 +6251,7 @@ func (esi EncryptionSetIdentity) MarshalJSON() ([]byte, error) { // EncryptionSetProperties ... type EncryptionSetProperties struct { - // EncryptionType - Possible values include: 'DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey', 'DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys' + // EncryptionType - Possible values include: 'DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey', 'DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys', 'DiskEncryptionSetTypeConfidentialVMEncryptedWithCustomerKey' EncryptionType DiskEncryptionSetType `json:"encryptionType,omitempty"` // ActiveKey - The key vault key which is currently used by this disk encryption set. ActiveKey *KeyForDiskEncryptionSet `json:"activeKey,omitempty"` @@ -4912,6 +6263,8 @@ type EncryptionSetProperties struct { RotationToLatestKeyVersionEnabled *bool `json:"rotationToLatestKeyVersionEnabled,omitempty"` // LastKeyRotationTimestamp - READ-ONLY; The time when the active key of this disk encryption set was updated. LastKeyRotationTimestamp *date.Time `json:"lastKeyRotationTimestamp,omitempty"` + // AutoKeyRotationError - READ-ONLY; The error that was encountered during auto-key rotation. If an error is present, then auto-key rotation will not be attempted until the error on this disk encryption set is fixed. + AutoKeyRotationError *APIError `json:"autoKeyRotationError,omitempty"` } // MarshalJSON is the custom marshaler for EncryptionSetProperties. @@ -5967,6 +7320,8 @@ type GalleryApplicationVersionPublishingProfile struct { EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS' StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` + // ReplicationMode - Optional parameter which specifies the mode to be used for replication. This property is not updatable. Possible values include: 'ReplicationModeFull', 'ReplicationModeShallow' + ReplicationMode ReplicationMode `json:"replicationMode,omitempty"` } // MarshalJSON is the custom marshaler for GalleryApplicationVersionPublishingProfile. @@ -5996,6 +7351,9 @@ func (gavpp GalleryApplicationVersionPublishingProfile) MarshalJSON() ([]byte, e if gavpp.StorageAccountType != "" { objectMap["storageAccountType"] = gavpp.StorageAccountType } + if gavpp.ReplicationMode != "" { + objectMap["replicationMode"] = gavpp.ReplicationMode + } return json.Marshal(objectMap) } @@ -6222,6 +7580,8 @@ type GalleryArtifactPublishingProfileBase struct { EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS' StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` + // ReplicationMode - Optional parameter which specifies the mode to be used for replication. This property is not updatable. Possible values include: 'ReplicationModeFull', 'ReplicationModeShallow' + ReplicationMode ReplicationMode `json:"replicationMode,omitempty"` } // MarshalJSON is the custom marshaler for GalleryArtifactPublishingProfileBase. @@ -6242,6 +7602,9 @@ func (gappb GalleryArtifactPublishingProfileBase) MarshalJSON() ([]byte, error) if gappb.StorageAccountType != "" { objectMap["storageAccountType"] = gappb.StorageAccountType } + if gappb.ReplicationMode != "" { + objectMap["replicationMode"] = gappb.ReplicationMode + } return json.Marshal(objectMap) } @@ -7171,6 +8534,8 @@ type GalleryImageVersionPublishingProfile struct { EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"` // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS' StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"` + // ReplicationMode - Optional parameter which specifies the mode to be used for replication. This property is not updatable. Possible values include: 'ReplicationModeFull', 'ReplicationModeShallow' + ReplicationMode ReplicationMode `json:"replicationMode,omitempty"` } // MarshalJSON is the custom marshaler for GalleryImageVersionPublishingProfile. @@ -7191,6 +8556,9 @@ func (givpp GalleryImageVersionPublishingProfile) MarshalJSON() ([]byte, error) if givpp.StorageAccountType != "" { objectMap["storageAccountType"] = givpp.StorageAccountType } + if givpp.ReplicationMode != "" { + objectMap["replicationMode"] = givpp.ReplicationMode + } return json.Marshal(objectMap) } @@ -7598,6 +8966,7 @@ type GalleryProperties struct { // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateUpdating', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateDeleting', 'ProvisioningStateMigrating' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` SharingProfile *SharingProfile `json:"sharingProfile,omitempty"` + SoftDeletePolicy *SoftDeletePolicy `json:"softDeletePolicy,omitempty"` } // MarshalJSON is the custom marshaler for GalleryProperties. @@ -7612,6 +8981,9 @@ func (gp GalleryProperties) MarshalJSON() ([]byte, error) { if gp.SharingProfile != nil { objectMap["sharingProfile"] = gp.SharingProfile } + if gp.SoftDeletePolicy != nil { + objectMap["softDeletePolicy"] = gp.SoftDeletePolicy + } return json.Marshal(objectMap) } @@ -7749,12 +9121,16 @@ type GrantAccessData struct { Access AccessLevel `json:"access,omitempty"` // DurationInSeconds - Time duration in seconds until the SAS access expires. DurationInSeconds *int32 `json:"durationInSeconds,omitempty"` + // GetSecureVMGuestStateSAS - Set this flag to true to get additional SAS for VM guest state + GetSecureVMGuestStateSAS *bool `json:"getSecureVMGuestStateSAS,omitempty"` } // HardwareProfile specifies the hardware settings for the virtual machine. type HardwareProfile struct { // VMSize - Specifies the size of the virtual machine.

The enum data type is currently deprecated and will be removed by December 23rd 2023.

Recommended way to get the list of available sizes is using these APIs:

[List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes)

[List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list)

[List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes).

The available VM sizes depend on region and availability set. Possible values include: 'VirtualMachineSizeTypesBasicA0', 'VirtualMachineSizeTypesBasicA1', 'VirtualMachineSizeTypesBasicA2', 'VirtualMachineSizeTypesBasicA3', 'VirtualMachineSizeTypesBasicA4', 'VirtualMachineSizeTypesStandardA0', 'VirtualMachineSizeTypesStandardA1', 'VirtualMachineSizeTypesStandardA2', 'VirtualMachineSizeTypesStandardA3', 'VirtualMachineSizeTypesStandardA4', 'VirtualMachineSizeTypesStandardA5', 'VirtualMachineSizeTypesStandardA6', 'VirtualMachineSizeTypesStandardA7', 'VirtualMachineSizeTypesStandardA8', 'VirtualMachineSizeTypesStandardA9', 'VirtualMachineSizeTypesStandardA10', 'VirtualMachineSizeTypesStandardA11', 'VirtualMachineSizeTypesStandardA1V2', 'VirtualMachineSizeTypesStandardA2V2', 'VirtualMachineSizeTypesStandardA4V2', 'VirtualMachineSizeTypesStandardA8V2', 'VirtualMachineSizeTypesStandardA2mV2', 'VirtualMachineSizeTypesStandardA4mV2', 'VirtualMachineSizeTypesStandardA8mV2', 'VirtualMachineSizeTypesStandardB1s', 'VirtualMachineSizeTypesStandardB1ms', 'VirtualMachineSizeTypesStandardB2s', 'VirtualMachineSizeTypesStandardB2ms', 'VirtualMachineSizeTypesStandardB4ms', 'VirtualMachineSizeTypesStandardB8ms', 'VirtualMachineSizeTypesStandardD1', 'VirtualMachineSizeTypesStandardD2', 'VirtualMachineSizeTypesStandardD3', 'VirtualMachineSizeTypesStandardD4', 'VirtualMachineSizeTypesStandardD11', 'VirtualMachineSizeTypesStandardD12', 'VirtualMachineSizeTypesStandardD13', 'VirtualMachineSizeTypesStandardD14', 'VirtualMachineSizeTypesStandardD1V2', 'VirtualMachineSizeTypesStandardD2V2', 'VirtualMachineSizeTypesStandardD3V2', 'VirtualMachineSizeTypesStandardD4V2', 'VirtualMachineSizeTypesStandardD5V2', 'VirtualMachineSizeTypesStandardD2V3', 'VirtualMachineSizeTypesStandardD4V3', 'VirtualMachineSizeTypesStandardD8V3', 'VirtualMachineSizeTypesStandardD16V3', 'VirtualMachineSizeTypesStandardD32V3', 'VirtualMachineSizeTypesStandardD64V3', 'VirtualMachineSizeTypesStandardD2sV3', 'VirtualMachineSizeTypesStandardD4sV3', 'VirtualMachineSizeTypesStandardD8sV3', 'VirtualMachineSizeTypesStandardD16sV3', 'VirtualMachineSizeTypesStandardD32sV3', 'VirtualMachineSizeTypesStandardD64sV3', 'VirtualMachineSizeTypesStandardD11V2', 'VirtualMachineSizeTypesStandardD12V2', 'VirtualMachineSizeTypesStandardD13V2', 'VirtualMachineSizeTypesStandardD14V2', 'VirtualMachineSizeTypesStandardD15V2', 'VirtualMachineSizeTypesStandardDS1', 'VirtualMachineSizeTypesStandardDS2', 'VirtualMachineSizeTypesStandardDS3', 'VirtualMachineSizeTypesStandardDS4', 'VirtualMachineSizeTypesStandardDS11', 'VirtualMachineSizeTypesStandardDS12', 'VirtualMachineSizeTypesStandardDS13', 'VirtualMachineSizeTypesStandardDS14', 'VirtualMachineSizeTypesStandardDS1V2', 'VirtualMachineSizeTypesStandardDS2V2', 'VirtualMachineSizeTypesStandardDS3V2', 'VirtualMachineSizeTypesStandardDS4V2', 'VirtualMachineSizeTypesStandardDS5V2', 'VirtualMachineSizeTypesStandardDS11V2', 'VirtualMachineSizeTypesStandardDS12V2', 'VirtualMachineSizeTypesStandardDS13V2', 'VirtualMachineSizeTypesStandardDS14V2', 'VirtualMachineSizeTypesStandardDS15V2', 'VirtualMachineSizeTypesStandardDS134V2', 'VirtualMachineSizeTypesStandardDS132V2', 'VirtualMachineSizeTypesStandardDS148V2', 'VirtualMachineSizeTypesStandardDS144V2', 'VirtualMachineSizeTypesStandardE2V3', 'VirtualMachineSizeTypesStandardE4V3', 'VirtualMachineSizeTypesStandardE8V3', 'VirtualMachineSizeTypesStandardE16V3', 'VirtualMachineSizeTypesStandardE32V3', 'VirtualMachineSizeTypesStandardE64V3', 'VirtualMachineSizeTypesStandardE2sV3', 'VirtualMachineSizeTypesStandardE4sV3', 'VirtualMachineSizeTypesStandardE8sV3', 'VirtualMachineSizeTypesStandardE16sV3', 'VirtualMachineSizeTypesStandardE32sV3', 'VirtualMachineSizeTypesStandardE64sV3', 'VirtualMachineSizeTypesStandardE3216V3', 'VirtualMachineSizeTypesStandardE328sV3', 'VirtualMachineSizeTypesStandardE6432sV3', 'VirtualMachineSizeTypesStandardE6416sV3', 'VirtualMachineSizeTypesStandardF1', 'VirtualMachineSizeTypesStandardF2', 'VirtualMachineSizeTypesStandardF4', 'VirtualMachineSizeTypesStandardF8', 'VirtualMachineSizeTypesStandardF16', 'VirtualMachineSizeTypesStandardF1s', 'VirtualMachineSizeTypesStandardF2s', 'VirtualMachineSizeTypesStandardF4s', 'VirtualMachineSizeTypesStandardF8s', 'VirtualMachineSizeTypesStandardF16s', 'VirtualMachineSizeTypesStandardF2sV2', 'VirtualMachineSizeTypesStandardF4sV2', 'VirtualMachineSizeTypesStandardF8sV2', 'VirtualMachineSizeTypesStandardF16sV2', 'VirtualMachineSizeTypesStandardF32sV2', 'VirtualMachineSizeTypesStandardF64sV2', 'VirtualMachineSizeTypesStandardF72sV2', 'VirtualMachineSizeTypesStandardG1', 'VirtualMachineSizeTypesStandardG2', 'VirtualMachineSizeTypesStandardG3', 'VirtualMachineSizeTypesStandardG4', 'VirtualMachineSizeTypesStandardG5', 'VirtualMachineSizeTypesStandardGS1', 'VirtualMachineSizeTypesStandardGS2', 'VirtualMachineSizeTypesStandardGS3', 'VirtualMachineSizeTypesStandardGS4', 'VirtualMachineSizeTypesStandardGS5', 'VirtualMachineSizeTypesStandardGS48', 'VirtualMachineSizeTypesStandardGS44', 'VirtualMachineSizeTypesStandardGS516', 'VirtualMachineSizeTypesStandardGS58', 'VirtualMachineSizeTypesStandardH8', 'VirtualMachineSizeTypesStandardH16', 'VirtualMachineSizeTypesStandardH8m', 'VirtualMachineSizeTypesStandardH16m', 'VirtualMachineSizeTypesStandardH16r', 'VirtualMachineSizeTypesStandardH16mr', 'VirtualMachineSizeTypesStandardL4s', 'VirtualMachineSizeTypesStandardL8s', 'VirtualMachineSizeTypesStandardL16s', 'VirtualMachineSizeTypesStandardL32s', 'VirtualMachineSizeTypesStandardM64s', 'VirtualMachineSizeTypesStandardM64ms', 'VirtualMachineSizeTypesStandardM128s', 'VirtualMachineSizeTypesStandardM128ms', 'VirtualMachineSizeTypesStandardM6432ms', 'VirtualMachineSizeTypesStandardM6416ms', 'VirtualMachineSizeTypesStandardM12864ms', 'VirtualMachineSizeTypesStandardM12832ms', 'VirtualMachineSizeTypesStandardNC6', 'VirtualMachineSizeTypesStandardNC12', 'VirtualMachineSizeTypesStandardNC24', 'VirtualMachineSizeTypesStandardNC24r', 'VirtualMachineSizeTypesStandardNC6sV2', 'VirtualMachineSizeTypesStandardNC12sV2', 'VirtualMachineSizeTypesStandardNC24sV2', 'VirtualMachineSizeTypesStandardNC24rsV2', 'VirtualMachineSizeTypesStandardNC6sV3', 'VirtualMachineSizeTypesStandardNC12sV3', 'VirtualMachineSizeTypesStandardNC24sV3', 'VirtualMachineSizeTypesStandardNC24rsV3', 'VirtualMachineSizeTypesStandardND6s', 'VirtualMachineSizeTypesStandardND12s', 'VirtualMachineSizeTypesStandardND24s', 'VirtualMachineSizeTypesStandardND24rs', 'VirtualMachineSizeTypesStandardNV6', 'VirtualMachineSizeTypesStandardNV12', 'VirtualMachineSizeTypesStandardNV24' VMSize VirtualMachineSizeTypes `json:"vmSize,omitempty"` + // VMSizeProperties - Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-07-01.

This feature is still in preview mode and is not supported for VirtualMachineScaleSet.

Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details. + VMSizeProperties *VMSizeProperties `json:"vmSizeProperties,omitempty"` } // Image the source user image virtual hard disk. The virtual hard disk will be copied before being @@ -8153,6 +9529,8 @@ type ImageReference struct { Version *string `json:"version,omitempty"` // ExactVersion - READ-ONLY; Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual machine. This readonly field differs from 'version', only if the value specified in 'version' field is 'latest'. ExactVersion *string `json:"exactVersion,omitempty"` + // SharedGalleryImageID - Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call. + SharedGalleryImageID *string `json:"sharedGalleryImageId,omitempty"` // ID - Resource Id ID *string `json:"id,omitempty"` } @@ -8172,6 +9550,9 @@ func (ir ImageReference) MarshalJSON() ([]byte, error) { if ir.Version != nil { objectMap["version"] = ir.Version } + if ir.SharedGalleryImageID != nil { + objectMap["sharedGalleryImageId"] = ir.SharedGalleryImageID + } if ir.ID != nil { objectMap["id"] = ir.ID } @@ -9050,15 +10431,15 @@ func (ovd OperationValueDisplay) MarshalJSON() ([]byte, error) { // OrchestrationServiceStateInput the input for OrchestrationServiceState type OrchestrationServiceStateInput struct { - // ServiceName - The name of the service. - ServiceName *string `json:"serviceName,omitempty"` + // ServiceName - The name of the service. Possible values include: 'OrchestrationServiceNamesAutomaticRepairs' + ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"` // Action - The action to be performed. Possible values include: 'OrchestrationServiceStateActionResume', 'OrchestrationServiceStateActionSuspend' Action OrchestrationServiceStateAction `json:"action,omitempty"` } // OrchestrationServiceSummary summary for an orchestration service of a virtual machine scale set. type OrchestrationServiceSummary struct { - // ServiceName - READ-ONLY; The name of the service. Possible values include: 'OrchestrationServiceNamesAutomaticRepairs' + // ServiceName - READ-ONLY; The name of the service. Possible values include: 'OrchestrationServiceNamesAutomaticRepairs', 'OrchestrationServiceNamesDummyOrchestrationServiceName' ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"` // ServiceState - READ-ONLY; The current state of the service. Possible values include: 'OrchestrationServiceStateNotRunning', 'OrchestrationServiceStateRunning', 'OrchestrationServiceStateSuspended' ServiceState OrchestrationServiceState `json:"serviceState,omitempty"` @@ -9323,7 +10704,7 @@ type OSProfile struct { WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"` // LinuxConfiguration - Specifies the Linux operating system settings on the virtual machine.

For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"` - // Secrets - Specifies set of certificates that should be installed onto the virtual machine. + // Secrets - Specifies set of certificates that should be installed onto the virtual machine. To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). Secrets *[]VaultSecretGroup `json:"secrets,omitempty"` // AllowExtensionOperations - Specifies whether extension operations should be allowed on the virtual machine.

This may only be set to False when no extensions are present on the virtual machine. AllowExtensionOperations *bool `json:"allowExtensionOperations,omitempty"` @@ -9584,6 +10965,77 @@ type PatchSettings struct { AssessmentMode WindowsPatchAssessmentMode `json:"assessmentMode,omitempty"` } +// PirCommunityGalleryResource base information about the community gallery resource in pir. +type PirCommunityGalleryResource struct { + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Location - READ-ONLY; Resource location + Location *string `json:"location,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + *CommunityGalleryIdentifier `json:"identifier,omitempty"` +} + +// MarshalJSON is the custom marshaler for PirCommunityGalleryResource. +func (pcgr PirCommunityGalleryResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pcgr.CommunityGalleryIdentifier != nil { + objectMap["identifier"] = pcgr.CommunityGalleryIdentifier + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PirCommunityGalleryResource struct. +func (pcgr *PirCommunityGalleryResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pcgr.Name = &name + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + pcgr.Location = &location + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pcgr.Type = &typeVar + } + case "identifier": + if v != nil { + var communityGalleryIdentifier CommunityGalleryIdentifier + err = json.Unmarshal(*v, &communityGalleryIdentifier) + if err != nil { + return err + } + pcgr.CommunityGalleryIdentifier = &communityGalleryIdentifier + } + } + } + + return nil +} + // PirResource the Resource model definition. type PirResource struct { // Name - READ-ONLY; Resource name @@ -10393,10 +11845,10 @@ func (pr ProxyResource) MarshalJSON() ([]byte, error) { // PublicIPAddressSku describes the public IP Sku type PublicIPAddressSku struct { - // PublicIPAddressSkuName - Specify public IP sku name. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard' - PublicIPAddressSkuName PublicIPAddressSkuName `json:"publicIPAddressSkuName,omitempty"` - // PublicIPAddressSkuTier - Specify public IP sku tier. Possible values include: 'PublicIPAddressSkuTierRegional', 'PublicIPAddressSkuTierGlobal' - PublicIPAddressSkuTier PublicIPAddressSkuTier `json:"publicIPAddressSkuTier,omitempty"` + // Name - Specify public IP sku name. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard' + Name PublicIPAddressSkuName `json:"name,omitempty"` + // Tier - Specify public IP sku tier. Possible values include: 'PublicIPAddressSkuTierRegional', 'PublicIPAddressSkuTierGlobal' + Tier PublicIPAddressSkuTier `json:"tier,omitempty"` } // PurchasePlan used for establishing the purchase context of any 3rd Party artifact through MarketPlace. @@ -10634,7 +12086,7 @@ func (rsc ResourceSkuCosts) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// ResourceSkuLocationInfo ... +// ResourceSkuLocationInfo describes an available Compute SKU Location Information. type ResourceSkuLocationInfo struct { // Location - READ-ONLY; Location of the SKU Location *string `json:"location,omitempty"` @@ -10642,6 +12094,10 @@ type ResourceSkuLocationInfo struct { Zones *[]string `json:"zones,omitempty"` // ZoneDetails - READ-ONLY; Details of capabilities available to a SKU in specific zones. ZoneDetails *[]ResourceSkuZoneDetails `json:"zoneDetails,omitempty"` + // ExtendedLocations - READ-ONLY; The names of extended locations. + ExtendedLocations *[]string `json:"extendedLocations,omitempty"` + // Type - READ-ONLY; The type of the extended location. Possible values include: 'ExtendedLocationTypeEdgeZone' + Type ExtendedLocationType `json:"type,omitempty"` } // MarshalJSON is the custom marshaler for ResourceSkuLocationInfo. @@ -10650,7 +12106,7 @@ func (rsli ResourceSkuLocationInfo) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// ResourceSkuRestrictionInfo ... +// ResourceSkuRestrictionInfo describes an available Compute SKU Restriction Information. type ResourceSkuRestrictionInfo struct { // Locations - READ-ONLY; Locations where the SKU is restricted Locations *[]string `json:"locations,omitempty"` @@ -11016,17 +12472,8 @@ func NewResourceURIListPage(cur ResourceURIList, getNextPage func(context.Contex // RestorePoint restore Point details. type RestorePoint struct { - autorest.Response `json:"-"` - // SourceMetadata - READ-ONLY; Gets the details of the VM captured at the time of the restore point creation. - SourceMetadata *RestorePointSourceMetadata `json:"sourceMetadata,omitempty"` - // ProvisioningState - READ-ONLY; Gets the provisioning state of the restore point. - ProvisioningState *string `json:"provisioningState,omitempty"` - // ConsistencyMode - READ-ONLY; Gets the consistency mode for the restore point. Please refer to https://aka.ms/RestorePoints for more details. Possible values include: 'ConsistencyModeTypesCrashConsistent', 'ConsistencyModeTypesFileSystemConsistent', 'ConsistencyModeTypesApplicationConsistent' - ConsistencyMode ConsistencyModeTypes `json:"consistencyMode,omitempty"` - // ProvisioningDetails - READ-ONLY; Gets the provisioning details set by the server during Create restore point operation. - ProvisioningDetails *RestorePointProvisioningDetails `json:"provisioningDetails,omitempty"` - // ExcludeDisks - List of disk resource ids that the customer wishes to exclude from the restore point. If no disks are specified, all disks will be included. - ExcludeDisks *[]APIEntityReference `json:"excludeDisks,omitempty"` + autorest.Response `json:"-"` + *RestorePointProperties `json:"properties,omitempty"` // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name @@ -11038,12 +12485,63 @@ type RestorePoint struct { // MarshalJSON is the custom marshaler for RestorePoint. func (rp RestorePoint) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if rp.ExcludeDisks != nil { - objectMap["excludeDisks"] = rp.ExcludeDisks + if rp.RestorePointProperties != nil { + objectMap["properties"] = rp.RestorePointProperties } return json.Marshal(objectMap) } +// UnmarshalJSON is the custom unmarshaler for RestorePoint struct. +func (rp *RestorePoint) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var restorePointProperties RestorePointProperties + err = json.Unmarshal(*v, &restorePointProperties) + if err != nil { + return err + } + rp.RestorePointProperties = &restorePointProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + rp.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + rp.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + rp.Type = &typeVar + } + } + } + + return nil +} + // RestorePointCollection create or update Restore Point collection parameters. type RestorePointCollection struct { autorest.Response `json:"-"` @@ -11431,16 +12929,30 @@ func (rpcu *RestorePointCollectionUpdate) UnmarshalJSON(body []byte) error { return nil } -// RestorePointProvisioningDetails restore Point Provisioning details. -type RestorePointProvisioningDetails struct { - // CreationTime - Gets the creation time of the restore point. - CreationTime *date.Time `json:"creationTime,omitempty"` - // TotalUsedSizeInBytes - Gets the total size of the data in all the disks which are part of the restore point. - TotalUsedSizeInBytes *int64 `json:"totalUsedSizeInBytes,omitempty"` - // StatusCode - Gets the status of the Create restore point operation. - StatusCode *int32 `json:"statusCode,omitempty"` - // StatusMessage - Gets the status message of the Create restore point operation. - StatusMessage *string `json:"statusMessage,omitempty"` +// RestorePointProperties the restore point properties. +type RestorePointProperties struct { + // ExcludeDisks - List of disk resource ids that the customer wishes to exclude from the restore point. If no disks are specified, all disks will be included. + ExcludeDisks *[]APIEntityReference `json:"excludeDisks,omitempty"` + // SourceMetadata - READ-ONLY; Gets the details of the VM captured at the time of the restore point creation. + SourceMetadata *RestorePointSourceMetadata `json:"sourceMetadata,omitempty"` + // ProvisioningState - READ-ONLY; Gets the provisioning state of the restore point. + ProvisioningState *string `json:"provisioningState,omitempty"` + // ConsistencyMode - READ-ONLY; Gets the consistency mode for the restore point. Please refer to https://aka.ms/RestorePoints for more details. Possible values include: 'ConsistencyModeTypesCrashConsistent', 'ConsistencyModeTypesFileSystemConsistent', 'ConsistencyModeTypesApplicationConsistent' + ConsistencyMode ConsistencyModeTypes `json:"consistencyMode,omitempty"` + // TimeCreated - Gets the creation time of the restore point. + TimeCreated *date.Time `json:"timeCreated,omitempty"` +} + +// MarshalJSON is the custom marshaler for RestorePointProperties. +func (rpp RestorePointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rpp.ExcludeDisks != nil { + objectMap["excludeDisks"] = rpp.ExcludeDisks + } + if rpp.TimeCreated != nil { + objectMap["timeCreated"] = rpp.TimeCreated + } + return json.Marshal(objectMap) } // RestorePointsCreateFuture an abstraction for monitoring and retrieving the results of a long-running @@ -11541,6 +13053,8 @@ type RestorePointSourceMetadata struct { VMID *string `json:"vmId,omitempty"` // SecurityProfile - Gets the security profile. SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"` + // Location - Location of the VM from which the restore point was created. + Location *string `json:"location,omitempty"` } // RestorePointSourceVMDataDisk describes a data disk. @@ -12249,6 +13763,8 @@ type RunCommandResult struct { type ScaleInPolicy struct { // Rules - The rules to be followed when scaling-in a virtual machine scale set.

Possible values are:

**Default** When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal scale set. Then, it will be balanced across Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in.

**OldestVM** When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will be chosen for removal.

**NewestVM** When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will be chosen for removal.

Rules *[]VirtualMachineScaleSetScaleInRules `json:"rules,omitempty"` + // ForceDeletion - This property allows you to specify if virtual machines chosen for removal have to be force deleted when a virtual machine scale set is being scaled-in.(Feature in Preview) + ForceDeletion *bool `json:"forceDeletion,omitempty"` } // ScheduledEventsProfile ... @@ -13354,13 +14870,15 @@ type SnapshotProperties struct { HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"` // PurchasePlan - Purchase plan information for the image from which the source disk for the snapshot was originally created. PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"` + // SupportedCapabilities - List of supported capabilities (like Accelerated Networking) for the image from which the source disk from the snapshot was originally created. + SupportedCapabilities *SupportedCapabilities `json:"supportedCapabilities,omitempty"` // CreationData - Disk source information. CreationData information cannot be changed after the disk has been created. CreationData *CreationData `json:"creationData,omitempty"` // DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` // DiskSizeBytes - READ-ONLY; The size of the disk in bytes. This field is read only. DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty"` - // DiskState - The state of the snapshot. Possible values include: 'DiskStateUnattached', 'DiskStateAttached', 'DiskStateReserved', 'DiskStateActiveSAS', 'DiskStateReadyToUpload', 'DiskStateActiveUpload' + // DiskState - The state of the snapshot. Possible values include: 'DiskStateUnattached', 'DiskStateAttached', 'DiskStateReserved', 'DiskStateFrozen', 'DiskStateActiveSAS', 'DiskStateActiveSASFrozen', 'DiskStateReadyToUpload', 'DiskStateActiveUpload' DiskState DiskState `json:"diskState,omitempty"` // UniqueID - READ-ONLY; Unique Guid identifying the resource. UniqueID *string `json:"uniqueId,omitempty"` @@ -13376,8 +14894,14 @@ type SnapshotProperties struct { NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"` // DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks. DiskAccessID *string `json:"diskAccessId,omitempty"` + // SecurityProfile - Contains the security related information for the resource. + SecurityProfile *DiskSecurityProfile `json:"securityProfile,omitempty"` // SupportsHibernation - Indicates the OS on a snapshot supports hibernation. SupportsHibernation *bool `json:"supportsHibernation,omitempty"` + // PublicNetworkAccess - Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled' + PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + // CompletionPercent - Percentage complete for the background copy when a resource is created via the CopyStart operation. + CompletionPercent *float64 `json:"completionPercent,omitempty"` } // MarshalJSON is the custom marshaler for SnapshotProperties. @@ -13392,6 +14916,9 @@ func (sp SnapshotProperties) MarshalJSON() ([]byte, error) { if sp.PurchasePlan != nil { objectMap["purchasePlan"] = sp.PurchasePlan } + if sp.SupportedCapabilities != nil { + objectMap["supportedCapabilities"] = sp.SupportedCapabilities + } if sp.CreationData != nil { objectMap["creationData"] = sp.CreationData } @@ -13416,9 +14943,18 @@ func (sp SnapshotProperties) MarshalJSON() ([]byte, error) { if sp.DiskAccessID != nil { objectMap["diskAccessId"] = sp.DiskAccessID } + if sp.SecurityProfile != nil { + objectMap["securityProfile"] = sp.SecurityProfile + } if sp.SupportsHibernation != nil { objectMap["supportsHibernation"] = sp.SupportsHibernation } + if sp.PublicNetworkAccess != "" { + objectMap["publicNetworkAccess"] = sp.PublicNetworkAccess + } + if sp.CompletionPercent != nil { + objectMap["completionPercent"] = sp.CompletionPercent + } return json.Marshal(objectMap) } @@ -13725,6 +15261,16 @@ type SnapshotUpdateProperties struct { DiskAccessID *string `json:"diskAccessId,omitempty"` // SupportsHibernation - Indicates the OS on a snapshot supports hibernation. SupportsHibernation *bool `json:"supportsHibernation,omitempty"` + // PublicNetworkAccess - Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled' + PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"` + // SupportedCapabilities - List of supported capabilities (like accelerated networking) for the image from which the OS disk was created. + SupportedCapabilities *SupportedCapabilities `json:"supportedCapabilities,omitempty"` +} + +// SoftDeletePolicy contains information about the soft deletion policy of the gallery. +type SoftDeletePolicy struct { + // IsSoftDeleteEnabled - Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time. + IsSoftDeleteEnabled *bool `json:"isSoftDeleteEnabled,omitempty"` } // SourceVault the vault id is an Azure Resource Manager Resource id in the form @@ -13734,6 +15280,16 @@ type SourceVault struct { ID *string `json:"id,omitempty"` } +// SpotRestorePolicy specifies the Spot-Try-Restore properties for the virtual machine scale set.

+// With this property customer can enable or disable automatic restore of the evicted Spot VMSS VM +// instances opportunistically based on capacity availability and pricing constraint. +type SpotRestorePolicy struct { + // Enabled - Enables the Spot-Try-Restore feature where evicted VMSS SPOT instances will be tried to be restored opportunistically based on capacity availability and pricing constraints + Enabled *bool `json:"enabled,omitempty"` + // RestoreTimeout - Timeout value expressed as an ISO 8601 time duration after which the platform will not try to restore the VMSS SPOT instances + RestoreTimeout *string `json:"restoreTimeout,omitempty"` +} + // SSHConfiguration SSH configuration for Linux based VMs running on Azure type SSHConfiguration struct { // PublicKeys - The list of SSH public keys used to authenticate with linux based VMs. @@ -14130,6 +15686,13 @@ type SubResourceWithColocationStatus struct { ID *string `json:"id,omitempty"` } +// SupportedCapabilities list of supported capabilities (like accelerated networking) persisted on the disk +// resource for VM use. +type SupportedCapabilities struct { + // AcceleratedNetwork - True if the image from which the OS disk is created supports accelerated networking. + AcceleratedNetwork *bool `json:"acceleratedNetwork,omitempty"` +} + // TargetRegion describes the target region information. type TargetRegion struct { // Name - The name of the region. @@ -14492,7 +16055,7 @@ type UserArtifactSource struct { // VaultCertificate describes a single certificate reference in a Key Vault, and where the certificate // should reside on the VM. type VaultCertificate struct { - // CertificateURL - This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:

{
"data":"",
"dataType":"pfx",
"password":""
} + // CertificateURL - This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:

{
"data":"",
"dataType":"pfx",
"password":""
}
To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). CertificateURL *string `json:"certificateUrl,omitempty"` // CertificateStore - For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account.

For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for private key. Both of these files are .pem formatted. CertificateStore *string `json:"certificateStore,omitempty"` @@ -15010,6 +16573,8 @@ type VirtualMachineExtensionProperties struct { ProvisioningState *string `json:"provisioningState,omitempty"` // InstanceView - The virtual machine extension instance view. InstanceView *VirtualMachineExtensionInstanceView `json:"instanceView,omitempty"` + // SuppressFailures - Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false. + SuppressFailures *bool `json:"suppressFailures,omitempty"` } // MarshalJSON is the custom marshaler for VirtualMachineExtensionProperties. @@ -15042,6 +16607,9 @@ func (vmep VirtualMachineExtensionProperties) MarshalJSON() ([]byte, error) { if vmep.InstanceView != nil { objectMap["instanceView"] = vmep.InstanceView } + if vmep.SuppressFailures != nil { + objectMap["suppressFailures"] = vmep.SuppressFailures + } return json.Marshal(objectMap) } @@ -15245,6 +16813,8 @@ type VirtualMachineExtensionUpdateProperties struct { Settings interface{} `json:"settings,omitempty"` // ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. ProtectedSettings interface{} `json:"protectedSettings,omitempty"` + // SuppressFailures - Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false. + SuppressFailures *bool `json:"suppressFailures,omitempty"` } // VirtualMachineHealthStatus the health status of the VM. @@ -15985,6 +17555,10 @@ type VirtualMachineProperties struct { ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"` // UserData - UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.

Minimum api-version: 2021-03-01 UserData *string `json:"userData,omitempty"` + // CapacityReservation - Specifies information about the capacity reservation that is used to allocate virtual machine.

Minimum api-version: 2021-04-01. + CapacityReservation *CapacityReservationProfile `json:"capacityReservation,omitempty"` + // ApplicationProfile - Specifies the gallery applications that should be made available to the VM/VMSS + ApplicationProfile *ApplicationProfile `json:"applicationProfile,omitempty"` } // MarshalJSON is the custom marshaler for VirtualMachineProperties. @@ -16050,6 +17624,12 @@ func (vmp VirtualMachineProperties) MarshalJSON() ([]byte, error) { if vmp.UserData != nil { objectMap["userData"] = vmp.UserData } + if vmp.CapacityReservation != nil { + objectMap["capacityReservation"] = vmp.CapacityReservation + } + if vmp.ApplicationProfile != nil { + objectMap["applicationProfile"] = vmp.ApplicationProfile + } return json.Marshal(objectMap) } @@ -17177,6 +18757,8 @@ type VirtualMachineScaleSetExtensionProperties struct { ProvisioningState *string `json:"provisioningState,omitempty"` // ProvisionAfterExtensions - Collection of extension names after which this extension needs to be provisioned. ProvisionAfterExtensions *[]string `json:"provisionAfterExtensions,omitempty"` + // SuppressFailures - Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false. + SuppressFailures *bool `json:"suppressFailures,omitempty"` } // MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtensionProperties. @@ -17209,6 +18791,9 @@ func (vmssep VirtualMachineScaleSetExtensionProperties) MarshalJSON() ([]byte, e if vmssep.ProvisionAfterExtensions != nil { objectMap["provisionAfterExtensions"] = vmssep.ProvisionAfterExtensions } + if vmssep.SuppressFailures != nil { + objectMap["suppressFailures"] = vmssep.SuppressFailures + } return json.Marshal(objectMap) } @@ -18368,7 +19953,7 @@ type VirtualMachineScaleSetOSProfile struct { WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"` // LinuxConfiguration - Specifies the Linux operating system settings on the virtual machine.

For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"` - // Secrets - Specifies set of certificates that should be installed onto the virtual machines in the scale set. + // Secrets - Specifies set of certificates that should be installed onto the virtual machines in the scale set. To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). Secrets *[]VaultSecretGroup `json:"secrets,omitempty"` } @@ -18390,7 +19975,7 @@ type VirtualMachineScaleSetProperties struct { UniqueID *string `json:"uniqueId,omitempty"` // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true. SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"` - // ZoneBalance - Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. + // ZoneBalance - Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. zoneBalance property can only be set if the zones property of the scale set contains more than one zone. If there are no zones or only one zone specified, then zoneBalance property should not be set. ZoneBalance *bool `json:"zoneBalance,omitempty"` // PlatformFaultDomainCount - Fault Domain count for each placement group. PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"` @@ -18400,10 +19985,12 @@ type VirtualMachineScaleSetProperties struct { HostGroup *SubResource `json:"hostGroup,omitempty"` // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type. AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` - // ScaleInPolicy - Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in. + // ScaleInPolicy - Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set. ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"` // OrchestrationMode - Specifies the orchestration mode for the virtual machine scale set. Possible values include: 'OrchestrationModeUniform', 'OrchestrationModeFlexible' OrchestrationMode OrchestrationMode `json:"orchestrationMode,omitempty"` + // SpotRestorePolicy - Specifies the Spot Restore properties for the virtual machine scale set. + SpotRestorePolicy *SpotRestorePolicy `json:"spotRestorePolicy,omitempty"` } // MarshalJSON is the custom marshaler for VirtualMachineScaleSetProperties. @@ -18448,6 +20035,9 @@ func (vmssp VirtualMachineScaleSetProperties) MarshalJSON() ([]byte, error) { if vmssp.OrchestrationMode != "" { objectMap["orchestrationMode"] = vmssp.OrchestrationMode } + if vmssp.SpotRestorePolicy != nil { + objectMap["spotRestorePolicy"] = vmssp.SpotRestorePolicy + } return json.Marshal(objectMap) } @@ -19561,7 +21151,7 @@ type VirtualMachineScaleSetUpdateProperties struct { SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"` // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type. AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"` - // ScaleInPolicy - Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in. + // ScaleInPolicy - Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set. ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"` // ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.

Minimum api-version: 2018-04-01. ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"` @@ -20383,6 +21973,10 @@ type VirtualMachineScaleSetVMProfile struct { ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"` // UserData - UserData for the virtual machines in the scale set, which must be base-64 encoded. Customer should not pass any secrets in here.

Minimum api-version: 2021-03-01 UserData *string `json:"userData,omitempty"` + // CapacityReservation - Specifies the capacity reservation related details of a scale set.

Minimum api-version: 2021-04-01. + CapacityReservation *CapacityReservationProfile `json:"capacityReservation,omitempty"` + // ApplicationProfile - Specifies the gallery applications that should be made available to the VM/VMSS + ApplicationProfile *ApplicationProfile `json:"applicationProfile,omitempty"` } // VirtualMachineScaleSetVMProperties describes the properties of a virtual machine scale set virtual @@ -21769,12 +23363,33 @@ func (vmu *VirtualMachineUpdate) UnmarshalJSON(body []byte) error { return nil } +// VMGalleryApplication specifies the required information to reference a compute gallery application +// version +type VMGalleryApplication struct { + // Tags - Optional, Specifies a passthrough value for more generic context. + Tags *string `json:"tags,omitempty"` + // Order - Optional, Specifies the order in which the packages have to be installed + Order *int32 `json:"order,omitempty"` + // PackageReferenceID - Specifies the GalleryApplicationVersion resource id on the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version} + PackageReferenceID *string `json:"packageReferenceId,omitempty"` + // ConfigurationReference - Optional, Specifies the uri to an azure blob that will replace the default configuration for the package if provided + ConfigurationReference *string `json:"configurationReference,omitempty"` +} + // VMScaleSetConvertToSinglePlacementGroupInput ... type VMScaleSetConvertToSinglePlacementGroupInput struct { // ActivePlacementGroupID - Id of the placement group in which you want future virtual machine instances to be placed. To query placement group Id, please use Virtual Machine Scale Set VMs - Get API. If not provided, the platform will choose one with maximum number of virtual machine instances. ActivePlacementGroupID *string `json:"activePlacementGroupId,omitempty"` } +// VMSizeProperties specifies VM Size Property settings on the virtual machine. +type VMSizeProperties struct { + // VCPUsAvailable - Specifies the number of vCPUs available for the VM.

When this property is not specified in the request body the default behavior is to set it to the value of vCPUs available for that VM size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list) . + VCPUsAvailable *int32 `json:"vCPUsAvailable,omitempty"` + // VCPUsPerCore - Specifies the vCPU to physical core ratio.

When this property is not specified in the request body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list)

Setting this property to 1 also means that hyper-threading is disabled. + VCPUsPerCore *int32 `json:"vCPUsPerCore,omitempty"` +} + // WindowsConfiguration specifies Windows operating system settings on the virtual machine. type WindowsConfiguration struct { // ProvisionVMAgent - Indicates whether virtual machine agent should be provisioned on the virtual machine.

When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. @@ -21815,6 +23430,6 @@ type WinRMConfiguration struct { type WinRMListener struct { // Protocol - Specifies the protocol of WinRM listener.

Possible values are:
**http**

**https**. Possible values include: 'ProtocolTypesHTTP', 'ProtocolTypesHTTPS' Protocol ProtocolTypes `json:"protocol,omitempty"` - // CertificateURL - This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:

{
"data":"",
"dataType":"pfx",
"password":""
} + // CertificateURL - This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:

{
"data":"",
"dataType":"pfx",
"password":""
}
To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). CertificateURL *string `json:"certificateUrl,omitempty"` } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/operations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/operations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/operations.go index 70c3607cd742a..b76ee91bfdf0b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/operations.go @@ -66,7 +66,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe // ListPreparer prepares the List request. func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/proximityplacementgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/proximityplacementgroups.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/proximityplacementgroups.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/proximityplacementgroups.go index 931976c7a4dd9..8144933b91db2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/proximityplacementgroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/proximityplacementgroups.go @@ -77,7 +77,7 @@ func (client ProximityPlacementGroupsClient) CreateOrUpdatePreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -155,7 +155,7 @@ func (client ProximityPlacementGroupsClient) DeletePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -232,7 +232,7 @@ func (client ProximityPlacementGroupsClient) GetPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -314,7 +314,7 @@ func (client ProximityPlacementGroupsClient) ListByResourceGroupPreparer(ctx con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -427,7 +427,7 @@ func (client ProximityPlacementGroupsClient) ListBySubscriptionPreparer(ctx cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -541,7 +541,7 @@ func (client ProximityPlacementGroupsClient) UpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/resourceskus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/resourceskus.go similarity index 88% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/resourceskus.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/resourceskus.go index 9c967d93aa8d9..35266973811b8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/resourceskus.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/resourceskus.go @@ -33,7 +33,8 @@ func NewResourceSkusClientWithBaseURI(baseURI string, subscriptionID string) Res // List gets the list of Microsoft.Compute SKUs available for your Subscription. // Parameters: // filter - the filter to apply on the operation. Only **location** filter is supported currently. -func (client ResourceSkusClient) List(ctx context.Context, filter string) (result ResourceSkusResultPage, err error) { +// includeExtendedLocations - to Include Extended Locations information or not in the response. +func (client ResourceSkusClient) List(ctx context.Context, filter string, includeExtendedLocations string) (result ResourceSkusResultPage, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusClient.List") defer func() { @@ -45,7 +46,7 @@ func (client ResourceSkusClient) List(ctx context.Context, filter string) (resul }() } result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, filter) + req, err := client.ListPreparer(ctx, filter, includeExtendedLocations) if err != nil { err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", nil, "Failure preparing request") return @@ -72,18 +73,21 @@ func (client ResourceSkusClient) List(ctx context.Context, filter string) (resul } // ListPreparer prepares the List request. -func (client ResourceSkusClient) ListPreparer(ctx context.Context, filter string) (*http.Request, error) { +func (client ResourceSkusClient) ListPreparer(ctx context.Context, filter string, includeExtendedLocations string) (*http.Request, error) { pathParameters := map[string]interface{}{ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-04-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } if len(filter) > 0 { queryParameters["$filter"] = autorest.Encode("query", filter) } + if len(includeExtendedLocations) > 0 { + queryParameters["includeExtendedLocations"] = autorest.Encode("query", includeExtendedLocations) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -133,7 +137,7 @@ func (client ResourceSkusClient) listNextResults(ctx context.Context, lastResult } // ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ResourceSkusClient) ListComplete(ctx context.Context, filter string) (result ResourceSkusResultIterator, err error) { +func (client ResourceSkusClient) ListComplete(ctx context.Context, filter string, includeExtendedLocations string) (result ResourceSkusResultIterator, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusClient.List") defer func() { @@ -144,6 +148,6 @@ func (client ResourceSkusClient) ListComplete(ctx context.Context, filter string tracing.EndSpan(ctx, sc, err) }() } - result.page, err = client.List(ctx, filter) + result.page, err = client.List(ctx, filter, includeExtendedLocations) return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/restorepointcollections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/restorepointcollections.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/restorepointcollections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/restorepointcollections.go index 20c8873ffc5f8..ea9d27484ceff 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/restorepointcollections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/restorepointcollections.go @@ -78,7 +78,7 @@ func (client RestorePointCollectionsClient) CreateOrUpdatePreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -150,7 +150,7 @@ func (client RestorePointCollectionsClient) DeletePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -237,7 +237,7 @@ func (client RestorePointCollectionsClient) GetPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -319,7 +319,7 @@ func (client RestorePointCollectionsClient) ListPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -434,7 +434,7 @@ func (client RestorePointCollectionsClient) ListAllPreparer(ctx context.Context) "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -548,7 +548,7 @@ func (client RestorePointCollectionsClient) UpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/restorepoints.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/restorepoints.go similarity index 85% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/restorepoints.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/restorepoints.go index 113cdc7cf074c..ad79c4b0eec5d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/restorepoints.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/restorepoints.go @@ -50,18 +50,20 @@ func (client RestorePointsClient) Create(ctx context.Context, resourceGroupName } if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.SourceMetadata", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.SourceMetadata.StorageProfile", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.SourceMetadata.StorageProfile.OsDisk", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SecretURL", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, + Constraints: []validation.Constraint{{Target: "parameters.RestorePointProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.RestorePointProperties.SourceMetadata", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SecretURL", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, }}, + {Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}, }}, }}, }}, @@ -93,15 +95,11 @@ func (client RestorePointsClient) CreatePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } - parameters.SourceMetadata = nil - parameters.ProvisioningState = nil - parameters.ConsistencyMode = "" - parameters.ProvisioningDetails = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -180,7 +178,7 @@ func (client RestorePointsClient) DeletePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -267,7 +265,7 @@ func (client RestorePointsClient) GetPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/sharedgalleries.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/sharedgalleries.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/sharedgalleries.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/sharedgalleries.go index 52d38b527ec4c..261ed0770ac0b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/sharedgalleries.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/sharedgalleries.go @@ -75,7 +75,7 @@ func (client SharedGalleriesClient) GetPreparer(ctx context.Context, location st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -155,7 +155,7 @@ func (client SharedGalleriesClient) ListPreparer(ctx context.Context, location s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/sharedgalleryimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/sharedgalleryimages.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/sharedgalleryimages.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/sharedgalleryimages.go index a5e82d4ac3fc5..5378b4f89811d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/sharedgalleryimages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/sharedgalleryimages.go @@ -79,7 +79,7 @@ func (client SharedGalleryImagesClient) GetPreparer(ctx context.Context, locatio "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -161,7 +161,7 @@ func (client SharedGalleryImagesClient) ListPreparer(ctx context.Context, locati "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/sharedgalleryimageversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/sharedgalleryimageversions.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/sharedgalleryimageversions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/sharedgalleryimageversions.go index f16f48c20b021..325d3f48b3e9c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/sharedgalleryimageversions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/sharedgalleryimageversions.go @@ -83,7 +83,7 @@ func (client SharedGalleryImageVersionsClient) GetPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -168,7 +168,7 @@ func (client SharedGalleryImageVersionsClient) ListPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-09-30" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/snapshots.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/snapshots.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/snapshots.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/snapshots.go index a33f868410540..1dc49461accb4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/snapshots.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/snapshots.go @@ -35,7 +35,8 @@ func NewSnapshotsClientWithBaseURI(baseURI string, subscriptionID string) Snapsh // Parameters: // resourceGroupName - the name of the resource group. // snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot -// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. +// is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 +// characters. // snapshot - snapshot object supplied in the body of the Put disk operation. func (client SnapshotsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, snapshotName string, snapshot Snapshot) (result SnapshotsCreateOrUpdateFuture, err error) { if tracing.IsEnabled() { @@ -91,7 +92,7 @@ func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -139,7 +140,8 @@ func (client SnapshotsClient) CreateOrUpdateResponder(resp *http.Response) (resu // Parameters: // resourceGroupName - the name of the resource group. // snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot -// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. +// is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 +// characters. func (client SnapshotsClient) Delete(ctx context.Context, resourceGroupName string, snapshotName string) (result SnapshotsDeleteFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.Delete") @@ -174,7 +176,7 @@ func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -218,7 +220,8 @@ func (client SnapshotsClient) DeleteResponder(resp *http.Response) (result autor // Parameters: // resourceGroupName - the name of the resource group. // snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot -// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. +// is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 +// characters. func (client SnapshotsClient) Get(ctx context.Context, resourceGroupName string, snapshotName string) (result Snapshot, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.Get") @@ -260,7 +263,7 @@ func (client SnapshotsClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -295,7 +298,8 @@ func (client SnapshotsClient) GetResponder(resp *http.Response) (result Snapshot // Parameters: // resourceGroupName - the name of the resource group. // snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot -// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. +// is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 +// characters. // grantAccessData - access data object supplied in the body of the get snapshot access operation. func (client SnapshotsClient) GrantAccess(ctx context.Context, resourceGroupName string, snapshotName string, grantAccessData GrantAccessData) (result SnapshotsGrantAccessFuture, err error) { if tracing.IsEnabled() { @@ -337,7 +341,7 @@ func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -425,7 +429,7 @@ func (client SnapshotsClient) ListPreparer(ctx context.Context) (*http.Request, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -541,7 +545,7 @@ func (client SnapshotsClient) ListByResourceGroupPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -613,7 +617,8 @@ func (client SnapshotsClient) ListByResourceGroupComplete(ctx context.Context, r // Parameters: // resourceGroupName - the name of the resource group. // snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot -// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. +// is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 +// characters. func (client SnapshotsClient) RevokeAccess(ctx context.Context, resourceGroupName string, snapshotName string) (result SnapshotsRevokeAccessFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.RevokeAccess") @@ -648,7 +653,7 @@ func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -692,7 +697,8 @@ func (client SnapshotsClient) RevokeAccessResponder(resp *http.Response) (result // Parameters: // resourceGroupName - the name of the resource group. // snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot -// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. +// is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 +// characters. // snapshot - snapshot object supplied in the body of the Patch snapshot operation. func (client SnapshotsClient) Update(ctx context.Context, resourceGroupName string, snapshotName string, snapshot SnapshotUpdate) (result SnapshotsUpdateFuture, err error) { if tracing.IsEnabled() { @@ -728,7 +734,7 @@ func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-12-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/sshpublickeys.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/sshpublickeys.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/sshpublickeys.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/sshpublickeys.go index 7d6e7981cf83a..896ec1f1edbff 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/sshpublickeys.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/sshpublickeys.go @@ -76,7 +76,7 @@ func (client SSHPublicKeysClient) CreatePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -154,7 +154,7 @@ func (client SSHPublicKeysClient) DeletePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -231,7 +231,7 @@ func (client SSHPublicKeysClient) GenerateKeyPairPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -307,7 +307,7 @@ func (client SSHPublicKeysClient) GetPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -387,7 +387,7 @@ func (client SSHPublicKeysClient) ListByResourceGroupPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -501,7 +501,7 @@ func (client SSHPublicKeysClient) ListBySubscriptionPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -615,7 +615,7 @@ func (client SSHPublicKeysClient) UpdatePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/usage.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/usage.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/usage.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/usage.go index f45a71a709e41..ab20765aebf99 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/usage.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/usage.go @@ -86,7 +86,7 @@ func (client UsageClient) ListPreparer(ctx context.Context, location string) (*h "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/version.go similarity index 90% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/version.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/version.go index f926067754d1b..b70229606e644 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/version.go @@ -10,7 +10,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + Version() + " compute/2021-03-01" + return "Azure-SDK-For-Go/" + Version() + " compute/2021-08-01" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachineextensionimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachineextensionimages.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachineextensionimages.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachineextensionimages.go index 366ddb1cc5a65..e359238e21cb3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachineextensionimages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachineextensionimages.go @@ -77,7 +77,7 @@ func (client VirtualMachineExtensionImagesClient) GetPreparer(ctx context.Contex "version": autorest.Encode("path", version), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -152,7 +152,7 @@ func (client VirtualMachineExtensionImagesClient) ListTypesPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -229,7 +229,7 @@ func (client VirtualMachineExtensionImagesClient) ListVersionsPreparer(ctx conte "type": autorest.Encode("path", typeParameter), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachineextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachineextensions.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachineextensions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachineextensions.go index d4c5d7a7cd57b..a73c28d027255 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachineextensions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachineextensions.go @@ -72,7 +72,7 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context. "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -155,7 +155,7 @@ func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context, "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -243,7 +243,7 @@ func (client VirtualMachineExtensionsClient) GetPreparer(ctx context.Context, re "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -323,7 +323,7 @@ func (client VirtualMachineExtensionsClient) ListPreparer(ctx context.Context, r "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -398,7 +398,7 @@ func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context, "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachineimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachineimages.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachineimages.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachineimages.go index 1a0b1ffa4c7fb..95b6c52e34afd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachineimages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachineimages.go @@ -82,7 +82,7 @@ func (client VirtualMachineImagesClient) GetPreparer(ctx context.Context, locati "version": autorest.Encode("path", version), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -163,7 +163,7 @@ func (client VirtualMachineImagesClient) ListPreparer(ctx context.Context, locat "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -248,7 +248,7 @@ func (client VirtualMachineImagesClient) ListOffersPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -322,7 +322,7 @@ func (client VirtualMachineImagesClient) ListPublishersPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -400,7 +400,7 @@ func (client VirtualMachineImagesClient) ListSkusPreparer(ctx context.Context, l "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachineimagesedgezone.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachineimagesedgezone.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachineimagesedgezone.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachineimagesedgezone.go index 85c55adad1b33..8fb48bf680d2e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachineimagesedgezone.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachineimagesedgezone.go @@ -84,7 +84,7 @@ func (client VirtualMachineImagesEdgeZoneClient) GetPreparer(ctx context.Context "version": autorest.Encode("path", version), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -170,7 +170,7 @@ func (client VirtualMachineImagesEdgeZoneClient) ListPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -257,7 +257,7 @@ func (client VirtualMachineImagesEdgeZoneClient) ListOffersPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -333,7 +333,7 @@ func (client VirtualMachineImagesEdgeZoneClient) ListPublishersPreparer(ctx cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -413,7 +413,7 @@ func (client VirtualMachineImagesEdgeZoneClient) ListSkusPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachineruncommands.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachineruncommands.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachineruncommands.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachineruncommands.go index de8ca546d911d..5a2f07fafb75e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachineruncommands.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachineruncommands.go @@ -73,7 +73,7 @@ func (client VirtualMachineRunCommandsClient) CreateOrUpdatePreparer(ctx context "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -156,7 +156,7 @@ func (client VirtualMachineRunCommandsClient) DeletePreparer(ctx context.Context "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -247,7 +247,7 @@ func (client VirtualMachineRunCommandsClient) GetPreparer(ctx context.Context, l "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -326,7 +326,7 @@ func (client VirtualMachineRunCommandsClient) GetByVirtualMachinePreparer(ctx co "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -414,7 +414,7 @@ func (client VirtualMachineRunCommandsClient) ListPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -533,7 +533,7 @@ func (client VirtualMachineRunCommandsClient) ListByVirtualMachinePreparer(ctx c "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -645,7 +645,7 @@ func (client VirtualMachineRunCommandsClient) UpdatePreparer(ctx context.Context "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachines.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachines.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachines.go index 23b3744fbea17..d1d62c748fc3e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachines.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachines.go @@ -69,7 +69,7 @@ func (client VirtualMachinesClient) AssessPatchesPreparer(ctx context.Context, r "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -158,7 +158,7 @@ func (client VirtualMachinesClient) CapturePreparer(ctx context.Context, resourc "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -240,7 +240,7 @@ func (client VirtualMachinesClient) ConvertToManagedDisksPreparer(ctx context.Co "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -341,7 +341,7 @@ func (client VirtualMachinesClient) CreateOrUpdatePreparer(ctx context.Context, "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -390,7 +390,8 @@ func (client VirtualMachinesClient) CreateOrUpdateResponder(resp *http.Response) // Parameters: // resourceGroupName - the name of the resource group. // VMName - the name of the virtual machine. -func (client VirtualMachinesClient) Deallocate(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesDeallocateFuture, err error) { +// hibernate - optional parameter to hibernate a virtual machine. (Feature in Preview) +func (client VirtualMachinesClient) Deallocate(ctx context.Context, resourceGroupName string, VMName string, hibernate *bool) (result VirtualMachinesDeallocateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Deallocate") defer func() { @@ -401,7 +402,7 @@ func (client VirtualMachinesClient) Deallocate(ctx context.Context, resourceGrou tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeallocatePreparer(ctx, resourceGroupName, VMName) + req, err := client.DeallocatePreparer(ctx, resourceGroupName, VMName, hibernate) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Deallocate", nil, "Failure preparing request") return @@ -417,17 +418,20 @@ func (client VirtualMachinesClient) Deallocate(ctx context.Context, resourceGrou } // DeallocatePreparer prepares the Deallocate request. -func (client VirtualMachinesClient) DeallocatePreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) { +func (client VirtualMachinesClient) DeallocatePreparer(ctx context.Context, resourceGroupName string, VMName string, hibernate *bool) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if hibernate != nil { + queryParameters["hibernate"] = autorest.Encode("query", *hibernate) + } preparer := autorest.CreatePreparer( autorest.AsPost(), @@ -468,7 +472,7 @@ func (client VirtualMachinesClient) DeallocateResponder(resp *http.Response) (re // Parameters: // resourceGroupName - the name of the resource group. // VMName - the name of the virtual machine. -// forceDeletion - optional parameter to force delete virtual machines.(Feature in Preview) +// forceDeletion - optional parameter to force delete virtual machines. func (client VirtualMachinesClient) Delete(ctx context.Context, resourceGroupName string, VMName string, forceDeletion *bool) (result VirtualMachinesDeleteFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Delete") @@ -503,7 +507,7 @@ func (client VirtualMachinesClient) DeletePreparer(ctx context.Context, resource "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -595,7 +599,7 @@ func (client VirtualMachinesClient) GeneralizePreparer(ctx context.Context, reso "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -674,7 +678,7 @@ func (client VirtualMachinesClient) GetPreparer(ctx context.Context, resourceGro "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -724,12 +728,6 @@ func (client VirtualMachinesClient) InstallPatches(ctx context.Context, resource tracing.EndSpan(ctx, sc, err) }() } - if err := validation.Validate([]validation.Validation{ - {TargetValue: installPatchesInput, - Constraints: []validation.Constraint{{Target: "installPatchesInput.MaximumDuration", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("compute.VirtualMachinesClient", "InstallPatches", err.Error()) - } - req, err := client.InstallPatchesPreparer(ctx, resourceGroupName, VMName, installPatchesInput) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "InstallPatches", nil, "Failure preparing request") @@ -753,7 +751,7 @@ func (client VirtualMachinesClient) InstallPatchesPreparer(ctx context.Context, "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -841,7 +839,7 @@ func (client VirtualMachinesClient) InstanceViewPreparer(ctx context.Context, re "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -921,7 +919,7 @@ func (client VirtualMachinesClient) ListPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1037,7 +1035,7 @@ func (client VirtualMachinesClient) ListAllPreparer(ctx context.Context, statusO "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1153,7 +1151,7 @@ func (client VirtualMachinesClient) ListAvailableSizesPreparer(ctx context.Conte "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1238,7 +1236,7 @@ func (client VirtualMachinesClient) ListByLocationPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1344,7 +1342,7 @@ func (client VirtualMachinesClient) PerformMaintenancePreparer(ctx context.Conte "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1426,7 +1424,7 @@ func (client VirtualMachinesClient) PowerOffPreparer(ctx context.Context, resour "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1509,7 +1507,7 @@ func (client VirtualMachinesClient) ReapplyPreparer(ctx context.Context, resourc "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1587,7 +1585,7 @@ func (client VirtualMachinesClient) RedeployPreparer(ctx context.Context, resour "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1666,7 +1664,7 @@ func (client VirtualMachinesClient) ReimagePreparer(ctx context.Context, resourc "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1749,7 +1747,7 @@ func (client VirtualMachinesClient) RestartPreparer(ctx context.Context, resourc "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1837,7 +1835,7 @@ func (client VirtualMachinesClient) RetrieveBootDiagnosticsDataPreparer(ctx cont "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1916,7 +1914,7 @@ func (client VirtualMachinesClient) RunCommandPreparer(ctx context.Context, reso "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2004,7 +2002,7 @@ func (client VirtualMachinesClient) SimulateEvictionPreparer(ctx context.Context "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2072,7 +2070,7 @@ func (client VirtualMachinesClient) StartPreparer(ctx context.Context, resourceG "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2151,7 +2149,7 @@ func (client VirtualMachinesClient) UpdatePreparer(ctx context.Context, resource "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachinescalesetextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachinescalesetextensions.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachinescalesetextensions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachinescalesetextensions.go index 20990fa32c3cd..9e71f3ba91002 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachinescalesetextensions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachinescalesetextensions.go @@ -72,7 +72,7 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(ctx "vmssExtensionName": autorest.Encode("path", vmssExtensionName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -156,7 +156,7 @@ func (client VirtualMachineScaleSetExtensionsClient) DeletePreparer(ctx context. "vmssExtensionName": autorest.Encode("path", vmssExtensionName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -244,7 +244,7 @@ func (client VirtualMachineScaleSetExtensionsClient) GetPreparer(ctx context.Con "vmssExtensionName": autorest.Encode("path", vmssExtensionName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -328,7 +328,7 @@ func (client VirtualMachineScaleSetExtensionsClient) ListPreparer(ctx context.Co "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -437,7 +437,7 @@ func (client VirtualMachineScaleSetExtensionsClient) UpdatePreparer(ctx context. "vmssExtensionName": autorest.Encode("path", vmssExtensionName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachinescalesetrollingupgrades.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachinescalesetrollingupgrades.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachinescalesetrollingupgrades.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachinescalesetrollingupgrades.go index 297117b5fef31..be9de5194bb59 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachinescalesetrollingupgrades.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachinescalesetrollingupgrades.go @@ -70,7 +70,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelPreparer(ctx con "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -155,7 +155,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestPreparer(ctx "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -226,7 +226,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeP "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -305,7 +305,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradePreparer "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachinescalesets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachinescalesets.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachinescalesets.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachinescalesets.go index 1502647516e40..28523a8607734 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachinescalesets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachinescalesets.go @@ -79,7 +79,7 @@ func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroupPrepare "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -173,7 +173,7 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(ctx context.C "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -256,7 +256,7 @@ func (client VirtualMachineScaleSetsClient) DeallocatePreparer(ctx context.Conte "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -340,7 +340,7 @@ func (client VirtualMachineScaleSetsClient) DeletePreparer(ctx context.Context, "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -430,7 +430,7 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesPreparer(ctx context. "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -522,7 +522,7 @@ func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUp "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, "platformUpdateDomain": autorest.Encode("query", platformUpdateDomain), @@ -601,7 +601,7 @@ func (client VirtualMachineScaleSetsClient) GetPreparer(ctx context.Context, res "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -680,7 +680,7 @@ func (client VirtualMachineScaleSetsClient) GetInstanceViewPreparer(ctx context. "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -761,7 +761,7 @@ func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistoryPreparer(ctx cont "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -877,7 +877,7 @@ func (client VirtualMachineScaleSetsClient) ListPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -992,7 +992,7 @@ func (client VirtualMachineScaleSetsClient) ListAllPreparer(ctx context.Context) "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1114,7 +1114,7 @@ func (client VirtualMachineScaleSetsClient) ListByLocationPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1233,7 +1233,7 @@ func (client VirtualMachineScaleSetsClient) ListSkusPreparer(ctx context.Context "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1342,7 +1342,7 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenancePreparer(ctx conte "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1430,7 +1430,7 @@ func (client VirtualMachineScaleSetsClient) PowerOffPreparer(ctx context.Context "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1520,7 +1520,7 @@ func (client VirtualMachineScaleSetsClient) RedeployPreparer(ctx context.Context "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1605,7 +1605,7 @@ func (client VirtualMachineScaleSetsClient) ReimagePreparer(ctx context.Context, "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1690,7 +1690,7 @@ func (client VirtualMachineScaleSetsClient) ReimageAllPreparer(ctx context.Conte "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1774,7 +1774,7 @@ func (client VirtualMachineScaleSetsClient) RestartPreparer(ctx context.Context, "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1835,12 +1835,6 @@ func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceState(ctx con tracing.EndSpan(ctx, sc, err) }() } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ServiceName", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewError("compute.VirtualMachineScaleSetsClient", "SetOrchestrationServiceState", err.Error()) - } - req, err := client.SetOrchestrationServiceStatePreparer(ctx, resourceGroupName, VMScaleSetName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "SetOrchestrationServiceState", nil, "Failure preparing request") @@ -1864,7 +1858,7 @@ func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStatePreparer "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1945,7 +1939,7 @@ func (client VirtualMachineScaleSetsClient) StartPreparer(ctx context.Context, r "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2029,7 +2023,7 @@ func (client VirtualMachineScaleSetsClient) UpdatePreparer(ctx context.Context, "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -2117,7 +2111,7 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesPreparer(ctx context. "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachinescalesetvmextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachinescalesetvmextensions.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachinescalesetvmextensions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachinescalesetvmextensions.go index f3ed83f630df9..9713046e25d88 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachinescalesetvmextensions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachinescalesetvmextensions.go @@ -75,7 +75,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdatePreparer(ct "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -162,7 +162,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) DeletePreparer(ctx contex "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -252,7 +252,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) GetPreparer(ctx context.C "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -334,7 +334,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) ListPreparer(ctx context. "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -411,7 +411,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) UpdatePreparer(ctx contex "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachinescalesetvmruncommands.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachinescalesetvmruncommands.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachinescalesetvmruncommands.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachinescalesetvmruncommands.go index 461eacb45d65a..4fbb0c1045076 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachinescalesetvmruncommands.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachinescalesetvmruncommands.go @@ -75,7 +75,7 @@ func (client VirtualMachineScaleSetVMRunCommandsClient) CreateOrUpdatePreparer(c "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -160,7 +160,7 @@ func (client VirtualMachineScaleSetVMRunCommandsClient) DeletePreparer(ctx conte "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -250,7 +250,7 @@ func (client VirtualMachineScaleSetVMRunCommandsClient) GetPreparer(ctx context. "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -337,7 +337,7 @@ func (client VirtualMachineScaleSetVMRunCommandsClient) ListPreparer(ctx context "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -451,7 +451,7 @@ func (client VirtualMachineScaleSetVMRunCommandsClient) UpdatePreparer(ctx conte "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachinescalesetvms.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachinescalesetvms.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachinescalesetvms.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachinescalesetvms.go index 0626a59a71275..f46f6c4f52f18 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachinescalesetvms.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachinescalesetvms.go @@ -74,7 +74,7 @@ func (client VirtualMachineScaleSetVMsClient) DeallocatePreparer(ctx context.Con "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -156,7 +156,7 @@ func (client VirtualMachineScaleSetVMsClient) DeletePreparer(ctx context.Context "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -248,7 +248,7 @@ func (client VirtualMachineScaleSetVMsClient) GetPreparer(ctx context.Context, r "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -329,7 +329,7 @@ func (client VirtualMachineScaleSetVMsClient) GetInstanceViewPreparer(ctx contex "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -414,7 +414,7 @@ func (client VirtualMachineScaleSetVMsClient) ListPreparer(ctx context.Context, "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -531,7 +531,7 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenancePreparer(ctx con "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -615,7 +615,7 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffPreparer(ctx context.Conte "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -701,7 +701,7 @@ func (client VirtualMachineScaleSetVMsClient) RedeployPreparer(ctx context.Conte "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -782,7 +782,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(ctx context.Contex "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -868,7 +868,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllPreparer(ctx context.Con "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -948,7 +948,7 @@ func (client VirtualMachineScaleSetVMsClient) RestartPreparer(ctx context.Contex "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1039,7 +1039,7 @@ func (client VirtualMachineScaleSetVMsClient) RetrieveBootDiagnosticsDataPrepare "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1120,7 +1120,7 @@ func (client VirtualMachineScaleSetVMsClient) RunCommandPreparer(ctx context.Con "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1210,7 +1210,7 @@ func (client VirtualMachineScaleSetVMsClient) SimulateEvictionPreparer(ctx conte "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1280,7 +1280,7 @@ func (client VirtualMachineScaleSetVMsClient) StartPreparer(ctx context.Context, "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1382,7 +1382,7 @@ func (client VirtualMachineScaleSetVMsClient) UpdatePreparer(ctx context.Context "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachinesizes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachinesizes.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachinesizes.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachinesizes.go index 6aa8255569f98..394d659c218ce 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute/virtualmachinesizes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute/virtualmachinesizes.go @@ -81,7 +81,7 @@ func (client VirtualMachineSizesClient) ListPreparer(ctx context.Context, locati "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2021-03-01" + const APIVersion = "2021-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/CHANGELOG.md new file mode 100644 index 0000000000000..93fd201bfc3ef --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/CHANGELOG.md @@ -0,0 +1,9 @@ +# Change History + +## Additive Changes + +### Struct Changes + +#### New Struct Fields + +1. ApplicationGatewayRoutingRulePropertiesFormat.Priority diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/_meta.json b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/_meta.json similarity index 80% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/_meta.json rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/_meta.json index 18c941dfb940f..9b636be005b5a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/_meta.json +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/_meta.json @@ -1,10 +1,10 @@ { - "commit": "394395ed0bdc1c5c05cb37a031379ca03bfebbb5", + "commit": "a8a52b9e6c305f03c3a4c5411d59fc4454b5b372", "readme": "/_/azure-rest-api-specs/specification/network/resource-manager/readme.md", - "tag": "package-2020-11", + "tag": "package-2021-08", "use": "@microsoft.azure/autorest.go@2.1.187", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2020-11 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/network/resource-manager/readme.md", + "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2021-08 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/network/resource-manager/readme.md", "additional_properties": { "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/applicationgatewayprivateendpointconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/applicationgatewayprivateendpointconnections.go similarity index 93% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/applicationgatewayprivateendpointconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/applicationgatewayprivateendpointconnections.go index b33b54da67b05..2e1a4a6839b98 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/applicationgatewayprivateendpointconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/applicationgatewayprivateendpointconnections.go @@ -10,7 +10,6 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -73,7 +72,7 @@ func (client ApplicationGatewayPrivateEndpointConnectionsClient) DeletePreparer( "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -160,7 +159,7 @@ func (client ApplicationGatewayPrivateEndpointConnectionsClient) GetPreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,7 +240,7 @@ func (client ApplicationGatewayPrivateEndpointConnectionsClient) ListPreparer(ct "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -326,19 +325,6 @@ func (client ApplicationGatewayPrivateEndpointConnectionsClient) Update(ctx cont tracing.EndSpan(ctx, sc, err) }() } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ApplicationGatewayPrivateEndpointConnectionProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPrivateEndpointConnectionProperties.PrivateEndpoint", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPrivateEndpointConnectionProperties.PrivateEndpoint.ExtendedLocation", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPrivateEndpointConnectionProperties.PrivateEndpoint.ExtendedLocation.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ApplicationGatewayPrivateEndpointConnectionProperties.PrivateEndpoint.ExtendedLocation.Type", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}, - }}}}}); err != nil { - return result, validation.NewError("network.ApplicationGatewayPrivateEndpointConnectionsClient", "Update", err.Error()) - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, applicationGatewayName, connectionName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsClient", "Update", nil, "Failure preparing request") @@ -363,7 +349,7 @@ func (client ApplicationGatewayPrivateEndpointConnectionsClient) UpdatePreparer( "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/applicationgatewayprivatelinkresources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/applicationgatewayprivatelinkresources.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/applicationgatewayprivatelinkresources.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/applicationgatewayprivatelinkresources.go index d4500cb71fb37..b3c4a19361d62 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/applicationgatewayprivatelinkresources.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/applicationgatewayprivatelinkresources.go @@ -82,7 +82,7 @@ func (client ApplicationGatewayPrivateLinkResourcesClient) ListPreparer(ctx cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/applicationgateways.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/applicationgateways.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/applicationgateways.go index 385e51278257f..08eed6176d253 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/applicationgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/applicationgateways.go @@ -71,7 +71,7 @@ func (client ApplicationGatewaysClient) BackendHealthPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -156,7 +156,7 @@ func (client ApplicationGatewaysClient) BackendHealthOnDemandPreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -269,7 +269,7 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -351,7 +351,7 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -436,7 +436,7 @@ func (client ApplicationGatewaysClient) GetPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -510,7 +510,7 @@ func (client ApplicationGatewaysClient) GetSslPredefinedPolicyPreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -589,7 +589,7 @@ func (client ApplicationGatewaysClient) ListPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -702,7 +702,7 @@ func (client ApplicationGatewaysClient) ListAllPreparer(ctx context.Context) (*h "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -810,7 +810,7 @@ func (client ApplicationGatewaysClient) ListAvailableRequestHeadersPreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -881,7 +881,7 @@ func (client ApplicationGatewaysClient) ListAvailableResponseHeadersPreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -952,7 +952,7 @@ func (client ApplicationGatewaysClient) ListAvailableServerVariablesPreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1023,7 +1023,7 @@ func (client ApplicationGatewaysClient) ListAvailableSslOptionsPreparer(ctx cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1099,7 +1099,7 @@ func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesPrepar "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1207,7 +1207,7 @@ func (client ApplicationGatewaysClient) ListAvailableWafRuleSetsPreparer(ctx con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1276,7 +1276,7 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1354,7 +1354,7 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1440,7 +1440,7 @@ func (client ApplicationGatewaysClient) UpdateTagsPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/applicationsecuritygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/applicationsecuritygroups.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/applicationsecuritygroups.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/applicationsecuritygroups.go index bf8ce0478ecee..062cd381e95b8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/applicationsecuritygroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/applicationsecuritygroups.go @@ -70,7 +70,7 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdatePreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -152,7 +152,7 @@ func (client ApplicationSecurityGroupsClient) DeletePreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -237,7 +237,7 @@ func (client ApplicationSecurityGroupsClient) GetPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -316,7 +316,7 @@ func (client ApplicationSecurityGroupsClient) ListPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -429,7 +429,7 @@ func (client ApplicationSecurityGroupsClient) ListAllPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -543,7 +543,7 @@ func (client ApplicationSecurityGroupsClient) UpdateTagsPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/availabledelegations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/availabledelegations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/availabledelegations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/availabledelegations.go index bee4225552ec9..14c6080dde1d9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/availabledelegations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/availabledelegations.go @@ -79,7 +79,7 @@ func (client AvailableDelegationsClient) ListPreparer(ctx context.Context, locat "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/availableendpointservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/availableendpointservices.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/availableendpointservices.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/availableendpointservices.go index c221f3c398024..6da78683f7f8f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/availableendpointservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/availableendpointservices.go @@ -79,7 +79,7 @@ func (client AvailableEndpointServicesClient) ListPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/availableprivateendpointtypes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/availableprivateendpointtypes.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/availableprivateendpointtypes.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/availableprivateendpointtypes.go index 2691ed7588af9..2a76e1d7f1f03 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/availableprivateendpointtypes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/availableprivateendpointtypes.go @@ -79,7 +79,7 @@ func (client AvailablePrivateEndpointTypesClient) ListPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -198,7 +198,7 @@ func (client AvailablePrivateEndpointTypesClient) ListByResourceGroupPreparer(ct "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/availableresourcegroupdelegations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/availableresourcegroupdelegations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/availableresourcegroupdelegations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/availableresourcegroupdelegations.go index 9ceb07a3c6f07..240254d7c7cc0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/availableresourcegroupdelegations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/availableresourcegroupdelegations.go @@ -82,7 +82,7 @@ func (client AvailableResourceGroupDelegationsClient) ListPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/availableservicealiases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/availableservicealiases.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/availableservicealiases.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/availableservicealiases.go index b707edd78fc67..439235398ba25 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/availableservicealiases.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/availableservicealiases.go @@ -79,7 +79,7 @@ func (client AvailableServiceAliasesClient) ListPreparer(ctx context.Context, lo "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -197,7 +197,7 @@ func (client AvailableServiceAliasesClient) ListByResourceGroupPreparer(ctx cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/azurefirewallfqdntags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/azurefirewallfqdntags.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/azurefirewallfqdntags.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/azurefirewallfqdntags.go index 8f2107996a8be..d6bc156d54d65 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/azurefirewallfqdntags.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/azurefirewallfqdntags.go @@ -76,7 +76,7 @@ func (client AzureFirewallFqdnTagsClient) ListAllPreparer(ctx context.Context) ( "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/azurefirewalls.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/azurefirewalls.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/azurefirewalls.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/azurefirewalls.go index 18a0b34d6b8fe..df0196dca0e07 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/azurefirewalls.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/azurefirewalls.go @@ -77,7 +77,7 @@ func (client AzureFirewallsClient) CreateOrUpdatePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client AzureFirewallsClient) DeletePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -244,7 +244,7 @@ func (client AzureFirewallsClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -323,7 +323,7 @@ func (client AzureFirewallsClient) ListPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -436,7 +436,7 @@ func (client AzureFirewallsClient) ListAllPreparer(ctx context.Context) (*http.R "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -543,7 +543,7 @@ func (client AzureFirewallsClient) UpdateTagsPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/bastionhosts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/bastionhosts.go similarity index 81% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/bastionhosts.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/bastionhosts.go index 67374553aaff5..79580ade1c359 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/bastionhosts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/bastionhosts.go @@ -10,6 +10,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -46,6 +47,17 @@ func (client BastionHostsClient) CreateOrUpdate(ctx context.Context, resourceGro tracing.EndSpan(ctx, sc, err) }() } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.BastionHostPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.BastionHostPropertiesFormat.ScaleUnits", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.BastionHostPropertiesFormat.ScaleUnits", Name: validation.InclusiveMaximum, Rule: int64(50), Chain: nil}, + {Target: "parameters.BastionHostPropertiesFormat.ScaleUnits", Name: validation.InclusiveMinimum, Rule: int64(2), Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.BastionHostsClient", "CreateOrUpdate", err.Error()) + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, bastionHostName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -69,7 +81,7 @@ func (client BastionHostsClient) CreateOrUpdatePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -151,7 +163,7 @@ func (client BastionHostsClient) DeletePreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -236,7 +248,7 @@ func (client BastionHostsClient) GetPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -312,7 +324,7 @@ func (client BastionHostsClient) ListPreparer(ctx context.Context) (*http.Reques "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -428,7 +440,7 @@ func (client BastionHostsClient) ListByResourceGroupPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -495,3 +507,85 @@ func (client BastionHostsClient) ListByResourceGroupComplete(ctx context.Context result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) return } + +// UpdateTags updates Tags for BastionHost resource +// Parameters: +// resourceGroupName - the name of the resource group. +// bastionHostName - the name of the Bastion Host. +// parameters - parameters supplied to update BastionHost tags. +func (client BastionHostsClient) UpdateTags(ctx context.Context, resourceGroupName string, bastionHostName string, parameters TagsObject) (result BastionHostsUpdateTagsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BastionHostsClient.UpdateTags") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, bastionHostName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "UpdateTags", nil, "Failure preparing request") + return + } + + result, err = client.UpdateTagsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "UpdateTags", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client BastionHostsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, bastionHostName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "bastionHostName": autorest.Encode("path", bastionHostName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client BastionHostsClient) UpdateTagsSender(req *http.Request) (future BastionHostsUpdateTagsFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client BastionHostsClient) UpdateTagsResponder(resp *http.Response) (result BastionHost, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/bgpservicecommunities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/bgpservicecommunities.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/bgpservicecommunities.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/bgpservicecommunities.go index 89dfc44682740..b4898bf21d2d9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/bgpservicecommunities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/bgpservicecommunities.go @@ -76,7 +76,7 @@ func (client BgpServiceCommunitiesClient) ListPreparer(ctx context.Context) (*ht "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/client.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/client.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/client.go index 25f77827a650e..b8d5848896111 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/client.go @@ -1,6 +1,6 @@ // Deprecated: Please note, this package has been deprecated. A replacement package is available [github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork). We strongly encourage you to upgrade to continue receiving updates. See [Migration Guide](https://aka.ms/azsdk/golang/t2/migration) for guidance on upgrading. Refer to our [deprecation policy](https://azure.github.io/azure-sdk/policies_support.html) for more details. // -// Package network implements the Azure ARM Network service API version . +// Package network implements the Azure ARM Network service API version 2021-08-01. // // Network Client package network @@ -91,7 +91,7 @@ func (client BaseClient) CheckDNSNameAvailabilityPreparer(ctx context.Context, l "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, "domainNameLabel": autorest.Encode("query", domainNameLabel), @@ -162,7 +162,7 @@ func (client BaseClient) DeleteBastionShareableLinkPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -255,7 +255,7 @@ func (client BaseClient) DisconnectActiveSessionsPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -365,7 +365,7 @@ func (client BaseClient) GeneratevirtualwanvpnserverconfigurationvpnprofilePrepa "virtualWANName": autorest.Encode("path", virtualWANName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -446,7 +446,7 @@ func (client BaseClient) GetActiveSessionsPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -579,7 +579,7 @@ func (client BaseClient) GetBastionShareableLinkPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -688,7 +688,7 @@ func (client BaseClient) PutBastionShareableLinkPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -817,7 +817,7 @@ func (client BaseClient) SupportedSecurityProvidersPreparer(ctx context.Context, "virtualWANName": autorest.Encode("path", virtualWANName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/configurationpolicygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/configurationpolicygroups.go new file mode 100644 index 0000000000000..ee4daf6dba500 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/configurationpolicygroups.go @@ -0,0 +1,396 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ConfigurationPolicyGroupsClient is the network Client +type ConfigurationPolicyGroupsClient struct { + BaseClient +} + +// NewConfigurationPolicyGroupsClient creates an instance of the ConfigurationPolicyGroupsClient client. +func NewConfigurationPolicyGroupsClient(subscriptionID string) ConfigurationPolicyGroupsClient { + return NewConfigurationPolicyGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewConfigurationPolicyGroupsClientWithBaseURI creates an instance of the ConfigurationPolicyGroupsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewConfigurationPolicyGroupsClientWithBaseURI(baseURI string, subscriptionID string) ConfigurationPolicyGroupsClient { + return ConfigurationPolicyGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a ConfigurationPolicyGroup if it doesn't exist else updates the existing one. +// Parameters: +// resourceGroupName - the resource group name of the ConfigurationPolicyGroup. +// vpnServerConfigurationName - the name of the VpnServerConfiguration. +// configurationPolicyGroupName - the name of the ConfigurationPolicyGroup. +// vpnServerConfigurationPolicyGroupParameters - parameters supplied to create or update a +// VpnServerConfiguration PolicyGroup. +func (client ConfigurationPolicyGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string, vpnServerConfigurationPolicyGroupParameters VpnServerConfigurationPolicyGroup) (result ConfigurationPolicyGroupsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationPolicyGroupsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, vpnServerConfigurationName, configurationPolicyGroupName, vpnServerConfigurationPolicyGroupParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConfigurationPolicyGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConfigurationPolicyGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ConfigurationPolicyGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string, vpnServerConfigurationPolicyGroupParameters VpnServerConfigurationPolicyGroup) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "configurationPolicyGroupName": autorest.Encode("path", configurationPolicyGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnServerConfigurationName": autorest.Encode("path", vpnServerConfigurationName), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + vpnServerConfigurationPolicyGroupParameters.Etag = nil + vpnServerConfigurationPolicyGroupParameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}", pathParameters), + autorest.WithJSON(vpnServerConfigurationPolicyGroupParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client ConfigurationPolicyGroupsClient) CreateOrUpdateSender(req *http.Request) (future ConfigurationPolicyGroupsCreateOrUpdateFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ConfigurationPolicyGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result VpnServerConfigurationPolicyGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a ConfigurationPolicyGroup. +// Parameters: +// resourceGroupName - the resource group name of the ConfigurationPolicyGroup. +// vpnServerConfigurationName - the name of the VpnServerConfiguration. +// configurationPolicyGroupName - the name of the ConfigurationPolicyGroup. +func (client ConfigurationPolicyGroupsClient) Delete(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string) (result ConfigurationPolicyGroupsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationPolicyGroupsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, vpnServerConfigurationName, configurationPolicyGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConfigurationPolicyGroupsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConfigurationPolicyGroupsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ConfigurationPolicyGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "configurationPolicyGroupName": autorest.Encode("path", configurationPolicyGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnServerConfigurationName": autorest.Encode("path", vpnServerConfigurationName), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ConfigurationPolicyGroupsClient) DeleteSender(req *http.Request) (future ConfigurationPolicyGroupsDeleteFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ConfigurationPolicyGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the details of a ConfigurationPolicyGroup. +// Parameters: +// resourceGroupName - the resource group name of the VpnServerConfiguration. +// vpnServerConfigurationName - the name of the VpnServerConfiguration. +// configurationPolicyGroupName - the name of the ConfigurationPolicyGroup being retrieved. +func (client ConfigurationPolicyGroupsClient) Get(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string) (result VpnServerConfigurationPolicyGroup, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationPolicyGroupsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, vpnServerConfigurationName, configurationPolicyGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConfigurationPolicyGroupsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ConfigurationPolicyGroupsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConfigurationPolicyGroupsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ConfigurationPolicyGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, configurationPolicyGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "configurationPolicyGroupName": autorest.Encode("path", configurationPolicyGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnServerConfigurationName": autorest.Encode("path", vpnServerConfigurationName), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups/{configurationPolicyGroupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ConfigurationPolicyGroupsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ConfigurationPolicyGroupsClient) GetResponder(resp *http.Response) (result VpnServerConfigurationPolicyGroup, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByVpnServerConfiguration lists all the configurationPolicyGroups in a resource group for a +// vpnServerConfiguration. +// Parameters: +// resourceGroupName - the resource group name of the VpnServerConfiguration. +// vpnServerConfigurationName - the name of the VpnServerConfiguration. +func (client ConfigurationPolicyGroupsClient) ListByVpnServerConfiguration(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string) (result ListVpnServerConfigurationPolicyGroupsResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationPolicyGroupsClient.ListByVpnServerConfiguration") + defer func() { + sc := -1 + if result.lvscpgr.Response.Response != nil { + sc = result.lvscpgr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByVpnServerConfigurationNextResults + req, err := client.ListByVpnServerConfigurationPreparer(ctx, resourceGroupName, vpnServerConfigurationName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConfigurationPolicyGroupsClient", "ListByVpnServerConfiguration", nil, "Failure preparing request") + return + } + + resp, err := client.ListByVpnServerConfigurationSender(req) + if err != nil { + result.lvscpgr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ConfigurationPolicyGroupsClient", "ListByVpnServerConfiguration", resp, "Failure sending request") + return + } + + result.lvscpgr, err = client.ListByVpnServerConfigurationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConfigurationPolicyGroupsClient", "ListByVpnServerConfiguration", resp, "Failure responding to request") + return + } + if result.lvscpgr.hasNextLink() && result.lvscpgr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByVpnServerConfigurationPreparer prepares the ListByVpnServerConfiguration request. +func (client ConfigurationPolicyGroupsClient) ListByVpnServerConfigurationPreparer(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vpnServerConfigurationName": autorest.Encode("path", vpnServerConfigurationName), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}/configurationPolicyGroups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByVpnServerConfigurationSender sends the ListByVpnServerConfiguration request. The method will close the +// http.Response Body if it receives an error. +func (client ConfigurationPolicyGroupsClient) ListByVpnServerConfigurationSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByVpnServerConfigurationResponder handles the response to the ListByVpnServerConfiguration request. The method always +// closes the http.Response Body. +func (client ConfigurationPolicyGroupsClient) ListByVpnServerConfigurationResponder(resp *http.Response) (result ListVpnServerConfigurationPolicyGroupsResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByVpnServerConfigurationNextResults retrieves the next set of results, if any. +func (client ConfigurationPolicyGroupsClient) listByVpnServerConfigurationNextResults(ctx context.Context, lastResults ListVpnServerConfigurationPolicyGroupsResult) (result ListVpnServerConfigurationPolicyGroupsResult, err error) { + req, err := lastResults.listVpnServerConfigurationPolicyGroupsResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ConfigurationPolicyGroupsClient", "listByVpnServerConfigurationNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByVpnServerConfigurationSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.ConfigurationPolicyGroupsClient", "listByVpnServerConfigurationNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByVpnServerConfigurationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConfigurationPolicyGroupsClient", "listByVpnServerConfigurationNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByVpnServerConfigurationComplete enumerates all values, automatically crossing page boundaries as required. +func (client ConfigurationPolicyGroupsClient) ListByVpnServerConfigurationComplete(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string) (result ListVpnServerConfigurationPolicyGroupsResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationPolicyGroupsClient.ListByVpnServerConfiguration") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByVpnServerConfiguration(ctx, resourceGroupName, vpnServerConfigurationName) + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/connectionmonitors.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/connectionmonitors.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/connectionmonitors.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/connectionmonitors.go index 0ba1575f8e33c..9c7ea471a4948 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/connectionmonitors.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/connectionmonitors.go @@ -98,7 +98,7 @@ func (client ConnectionMonitorsClient) CreateOrUpdatePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -184,7 +184,7 @@ func (client ConnectionMonitorsClient) DeletePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -271,7 +271,7 @@ func (client ConnectionMonitorsClient) GetPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -347,7 +347,7 @@ func (client ConnectionMonitorsClient) ListPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -418,7 +418,7 @@ func (client ConnectionMonitorsClient) QueryPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -499,7 +499,7 @@ func (client ConnectionMonitorsClient) StartPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -579,7 +579,7 @@ func (client ConnectionMonitorsClient) StopPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -667,7 +667,7 @@ func (client ConnectionMonitorsClient) UpdateTagsPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/customipprefixes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/customipprefixes.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/customipprefixes.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/customipprefixes.go index 6c3188a6365fa..4cccfbc1611b5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/customipprefixes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/customipprefixes.go @@ -10,7 +10,6 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -48,15 +47,6 @@ func (client CustomIPPrefixesClient) CreateOrUpdate(ctx context.Context, resourc tracing.EndSpan(ctx, sc, err) }() } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ExtendedLocation", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ExtendedLocation.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ExtendedLocation.Type", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("network.CustomIPPrefixesClient", "CreateOrUpdate", err.Error()) - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, customIPPrefixName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -80,7 +70,7 @@ func (client CustomIPPrefixesClient) CreateOrUpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -162,7 +152,7 @@ func (client CustomIPPrefixesClient) DeletePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -248,7 +238,7 @@ func (client CustomIPPrefixesClient) GetPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -330,7 +320,7 @@ func (client CustomIPPrefixesClient) ListPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -443,7 +433,7 @@ func (client CustomIPPrefixesClient) ListAllPreparer(ctx context.Context) (*http "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -557,7 +547,7 @@ func (client CustomIPPrefixesClient) UpdateTagsPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/ddoscustompolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/ddoscustompolicies.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/ddoscustompolicies.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/ddoscustompolicies.go index 65ee21a82da51..57341307e42db 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/ddoscustompolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/ddoscustompolicies.go @@ -70,7 +70,7 @@ func (client DdosCustomPoliciesClient) CreateOrUpdatePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -152,7 +152,7 @@ func (client DdosCustomPoliciesClient) DeletePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -237,7 +237,7 @@ func (client DdosCustomPoliciesClient) GetPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -314,7 +314,7 @@ func (client DdosCustomPoliciesClient) UpdateTagsPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/ddosprotectionplans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/ddosprotectionplans.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/ddosprotectionplans.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/ddosprotectionplans.go index b9ebf927b4e5a..84dd6888cf268 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/ddosprotectionplans.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/ddosprotectionplans.go @@ -70,7 +70,7 @@ func (client DdosProtectionPlansClient) CreateOrUpdatePreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -155,7 +155,7 @@ func (client DdosProtectionPlansClient) DeletePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -240,7 +240,7 @@ func (client DdosProtectionPlansClient) GetPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -316,7 +316,7 @@ func (client DdosProtectionPlansClient) ListPreparer(ctx context.Context) (*http "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -432,7 +432,7 @@ func (client DdosProtectionPlansClient) ListByResourceGroupPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -546,7 +546,7 @@ func (client DdosProtectionPlansClient) UpdateTagsPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/defaultsecurityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/defaultsecurityrules.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/defaultsecurityrules.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/defaultsecurityrules.go index dc3864eb3e5c4..43a559531ba55 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/defaultsecurityrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/defaultsecurityrules.go @@ -78,7 +78,7 @@ func (client DefaultSecurityRulesClient) GetPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client DefaultSecurityRulesClient) ListPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/dscpconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/dscpconfiguration.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/dscpconfiguration.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/dscpconfiguration.go index 47f77a12a2be8..1721a2d088f07 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/dscpconfiguration.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/dscpconfiguration.go @@ -70,7 +70,7 @@ func (client DscpConfigurationClient) CreateOrUpdatePreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -152,7 +152,7 @@ func (client DscpConfigurationClient) DeletePreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -237,7 +237,7 @@ func (client DscpConfigurationClient) GetPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -316,7 +316,7 @@ func (client DscpConfigurationClient) ListPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -429,7 +429,7 @@ func (client DscpConfigurationClient) ListAllPreparer(ctx context.Context) (*htt "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/enums.go similarity index 90% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/enums.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/enums.go index 84aee1a1b9b6a..5c9c1b81969ec 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/enums.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/enums.go @@ -89,6 +89,24 @@ func PossibleApplicationGatewayFirewallModeValues() []ApplicationGatewayFirewall return []ApplicationGatewayFirewallMode{ApplicationGatewayFirewallModeDetection, ApplicationGatewayFirewallModePrevention} } +// ApplicationGatewayLoadDistributionAlgorithm enumerates the values for application gateway load distribution +// algorithm. +type ApplicationGatewayLoadDistributionAlgorithm string + +const ( + // ApplicationGatewayLoadDistributionAlgorithmIPHash ... + ApplicationGatewayLoadDistributionAlgorithmIPHash ApplicationGatewayLoadDistributionAlgorithm = "IpHash" + // ApplicationGatewayLoadDistributionAlgorithmLeastConnections ... + ApplicationGatewayLoadDistributionAlgorithmLeastConnections ApplicationGatewayLoadDistributionAlgorithm = "LeastConnections" + // ApplicationGatewayLoadDistributionAlgorithmRoundRobin ... + ApplicationGatewayLoadDistributionAlgorithmRoundRobin ApplicationGatewayLoadDistributionAlgorithm = "RoundRobin" +) + +// PossibleApplicationGatewayLoadDistributionAlgorithmValues returns an array of possible values for the ApplicationGatewayLoadDistributionAlgorithm const type. +func PossibleApplicationGatewayLoadDistributionAlgorithmValues() []ApplicationGatewayLoadDistributionAlgorithm { + return []ApplicationGatewayLoadDistributionAlgorithm{ApplicationGatewayLoadDistributionAlgorithmIPHash, ApplicationGatewayLoadDistributionAlgorithmLeastConnections, ApplicationGatewayLoadDistributionAlgorithmRoundRobin} +} + // ApplicationGatewayOperationalState enumerates the values for application gateway operational state. type ApplicationGatewayOperationalState string @@ -116,11 +134,15 @@ const ( ApplicationGatewayProtocolHTTP ApplicationGatewayProtocol = "Http" // ApplicationGatewayProtocolHTTPS ... ApplicationGatewayProtocolHTTPS ApplicationGatewayProtocol = "Https" + // ApplicationGatewayProtocolTCP ... + ApplicationGatewayProtocolTCP ApplicationGatewayProtocol = "Tcp" + // ApplicationGatewayProtocolTLS ... + ApplicationGatewayProtocolTLS ApplicationGatewayProtocol = "Tls" ) // PossibleApplicationGatewayProtocolValues returns an array of possible values for the ApplicationGatewayProtocol const type. func PossibleApplicationGatewayProtocolValues() []ApplicationGatewayProtocol { - return []ApplicationGatewayProtocol{ApplicationGatewayProtocolHTTP, ApplicationGatewayProtocolHTTPS} + return []ApplicationGatewayProtocol{ApplicationGatewayProtocolHTTP, ApplicationGatewayProtocolHTTPS, ApplicationGatewayProtocolTCP, ApplicationGatewayProtocolTLS} } // ApplicationGatewayRedirectType enumerates the values for application gateway redirect type. @@ -449,6 +471,8 @@ func PossibleAzureFirewallSkuNameValues() []AzureFirewallSkuName { type AzureFirewallSkuTier string const ( + // AzureFirewallSkuTierBasic ... + AzureFirewallSkuTierBasic AzureFirewallSkuTier = "Basic" // AzureFirewallSkuTierPremium ... AzureFirewallSkuTierPremium AzureFirewallSkuTier = "Premium" // AzureFirewallSkuTierStandard ... @@ -457,7 +481,7 @@ const ( // PossibleAzureFirewallSkuTierValues returns an array of possible values for the AzureFirewallSkuTier const type. func PossibleAzureFirewallSkuTierValues() []AzureFirewallSkuTier { - return []AzureFirewallSkuTier{AzureFirewallSkuTierPremium, AzureFirewallSkuTierStandard} + return []AzureFirewallSkuTier{AzureFirewallSkuTierBasic, AzureFirewallSkuTierPremium, AzureFirewallSkuTierStandard} } // AzureFirewallThreatIntelMode enumerates the values for azure firewall threat intel mode. @@ -492,6 +516,21 @@ func PossibleBastionConnectProtocolValues() []BastionConnectProtocol { return []BastionConnectProtocol{BastionConnectProtocolRDP, BastionConnectProtocolSSH} } +// BastionHostSkuName enumerates the values for bastion host sku name. +type BastionHostSkuName string + +const ( + // BastionHostSkuNameBasic ... + BastionHostSkuNameBasic BastionHostSkuName = "Basic" + // BastionHostSkuNameStandard ... + BastionHostSkuNameStandard BastionHostSkuName = "Standard" +) + +// PossibleBastionHostSkuNameValues returns an array of possible values for the BastionHostSkuName const type. +func PossibleBastionHostSkuNameValues() []BastionHostSkuName { + return []BastionHostSkuName{BastionHostSkuNameBasic, BastionHostSkuNameStandard} +} + // BgpPeerState enumerates the values for bgp peer state. type BgpPeerState string @@ -741,6 +780,21 @@ func PossibleDdosSettingsProtectionCoverageValues() []DdosSettingsProtectionCove return []DdosSettingsProtectionCoverage{DdosSettingsProtectionCoverageBasic, DdosSettingsProtectionCoverageStandard} } +// DeleteOptions enumerates the values for delete options. +type DeleteOptions string + +const ( + // DeleteOptionsDelete ... + DeleteOptionsDelete DeleteOptions = "Delete" + // DeleteOptionsDetach ... + DeleteOptionsDetach DeleteOptions = "Detach" +) + +// PossibleDeleteOptionsValues returns an array of possible values for the DeleteOptions const type. +func PossibleDeleteOptionsValues() []DeleteOptions { + return []DeleteOptions{DeleteOptionsDelete, DeleteOptionsDetach} +} + // DestinationPortBehavior enumerates the values for destination port behavior. type DestinationPortBehavior string @@ -1054,6 +1108,22 @@ func PossibleExpressRoutePeeringTypeValues() []ExpressRoutePeeringType { return []ExpressRoutePeeringType{ExpressRoutePeeringTypeAzurePrivatePeering, ExpressRoutePeeringTypeAzurePublicPeering, ExpressRoutePeeringTypeMicrosoftPeering} } +// ExpressRoutePortAuthorizationUseStatus enumerates the values for express route port authorization use +// status. +type ExpressRoutePortAuthorizationUseStatus string + +const ( + // ExpressRoutePortAuthorizationUseStatusAvailable ... + ExpressRoutePortAuthorizationUseStatusAvailable ExpressRoutePortAuthorizationUseStatus = "Available" + // ExpressRoutePortAuthorizationUseStatusInUse ... + ExpressRoutePortAuthorizationUseStatusInUse ExpressRoutePortAuthorizationUseStatus = "InUse" +) + +// PossibleExpressRoutePortAuthorizationUseStatusValues returns an array of possible values for the ExpressRoutePortAuthorizationUseStatus const type. +func PossibleExpressRoutePortAuthorizationUseStatusValues() []ExpressRoutePortAuthorizationUseStatus { + return []ExpressRoutePortAuthorizationUseStatus{ExpressRoutePortAuthorizationUseStatusAvailable, ExpressRoutePortAuthorizationUseStatusInUse} +} + // ExpressRoutePortsEncapsulation enumerates the values for express route ports encapsulation. type ExpressRoutePortsEncapsulation string @@ -1098,6 +1168,21 @@ func PossibleFirewallPolicyFilterRuleCollectionActionTypeValues() []FirewallPoli return []FirewallPolicyFilterRuleCollectionActionType{FirewallPolicyFilterRuleCollectionActionTypeAllow, FirewallPolicyFilterRuleCollectionActionTypeDeny} } +// FirewallPolicyIDPSQuerySortOrder enumerates the values for firewall policy idps query sort order. +type FirewallPolicyIDPSQuerySortOrder string + +const ( + // FirewallPolicyIDPSQuerySortOrderAscending ... + FirewallPolicyIDPSQuerySortOrderAscending FirewallPolicyIDPSQuerySortOrder = "Ascending" + // FirewallPolicyIDPSQuerySortOrderDescending ... + FirewallPolicyIDPSQuerySortOrderDescending FirewallPolicyIDPSQuerySortOrder = "Descending" +) + +// PossibleFirewallPolicyIDPSQuerySortOrderValues returns an array of possible values for the FirewallPolicyIDPSQuerySortOrder const type. +func PossibleFirewallPolicyIDPSQuerySortOrderValues() []FirewallPolicyIDPSQuerySortOrder { + return []FirewallPolicyIDPSQuerySortOrder{FirewallPolicyIDPSQuerySortOrderAscending, FirewallPolicyIDPSQuerySortOrderDescending} +} + // FirewallPolicyIntrusionDetectionProtocol enumerates the values for firewall policy intrusion detection // protocol. type FirewallPolicyIntrusionDetectionProtocol string @@ -1189,6 +1274,8 @@ func PossibleFirewallPolicyRuleNetworkProtocolValues() []FirewallPolicyRuleNetwo type FirewallPolicySkuTier string const ( + // FirewallPolicySkuTierBasic ... + FirewallPolicySkuTierBasic FirewallPolicySkuTier = "Basic" // FirewallPolicySkuTierPremium ... FirewallPolicySkuTierPremium FirewallPolicySkuTier = "Premium" // FirewallPolicySkuTierStandard ... @@ -1197,7 +1284,7 @@ const ( // PossibleFirewallPolicySkuTierValues returns an array of possible values for the FirewallPolicySkuTier const type. func PossibleFirewallPolicySkuTierValues() []FirewallPolicySkuTier { - return []FirewallPolicySkuTier{FirewallPolicySkuTierPremium, FirewallPolicySkuTierStandard} + return []FirewallPolicySkuTier{FirewallPolicySkuTierBasic, FirewallPolicySkuTierPremium, FirewallPolicySkuTierStandard} } // FlowLogFormatType enumerates the values for flow log format type. @@ -1213,6 +1300,41 @@ func PossibleFlowLogFormatTypeValues() []FlowLogFormatType { return []FlowLogFormatType{FlowLogFormatTypeJSON} } +// GatewayLoadBalancerTunnelInterfaceType enumerates the values for gateway load balancer tunnel interface +// type. +type GatewayLoadBalancerTunnelInterfaceType string + +const ( + // GatewayLoadBalancerTunnelInterfaceTypeExternal ... + GatewayLoadBalancerTunnelInterfaceTypeExternal GatewayLoadBalancerTunnelInterfaceType = "External" + // GatewayLoadBalancerTunnelInterfaceTypeInternal ... + GatewayLoadBalancerTunnelInterfaceTypeInternal GatewayLoadBalancerTunnelInterfaceType = "Internal" + // GatewayLoadBalancerTunnelInterfaceTypeNone ... + GatewayLoadBalancerTunnelInterfaceTypeNone GatewayLoadBalancerTunnelInterfaceType = "None" +) + +// PossibleGatewayLoadBalancerTunnelInterfaceTypeValues returns an array of possible values for the GatewayLoadBalancerTunnelInterfaceType const type. +func PossibleGatewayLoadBalancerTunnelInterfaceTypeValues() []GatewayLoadBalancerTunnelInterfaceType { + return []GatewayLoadBalancerTunnelInterfaceType{GatewayLoadBalancerTunnelInterfaceTypeExternal, GatewayLoadBalancerTunnelInterfaceTypeInternal, GatewayLoadBalancerTunnelInterfaceTypeNone} +} + +// GatewayLoadBalancerTunnelProtocol enumerates the values for gateway load balancer tunnel protocol. +type GatewayLoadBalancerTunnelProtocol string + +const ( + // GatewayLoadBalancerTunnelProtocolNative ... + GatewayLoadBalancerTunnelProtocolNative GatewayLoadBalancerTunnelProtocol = "Native" + // GatewayLoadBalancerTunnelProtocolNone ... + GatewayLoadBalancerTunnelProtocolNone GatewayLoadBalancerTunnelProtocol = "None" + // GatewayLoadBalancerTunnelProtocolVXLAN ... + GatewayLoadBalancerTunnelProtocolVXLAN GatewayLoadBalancerTunnelProtocol = "VXLAN" +) + +// PossibleGatewayLoadBalancerTunnelProtocolValues returns an array of possible values for the GatewayLoadBalancerTunnelProtocol const type. +func PossibleGatewayLoadBalancerTunnelProtocolValues() []GatewayLoadBalancerTunnelProtocol { + return []GatewayLoadBalancerTunnelProtocol{GatewayLoadBalancerTunnelProtocolNative, GatewayLoadBalancerTunnelProtocolNone, GatewayLoadBalancerTunnelProtocolVXLAN} +} + // HTTPConfigurationMethod enumerates the values for http configuration method. type HTTPConfigurationMethod string @@ -1260,6 +1382,23 @@ func PossibleHubBgpConnectionStatusValues() []HubBgpConnectionStatus { return []HubBgpConnectionStatus{HubBgpConnectionStatusConnected, HubBgpConnectionStatusConnecting, HubBgpConnectionStatusNotConnected, HubBgpConnectionStatusUnknown} } +// HubRoutingPreference enumerates the values for hub routing preference. +type HubRoutingPreference string + +const ( + // HubRoutingPreferenceASPath ... + HubRoutingPreferenceASPath HubRoutingPreference = "ASPath" + // HubRoutingPreferenceExpressRoute ... + HubRoutingPreferenceExpressRoute HubRoutingPreference = "ExpressRoute" + // HubRoutingPreferenceVpnGateway ... + HubRoutingPreferenceVpnGateway HubRoutingPreference = "VpnGateway" +) + +// PossibleHubRoutingPreferenceValues returns an array of possible values for the HubRoutingPreference const type. +func PossibleHubRoutingPreferenceValues() []HubRoutingPreference { + return []HubRoutingPreference{HubRoutingPreferenceASPath, HubRoutingPreferenceExpressRoute, HubRoutingPreferenceVpnGateway} +} + // HubVirtualNetworkConnectionStatus enumerates the values for hub virtual network connection status. type HubVirtualNetworkConnectionStatus string @@ -1342,6 +1481,23 @@ func PossibleInboundSecurityRulesProtocolValues() []InboundSecurityRulesProtocol return []InboundSecurityRulesProtocol{InboundSecurityRulesProtocolTCP, InboundSecurityRulesProtocolUDP} } +// InterfaceAuxiliaryMode enumerates the values for interface auxiliary mode. +type InterfaceAuxiliaryMode string + +const ( + // InterfaceAuxiliaryModeFloating ... + InterfaceAuxiliaryModeFloating InterfaceAuxiliaryMode = "Floating" + // InterfaceAuxiliaryModeMaxConnections ... + InterfaceAuxiliaryModeMaxConnections InterfaceAuxiliaryMode = "MaxConnections" + // InterfaceAuxiliaryModeNone ... + InterfaceAuxiliaryModeNone InterfaceAuxiliaryMode = "None" +) + +// PossibleInterfaceAuxiliaryModeValues returns an array of possible values for the InterfaceAuxiliaryMode const type. +func PossibleInterfaceAuxiliaryModeValues() []InterfaceAuxiliaryMode { + return []InterfaceAuxiliaryMode{InterfaceAuxiliaryModeFloating, InterfaceAuxiliaryModeMaxConnections, InterfaceAuxiliaryModeNone} +} + // InterfaceMigrationPhase enumerates the values for interface migration phase. type InterfaceMigrationPhase string @@ -1519,6 +1675,25 @@ func PossibleIssueTypeValues() []IssueType { return []IssueType{IssueTypeAgentStopped, IssueTypeDNSResolution, IssueTypeGuestFirewall, IssueTypeNetworkSecurityRule, IssueTypePlatform, IssueTypePortThrottled, IssueTypeSocketBind, IssueTypeUnknown, IssueTypeUserDefinedRoute} } +// LoadBalancerBackendAddressAdminState enumerates the values for load balancer backend address admin state. +type LoadBalancerBackendAddressAdminState string + +const ( + // LoadBalancerBackendAddressAdminStateDown ... + LoadBalancerBackendAddressAdminStateDown LoadBalancerBackendAddressAdminState = "Down" + // LoadBalancerBackendAddressAdminStateDrain ... + LoadBalancerBackendAddressAdminStateDrain LoadBalancerBackendAddressAdminState = "Drain" + // LoadBalancerBackendAddressAdminStateNone ... + LoadBalancerBackendAddressAdminStateNone LoadBalancerBackendAddressAdminState = "None" + // LoadBalancerBackendAddressAdminStateUp ... + LoadBalancerBackendAddressAdminStateUp LoadBalancerBackendAddressAdminState = "Up" +) + +// PossibleLoadBalancerBackendAddressAdminStateValues returns an array of possible values for the LoadBalancerBackendAddressAdminState const type. +func PossibleLoadBalancerBackendAddressAdminStateValues() []LoadBalancerBackendAddressAdminState { + return []LoadBalancerBackendAddressAdminState{LoadBalancerBackendAddressAdminStateDown, LoadBalancerBackendAddressAdminStateDrain, LoadBalancerBackendAddressAdminStateNone, LoadBalancerBackendAddressAdminStateUp} +} + // LoadBalancerOutboundRuleProtocol enumerates the values for load balancer outbound rule protocol. type LoadBalancerOutboundRuleProtocol string @@ -1542,13 +1717,15 @@ type LoadBalancerSkuName string const ( // LoadBalancerSkuNameBasic ... LoadBalancerSkuNameBasic LoadBalancerSkuName = "Basic" + // LoadBalancerSkuNameGateway ... + LoadBalancerSkuNameGateway LoadBalancerSkuName = "Gateway" // LoadBalancerSkuNameStandard ... LoadBalancerSkuNameStandard LoadBalancerSkuName = "Standard" ) // PossibleLoadBalancerSkuNameValues returns an array of possible values for the LoadBalancerSkuName const type. func PossibleLoadBalancerSkuNameValues() []LoadBalancerSkuName { - return []LoadBalancerSkuName{LoadBalancerSkuNameBasic, LoadBalancerSkuNameStandard} + return []LoadBalancerSkuName{LoadBalancerSkuNameBasic, LoadBalancerSkuNameGateway, LoadBalancerSkuNameStandard} } // LoadBalancerSkuTier enumerates the values for load balancer sku tier. @@ -1702,17 +1879,29 @@ func PossibleOutputTypeValues() []OutputType { type OwaspCrsExclusionEntryMatchVariable string const ( + // OwaspCrsExclusionEntryMatchVariableRequestArgKeys ... + OwaspCrsExclusionEntryMatchVariableRequestArgKeys OwaspCrsExclusionEntryMatchVariable = "RequestArgKeys" // OwaspCrsExclusionEntryMatchVariableRequestArgNames ... OwaspCrsExclusionEntryMatchVariableRequestArgNames OwaspCrsExclusionEntryMatchVariable = "RequestArgNames" + // OwaspCrsExclusionEntryMatchVariableRequestArgValues ... + OwaspCrsExclusionEntryMatchVariableRequestArgValues OwaspCrsExclusionEntryMatchVariable = "RequestArgValues" + // OwaspCrsExclusionEntryMatchVariableRequestCookieKeys ... + OwaspCrsExclusionEntryMatchVariableRequestCookieKeys OwaspCrsExclusionEntryMatchVariable = "RequestCookieKeys" // OwaspCrsExclusionEntryMatchVariableRequestCookieNames ... OwaspCrsExclusionEntryMatchVariableRequestCookieNames OwaspCrsExclusionEntryMatchVariable = "RequestCookieNames" + // OwaspCrsExclusionEntryMatchVariableRequestCookieValues ... + OwaspCrsExclusionEntryMatchVariableRequestCookieValues OwaspCrsExclusionEntryMatchVariable = "RequestCookieValues" + // OwaspCrsExclusionEntryMatchVariableRequestHeaderKeys ... + OwaspCrsExclusionEntryMatchVariableRequestHeaderKeys OwaspCrsExclusionEntryMatchVariable = "RequestHeaderKeys" // OwaspCrsExclusionEntryMatchVariableRequestHeaderNames ... OwaspCrsExclusionEntryMatchVariableRequestHeaderNames OwaspCrsExclusionEntryMatchVariable = "RequestHeaderNames" + // OwaspCrsExclusionEntryMatchVariableRequestHeaderValues ... + OwaspCrsExclusionEntryMatchVariableRequestHeaderValues OwaspCrsExclusionEntryMatchVariable = "RequestHeaderValues" ) // PossibleOwaspCrsExclusionEntryMatchVariableValues returns an array of possible values for the OwaspCrsExclusionEntryMatchVariable const type. func PossibleOwaspCrsExclusionEntryMatchVariableValues() []OwaspCrsExclusionEntryMatchVariable { - return []OwaspCrsExclusionEntryMatchVariable{OwaspCrsExclusionEntryMatchVariableRequestArgNames, OwaspCrsExclusionEntryMatchVariableRequestCookieNames, OwaspCrsExclusionEntryMatchVariableRequestHeaderNames} + return []OwaspCrsExclusionEntryMatchVariable{OwaspCrsExclusionEntryMatchVariableRequestArgKeys, OwaspCrsExclusionEntryMatchVariableRequestArgNames, OwaspCrsExclusionEntryMatchVariableRequestArgValues, OwaspCrsExclusionEntryMatchVariableRequestCookieKeys, OwaspCrsExclusionEntryMatchVariableRequestCookieNames, OwaspCrsExclusionEntryMatchVariableRequestCookieValues, OwaspCrsExclusionEntryMatchVariableRequestHeaderKeys, OwaspCrsExclusionEntryMatchVariableRequestHeaderNames, OwaspCrsExclusionEntryMatchVariableRequestHeaderValues} } // OwaspCrsExclusionEntrySelectorMatchOperator enumerates the values for owasp crs exclusion entry selector @@ -1840,6 +2029,23 @@ func PossiblePreferredIPVersionValues() []PreferredIPVersion { return []PreferredIPVersion{PreferredIPVersionIPv4, PreferredIPVersionIPv6} } +// PreferredRoutingGateway enumerates the values for preferred routing gateway. +type PreferredRoutingGateway string + +const ( + // PreferredRoutingGatewayExpressRoute ... + PreferredRoutingGatewayExpressRoute PreferredRoutingGateway = "ExpressRoute" + // PreferredRoutingGatewayNone ... + PreferredRoutingGatewayNone PreferredRoutingGateway = "None" + // PreferredRoutingGatewayVpnGateway ... + PreferredRoutingGatewayVpnGateway PreferredRoutingGateway = "VpnGateway" +) + +// PossiblePreferredRoutingGatewayValues returns an array of possible values for the PreferredRoutingGateway const type. +func PossiblePreferredRoutingGatewayValues() []PreferredRoutingGateway { + return []PreferredRoutingGateway{PreferredRoutingGatewayExpressRoute, PreferredRoutingGatewayNone, PreferredRoutingGatewayVpnGateway} +} + // ProbeProtocol enumerates the values for probe protocol. type ProbeProtocol string @@ -2237,6 +2443,19 @@ func PossibleSeverityValues() []Severity { return []Severity{SeverityError, SeverityWarning} } +// SyncRemoteAddressSpace enumerates the values for sync remote address space. +type SyncRemoteAddressSpace string + +const ( + // SyncRemoteAddressSpaceTrue ... + SyncRemoteAddressSpaceTrue SyncRemoteAddressSpace = "true" +) + +// PossibleSyncRemoteAddressSpaceValues returns an array of possible values for the SyncRemoteAddressSpace const type. +func PossibleSyncRemoteAddressSpaceValues() []SyncRemoteAddressSpace { + return []SyncRemoteAddressSpace{SyncRemoteAddressSpaceTrue} +} + // TransportProtocol enumerates the values for transport protocol. type TransportProtocol string @@ -2290,6 +2509,21 @@ func PossibleVerbosityLevelValues() []VerbosityLevel { return []VerbosityLevel{VerbosityLevelFull, VerbosityLevelMinimum, VerbosityLevelNormal} } +// VirtualNetworkEncryptionEnforcement enumerates the values for virtual network encryption enforcement. +type VirtualNetworkEncryptionEnforcement string + +const ( + // VirtualNetworkEncryptionEnforcementAllowUnencrypted ... + VirtualNetworkEncryptionEnforcementAllowUnencrypted VirtualNetworkEncryptionEnforcement = "AllowUnencrypted" + // VirtualNetworkEncryptionEnforcementDropUnencrypted ... + VirtualNetworkEncryptionEnforcementDropUnencrypted VirtualNetworkEncryptionEnforcement = "DropUnencrypted" +) + +// PossibleVirtualNetworkEncryptionEnforcementValues returns an array of possible values for the VirtualNetworkEncryptionEnforcement const type. +func PossibleVirtualNetworkEncryptionEnforcementValues() []VirtualNetworkEncryptionEnforcement { + return []VirtualNetworkEncryptionEnforcement{VirtualNetworkEncryptionEnforcementAllowUnencrypted, VirtualNetworkEncryptionEnforcementDropUnencrypted} +} + // VirtualNetworkGatewayConnectionMode enumerates the values for virtual network gateway connection mode. type VirtualNetworkGatewayConnectionMode string @@ -2468,6 +2702,25 @@ func PossibleVirtualNetworkGatewayTypeValues() []VirtualNetworkGatewayType { return []VirtualNetworkGatewayType{VirtualNetworkGatewayTypeExpressRoute, VirtualNetworkGatewayTypeLocalGateway, VirtualNetworkGatewayTypeVpn} } +// VirtualNetworkPeeringLevel enumerates the values for virtual network peering level. +type VirtualNetworkPeeringLevel string + +const ( + // VirtualNetworkPeeringLevelFullyInSync ... + VirtualNetworkPeeringLevelFullyInSync VirtualNetworkPeeringLevel = "FullyInSync" + // VirtualNetworkPeeringLevelLocalAndRemoteNotInSync ... + VirtualNetworkPeeringLevelLocalAndRemoteNotInSync VirtualNetworkPeeringLevel = "LocalAndRemoteNotInSync" + // VirtualNetworkPeeringLevelLocalNotInSync ... + VirtualNetworkPeeringLevelLocalNotInSync VirtualNetworkPeeringLevel = "LocalNotInSync" + // VirtualNetworkPeeringLevelRemoteNotInSync ... + VirtualNetworkPeeringLevelRemoteNotInSync VirtualNetworkPeeringLevel = "RemoteNotInSync" +) + +// PossibleVirtualNetworkPeeringLevelValues returns an array of possible values for the VirtualNetworkPeeringLevel const type. +func PossibleVirtualNetworkPeeringLevelValues() []VirtualNetworkPeeringLevel { + return []VirtualNetworkPeeringLevel{VirtualNetworkPeeringLevelFullyInSync, VirtualNetworkPeeringLevelLocalAndRemoteNotInSync, VirtualNetworkPeeringLevelLocalNotInSync, VirtualNetworkPeeringLevelRemoteNotInSync} +} + // VirtualNetworkPeeringState enumerates the values for virtual network peering state. type VirtualNetworkPeeringState string @@ -2664,6 +2917,23 @@ func PossibleVpnNatRuleTypeValues() []VpnNatRuleType { return []VpnNatRuleType{VpnNatRuleTypeDynamic, VpnNatRuleTypeStatic} } +// VpnPolicyMemberAttributeType enumerates the values for vpn policy member attribute type. +type VpnPolicyMemberAttributeType string + +const ( + // VpnPolicyMemberAttributeTypeAADGroupID ... + VpnPolicyMemberAttributeTypeAADGroupID VpnPolicyMemberAttributeType = "AADGroupId" + // VpnPolicyMemberAttributeTypeCertificateGroupID ... + VpnPolicyMemberAttributeTypeCertificateGroupID VpnPolicyMemberAttributeType = "CertificateGroupId" + // VpnPolicyMemberAttributeTypeRadiusAzureGroupID ... + VpnPolicyMemberAttributeTypeRadiusAzureGroupID VpnPolicyMemberAttributeType = "RadiusAzureGroupId" +) + +// PossibleVpnPolicyMemberAttributeTypeValues returns an array of possible values for the VpnPolicyMemberAttributeType const type. +func PossibleVpnPolicyMemberAttributeTypeValues() []VpnPolicyMemberAttributeType { + return []VpnPolicyMemberAttributeType{VpnPolicyMemberAttributeTypeAADGroupID, VpnPolicyMemberAttributeTypeCertificateGroupID, VpnPolicyMemberAttributeTypeRadiusAzureGroupID} +} + // VpnType enumerates the values for vpn type. type VpnType string diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutecircuitauthorizations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutecircuitauthorizations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutecircuitauthorizations.go index 4dfd0819b2af6..b266a6cf1a4db 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutecircuitauthorizations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutecircuitauthorizations.go @@ -74,7 +74,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -246,7 +246,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) GetPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -327,7 +327,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) ListPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutecircuitconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutecircuitconnections.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutecircuitconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutecircuitconnections.go index 506cb730e55e0..83674223397ef 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutecircuitconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutecircuitconnections.go @@ -75,7 +75,7 @@ func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdatePreparer(ctx co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -162,7 +162,7 @@ func (client ExpressRouteCircuitConnectionsClient) DeletePreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -251,7 +251,7 @@ func (client ExpressRouteCircuitConnectionsClient) GetPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -334,7 +334,7 @@ func (client ExpressRouteCircuitConnectionsClient) ListPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutecircuitpeerings.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutecircuitpeerings.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutecircuitpeerings.go index 35f9a8ea747a7..f502d7a7ae49b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutecircuitpeerings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutecircuitpeerings.go @@ -84,7 +84,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -169,7 +169,7 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -256,7 +256,7 @@ func (client ExpressRouteCircuitPeeringsClient) GetPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -337,7 +337,7 @@ func (client ExpressRouteCircuitPeeringsClient) ListPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutecircuits.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutecircuits.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutecircuits.go index ca025999283e5..6e6d664c9edd3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutecircuits.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutecircuits.go @@ -70,7 +70,7 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -152,7 +152,7 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -237,7 +237,7 @@ func (client ExpressRouteCircuitsClient) GetPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -315,7 +315,7 @@ func (client ExpressRouteCircuitsClient) GetPeeringStatsPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -391,7 +391,7 @@ func (client ExpressRouteCircuitsClient) GetStatsPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -470,7 +470,7 @@ func (client ExpressRouteCircuitsClient) ListPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -583,7 +583,7 @@ func (client ExpressRouteCircuitsClient) ListAllPreparer(ctx context.Context) (* "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -693,7 +693,7 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -777,7 +777,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -861,7 +861,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -948,7 +948,7 @@ func (client ExpressRouteCircuitsClient) UpdateTagsPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressrouteconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressrouteconnections.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressrouteconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressrouteconnections.go index 095e2580cd073..b58cfdf034cba 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressrouteconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressrouteconnections.go @@ -81,7 +81,7 @@ func (client ExpressRouteConnectionsClient) CreateOrUpdatePreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -164,7 +164,7 @@ func (client ExpressRouteConnectionsClient) DeletePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -251,7 +251,7 @@ func (client ExpressRouteConnectionsClient) GetPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -327,7 +327,7 @@ func (client ExpressRouteConnectionsClient) ListPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutecrossconnectionpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutecrossconnectionpeerings.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutecrossconnectionpeerings.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutecrossconnectionpeerings.go index d7b8c482ae275..a4fbcebcd4507 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutecrossconnectionpeerings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutecrossconnectionpeerings.go @@ -86,7 +86,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdatePreparer(c "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -170,7 +170,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) DeletePreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -257,7 +257,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) GetPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -338,7 +338,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) ListPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutecrossconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutecrossconnections.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutecrossconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutecrossconnections.go index 3d1ea4eac4e7f..5f644efbaa727 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutecrossconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutecrossconnections.go @@ -70,7 +70,7 @@ func (client ExpressRouteCrossConnectionsClient) CreateOrUpdatePreparer(ctx cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client ExpressRouteCrossConnectionsClient) GetPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -235,7 +235,7 @@ func (client ExpressRouteCrossConnectionsClient) ListPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -346,7 +346,7 @@ func (client ExpressRouteCrossConnectionsClient) ListArpTablePreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -435,7 +435,7 @@ func (client ExpressRouteCrossConnectionsClient) ListByResourceGroupPreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -546,7 +546,7 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTablePreparer(ctx con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -630,7 +630,7 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummaryPreparer( "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -717,7 +717,7 @@ func (client ExpressRouteCrossConnectionsClient) UpdateTagsPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutegateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutegateways.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutegateways.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutegateways.go index 62a0be607266f..7073ce13ba27c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutegateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutegateways.go @@ -78,7 +78,7 @@ func (client ExpressRouteGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -161,7 +161,7 @@ func (client ExpressRouteGatewaysClient) DeletePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -246,7 +246,7 @@ func (client ExpressRouteGatewaysClient) GetPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -320,7 +320,7 @@ func (client ExpressRouteGatewaysClient) ListByResourceGroupPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -391,7 +391,7 @@ func (client ExpressRouteGatewaysClient) ListBySubscriptionPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -461,7 +461,7 @@ func (client ExpressRouteGatewaysClient) UpdateTagsPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutelinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutelinks.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutelinks.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutelinks.go index 6772a6a5f672a..3f973edf64bfd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressroutelinks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressroutelinks.go @@ -78,7 +78,7 @@ func (client ExpressRouteLinksClient) GetPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client ExpressRouteLinksClient) ListPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressrouteportauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressrouteportauthorizations.go new file mode 100644 index 0000000000000..43ea09b6d4046 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressrouteportauthorizations.go @@ -0,0 +1,395 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ExpressRoutePortAuthorizationsClient is the network Client +type ExpressRoutePortAuthorizationsClient struct { + BaseClient +} + +// NewExpressRoutePortAuthorizationsClient creates an instance of the ExpressRoutePortAuthorizationsClient client. +func NewExpressRoutePortAuthorizationsClient(subscriptionID string) ExpressRoutePortAuthorizationsClient { + return NewExpressRoutePortAuthorizationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewExpressRoutePortAuthorizationsClientWithBaseURI creates an instance of the ExpressRoutePortAuthorizationsClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewExpressRoutePortAuthorizationsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRoutePortAuthorizationsClient { + return ExpressRoutePortAuthorizationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates an authorization in the specified express route port. +// Parameters: +// resourceGroupName - the name of the resource group. +// expressRoutePortName - the name of the express route port. +// authorizationName - the name of the authorization. +// authorizationParameters - parameters supplied to the create or update express route port authorization +// operation. +func (client ExpressRoutePortAuthorizationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string, authorizationParameters ExpressRoutePortAuthorization) (result ExpressRoutePortAuthorizationsCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortAuthorizationsClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, expressRoutePortName, authorizationName, authorizationParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortAuthorizationsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortAuthorizationsClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ExpressRoutePortAuthorizationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string, authorizationParameters ExpressRoutePortAuthorization) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "authorizationName": autorest.Encode("path", authorizationName), + "expressRoutePortName": autorest.Encode("path", expressRoutePortName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + authorizationParameters.Etag = nil + authorizationParameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}", pathParameters), + autorest.WithJSON(authorizationParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client ExpressRoutePortAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRoutePortAuthorizationsCreateOrUpdateFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ExpressRoutePortAuthorizationsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRoutePortAuthorization, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified authorization from the specified express route port. +// Parameters: +// resourceGroupName - the name of the resource group. +// expressRoutePortName - the name of the express route port. +// authorizationName - the name of the authorization. +func (client ExpressRoutePortAuthorizationsClient) Delete(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string) (result ExpressRoutePortAuthorizationsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortAuthorizationsClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, expressRoutePortName, authorizationName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortAuthorizationsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortAuthorizationsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ExpressRoutePortAuthorizationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "authorizationName": autorest.Encode("path", authorizationName), + "expressRoutePortName": autorest.Encode("path", expressRoutePortName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ExpressRoutePortAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRoutePortAuthorizationsDeleteFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ExpressRoutePortAuthorizationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified authorization from the specified express route port. +// Parameters: +// resourceGroupName - the name of the resource group. +// expressRoutePortName - the name of the express route port. +// authorizationName - the name of the authorization. +func (client ExpressRoutePortAuthorizationsClient) Get(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string) (result ExpressRoutePortAuthorization, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortAuthorizationsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, expressRoutePortName, authorizationName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortAuthorizationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortAuthorizationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortAuthorizationsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client ExpressRoutePortAuthorizationsClient) GetPreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string, authorizationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "authorizationName": autorest.Encode("path", authorizationName), + "expressRoutePortName": autorest.Encode("path", expressRoutePortName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ExpressRoutePortAuthorizationsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExpressRoutePortAuthorizationsClient) GetResponder(resp *http.Response) (result ExpressRoutePortAuthorization, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all authorizations in an express route port. +// Parameters: +// resourceGroupName - the name of the resource group. +// expressRoutePortName - the name of the express route port. +func (client ExpressRoutePortAuthorizationsClient) List(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result ExpressRoutePortAuthorizationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortAuthorizationsClient.List") + defer func() { + sc := -1 + if result.erpalr.Response.Response != nil { + sc = result.erpalr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, expressRoutePortName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortAuthorizationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.erpalr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortAuthorizationsClient", "List", resp, "Failure sending request") + return + } + + result.erpalr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortAuthorizationsClient", "List", resp, "Failure responding to request") + return + } + if result.erpalr.hasNextLink() && result.erpalr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ExpressRoutePortAuthorizationsClient) ListPreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "expressRoutePortName": autorest.Encode("path", expressRoutePortName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ExpressRoutePortAuthorizationsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ExpressRoutePortAuthorizationsClient) ListResponder(resp *http.Response) (result ExpressRoutePortAuthorizationListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ExpressRoutePortAuthorizationsClient) listNextResults(ctx context.Context, lastResults ExpressRoutePortAuthorizationListResult) (result ExpressRoutePortAuthorizationListResult, err error) { + req, err := lastResults.expressRoutePortAuthorizationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ExpressRoutePortAuthorizationsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.ExpressRoutePortAuthorizationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortAuthorizationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ExpressRoutePortAuthorizationsClient) ListComplete(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result ExpressRoutePortAuthorizationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortAuthorizationsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName, expressRoutePortName) + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressrouteports.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressrouteports.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressrouteports.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressrouteports.go index 5554d6d9066a1..bec868899b61a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressrouteports.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressrouteports.go @@ -71,7 +71,7 @@ func (client ExpressRoutePortsClient) CreateOrUpdatePreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -153,7 +153,7 @@ func (client ExpressRoutePortsClient) DeletePreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -245,7 +245,7 @@ func (client ExpressRoutePortsClient) GenerateLOAPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -323,7 +323,7 @@ func (client ExpressRoutePortsClient) GetPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -399,7 +399,7 @@ func (client ExpressRoutePortsClient) ListPreparer(ctx context.Context) (*http.R "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -515,7 +515,7 @@ func (client ExpressRoutePortsClient) ListByResourceGroupPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -629,7 +629,7 @@ func (client ExpressRoutePortsClient) UpdateTagsPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressrouteportslocations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressrouteportslocations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressrouteportslocations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressrouteportslocations.go index c799bd1787a60..feca9cf4eddc6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressrouteportslocations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressrouteportslocations.go @@ -75,7 +75,7 @@ func (client ExpressRoutePortsLocationsClient) GetPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -152,7 +152,7 @@ func (client ExpressRoutePortsLocationsClient) ListPreparer(ctx context.Context) "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressrouteserviceproviders.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressrouteserviceproviders.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressrouteserviceproviders.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressrouteserviceproviders.go index 1849ec2326de6..c237501b4d03a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/expressrouteserviceproviders.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/expressrouteserviceproviders.go @@ -76,7 +76,7 @@ func (client ExpressRouteServiceProvidersClient) ListPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/firewallpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/firewallpolicies.go similarity index 77% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/firewallpolicies.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/firewallpolicies.go index 2a9dab55f583a..dddc0c3b11f56 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/firewallpolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/firewallpolicies.go @@ -10,6 +10,7 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -47,6 +48,27 @@ func (client FirewallPoliciesClient) CreateOrUpdate(ctx context.Context, resourc tracing.EndSpan(ctx, sc, err) }() } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.FirewallPolicyPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyPropertiesFormat.ExplicitProxySettings", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyPropertiesFormat.ExplicitProxySettings.HTTPPort", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyPropertiesFormat.ExplicitProxySettings.HTTPPort", Name: validation.InclusiveMaximum, Rule: int64(64000), Chain: nil}, + {Target: "parameters.FirewallPolicyPropertiesFormat.ExplicitProxySettings.HTTPPort", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + {Target: "parameters.FirewallPolicyPropertiesFormat.ExplicitProxySettings.HTTPSPort", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyPropertiesFormat.ExplicitProxySettings.HTTPSPort", Name: validation.InclusiveMaximum, Rule: int64(64000), Chain: nil}, + {Target: "parameters.FirewallPolicyPropertiesFormat.ExplicitProxySettings.HTTPSPort", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + {Target: "parameters.FirewallPolicyPropertiesFormat.ExplicitProxySettings.PacFilePort", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.FirewallPolicyPropertiesFormat.ExplicitProxySettings.PacFilePort", Name: validation.InclusiveMaximum, Rule: int64(64000), Chain: nil}, + {Target: "parameters.FirewallPolicyPropertiesFormat.ExplicitProxySettings.PacFilePort", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, + }}, + }}, + }}}}}); err != nil { + return result, validation.NewError("network.FirewallPoliciesClient", "CreateOrUpdate", err.Error()) + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, firewallPolicyName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -70,7 +92,7 @@ func (client FirewallPoliciesClient) CreateOrUpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -152,7 +174,7 @@ func (client FirewallPoliciesClient) DeletePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -238,7 +260,7 @@ func (client FirewallPoliciesClient) GetPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -320,7 +342,7 @@ func (client FirewallPoliciesClient) ListPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -433,7 +455,7 @@ func (client FirewallPoliciesClient) ListAllPreparer(ctx context.Context) (*http "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -500,3 +522,82 @@ func (client FirewallPoliciesClient) ListAllComplete(ctx context.Context) (resul result.page, err = client.ListAll(ctx) return } + +// UpdateTags updates tags of a Azure Firewall Policy resource. +// Parameters: +// resourceGroupName - the name of the resource group. +// firewallPolicyName - the name of the Firewall Policy. +// parameters - parameters supplied to update Azure Firewall Policy tags. +func (client FirewallPoliciesClient) UpdateTags(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters TagsObject) (result FirewallPolicy, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPoliciesClient.UpdateTags") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, firewallPolicyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "UpdateTags", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateTagsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "UpdateTags", resp, "Failure sending request") + return + } + + result, err = client.UpdateTagsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "UpdateTags", resp, "Failure responding to request") + return + } + + return +} + +// UpdateTagsPreparer prepares the UpdateTags request. +func (client FirewallPoliciesClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters TagsObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "firewallPolicyName": autorest.Encode("path", firewallPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateTagsSender sends the UpdateTags request. The method will close the +// http.Response Body if it receives an error. +func (client FirewallPoliciesClient) UpdateTagsSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateTagsResponder handles the response to the UpdateTags request. The method always +// closes the http.Response Body. +func (client FirewallPoliciesClient) UpdateTagsResponder(resp *http.Response) (result FirewallPolicy, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/firewallpolicyidpssignatures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/firewallpolicyidpssignatures.go new file mode 100644 index 0000000000000..c920b64009a5f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/firewallpolicyidpssignatures.go @@ -0,0 +1,120 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// FirewallPolicyIdpsSignaturesClient is the network Client +type FirewallPolicyIdpsSignaturesClient struct { + BaseClient +} + +// NewFirewallPolicyIdpsSignaturesClient creates an instance of the FirewallPolicyIdpsSignaturesClient client. +func NewFirewallPolicyIdpsSignaturesClient(subscriptionID string) FirewallPolicyIdpsSignaturesClient { + return NewFirewallPolicyIdpsSignaturesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewFirewallPolicyIdpsSignaturesClientWithBaseURI creates an instance of the FirewallPolicyIdpsSignaturesClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewFirewallPolicyIdpsSignaturesClientWithBaseURI(baseURI string, subscriptionID string) FirewallPolicyIdpsSignaturesClient { + return FirewallPolicyIdpsSignaturesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List retrieves the current status of IDPS signatures for the relevant policy +// Parameters: +// resourceGroupName - the name of the resource group. +// firewallPolicyName - the name of the Firewall Policy. +func (client FirewallPolicyIdpsSignaturesClient) List(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters IDPSQueryObject) (result QueryResults, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyIdpsSignaturesClient.List") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.ResultsPerPage", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ResultsPerPage", Name: validation.InclusiveMaximum, Rule: int64(1000), Chain: nil}, + {Target: "parameters.ResultsPerPage", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("network.FirewallPolicyIdpsSignaturesClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, firewallPolicyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyIdpsSignaturesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.FirewallPolicyIdpsSignaturesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyIdpsSignaturesClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client FirewallPolicyIdpsSignaturesClient) ListPreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters IDPSQueryObject) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "firewallPolicyName": autorest.Encode("path", firewallPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/listIdpsSignatures", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client FirewallPolicyIdpsSignaturesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client FirewallPolicyIdpsSignaturesClient) ListResponder(resp *http.Response) (result QueryResults, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/firewallpolicyidpssignaturesfiltervalues.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/firewallpolicyidpssignaturesfiltervalues.go new file mode 100644 index 0000000000000..576612c8ed27c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/firewallpolicyidpssignaturesfiltervalues.go @@ -0,0 +1,111 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// FirewallPolicyIdpsSignaturesFilterValuesClient is the network Client +type FirewallPolicyIdpsSignaturesFilterValuesClient struct { + BaseClient +} + +// NewFirewallPolicyIdpsSignaturesFilterValuesClient creates an instance of the +// FirewallPolicyIdpsSignaturesFilterValuesClient client. +func NewFirewallPolicyIdpsSignaturesFilterValuesClient(subscriptionID string) FirewallPolicyIdpsSignaturesFilterValuesClient { + return NewFirewallPolicyIdpsSignaturesFilterValuesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewFirewallPolicyIdpsSignaturesFilterValuesClientWithBaseURI creates an instance of the +// FirewallPolicyIdpsSignaturesFilterValuesClient client using a custom endpoint. Use this when interacting with an +// Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewFirewallPolicyIdpsSignaturesFilterValuesClientWithBaseURI(baseURI string, subscriptionID string) FirewallPolicyIdpsSignaturesFilterValuesClient { + return FirewallPolicyIdpsSignaturesFilterValuesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List retrieves the current filter values for the signatures overrides +// Parameters: +// resourceGroupName - the name of the resource group. +// firewallPolicyName - the name of the Firewall Policy. +func (client FirewallPolicyIdpsSignaturesFilterValuesClient) List(ctx context.Context, parameters SignatureOverridesFilterValuesQuery, resourceGroupName string, firewallPolicyName string) (result SignatureOverridesFilterValuesResponse, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyIdpsSignaturesFilterValuesClient.List") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListPreparer(ctx, parameters, resourceGroupName, firewallPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyIdpsSignaturesFilterValuesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.FirewallPolicyIdpsSignaturesFilterValuesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyIdpsSignaturesFilterValuesClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client FirewallPolicyIdpsSignaturesFilterValuesClient) ListPreparer(ctx context.Context, parameters SignatureOverridesFilterValuesQuery, resourceGroupName string, firewallPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "firewallPolicyName": autorest.Encode("path", firewallPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/listIdpsFilterOptions", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client FirewallPolicyIdpsSignaturesFilterValuesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client FirewallPolicyIdpsSignaturesFilterValuesClient) ListResponder(resp *http.Response) (result SignatureOverridesFilterValuesResponse, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/firewallpolicyidpssignaturesoverrides.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/firewallpolicyidpssignaturesoverrides.go new file mode 100644 index 0000000000000..6ab55b16199ba --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/firewallpolicyidpssignaturesoverrides.go @@ -0,0 +1,343 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// FirewallPolicyIdpsSignaturesOverridesClient is the network Client +type FirewallPolicyIdpsSignaturesOverridesClient struct { + BaseClient +} + +// NewFirewallPolicyIdpsSignaturesOverridesClient creates an instance of the +// FirewallPolicyIdpsSignaturesOverridesClient client. +func NewFirewallPolicyIdpsSignaturesOverridesClient(subscriptionID string) FirewallPolicyIdpsSignaturesOverridesClient { + return NewFirewallPolicyIdpsSignaturesOverridesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewFirewallPolicyIdpsSignaturesOverridesClientWithBaseURI creates an instance of the +// FirewallPolicyIdpsSignaturesOverridesClient client using a custom endpoint. Use this when interacting with an Azure +// cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewFirewallPolicyIdpsSignaturesOverridesClientWithBaseURI(baseURI string, subscriptionID string) FirewallPolicyIdpsSignaturesOverridesClient { + return FirewallPolicyIdpsSignaturesOverridesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get returns all signatures overrides for a specific policy. +// Parameters: +// resourceGroupName - the name of the resource group. +// firewallPolicyName - the name of the Firewall Policy. +func (client FirewallPolicyIdpsSignaturesOverridesClient) Get(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result SignaturesOverrides, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyIdpsSignaturesOverridesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, firewallPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyIdpsSignaturesOverridesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.FirewallPolicyIdpsSignaturesOverridesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyIdpsSignaturesOverridesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client FirewallPolicyIdpsSignaturesOverridesClient) GetPreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "firewallPolicyName": autorest.Encode("path", firewallPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client FirewallPolicyIdpsSignaturesOverridesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client FirewallPolicyIdpsSignaturesOverridesClient) GetResponder(resp *http.Response) (result SignaturesOverrides, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List returns all signatures overrides objects for a specific policy as a list containing a single value. +// Parameters: +// resourceGroupName - the name of the resource group. +// firewallPolicyName - the name of the Firewall Policy. +func (client FirewallPolicyIdpsSignaturesOverridesClient) List(ctx context.Context, resourceGroupName string, firewallPolicyName string) (result SignaturesOverridesList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyIdpsSignaturesOverridesClient.List") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListPreparer(ctx, resourceGroupName, firewallPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyIdpsSignaturesOverridesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.FirewallPolicyIdpsSignaturesOverridesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyIdpsSignaturesOverridesClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client FirewallPolicyIdpsSignaturesOverridesClient) ListPreparer(ctx context.Context, resourceGroupName string, firewallPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "firewallPolicyName": autorest.Encode("path", firewallPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client FirewallPolicyIdpsSignaturesOverridesClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client FirewallPolicyIdpsSignaturesOverridesClient) ListResponder(resp *http.Response) (result SignaturesOverridesList, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Patch will update the status of policy's signature overrides for IDPS +// Parameters: +// parameters - will contain all properties of the object to put +// resourceGroupName - the name of the resource group. +// firewallPolicyName - the name of the Firewall Policy. +func (client FirewallPolicyIdpsSignaturesOverridesClient) Patch(ctx context.Context, parameters SignaturesOverrides, resourceGroupName string, firewallPolicyName string) (result SignaturesOverrides, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyIdpsSignaturesOverridesClient.Patch") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.PatchPreparer(ctx, parameters, resourceGroupName, firewallPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyIdpsSignaturesOverridesClient", "Patch", nil, "Failure preparing request") + return + } + + resp, err := client.PatchSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.FirewallPolicyIdpsSignaturesOverridesClient", "Patch", resp, "Failure sending request") + return + } + + result, err = client.PatchResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyIdpsSignaturesOverridesClient", "Patch", resp, "Failure responding to request") + return + } + + return +} + +// PatchPreparer prepares the Patch request. +func (client FirewallPolicyIdpsSignaturesOverridesClient) PatchPreparer(ctx context.Context, parameters SignaturesOverrides, resourceGroupName string, firewallPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "firewallPolicyName": autorest.Encode("path", firewallPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PatchSender sends the Patch request. The method will close the +// http.Response Body if it receives an error. +func (client FirewallPolicyIdpsSignaturesOverridesClient) PatchSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// PatchResponder handles the response to the Patch request. The method always +// closes the http.Response Body. +func (client FirewallPolicyIdpsSignaturesOverridesClient) PatchResponder(resp *http.Response) (result SignaturesOverrides, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Put will override/create a new signature overrides for the policy's IDPS +// Parameters: +// parameters - will contain all properties of the object to put +// resourceGroupName - the name of the resource group. +// firewallPolicyName - the name of the Firewall Policy. +func (client FirewallPolicyIdpsSignaturesOverridesClient) Put(ctx context.Context, parameters SignaturesOverrides, resourceGroupName string, firewallPolicyName string) (result SignaturesOverrides, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/FirewallPolicyIdpsSignaturesOverridesClient.Put") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.PutPreparer(ctx, parameters, resourceGroupName, firewallPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyIdpsSignaturesOverridesClient", "Put", nil, "Failure preparing request") + return + } + + resp, err := client.PutSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.FirewallPolicyIdpsSignaturesOverridesClient", "Put", resp, "Failure sending request") + return + } + + result, err = client.PutResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.FirewallPolicyIdpsSignaturesOverridesClient", "Put", resp, "Failure responding to request") + return + } + + return +} + +// PutPreparer prepares the Put request. +func (client FirewallPolicyIdpsSignaturesOverridesClient) PutPreparer(ctx context.Context, parameters SignaturesOverrides, resourceGroupName string, firewallPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "firewallPolicyName": autorest.Encode("path", firewallPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// PutSender sends the Put request. The method will close the +// http.Response Body if it receives an error. +func (client FirewallPolicyIdpsSignaturesOverridesClient) PutSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// PutResponder handles the response to the Put request. The method always +// closes the http.Response Body. +func (client FirewallPolicyIdpsSignaturesOverridesClient) PutResponder(resp *http.Response) (result SignaturesOverrides, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/firewallpolicyrulecollectiongroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/firewallpolicyrulecollectiongroups.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/firewallpolicyrulecollectiongroups.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/firewallpolicyrulecollectiongroups.go index e7449dffe1caa..5e93d360c63ba 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/firewallpolicyrulecollectiongroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/firewallpolicyrulecollectiongroups.go @@ -85,7 +85,7 @@ func (client FirewallPolicyRuleCollectionGroupsClient) CreateOrUpdatePreparer(ct "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -170,7 +170,7 @@ func (client FirewallPolicyRuleCollectionGroupsClient) DeletePreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -257,7 +257,7 @@ func (client FirewallPolicyRuleCollectionGroupsClient) GetPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -338,7 +338,7 @@ func (client FirewallPolicyRuleCollectionGroupsClient) ListPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/flowlogs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/flowlogs.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/flowlogs.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/flowlogs.go index f7b27ddbe06a4..6437b94c0910e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/flowlogs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/flowlogs.go @@ -81,7 +81,7 @@ func (client FlowLogsClient) CreateOrUpdatePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -165,7 +165,7 @@ func (client FlowLogsClient) DeletePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -252,7 +252,7 @@ func (client FlowLogsClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -333,7 +333,7 @@ func (client FlowLogsClient) ListPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -449,7 +449,7 @@ func (client FlowLogsClient) UpdateTagsPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/hubroutetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/hubroutetables.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/hubroutetables.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/hubroutetables.go index 1cfb13e2520e2..579df8d7267cc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/hubroutetables.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/hubroutetables.go @@ -71,7 +71,7 @@ func (client HubRouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, r "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -156,7 +156,7 @@ func (client HubRouteTablesClient) DeletePreparer(ctx context.Context, resourceG "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -243,7 +243,7 @@ func (client HubRouteTablesClient) GetPreparer(ctx context.Context, resourceGrou "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -324,7 +324,7 @@ func (client HubRouteTablesClient) ListPreparer(ctx context.Context, resourceGro "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/hubvirtualnetworkconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/hubvirtualnetworkconnections.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/hubvirtualnetworkconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/hubvirtualnetworkconnections.go index 5db2f429d0a00..2e68e70e460fa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/hubvirtualnetworkconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/hubvirtualnetworkconnections.go @@ -73,7 +73,7 @@ func (client HubVirtualNetworkConnectionsClient) CreateOrUpdatePreparer(ctx cont "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -157,7 +157,7 @@ func (client HubVirtualNetworkConnectionsClient) DeletePreparer(ctx context.Cont "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -244,7 +244,7 @@ func (client HubVirtualNetworkConnectionsClient) GetPreparer(ctx context.Context "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -325,7 +325,7 @@ func (client HubVirtualNetworkConnectionsClient) ListPreparer(ctx context.Contex "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/inboundnatrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/inboundnatrules.go similarity index 89% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/inboundnatrules.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/inboundnatrules.go index f80e73b9fcc0c..f603374e192e3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/inboundnatrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/inboundnatrules.go @@ -31,12 +31,12 @@ func NewInboundNatRulesClientWithBaseURI(baseURI string, subscriptionID string) return InboundNatRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates a load balancer inbound nat rule. +// CreateOrUpdate creates or updates a load balancer inbound NAT rule. // Parameters: // resourceGroupName - the name of the resource group. // loadBalancerName - the name of the load balancer. -// inboundNatRuleName - the name of the inbound nat rule. -// inboundNatRuleParameters - parameters supplied to the create or update inbound nat rule operation. +// inboundNatRuleName - the name of the inbound NAT rule. +// inboundNatRuleParameters - parameters supplied to the create or update inbound NAT rule operation. func (client InboundNatRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, inboundNatRuleParameters InboundNatRule) (result InboundNatRulesCreateOrUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRulesClient.CreateOrUpdate") @@ -54,18 +54,14 @@ func (client InboundNatRulesClient) CreateOrUpdate(ctx context.Context, resource Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.ExtendedLocation", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.ExtendedLocation.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.ExtendedLocation.Type", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, - }}, - {Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.ServicePublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, - {Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.LinkedPublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, }}, + {Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.ServicePublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + {Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.LinkedPublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + }}, }}, }}, }}, @@ -97,7 +93,7 @@ func (client InboundNatRulesClient) CreateOrUpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -142,11 +138,11 @@ func (client InboundNatRulesClient) CreateOrUpdateResponder(resp *http.Response) return } -// Delete deletes the specified load balancer inbound nat rule. +// Delete deletes the specified load balancer inbound NAT rule. // Parameters: // resourceGroupName - the name of the resource group. // loadBalancerName - the name of the load balancer. -// inboundNatRuleName - the name of the inbound nat rule. +// inboundNatRuleName - the name of the inbound NAT rule. func (client InboundNatRulesClient) Delete(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string) (result InboundNatRulesDeleteFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRulesClient.Delete") @@ -182,7 +178,7 @@ func (client InboundNatRulesClient) DeletePreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -222,11 +218,11 @@ func (client InboundNatRulesClient) DeleteResponder(resp *http.Response) (result return } -// Get gets the specified load balancer inbound nat rule. +// Get gets the specified load balancer inbound NAT rule. // Parameters: // resourceGroupName - the name of the resource group. // loadBalancerName - the name of the load balancer. -// inboundNatRuleName - the name of the inbound nat rule. +// inboundNatRuleName - the name of the inbound NAT rule. // expand - expands referenced resources. func (client InboundNatRulesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, expand string) (result InboundNatRule, err error) { if tracing.IsEnabled() { @@ -270,7 +266,7 @@ func (client InboundNatRulesClient) GetPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -304,7 +300,7 @@ func (client InboundNatRulesClient) GetResponder(resp *http.Response) (result In return } -// List gets all the inbound nat rules in a load balancer. +// List gets all the inbound NAT rules in a load balancer. // Parameters: // resourceGroupName - the name of the resource group. // loadBalancerName - the name of the load balancer. @@ -354,7 +350,7 @@ func (client InboundNatRulesClient) ListPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/inboundsecurityrule.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/inboundsecurityrule.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/inboundsecurityrule.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/inboundsecurityrule.go index cd9a2ff2f3055..d4279e18a3911 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/inboundsecurityrule.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/inboundsecurityrule.go @@ -73,7 +73,7 @@ func (client InboundSecurityRuleClient) CreateOrUpdatePreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/interfaceipconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/interfaceipconfigurations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/interfaceipconfigurations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/interfaceipconfigurations.go index 6dd1d2654c020..c2675352841f0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/interfaceipconfigurations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/interfaceipconfigurations.go @@ -78,7 +78,7 @@ func (client InterfaceIPConfigurationsClient) GetPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client InterfaceIPConfigurationsClient) ListPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/interfaceloadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/interfaceloadbalancers.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/interfaceloadbalancers.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/interfaceloadbalancers.go index 57329deb9b824..cc49e62e6eccf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/interfaceloadbalancers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/interfaceloadbalancers.go @@ -81,7 +81,7 @@ func (client InterfaceLoadBalancersClient) ListPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/interfacesgroup.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/interfacesgroup.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/interfacesgroup.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/interfacesgroup.go index 458a5060f7591..2ace149c5a5f2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/interfacesgroup.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/interfacesgroup.go @@ -10,7 +10,6 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -47,29 +46,6 @@ func (client InterfacesClient) CreateOrUpdate(ctx context.Context, resourceGroup tracing.EndSpan(ctx, sc, err) }() } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ExtendedLocation", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ExtendedLocation.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ExtendedLocation.Type", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.InterfacePropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.InterfacePropertiesFormat.PrivateEndpoint", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.InterfacePropertiesFormat.PrivateEndpoint.ExtendedLocation", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.InterfacePropertiesFormat.PrivateEndpoint.ExtendedLocation.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.InterfacePropertiesFormat.PrivateEndpoint.ExtendedLocation.Type", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}, - {Target: "parameters.InterfacePropertiesFormat.PrivateLinkService", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.InterfacePropertiesFormat.PrivateLinkService.ExtendedLocation", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.InterfacePropertiesFormat.PrivateLinkService.ExtendedLocation.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.InterfacePropertiesFormat.PrivateLinkService.ExtendedLocation.Type", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}, - }}}}}); err != nil { - return result, validation.NewError("network.InterfacesClient", "CreateOrUpdate", err.Error()) - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkInterfaceName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.InterfacesClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -93,7 +69,7 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -175,7 +151,7 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -261,7 +237,7 @@ func (client InterfacesClient) GetPreparer(ctx context.Context, resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -345,7 +321,7 @@ func (client InterfacesClient) GetCloudServiceNetworkInterfacePreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -417,7 +393,7 @@ func (client InterfacesClient) GetEffectiveRouteTablePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -511,7 +487,7 @@ func (client InterfacesClient) GetVirtualMachineScaleSetIPConfigurationPreparer( "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), } - const APIVersion = "2018-10-01" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -595,7 +571,7 @@ func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterfacePreparer "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), } - const APIVersion = "2018-10-01" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -677,7 +653,7 @@ func (client InterfacesClient) ListPreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -790,7 +766,7 @@ func (client InterfacesClient) ListAllPreparer(ctx context.Context) (*http.Reque "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -908,7 +884,7 @@ func (client InterfacesClient) ListCloudServiceNetworkInterfacesPreparer(ctx con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1029,7 +1005,7 @@ func (client InterfacesClient) ListCloudServiceRoleInstanceNetworkInterfacesPrep "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1135,7 +1111,7 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(ctx co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1232,7 +1208,7 @@ func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurationsPrepare "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), } - const APIVersion = "2018-10-01" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1353,7 +1329,7 @@ func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesPrepar "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), } - const APIVersion = "2018-10-01" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1474,7 +1450,7 @@ func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesPrep "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), } - const APIVersion = "2018-10-01" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1588,7 +1564,7 @@ func (client InterfacesClient) UpdateTagsPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/interfacetapconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/interfacetapconfigurations.go similarity index 86% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/interfacetapconfigurations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/interfacetapconfigurations.go index ddf39e9c2ebe5..bf16177e294e5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/interfacetapconfigurations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/interfacetapconfigurations.go @@ -57,36 +57,28 @@ func (client InterfaceTapConfigurationsClient) CreateOrUpdate(ctx context.Contex Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.ExtendedLocation", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.ExtendedLocation.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.ExtendedLocation.Type", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, - }}, - {Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.ServicePublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, - {Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.LinkedPublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, }}, + {Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.ServicePublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + {Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.LinkedPublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + }}, }}, }}, }}, {Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.ExtendedLocation", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.ExtendedLocation.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.ExtendedLocation.Type", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, - }}, - {Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.ServicePublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, - {Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.LinkedPublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, }}, + {Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.ServicePublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + {Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat.VirtualNetworkTap.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.LinkedPublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + }}, }}, }}, }}, @@ -120,7 +112,7 @@ func (client InterfaceTapConfigurationsClient) CreateOrUpdatePreparer(ctx contex "tapConfigurationName": autorest.Encode("path", tapConfigurationName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -205,7 +197,7 @@ func (client InterfaceTapConfigurationsClient) DeletePreparer(ctx context.Contex "tapConfigurationName": autorest.Encode("path", tapConfigurationName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -292,7 +284,7 @@ func (client InterfaceTapConfigurationsClient) GetPreparer(ctx context.Context, "tapConfigurationName": autorest.Encode("path", tapConfigurationName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -373,7 +365,7 @@ func (client InterfaceTapConfigurationsClient) ListPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/ipallocations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/ipallocations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/ipallocations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/ipallocations.go index 02118252f7c92..764e051e00528 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/ipallocations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/ipallocations.go @@ -69,7 +69,7 @@ func (client IPAllocationsClient) CreateOrUpdatePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -151,7 +151,7 @@ func (client IPAllocationsClient) DeletePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -237,7 +237,7 @@ func (client IPAllocationsClient) GetPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -316,7 +316,7 @@ func (client IPAllocationsClient) ListPreparer(ctx context.Context) (*http.Reque "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -432,7 +432,7 @@ func (client IPAllocationsClient) ListByResourceGroupPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -546,7 +546,7 @@ func (client IPAllocationsClient) UpdateTagsPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/ipgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/ipgroups.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/ipgroups.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/ipgroups.go index 3f12af9669519..ec763e6966c16 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/ipgroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/ipgroups.go @@ -69,7 +69,7 @@ func (client IPGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -151,7 +151,7 @@ func (client IPGroupsClient) DeletePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -238,7 +238,7 @@ func (client IPGroupsClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -317,7 +317,7 @@ func (client IPGroupsClient) ListPreparer(ctx context.Context) (*http.Request, e "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -433,7 +433,7 @@ func (client IPGroupsClient) ListByResourceGroupPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -547,7 +547,7 @@ func (client IPGroupsClient) UpdateGroupsPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/loadbalancerbackendaddresspools.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/loadbalancerbackendaddresspools.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/loadbalancerbackendaddresspools.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/loadbalancerbackendaddresspools.go index 1fe0f4231c5fc..8f5cf4c572b02 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/loadbalancerbackendaddresspools.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/loadbalancerbackendaddresspools.go @@ -72,7 +72,7 @@ func (client LoadBalancerBackendAddressPoolsClient) CreateOrUpdatePreparer(ctx c "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -157,7 +157,7 @@ func (client LoadBalancerBackendAddressPoolsClient) DeletePreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -244,7 +244,7 @@ func (client LoadBalancerBackendAddressPoolsClient) GetPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -325,7 +325,7 @@ func (client LoadBalancerBackendAddressPoolsClient) ListPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/loadbalancerfrontendipconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/loadbalancerfrontendipconfigurations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/loadbalancerfrontendipconfigurations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/loadbalancerfrontendipconfigurations.go index 694853a0b7ab3..89fcfa437255f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/loadbalancerfrontendipconfigurations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/loadbalancerfrontendipconfigurations.go @@ -79,7 +79,7 @@ func (client LoadBalancerFrontendIPConfigurationsClient) GetPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -160,7 +160,7 @@ func (client LoadBalancerFrontendIPConfigurationsClient) ListPreparer(ctx contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/loadbalancerloadbalancingrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/loadbalancerloadbalancingrules.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/loadbalancerloadbalancingrules.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/loadbalancerloadbalancingrules.go index 46ecd7abfe571..61d0a0eb6ad6d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/loadbalancerloadbalancingrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/loadbalancerloadbalancingrules.go @@ -78,7 +78,7 @@ func (client LoadBalancerLoadBalancingRulesClient) GetPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client LoadBalancerLoadBalancingRulesClient) ListPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/loadbalancernetworkinterfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/loadbalancernetworkinterfaces.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/loadbalancernetworkinterfaces.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/loadbalancernetworkinterfaces.go index d73de3b0cb784..979d6bbc8d463 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/loadbalancernetworkinterfaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/loadbalancernetworkinterfaces.go @@ -81,7 +81,7 @@ func (client LoadBalancerNetworkInterfacesClient) ListPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/loadbalanceroutboundrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/loadbalanceroutboundrules.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/loadbalanceroutboundrules.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/loadbalanceroutboundrules.go index 00fcb69dede23..c0a7ee956cb17 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/loadbalanceroutboundrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/loadbalanceroutboundrules.go @@ -78,7 +78,7 @@ func (client LoadBalancerOutboundRulesClient) GetPreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client LoadBalancerOutboundRulesClient) ListPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/loadbalancerprobes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/loadbalancerprobes.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/loadbalancerprobes.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/loadbalancerprobes.go index fd2ca3855c975..e6f4119d9d0ae 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/loadbalancerprobes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/loadbalancerprobes.go @@ -78,7 +78,7 @@ func (client LoadBalancerProbesClient) GetPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -159,7 +159,7 @@ func (client LoadBalancerProbesClient) ListPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/loadbalancers.go similarity index 75% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/loadbalancers.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/loadbalancers.go index b46c602f9188d..47a59550a3baf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/loadbalancers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/loadbalancers.go @@ -10,7 +10,6 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -47,15 +46,6 @@ func (client LoadBalancersClient) CreateOrUpdate(ctx context.Context, resourceGr tracing.EndSpan(ctx, sc, err) }() } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ExtendedLocation", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ExtendedLocation.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ExtendedLocation.Type", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("network.LoadBalancersClient", "CreateOrUpdate", err.Error()) - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, loadBalancerName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -79,7 +69,7 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -161,7 +151,7 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -247,7 +237,7 @@ func (client LoadBalancersClient) GetPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -329,7 +319,7 @@ func (client LoadBalancersClient) ListPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -442,7 +432,7 @@ func (client LoadBalancersClient) ListAllPreparer(ctx context.Context) (*http.Re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -510,6 +500,169 @@ func (client LoadBalancersClient) ListAllComplete(ctx context.Context) (result L return } +// ListInboundNatRulePortMappings list of inbound NAT rule port mappings. +// Parameters: +// groupName - the name of the resource group. +// loadBalancerName - the name of the load balancer. +// backendPoolName - the name of the load balancer backend address pool. +// parameters - query inbound NAT rule port mapping request. +func (client LoadBalancersClient) ListInboundNatRulePortMappings(ctx context.Context, groupName string, loadBalancerName string, backendPoolName string, parameters QueryInboundNatRulePortMappingRequest) (result LoadBalancersListInboundNatRulePortMappingsFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.ListInboundNatRulePortMappings") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListInboundNatRulePortMappingsPreparer(ctx, groupName, loadBalancerName, backendPoolName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "ListInboundNatRulePortMappings", nil, "Failure preparing request") + return + } + + result, err = client.ListInboundNatRulePortMappingsSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "ListInboundNatRulePortMappings", result.Response(), "Failure sending request") + return + } + + return +} + +// ListInboundNatRulePortMappingsPreparer prepares the ListInboundNatRulePortMappings request. +func (client LoadBalancersClient) ListInboundNatRulePortMappingsPreparer(ctx context.Context, groupName string, loadBalancerName string, backendPoolName string, parameters QueryInboundNatRulePortMappingRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backendPoolName": autorest.Encode("path", backendPoolName), + "groupName": autorest.Encode("path", groupName), + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendPoolName}/queryInboundNatRulePortMapping", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListInboundNatRulePortMappingsSender sends the ListInboundNatRulePortMappings request. The method will close the +// http.Response Body if it receives an error. +func (client LoadBalancersClient) ListInboundNatRulePortMappingsSender(req *http.Request) (future LoadBalancersListInboundNatRulePortMappingsFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// ListInboundNatRulePortMappingsResponder handles the response to the ListInboundNatRulePortMappings request. The method always +// closes the http.Response Body. +func (client LoadBalancersClient) ListInboundNatRulePortMappingsResponder(resp *http.Response) (result BackendAddressInboundNatRulePortMappings, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// SwapPublicIPAddresses swaps VIPs between two load balancers. +// Parameters: +// location - the region where load balancers are located at. +// parameters - parameters that define which VIPs should be swapped. +func (client LoadBalancersClient) SwapPublicIPAddresses(ctx context.Context, location string, parameters LoadBalancerVipSwapRequest) (result LoadBalancersSwapPublicIPAddressesFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.SwapPublicIPAddresses") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.SwapPublicIPAddressesPreparer(ctx, location, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "SwapPublicIPAddresses", nil, "Failure preparing request") + return + } + + result, err = client.SwapPublicIPAddressesSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "SwapPublicIPAddresses", result.Response(), "Failure sending request") + return + } + + return +} + +// SwapPublicIPAddressesPreparer prepares the SwapPublicIPAddresses request. +func (client LoadBalancersClient) SwapPublicIPAddressesPreparer(ctx context.Context, location string, parameters LoadBalancerVipSwapRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/setLoadBalancerFrontendPublicIpAddresses", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// SwapPublicIPAddressesSender sends the SwapPublicIPAddresses request. The method will close the +// http.Response Body if it receives an error. +func (client LoadBalancersClient) SwapPublicIPAddressesSender(req *http.Request) (future LoadBalancersSwapPublicIPAddressesFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// SwapPublicIPAddressesResponder handles the response to the SwapPublicIPAddresses request. The method always +// closes the http.Response Body. +func (client LoadBalancersClient) SwapPublicIPAddressesResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + // UpdateTags updates a load balancer tags. // Parameters: // resourceGroupName - the name of the resource group. @@ -556,7 +709,7 @@ func (client LoadBalancersClient) UpdateTagsPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/localnetworkgateways.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/localnetworkgateways.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/localnetworkgateways.go index fbd11e41d6810..c7cd62e8c913f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/localnetworkgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/localnetworkgateways.go @@ -86,7 +86,7 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -174,7 +174,7 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -265,7 +265,7 @@ func (client LocalNetworkGatewaysClient) GetPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -344,7 +344,7 @@ func (client LocalNetworkGatewaysClient) ListPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -464,7 +464,7 @@ func (client LocalNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/models.go similarity index 93% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/models.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/models.go index 227218bb6429f..fc6475f7f8155 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/models.go @@ -18,7 +18,7 @@ import ( ) // The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network" +const fqdn = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network" // AadAuthenticationParameters AAD Vpn authentication type related parameters. type AadAuthenticationParameters struct { @@ -838,7 +838,7 @@ func (agbhs *ApplicationGatewayBackendHTTPSettings) UnmarshalJSON(body []byte) e type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct { // Port - The destination port on the backend. Port *int32 `json:"port,omitempty"` - // Protocol - The protocol used to communicate with the backend. Possible values include: 'ApplicationGatewayProtocolHTTP', 'ApplicationGatewayProtocolHTTPS' + // Protocol - The protocol used to communicate with the backend. Possible values include: 'ApplicationGatewayProtocolHTTP', 'ApplicationGatewayProtocolHTTPS', 'ApplicationGatewayProtocolTCP', 'ApplicationGatewayProtocolTLS' Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` // CookieBasedAffinity - Cookie based affinity. Possible values include: 'ApplicationGatewayCookieBasedAffinityEnabled', 'ApplicationGatewayCookieBasedAffinityDisabled' CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"` @@ -911,6 +911,143 @@ func (agbhspf ApplicationGatewayBackendHTTPSettingsPropertiesFormat) MarshalJSON return json.Marshal(objectMap) } +// ApplicationGatewayBackendSettings backend address pool settings of an application gateway. +type ApplicationGatewayBackendSettings struct { + // ApplicationGatewayBackendSettingsPropertiesFormat - Properties of the application gateway backend settings. + *ApplicationGatewayBackendSettingsPropertiesFormat `json:"properties,omitempty"` + // Name - Name of the backend settings that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayBackendSettings. +func (agbs ApplicationGatewayBackendSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agbs.ApplicationGatewayBackendSettingsPropertiesFormat != nil { + objectMap["properties"] = agbs.ApplicationGatewayBackendSettingsPropertiesFormat + } + if agbs.Name != nil { + objectMap["name"] = agbs.Name + } + if agbs.ID != nil { + objectMap["id"] = agbs.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayBackendSettings struct. +func (agbs *ApplicationGatewayBackendSettings) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var applicationGatewayBackendSettingsPropertiesFormat ApplicationGatewayBackendSettingsPropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayBackendSettingsPropertiesFormat) + if err != nil { + return err + } + agbs.ApplicationGatewayBackendSettingsPropertiesFormat = &applicationGatewayBackendSettingsPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agbs.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agbs.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agbs.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agbs.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayBackendSettingsPropertiesFormat properties of Backend address pool settings of an +// application gateway. +type ApplicationGatewayBackendSettingsPropertiesFormat struct { + // Port - The destination port on the backend. + Port *int32 `json:"port,omitempty"` + // Protocol - The protocol used to communicate with the backend. Possible values include: 'ApplicationGatewayProtocolHTTP', 'ApplicationGatewayProtocolHTTPS', 'ApplicationGatewayProtocolTCP', 'ApplicationGatewayProtocolTLS' + Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` + // Timeout - Connection timeout in seconds. Application Gateway will fail the request if response is not received within ConnectionTimeout. Acceptable values are from 1 second to 86400 seconds. + Timeout *int32 `json:"timeout,omitempty"` + // Probe - Probe resource of an application gateway. + Probe *SubResource `json:"probe,omitempty"` + // TrustedRootCertificates - Array of references to application gateway trusted root certificates. + TrustedRootCertificates *[]SubResource `json:"trustedRootCertificates,omitempty"` + // HostName - Server name indication to be sent to the backend servers for Tls protocol. + HostName *string `json:"hostName,omitempty"` + // PickHostNameFromBackendAddress - Whether to pick server name indication from the host name of the backend server for Tls protocol. Default value is false. + PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the backend HTTP settings resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayBackendSettingsPropertiesFormat. +func (agbspf ApplicationGatewayBackendSettingsPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agbspf.Port != nil { + objectMap["port"] = agbspf.Port + } + if agbspf.Protocol != "" { + objectMap["protocol"] = agbspf.Protocol + } + if agbspf.Timeout != nil { + objectMap["timeout"] = agbspf.Timeout + } + if agbspf.Probe != nil { + objectMap["probe"] = agbspf.Probe + } + if agbspf.TrustedRootCertificates != nil { + objectMap["trustedRootCertificates"] = agbspf.TrustedRootCertificates + } + if agbspf.HostName != nil { + objectMap["hostName"] = agbspf.HostName + } + if agbspf.PickHostNameFromBackendAddress != nil { + objectMap["pickHostNameFromBackendAddress"] = agbspf.PickHostNameFromBackendAddress + } + return json.Marshal(objectMap) +} + // ApplicationGatewayClientAuthConfiguration application gateway client authentication configuration. type ApplicationGatewayClientAuthConfiguration struct { // VerifyClientCertIssuerDN - Verify client certificate issuer name on the application gateway. @@ -1335,6 +1472,14 @@ func (agfppf ApplicationGatewayFrontendPortPropertiesFormat) MarshalJSON() ([]by return json.Marshal(objectMap) } +// ApplicationGatewayGlobalConfiguration application Gateway global configuration. +type ApplicationGatewayGlobalConfiguration struct { + // EnableRequestBuffering - Enable request buffering. + EnableRequestBuffering *bool `json:"enableRequestBuffering,omitempty"` + // EnableResponseBuffering - Enable response buffering. + EnableResponseBuffering *bool `json:"enableResponseBuffering,omitempty"` +} + // ApplicationGatewayHeaderConfiguration header configuration of the Actions set in Application Gateway. type ApplicationGatewayHeaderConfiguration struct { // HeaderName - Header name of the header configuration. @@ -1438,7 +1583,7 @@ type ApplicationGatewayHTTPListenerPropertiesFormat struct { FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` // FrontendPort - Frontend port resource of an application gateway. FrontendPort *SubResource `json:"frontendPort,omitempty"` - // Protocol - Protocol of the HTTP listener. Possible values include: 'ApplicationGatewayProtocolHTTP', 'ApplicationGatewayProtocolHTTPS' + // Protocol - Protocol of the HTTP listener. Possible values include: 'ApplicationGatewayProtocolHTTP', 'ApplicationGatewayProtocolHTTPS', 'ApplicationGatewayProtocolTCP', 'ApplicationGatewayProtocolTLS' Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` // HostName - Host name of HTTP listener. HostName *string `json:"hostName,omitempty"` @@ -1602,6 +1747,132 @@ func (agicpf ApplicationGatewayIPConfigurationPropertiesFormat) MarshalJSON() ([ return json.Marshal(objectMap) } +// ApplicationGatewayListener listener of an application gateway. +type ApplicationGatewayListener struct { + // ApplicationGatewayListenerPropertiesFormat - Properties of the application gateway listener. + *ApplicationGatewayListenerPropertiesFormat `json:"properties,omitempty"` + // Name - Name of the listener that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayListener. +func (agl ApplicationGatewayListener) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agl.ApplicationGatewayListenerPropertiesFormat != nil { + objectMap["properties"] = agl.ApplicationGatewayListenerPropertiesFormat + } + if agl.Name != nil { + objectMap["name"] = agl.Name + } + if agl.ID != nil { + objectMap["id"] = agl.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayListener struct. +func (agl *ApplicationGatewayListener) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var applicationGatewayListenerPropertiesFormat ApplicationGatewayListenerPropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayListenerPropertiesFormat) + if err != nil { + return err + } + agl.ApplicationGatewayListenerPropertiesFormat = &applicationGatewayListenerPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agl.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agl.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agl.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agl.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayListenerPropertiesFormat properties of listener of an application gateway. +type ApplicationGatewayListenerPropertiesFormat struct { + // FrontendIPConfiguration - Frontend IP configuration resource of an application gateway. + FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` + // FrontendPort - Frontend port resource of an application gateway. + FrontendPort *SubResource `json:"frontendPort,omitempty"` + // Protocol - Protocol of the listener. Possible values include: 'ApplicationGatewayProtocolHTTP', 'ApplicationGatewayProtocolHTTPS', 'ApplicationGatewayProtocolTCP', 'ApplicationGatewayProtocolTLS' + Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` + // SslCertificate - SSL certificate resource of an application gateway. + SslCertificate *SubResource `json:"sslCertificate,omitempty"` + // SslProfile - SSL profile resource of the application gateway. + SslProfile *SubResource `json:"sslProfile,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the listener resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayListenerPropertiesFormat. +func (aglpf ApplicationGatewayListenerPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if aglpf.FrontendIPConfiguration != nil { + objectMap["frontendIPConfiguration"] = aglpf.FrontendIPConfiguration + } + if aglpf.FrontendPort != nil { + objectMap["frontendPort"] = aglpf.FrontendPort + } + if aglpf.Protocol != "" { + objectMap["protocol"] = aglpf.Protocol + } + if aglpf.SslCertificate != nil { + objectMap["sslCertificate"] = aglpf.SslCertificate + } + if aglpf.SslProfile != nil { + objectMap["sslProfile"] = aglpf.SslProfile + } + return json.Marshal(objectMap) +} + // ApplicationGatewayListResult response for ListApplicationGateways API service call. type ApplicationGatewayListResult struct { autorest.Response `json:"-"` @@ -1761,9 +2032,218 @@ func NewApplicationGatewayListResultPage(cur ApplicationGatewayListResult, getNe } } +// ApplicationGatewayLoadDistributionPolicy load Distribution Policy of an application gateway. +type ApplicationGatewayLoadDistributionPolicy struct { + // ApplicationGatewayLoadDistributionPolicyPropertiesFormat - Properties of the application gateway load distribution policy. + *ApplicationGatewayLoadDistributionPolicyPropertiesFormat `json:"properties,omitempty"` + // Name - Name of the load distribution policy that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayLoadDistributionPolicy. +func (agldp ApplicationGatewayLoadDistributionPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agldp.ApplicationGatewayLoadDistributionPolicyPropertiesFormat != nil { + objectMap["properties"] = agldp.ApplicationGatewayLoadDistributionPolicyPropertiesFormat + } + if agldp.Name != nil { + objectMap["name"] = agldp.Name + } + if agldp.ID != nil { + objectMap["id"] = agldp.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayLoadDistributionPolicy struct. +func (agldp *ApplicationGatewayLoadDistributionPolicy) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var applicationGatewayLoadDistributionPolicyPropertiesFormat ApplicationGatewayLoadDistributionPolicyPropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayLoadDistributionPolicyPropertiesFormat) + if err != nil { + return err + } + agldp.ApplicationGatewayLoadDistributionPolicyPropertiesFormat = &applicationGatewayLoadDistributionPolicyPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agldp.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agldp.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agldp.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agldp.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayLoadDistributionPolicyPropertiesFormat properties of Load Distribution Policy of an +// application gateway. +type ApplicationGatewayLoadDistributionPolicyPropertiesFormat struct { + // LoadDistributionTargets - Load Distribution Targets resource of an application gateway. + LoadDistributionTargets *[]ApplicationGatewayLoadDistributionTarget `json:"loadDistributionTargets,omitempty"` + // LoadDistributionAlgorithm - Load Distribution Targets resource of an application gateway. Possible values include: 'ApplicationGatewayLoadDistributionAlgorithmRoundRobin', 'ApplicationGatewayLoadDistributionAlgorithmLeastConnections', 'ApplicationGatewayLoadDistributionAlgorithmIPHash' + LoadDistributionAlgorithm ApplicationGatewayLoadDistributionAlgorithm `json:"loadDistributionAlgorithm,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the Load Distribution Policy resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayLoadDistributionPolicyPropertiesFormat. +func (agldppf ApplicationGatewayLoadDistributionPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agldppf.LoadDistributionTargets != nil { + objectMap["loadDistributionTargets"] = agldppf.LoadDistributionTargets + } + if agldppf.LoadDistributionAlgorithm != "" { + objectMap["loadDistributionAlgorithm"] = agldppf.LoadDistributionAlgorithm + } + return json.Marshal(objectMap) +} + +// ApplicationGatewayLoadDistributionTarget load Distribution Target of an application gateway. +type ApplicationGatewayLoadDistributionTarget struct { + // ApplicationGatewayLoadDistributionTargetPropertiesFormat - Properties of the application gateway load distribution target. + *ApplicationGatewayLoadDistributionTargetPropertiesFormat `json:"properties,omitempty"` + // Name - Name of the load distribution policy that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayLoadDistributionTarget. +func (agldt ApplicationGatewayLoadDistributionTarget) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agldt.ApplicationGatewayLoadDistributionTargetPropertiesFormat != nil { + objectMap["properties"] = agldt.ApplicationGatewayLoadDistributionTargetPropertiesFormat + } + if agldt.Name != nil { + objectMap["name"] = agldt.Name + } + if agldt.ID != nil { + objectMap["id"] = agldt.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayLoadDistributionTarget struct. +func (agldt *ApplicationGatewayLoadDistributionTarget) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var applicationGatewayLoadDistributionTargetPropertiesFormat ApplicationGatewayLoadDistributionTargetPropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayLoadDistributionTargetPropertiesFormat) + if err != nil { + return err + } + agldt.ApplicationGatewayLoadDistributionTargetPropertiesFormat = &applicationGatewayLoadDistributionTargetPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agldt.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agldt.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agldt.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agldt.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayLoadDistributionTargetPropertiesFormat ... +type ApplicationGatewayLoadDistributionTargetPropertiesFormat struct { + // WeightPerServer - Weight per server. Range between 1 and 100. + WeightPerServer *int32 `json:"weightPerServer,omitempty"` + // BackendAddressPool - Backend address pool resource of the application gateway. + BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` +} + // ApplicationGatewayOnDemandProbe details of on demand test probe request. type ApplicationGatewayOnDemandProbe struct { - // Protocol - The protocol used for the probe. Possible values include: 'ApplicationGatewayProtocolHTTP', 'ApplicationGatewayProtocolHTTPS' + // Protocol - The protocol used for the probe. Possible values include: 'ApplicationGatewayProtocolHTTP', 'ApplicationGatewayProtocolHTTPS', 'ApplicationGatewayProtocolTCP', 'ApplicationGatewayProtocolTLS' Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` // Host - Host name to send the probe to. Host *string `json:"host,omitempty"` @@ -1882,6 +2362,8 @@ type ApplicationGatewayPathRulePropertiesFormat struct { RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` // RewriteRuleSet - Rewrite rule set resource of URL path map path rule. RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"` + // LoadDistributionPolicy - Load Distribution Policy resource of URL path map path rule. + LoadDistributionPolicy *SubResource `json:"loadDistributionPolicy,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the path rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // FirewallPolicy - Reference to the FirewallPolicy resource. @@ -1906,6 +2388,9 @@ func (agprpf ApplicationGatewayPathRulePropertiesFormat) MarshalJSON() ([]byte, if agprpf.RewriteRuleSet != nil { objectMap["rewriteRuleSet"] = agprpf.RewriteRuleSet } + if agprpf.LoadDistributionPolicy != nil { + objectMap["loadDistributionPolicy"] = agprpf.LoadDistributionPolicy + } if agprpf.FirewallPolicy != nil { objectMap["firewallPolicy"] = agprpf.FirewallPolicy } @@ -2865,7 +3350,7 @@ type ApplicationGatewayProbeHealthResponseMatch struct { // ApplicationGatewayProbePropertiesFormat properties of probe of an application gateway. type ApplicationGatewayProbePropertiesFormat struct { - // Protocol - The protocol used for the probe. Possible values include: 'ApplicationGatewayProtocolHTTP', 'ApplicationGatewayProtocolHTTPS' + // Protocol - The protocol used for the probe. Possible values include: 'ApplicationGatewayProtocolHTTP', 'ApplicationGatewayProtocolHTTPS', 'ApplicationGatewayProtocolTCP', 'ApplicationGatewayProtocolTLS' Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` // Host - Host name to send the probe to. Host *string `json:"host,omitempty"` @@ -2879,6 +3364,8 @@ type ApplicationGatewayProbePropertiesFormat struct { UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"` // PickHostNameFromBackendHTTPSettings - Whether the host header should be picked from the backend http settings. Default value is false. PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"` + // PickHostNameFromBackendSettings - Whether the server name indication should be picked from the backend settings for Tls protocol. Default value is false. + PickHostNameFromBackendSettings *bool `json:"pickHostNameFromBackendSettings,omitempty"` // MinServers - Minimum number of servers that are always marked healthy. Default value is 0. MinServers *int32 `json:"minServers,omitempty"` // Match - Criterion for classifying a healthy probe response. @@ -2913,6 +3400,9 @@ func (agppf ApplicationGatewayProbePropertiesFormat) MarshalJSON() ([]byte, erro if agppf.PickHostNameFromBackendHTTPSettings != nil { objectMap["pickHostNameFromBackendHttpSettings"] = agppf.PickHostNameFromBackendHTTPSettings } + if agppf.PickHostNameFromBackendSettings != nil { + objectMap["pickHostNameFromBackendSettings"] = agppf.PickHostNameFromBackendSettings + } if agppf.MinServers != nil { objectMap["minServers"] = agppf.MinServers } @@ -2953,14 +3443,20 @@ type ApplicationGatewayPropertiesFormat struct { BackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"backendAddressPools,omitempty"` // BackendHTTPSettingsCollection - Backend http settings of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettingsCollection,omitempty"` + // BackendSettingsCollection - Backend settings of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + BackendSettingsCollection *[]ApplicationGatewayBackendSettings `json:"backendSettingsCollection,omitempty"` // HTTPListeners - Http listeners of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"` + // Listeners - Listeners of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). + Listeners *[]ApplicationGatewayListener `json:"listeners,omitempty"` // SslProfiles - SSL profiles of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). SslProfiles *[]ApplicationGatewaySslProfile `json:"sslProfiles,omitempty"` // URLPathMaps - URL path map of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"` // RequestRoutingRules - Request routing rules of the application gateway resource. RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"` + // RoutingRules - Routing rules of the application gateway resource. + RoutingRules *[]ApplicationGatewayRoutingRule `json:"routingRules,omitempty"` // RewriteRuleSets - Rewrite rules for the application gateway resource. RewriteRuleSets *[]ApplicationGatewayRewriteRuleSet `json:"rewriteRuleSets,omitempty"` // RedirectConfigurations - Redirect configurations of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). @@ -2987,6 +3483,10 @@ type ApplicationGatewayPropertiesFormat struct { CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"` // ForceFirewallPolicyAssociation - If true, associates a firewall policy with an application gateway regardless whether the policy differs from the WAF Config. ForceFirewallPolicyAssociation *bool `json:"forceFirewallPolicyAssociation,omitempty"` + // LoadDistributionPolicies - Load distribution policies of the application gateway resource. + LoadDistributionPolicies *[]ApplicationGatewayLoadDistributionPolicy `json:"loadDistributionPolicies,omitempty"` + // GlobalConfiguration - Global Configuration. + GlobalConfiguration *ApplicationGatewayGlobalConfiguration `json:"globalConfiguration,omitempty"` } // MarshalJSON is the custom marshaler for ApplicationGatewayPropertiesFormat. @@ -3028,9 +3528,15 @@ func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { if agpf.BackendHTTPSettingsCollection != nil { objectMap["backendHttpSettingsCollection"] = agpf.BackendHTTPSettingsCollection } + if agpf.BackendSettingsCollection != nil { + objectMap["backendSettingsCollection"] = agpf.BackendSettingsCollection + } if agpf.HTTPListeners != nil { objectMap["httpListeners"] = agpf.HTTPListeners } + if agpf.Listeners != nil { + objectMap["listeners"] = agpf.Listeners + } if agpf.SslProfiles != nil { objectMap["sslProfiles"] = agpf.SslProfiles } @@ -3040,6 +3546,9 @@ func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { if agpf.RequestRoutingRules != nil { objectMap["requestRoutingRules"] = agpf.RequestRoutingRules } + if agpf.RoutingRules != nil { + objectMap["routingRules"] = agpf.RoutingRules + } if agpf.RewriteRuleSets != nil { objectMap["rewriteRuleSets"] = agpf.RewriteRuleSets } @@ -3070,6 +3579,12 @@ func (agpf ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { if agpf.ForceFirewallPolicyAssociation != nil { objectMap["forceFirewallPolicyAssociation"] = agpf.ForceFirewallPolicyAssociation } + if agpf.LoadDistributionPolicies != nil { + objectMap["loadDistributionPolicies"] = agpf.LoadDistributionPolicies + } + if agpf.GlobalConfiguration != nil { + objectMap["globalConfiguration"] = agpf.GlobalConfiguration + } return json.Marshal(objectMap) } @@ -3291,6 +3806,8 @@ type ApplicationGatewayRequestRoutingRulePropertiesFormat struct { RewriteRuleSet *SubResource `json:"rewriteRuleSet,omitempty"` // RedirectConfiguration - Redirect configuration resource of the application gateway. RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` + // LoadDistributionPolicy - Load Distribution Policy resource of the application gateway. + LoadDistributionPolicy *SubResource `json:"loadDistributionPolicy,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the request routing rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -3322,6 +3839,9 @@ func (agrrrpf ApplicationGatewayRequestRoutingRulePropertiesFormat) MarshalJSON( if agrrrpf.RedirectConfiguration != nil { objectMap["redirectConfiguration"] = agrrrpf.RedirectConfiguration } + if agrrrpf.LoadDistributionPolicy != nil { + objectMap["loadDistributionPolicy"] = agrrrpf.LoadDistributionPolicy + } return json.Marshal(objectMap) } @@ -3455,6 +3975,132 @@ func (agrrspf ApplicationGatewayRewriteRuleSetPropertiesFormat) MarshalJSON() ([ return json.Marshal(objectMap) } +// ApplicationGatewayRoutingRule routing rule of an application gateway. +type ApplicationGatewayRoutingRule struct { + // ApplicationGatewayRoutingRulePropertiesFormat - Properties of the application gateway routing rule. + *ApplicationGatewayRoutingRulePropertiesFormat `json:"properties,omitempty"` + // Name - Name of the routing rule that is unique within an Application Gateway. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayRoutingRule. +func (agrr ApplicationGatewayRoutingRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agrr.ApplicationGatewayRoutingRulePropertiesFormat != nil { + objectMap["properties"] = agrr.ApplicationGatewayRoutingRulePropertiesFormat + } + if agrr.Name != nil { + objectMap["name"] = agrr.Name + } + if agrr.ID != nil { + objectMap["id"] = agrr.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ApplicationGatewayRoutingRule struct. +func (agrr *ApplicationGatewayRoutingRule) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var applicationGatewayRoutingRulePropertiesFormat ApplicationGatewayRoutingRulePropertiesFormat + err = json.Unmarshal(*v, &applicationGatewayRoutingRulePropertiesFormat) + if err != nil { + return err + } + agrr.ApplicationGatewayRoutingRulePropertiesFormat = &applicationGatewayRoutingRulePropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + agrr.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + agrr.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + agrr.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + agrr.ID = &ID + } + } + } + + return nil +} + +// ApplicationGatewayRoutingRulePropertiesFormat properties of routing rule of the application gateway. +type ApplicationGatewayRoutingRulePropertiesFormat struct { + // RuleType - Rule type. Possible values include: 'ApplicationGatewayRequestRoutingRuleTypeBasic', 'ApplicationGatewayRequestRoutingRuleTypePathBasedRouting' + RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"` + // Priority - Priority of the routing rule. + Priority *int32 `json:"priority,omitempty"` + // BackendAddressPool - Backend address pool resource of the application gateway. + BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` + // BackendSettings - Backend settings resource of the application gateway. + BackendSettings *SubResource `json:"backendSettings,omitempty"` + // Listener - Listener resource of the application gateway. + Listener *SubResource `json:"listener,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the request routing rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ApplicationGatewayRoutingRulePropertiesFormat. +func (agrrpf ApplicationGatewayRoutingRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if agrrpf.RuleType != "" { + objectMap["ruleType"] = agrrpf.RuleType + } + if agrrpf.Priority != nil { + objectMap["priority"] = agrrpf.Priority + } + if agrrpf.BackendAddressPool != nil { + objectMap["backendAddressPool"] = agrrpf.BackendAddressPool + } + if agrrpf.BackendSettings != nil { + objectMap["backendSettings"] = agrrpf.BackendSettings + } + if agrrpf.Listener != nil { + objectMap["listener"] = agrrpf.Listener + } + return json.Marshal(objectMap) +} + // ApplicationGatewaysBackendHealthFuture an abstraction for monitoring and retrieving the results of a // long-running operation. type ApplicationGatewaysBackendHealthFuture struct { @@ -4125,6 +4771,10 @@ func (agtcc *ApplicationGatewayTrustedClientCertificate) UnmarshalJSON(body []by type ApplicationGatewayTrustedClientCertificatePropertiesFormat struct { // Data - Certificate public data. Data *string `json:"data,omitempty"` + // ValidatedCertData - READ-ONLY; Validated certificate data. + ValidatedCertData *string `json:"validatedCertData,omitempty"` + // ClientCertIssuerDN - READ-ONLY; Distinguished name of client certificate issuer. + ClientCertIssuerDN *string `json:"clientCertIssuerDN,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the trusted client certificate resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -4360,6 +5010,8 @@ type ApplicationGatewayURLPathMapPropertiesFormat struct { DefaultRewriteRuleSet *SubResource `json:"defaultRewriteRuleSet,omitempty"` // DefaultRedirectConfiguration - Default redirect configuration resource of URL path map. DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"` + // DefaultLoadDistributionPolicy - Default Load Distribution Policy resource of URL path map. + DefaultLoadDistributionPolicy *SubResource `json:"defaultLoadDistributionPolicy,omitempty"` // PathRules - Path rule of URL path map resource. PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the URL path map resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' @@ -4381,6 +5033,9 @@ func (agupmpf ApplicationGatewayURLPathMapPropertiesFormat) MarshalJSON() ([]byt if agupmpf.DefaultRedirectConfiguration != nil { objectMap["defaultRedirectConfiguration"] = agupmpf.DefaultRedirectConfiguration } + if agupmpf.DefaultLoadDistributionPolicy != nil { + objectMap["defaultLoadDistributionPolicy"] = agupmpf.DefaultLoadDistributionPolicy + } if agupmpf.PathRules != nil { objectMap["pathRules"] = agupmpf.PathRules } @@ -7124,7 +7779,7 @@ func (future *AzureFirewallsDeleteFuture) result(client AzureFirewallsClient) (a type AzureFirewallSku struct { // Name - Name of an Azure Firewall SKU. Possible values include: 'AzureFirewallSkuNameAZFWVNet', 'AzureFirewallSkuNameAZFWHub' Name AzureFirewallSkuName `json:"name,omitempty"` - // Tier - Tier of an Azure Firewall. Possible values include: 'AzureFirewallSkuTierStandard', 'AzureFirewallSkuTierPremium' + // Tier - Tier of an Azure Firewall. Possible values include: 'AzureFirewallSkuTierStandard', 'AzureFirewallSkuTierPremium', 'AzureFirewallSkuTierBasic' Tier AzureFirewallSkuTier `json:"tier,omitempty"` } @@ -7482,6 +8137,13 @@ func (awcpf AzureWebCategoryPropertiesFormat) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// BackendAddressInboundNatRulePortMappings the response for a QueryInboundNatRulePortMapping API. +type BackendAddressInboundNatRulePortMappings struct { + autorest.Response `json:"-"` + // InboundNatRulePortMappings - Collection of inbound NAT rule port mappings. + InboundNatRulePortMappings *[]InboundNatRulePortMapping `json:"inboundNatRulePortMappings,omitempty"` +} + // BackendAddressPool pool of backend IP addresses. type BackendAddressPool struct { autorest.Response `json:"-"` @@ -7576,6 +8238,8 @@ func (bap *BackendAddressPool) UnmarshalJSON(body []byte) error { type BackendAddressPoolPropertiesFormat struct { // Location - The location of the backend address pool. Location *string `json:"location,omitempty"` + // TunnelInterfaces - An array of gateway load balancer tunnel interfaces. + TunnelInterfaces *[]GatewayLoadBalancerTunnelInterface `json:"tunnelInterfaces,omitempty"` // LoadBalancerBackendAddresses - An array of backend addresses. LoadBalancerBackendAddresses *[]LoadBalancerBackendAddress `json:"loadBalancerBackendAddresses,omitempty"` // BackendIPConfigurations - READ-ONLY; An array of references to IP addresses defined in network interfaces. @@ -7586,8 +8250,12 @@ type BackendAddressPoolPropertiesFormat struct { OutboundRule *SubResource `json:"outboundRule,omitempty"` // OutboundRules - READ-ONLY; An array of references to outbound rules that use this backend address pool. OutboundRules *[]SubResource `json:"outboundRules,omitempty"` + // InboundNatRules - READ-ONLY; An array of references to inbound NAT rules that use this backend address pool. + InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the backend address pool resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // DrainPeriodInSeconds - Amount of seconds Load Balancer waits for before sending RESET to client and backend address. + DrainPeriodInSeconds *int32 `json:"drainPeriodInSeconds,omitempty"` } // MarshalJSON is the custom marshaler for BackendAddressPoolPropertiesFormat. @@ -7596,9 +8264,15 @@ func (bappf BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) { if bappf.Location != nil { objectMap["location"] = bappf.Location } + if bappf.TunnelInterfaces != nil { + objectMap["tunnelInterfaces"] = bappf.TunnelInterfaces + } if bappf.LoadBalancerBackendAddresses != nil { objectMap["loadBalancerBackendAddresses"] = bappf.LoadBalancerBackendAddresses } + if bappf.DrainPeriodInSeconds != nil { + objectMap["drainPeriodInSeconds"] = bappf.DrainPeriodInSeconds + } return json.Marshal(objectMap) } @@ -7801,6 +8475,8 @@ type BastionHost struct { *BastionHostPropertiesFormat `json:"properties,omitempty"` // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` + // Sku - The sku of this Bastion Host. + Sku *Sku `json:"sku,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. @@ -7819,6 +8495,9 @@ func (bh BastionHost) MarshalJSON() ([]byte, error) { if bh.BastionHostPropertiesFormat != nil { objectMap["properties"] = bh.BastionHostPropertiesFormat } + if bh.Sku != nil { + objectMap["sku"] = bh.Sku + } if bh.ID != nil { objectMap["id"] = bh.ID } @@ -7858,6 +8537,15 @@ func (bh *BastionHost) UnmarshalJSON(body []byte) error { } bh.Etag = &etag } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + bh.Sku = &sku + } case "id": if v != nil { var ID string @@ -8192,6 +8880,18 @@ type BastionHostPropertiesFormat struct { DNSName *string `json:"dnsName,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the bastion host resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // ScaleUnits - The scale units for the Bastion Host resource. + ScaleUnits *int32 `json:"scaleUnits,omitempty"` + // DisableCopyPaste - Enable/Disable Copy/Paste feature of the Bastion Host resource. + DisableCopyPaste *bool `json:"disableCopyPaste,omitempty"` + // EnableFileCopy - Enable/Disable File Copy feature of the Bastion Host resource. + EnableFileCopy *bool `json:"enableFileCopy,omitempty"` + // EnableIPConnect - Enable/Disable IP Connect feature of the Bastion Host resource. + EnableIPConnect *bool `json:"enableIpConnect,omitempty"` + // EnableShareableLink - Enable/Disable Shareable Link of the Bastion Host resource. + EnableShareableLink *bool `json:"enableShareableLink,omitempty"` + // EnableTunneling - Enable/Disable Tunneling feature of the Bastion Host resource. + EnableTunneling *bool `json:"enableTunneling,omitempty"` } // MarshalJSON is the custom marshaler for BastionHostPropertiesFormat. @@ -8203,6 +8903,24 @@ func (bhpf BastionHostPropertiesFormat) MarshalJSON() ([]byte, error) { if bhpf.DNSName != nil { objectMap["dnsName"] = bhpf.DNSName } + if bhpf.ScaleUnits != nil { + objectMap["scaleUnits"] = bhpf.ScaleUnits + } + if bhpf.DisableCopyPaste != nil { + objectMap["disableCopyPaste"] = bhpf.DisableCopyPaste + } + if bhpf.EnableFileCopy != nil { + objectMap["enableFileCopy"] = bhpf.EnableFileCopy + } + if bhpf.EnableIPConnect != nil { + objectMap["enableIpConnect"] = bhpf.EnableIPConnect + } + if bhpf.EnableShareableLink != nil { + objectMap["enableShareableLink"] = bhpf.EnableShareableLink + } + if bhpf.EnableTunneling != nil { + objectMap["enableTunneling"] = bhpf.EnableTunneling + } return json.Marshal(objectMap) } @@ -8286,6 +9004,49 @@ func (future *BastionHostsDeleteFuture) result(client BastionHostsClient) (ar au return } +// BastionHostsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type BastionHostsUpdateTagsFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(BastionHostsClient) (BastionHost, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *BastionHostsUpdateTagsFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for BastionHostsUpdateTagsFuture.Result. +func (future *BastionHostsUpdateTagsFuture) result(client BastionHostsClient) (bh BastionHost, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsUpdateTagsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + bh.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.BastionHostsUpdateTagsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if bh.Response.Response, err = future.GetResult(sender); err == nil && bh.Response.Response.StatusCode != http.StatusNoContent { + bh, err = client.UpdateTagsResponder(bh.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.BastionHostsUpdateTagsFuture", "Result", bh.Response.Response, "Failure responding to request") + } + } + return +} + // BastionSessionDeleteResult response for DisconnectActiveSessions. type BastionSessionDeleteResult struct { autorest.Response `json:"-"` @@ -8760,6 +9521,8 @@ type BgpConnectionProperties struct { PeerAsn *int64 `json:"peerAsn,omitempty"` // PeerIP - Peer IP. PeerIP *string `json:"peerIp,omitempty"` + // HubVirtualNetworkConnection - The reference to the HubVirtualNetworkConnection resource. + HubVirtualNetworkConnection *SubResource `json:"hubVirtualNetworkConnection,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // ConnectionState - READ-ONLY; The current state of the VirtualHub to Peer. Possible values include: 'HubBgpConnectionStatusUnknown', 'HubBgpConnectionStatusConnecting', 'HubBgpConnectionStatusConnected', 'HubBgpConnectionStatusNotConnected' @@ -8775,6 +9538,9 @@ func (bcp BgpConnectionProperties) MarshalJSON() ([]byte, error) { if bcp.PeerIP != nil { objectMap["peerIp"] = bcp.PeerIP } + if bcp.HubVirtualNetworkConnection != nil { + objectMap["hubVirtualNetworkConnection"] = bcp.HubVirtualNetworkConnection + } return json.Marshal(objectMap) } @@ -9175,6 +9941,86 @@ type ConfigurationDiagnosticResult struct { NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"` } +// ConfigurationPolicyGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. +type ConfigurationPolicyGroupsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ConfigurationPolicyGroupsClient) (VpnServerConfigurationPolicyGroup, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ConfigurationPolicyGroupsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ConfigurationPolicyGroupsCreateOrUpdateFuture.Result. +func (future *ConfigurationPolicyGroupsCreateOrUpdateFuture) result(client ConfigurationPolicyGroupsClient) (vscpg VpnServerConfigurationPolicyGroup, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConfigurationPolicyGroupsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vscpg.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ConfigurationPolicyGroupsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vscpg.Response.Response, err = future.GetResult(sender); err == nil && vscpg.Response.Response.StatusCode != http.StatusNoContent { + vscpg, err = client.CreateOrUpdateResponder(vscpg.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConfigurationPolicyGroupsCreateOrUpdateFuture", "Result", vscpg.Response.Response, "Failure responding to request") + } + } + return +} + +// ConfigurationPolicyGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ConfigurationPolicyGroupsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ConfigurationPolicyGroupsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ConfigurationPolicyGroupsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ConfigurationPolicyGroupsDeleteFuture.Result. +func (future *ConfigurationPolicyGroupsDeleteFuture) result(client ConfigurationPolicyGroupsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ConfigurationPolicyGroupsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ConfigurationPolicyGroupsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + // ConnectionMonitor parameters that define the operation to create a connection monitor. type ConnectionMonitor struct { // Location - Connection monitor location. @@ -10693,12 +11539,22 @@ func NewCustomIPPrefixListResultPage(cur CustomIPPrefixListResult, getNextPage f type CustomIPPrefixPropertiesFormat struct { // Cidr - The prefix range in CIDR notation. Should include the start address and the prefix length. Cidr *string `json:"cidr,omitempty"` + // SignedMessage - Signed message for WAN validation. + SignedMessage *string `json:"signedMessage,omitempty"` + // AuthorizationMessage - Authorization message for WAN validation. + AuthorizationMessage *string `json:"authorizationMessage,omitempty"` + // CustomIPPrefixParent - The Parent CustomIpPrefix for IPv6 /64 CustomIpPrefix. + CustomIPPrefixParent *SubResource `json:"customIpPrefixParent,omitempty"` + // ChildCustomIPPrefixes - READ-ONLY; The list of all Children for IPv6 /48 CustomIpPrefix. + ChildCustomIPPrefixes *[]SubResource `json:"childCustomIpPrefixes,omitempty"` // CommissionedState - The commissioned state of the Custom IP Prefix. Possible values include: 'CommissionedStateProvisioning', 'CommissionedStateProvisioned', 'CommissionedStateCommissioning', 'CommissionedStateCommissioned', 'CommissionedStateDecommissioning', 'CommissionedStateDeprovisioning' CommissionedState CommissionedState `json:"commissionedState,omitempty"` // PublicIPPrefixes - READ-ONLY; The list of all referenced PublicIpPrefixes. PublicIPPrefixes *[]SubResource `json:"publicIpPrefixes,omitempty"` // ResourceGUID - READ-ONLY; The resource GUID property of the custom IP prefix resource. ResourceGUID *string `json:"resourceGuid,omitempty"` + // FailedReason - READ-ONLY; The reason why resource is in failed state. + FailedReason *string `json:"failedReason,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the custom IP prefix resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -10709,6 +11565,15 @@ func (cippf CustomIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) { if cippf.Cidr != nil { objectMap["cidr"] = cippf.Cidr } + if cippf.SignedMessage != nil { + objectMap["signedMessage"] = cippf.SignedMessage + } + if cippf.AuthorizationMessage != nil { + objectMap["authorizationMessage"] = cippf.AuthorizationMessage + } + if cippf.CustomIPPrefixParent != nil { + objectMap["customIpPrefixParent"] = cippf.CustomIPPrefixParent + } if cippf.CommissionedState != "" { objectMap["commissionedState"] = cippf.CommissionedState } @@ -11490,7 +12355,7 @@ type DNSSettings struct { RequireProxyForNetworkRules *bool `json:"requireProxyForNetworkRules,omitempty"` } -// DscpConfiguration DSCP Configuration in a resource group. +// DscpConfiguration differentiated Services Code Point configuration for any given network interface type DscpConfiguration struct { autorest.Response `json:"-"` // DscpConfigurationPropertiesFormat - Properties of the network interface. @@ -11853,7 +12718,7 @@ func NewDscpConfigurationListResultPage(cur DscpConfigurationListResult, getNext } } -// DscpConfigurationPropertiesFormat DSCP Configuration properties. +// DscpConfigurationPropertiesFormat differentiated Services Code Point configuration properties. type DscpConfigurationPropertiesFormat struct { // Markings - List of markings to be used in the configuration. Markings *[]int32 `json:"markings,omitempty"` @@ -11867,6 +12732,8 @@ type DscpConfigurationPropertiesFormat struct { DestinationPortRanges *[]QosPortRange `json:"destinationPortRanges,omitempty"` // Protocol - RNM supported protocol types. Possible values include: 'ProtocolTypeDoNotUse', 'ProtocolTypeIcmp', 'ProtocolTypeTCP', 'ProtocolTypeUDP', 'ProtocolTypeGre', 'ProtocolTypeEsp', 'ProtocolTypeAh', 'ProtocolTypeVxlan', 'ProtocolTypeAll' Protocol ProtocolType `json:"protocol,omitempty"` + // QosDefinitionCollection - QoS object definitions + QosDefinitionCollection *[]QosDefinition `json:"qosDefinitionCollection,omitempty"` // QosCollectionID - READ-ONLY; Qos Collection ID generated by RNM. QosCollectionID *string `json:"qosCollectionId,omitempty"` // AssociatedNetworkInterfaces - READ-ONLY; Associated Network Interfaces to the DSCP Configuration. @@ -11898,6 +12765,9 @@ func (dcpf DscpConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { if dcpf.Protocol != "" { objectMap["protocol"] = dcpf.Protocol } + if dcpf.QosDefinitionCollection != nil { + objectMap["qosDefinitionCollection"] = dcpf.QosDefinitionCollection + } return json.Marshal(objectMap) } @@ -11933,6 +12803,8 @@ func (ensg EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) { // EffectiveNetworkSecurityGroupAssociation the effective network security group association. type EffectiveNetworkSecurityGroupAssociation struct { + // NetworkManager - The ID of the Azure network manager if assigned. + NetworkManager *SubResource `json:"networkManager,omitempty"` // Subnet - The ID of the subnet if assigned. Subnet *SubResource `json:"subnet,omitempty"` // NetworkInterface - The ID of the network interface if assigned. @@ -12273,6 +13145,44 @@ func (ensg EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// ExclusionManagedRule defines a managed rule to use for exclusion. +type ExclusionManagedRule struct { + // RuleID - Identifier for the managed rule. + RuleID *string `json:"ruleId,omitempty"` +} + +// ExclusionManagedRuleGroup defines a managed rule group to use for exclusion. +type ExclusionManagedRuleGroup struct { + // RuleGroupName - The managed rule group for exclusion. + RuleGroupName *string `json:"ruleGroupName,omitempty"` + // Rules - List of rules that will be excluded. If none specified, all rules in the group will be excluded. + Rules *[]ExclusionManagedRule `json:"rules,omitempty"` +} + +// ExclusionManagedRuleSet defines a managed rule set for Exclusions. +type ExclusionManagedRuleSet struct { + // RuleSetType - Defines the rule set type to use. + RuleSetType *string `json:"ruleSetType,omitempty"` + // RuleSetVersion - Defines the version of the rule set to use. + RuleSetVersion *string `json:"ruleSetVersion,omitempty"` + // RuleGroups - Defines the rule groups to apply to the rule set. + RuleGroups *[]ExclusionManagedRuleGroup `json:"ruleGroups,omitempty"` +} + +// ExplicitProxySettings explicit Proxy Settings in Firewall Policy. +type ExplicitProxySettings struct { + // EnableExplicitProxy - When set to true, explicit proxy mode is enabled. + EnableExplicitProxy *bool `json:"enableExplicitProxy,omitempty"` + // HTTPPort - Port number for explicit proxy http protocol, cannot be greater than 64000. + HTTPPort *int32 `json:"httpPort,omitempty"` + // HTTPSPort - Port number for explicit proxy https protocol, cannot be greater than 64000. + HTTPSPort *int32 `json:"httpsPort,omitempty"` + // PacFilePort - Port number for firewall to serve PAC file. + PacFilePort *int32 `json:"pacFilePort,omitempty"` + // PacFile - SAS URL for PAC file. + PacFile *string `json:"pacFile,omitempty"` +} + // ExpressRouteCircuit expressRouteCircuit resource. type ExpressRouteCircuit struct { autorest.Response `json:"-"` @@ -13623,6 +14533,8 @@ type ExpressRouteCircuitPropertiesFormat struct { GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` // GlobalReachEnabled - Flag denoting global reach status. GlobalReachEnabled *bool `json:"globalReachEnabled,omitempty"` + // AuthorizationKey - The authorizationKey. + AuthorizationKey *string `json:"authorizationKey,omitempty"` } // MarshalJSON is the custom marshaler for ExpressRouteCircuitPropertiesFormat. @@ -13664,6 +14576,9 @@ func (ercpf ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) { if ercpf.GlobalReachEnabled != nil { objectMap["globalReachEnabled"] = ercpf.GlobalReachEnabled } + if ercpf.AuthorizationKey != nil { + objectMap["authorizationKey"] = ercpf.AuthorizationKey + } return json.Marshal(objectMap) } @@ -15237,7 +16152,7 @@ type ExpressRouteGatewayList struct { type ExpressRouteGatewayProperties struct { // AutoScaleConfiguration - Configuration for auto scaling. AutoScaleConfiguration *ExpressRouteGatewayPropertiesAutoScaleConfiguration `json:"autoScaleConfiguration,omitempty"` - // ExpressRouteConnections - READ-ONLY; List of ExpressRoute connections to the ExpressRoute gateway. + // ExpressRouteConnections - List of ExpressRoute connections to the ExpressRoute gateway. ExpressRouteConnections *[]ExpressRouteConnection `json:"expressRouteConnections,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the express route gateway resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` @@ -15251,6 +16166,9 @@ func (ergp ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) { if ergp.AutoScaleConfiguration != nil { objectMap["autoScaleConfiguration"] = ergp.AutoScaleConfiguration } + if ergp.ExpressRouteConnections != nil { + objectMap["expressRouteConnections"] = ergp.ExpressRouteConnections + } if ergp.VirtualHub != nil { objectMap["virtualHub"] = ergp.VirtualHub } @@ -15806,26 +16724,375 @@ func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error { return nil } -// ExpressRoutePortListResult response for ListExpressRoutePorts API service call. -type ExpressRoutePortListResult struct { +// ExpressRoutePortAuthorization expressRoutePort Authorization resource definition. +type ExpressRoutePortAuthorization struct { autorest.Response `json:"-"` - // Value - A list of ExpressRoutePort resources. - Value *[]ExpressRoutePort `json:"value,omitempty"` + // ExpressRoutePortAuthorizationPropertiesFormat - ExpressRoutePort properties. + *ExpressRoutePortAuthorizationPropertiesFormat `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Type of the resource. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRoutePortAuthorization. +func (erpa ExpressRoutePortAuthorization) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if erpa.ExpressRoutePortAuthorizationPropertiesFormat != nil { + objectMap["properties"] = erpa.ExpressRoutePortAuthorizationPropertiesFormat + } + if erpa.Name != nil { + objectMap["name"] = erpa.Name + } + if erpa.ID != nil { + objectMap["id"] = erpa.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for ExpressRoutePortAuthorization struct. +func (erpa *ExpressRoutePortAuthorization) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var expressRoutePortAuthorizationPropertiesFormat ExpressRoutePortAuthorizationPropertiesFormat + err = json.Unmarshal(*v, &expressRoutePortAuthorizationPropertiesFormat) + if err != nil { + return err + } + erpa.ExpressRoutePortAuthorizationPropertiesFormat = &expressRoutePortAuthorizationPropertiesFormat + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + erpa.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + erpa.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + erpa.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + erpa.ID = &ID + } + } + } + + return nil +} + +// ExpressRoutePortAuthorizationListResult response for ListExpressRoutePortAuthorizations API service +// call. +type ExpressRoutePortAuthorizationListResult struct { + autorest.Response `json:"-"` + // Value - The authorizations in an ExpressRoute Port. + Value *[]ExpressRoutePortAuthorization `json:"value,omitempty"` // NextLink - The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values. -type ExpressRoutePortListResultIterator struct { +// ExpressRoutePortAuthorizationListResultIterator provides access to a complete listing of +// ExpressRoutePortAuthorization values. +type ExpressRoutePortAuthorizationListResultIterator struct { i int - page ExpressRoutePortListResultPage + page ExpressRoutePortAuthorizationListResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *ExpressRoutePortAuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortAuthorizationListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ExpressRoutePortAuthorizationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ExpressRoutePortAuthorizationListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ExpressRoutePortAuthorizationListResultIterator) Response() ExpressRoutePortAuthorizationListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ExpressRoutePortAuthorizationListResultIterator) Value() ExpressRoutePortAuthorization { + if !iter.page.NotDone() { + return ExpressRoutePortAuthorization{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ExpressRoutePortAuthorizationListResultIterator type. +func NewExpressRoutePortAuthorizationListResultIterator(page ExpressRoutePortAuthorizationListResultPage) ExpressRoutePortAuthorizationListResultIterator { + return ExpressRoutePortAuthorizationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (erpalr ExpressRoutePortAuthorizationListResult) IsEmpty() bool { + return erpalr.Value == nil || len(*erpalr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (erpalr ExpressRoutePortAuthorizationListResult) hasNextLink() bool { + return erpalr.NextLink != nil && len(*erpalr.NextLink) != 0 +} + +// expressRoutePortAuthorizationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (erpalr ExpressRoutePortAuthorizationListResult) expressRoutePortAuthorizationListResultPreparer(ctx context.Context) (*http.Request, error) { + if !erpalr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(erpalr.NextLink))) +} + +// ExpressRoutePortAuthorizationListResultPage contains a page of ExpressRoutePortAuthorization values. +type ExpressRoutePortAuthorizationListResultPage struct { + fn func(context.Context, ExpressRoutePortAuthorizationListResult) (ExpressRoutePortAuthorizationListResult, error) + erpalr ExpressRoutePortAuthorizationListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ExpressRoutePortAuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortAuthorizationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.erpalr) + if err != nil { + return err + } + page.erpalr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ExpressRoutePortAuthorizationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ExpressRoutePortAuthorizationListResultPage) NotDone() bool { + return !page.erpalr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ExpressRoutePortAuthorizationListResultPage) Response() ExpressRoutePortAuthorizationListResult { + return page.erpalr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ExpressRoutePortAuthorizationListResultPage) Values() []ExpressRoutePortAuthorization { + if page.erpalr.IsEmpty() { + return nil + } + return *page.erpalr.Value +} + +// Creates a new instance of the ExpressRoutePortAuthorizationListResultPage type. +func NewExpressRoutePortAuthorizationListResultPage(cur ExpressRoutePortAuthorizationListResult, getNextPage func(context.Context, ExpressRoutePortAuthorizationListResult) (ExpressRoutePortAuthorizationListResult, error)) ExpressRoutePortAuthorizationListResultPage { + return ExpressRoutePortAuthorizationListResultPage{ + fn: getNextPage, + erpalr: cur, + } +} + +// ExpressRoutePortAuthorizationPropertiesFormat properties of ExpressRoutePort Authorization. +type ExpressRoutePortAuthorizationPropertiesFormat struct { + // AuthorizationKey - READ-ONLY; The authorization key. + AuthorizationKey *string `json:"authorizationKey,omitempty"` + // AuthorizationUseStatus - READ-ONLY; The authorization use status. Possible values include: 'ExpressRoutePortAuthorizationUseStatusAvailable', 'ExpressRoutePortAuthorizationUseStatusInUse' + AuthorizationUseStatus ExpressRoutePortAuthorizationUseStatus `json:"authorizationUseStatus,omitempty"` + // CircuitResourceURI - READ-ONLY; The reference to the ExpressRoute circuit resource using the authorization. + CircuitResourceURI *string `json:"circuitResourceUri,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the authorization resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExpressRoutePortAuthorizationPropertiesFormat. +func (erpapf ExpressRoutePortAuthorizationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// ExpressRoutePortAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type ExpressRoutePortAuthorizationsCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRoutePortAuthorizationsClient) (ExpressRoutePortAuthorization, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRoutePortAuthorizationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRoutePortAuthorizationsCreateOrUpdateFuture.Result. +func (future *ExpressRoutePortAuthorizationsCreateOrUpdateFuture) result(client ExpressRoutePortAuthorizationsClient) (erpa ExpressRoutePortAuthorization, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortAuthorizationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + erpa.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortAuthorizationsCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if erpa.Response.Response, err = future.GetResult(sender); err == nil && erpa.Response.Response.StatusCode != http.StatusNoContent { + erpa, err = client.CreateOrUpdateResponder(erpa.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortAuthorizationsCreateOrUpdateFuture", "Result", erpa.Response.Response, "Failure responding to request") + } + } + return +} + +// ExpressRoutePortAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type ExpressRoutePortAuthorizationsDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(ExpressRoutePortAuthorizationsClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *ExpressRoutePortAuthorizationsDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for ExpressRoutePortAuthorizationsDeleteFuture.Result. +func (future *ExpressRoutePortAuthorizationsDeleteFuture) result(client ExpressRoutePortAuthorizationsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ExpressRoutePortAuthorizationsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortAuthorizationsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// ExpressRoutePortListResult response for ListExpressRoutePorts API service call. +type ExpressRoutePortListResult struct { + autorest.Response `json:"-"` + // Value - A list of ExpressRoutePort resources. + Value *[]ExpressRoutePort `json:"value,omitempty"` + // NextLink - The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values. +type ExpressRoutePortListResultIterator struct { + i int + page ExpressRoutePortListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -16687,8 +17954,16 @@ func (ersppf ExpressRouteServiceProviderPropertiesFormat) MarshalJSON() ([]byte, type ExtendedLocation struct { // Name - The name of the extended location. Name *string `json:"name,omitempty"` - // Type - The type of the extended location. - Type *string `json:"type,omitempty"` + // Type - The type of the extended location. Possible values include: 'ExtendedLocationTypesEdgeZone' + Type ExtendedLocationTypes `json:"type,omitempty"` +} + +// FilterItems will contain the filter name and values to operate on +type FilterItems struct { + // Field - The name of the field we would like to filter + Field *string `json:"field,omitempty"` + // Values - List of values to filter the current field by + Values *[]string `json:"values,omitempty"` } // FirewallPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a @@ -17074,6 +18349,8 @@ type FirewallPolicyIntrusionDetectionConfiguration struct { SignatureOverrides *[]FirewallPolicyIntrusionDetectionSignatureSpecification `json:"signatureOverrides,omitempty"` // BypassTrafficSettings - List of rules for traffic to bypass. BypassTrafficSettings *[]FirewallPolicyIntrusionDetectionBypassTrafficSpecifications `json:"bypassTrafficSettings,omitempty"` + // PrivateRanges - IDPS Private IP address ranges are used to identify traffic direction (i.e. inbound, outbound, etc.). By default, only ranges defined by IANA RFC 1918 are considered private IP addresses. To modify default ranges, specify your Private IP address ranges with this property + PrivateRanges *[]string `json:"privateRanges,omitempty"` } // FirewallPolicyIntrusionDetectionSignatureSpecification intrusion detection signatures specification @@ -17401,8 +18678,12 @@ type FirewallPolicyPropertiesFormat struct { Insights *FirewallPolicyInsights `json:"insights,omitempty"` // Snat - The private IP addresses/IP ranges to which traffic will not be SNAT. Snat *FirewallPolicySNAT `json:"snat,omitempty"` + // SQL - SQL Settings definition. + SQL *FirewallPolicySQL `json:"sql,omitempty"` // DNSSettings - DNS Proxy Settings definition. DNSSettings *DNSSettings `json:"dnsSettings,omitempty"` + // ExplicitProxySettings - Explicit Proxy Settings definition. + ExplicitProxySettings *ExplicitProxySettings `json:"explicitProxySettings,omitempty"` // IntrusionDetection - The configuration for Intrusion detection. IntrusionDetection *FirewallPolicyIntrusionDetection `json:"intrusionDetection,omitempty"` // TransportSecurity - TLS Configuration definition. @@ -17429,9 +18710,15 @@ func (fppf FirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { if fppf.Snat != nil { objectMap["snat"] = fppf.Snat } + if fppf.SQL != nil { + objectMap["sql"] = fppf.SQL + } if fppf.DNSSettings != nil { objectMap["dnsSettings"] = fppf.DNSSettings } + if fppf.ExplicitProxySettings != nil { + objectMap["explicitProxySettings"] = fppf.ExplicitProxySettings + } if fppf.IntrusionDetection != nil { objectMap["intrusionDetection"] = fppf.IntrusionDetection } @@ -18047,7 +19334,7 @@ func (future *FirewallPolicyRuleCollectionGroupsDeleteFuture) result(client Fire // FirewallPolicySku SKU of Firewall policy. type FirewallPolicySku struct { - // Tier - Tier of Firewall Policy. Possible values include: 'FirewallPolicySkuTierStandard', 'FirewallPolicySkuTierPremium' + // Tier - Tier of Firewall Policy. Possible values include: 'FirewallPolicySkuTierStandard', 'FirewallPolicySkuTierPremium', 'FirewallPolicySkuTierBasic' Tier FirewallPolicySkuTier `json:"tier,omitempty"` } @@ -18057,6 +19344,12 @@ type FirewallPolicySNAT struct { PrivateRanges *[]string `json:"privateRanges,omitempty"` } +// FirewallPolicySQL SQL Settings in Firewall Policy. +type FirewallPolicySQL struct { + // AllowSQLRedirect - A flag to indicate if SQL Redirect traffic filtering is enabled. Turning on the flag requires no rule using port 11000-11999. + AllowSQLRedirect *bool `json:"allowSqlRedirect,omitempty"` +} + // FirewallPolicyThreatIntelWhitelist threatIntel Whitelist for Firewall Policy. type FirewallPolicyThreatIntelWhitelist struct { // IPAddresses - List of IP addresses for the ThreatIntel Whitelist. @@ -18699,6 +19992,8 @@ type FrontendIPConfigurationPropertiesFormat struct { PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` // PublicIPPrefix - The reference to the Public IP Prefix resource. PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"` + // GatewayLoadBalancer - The reference to gateway load balancer frontend IP. + GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the frontend IP configuration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -18724,9 +20019,34 @@ func (ficpf FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, erro if ficpf.PublicIPPrefix != nil { objectMap["publicIPPrefix"] = ficpf.PublicIPPrefix } + if ficpf.GatewayLoadBalancer != nil { + objectMap["gatewayLoadBalancer"] = ficpf.GatewayLoadBalancer + } return json.Marshal(objectMap) } +// GatewayCustomBgpIPAddressIPConfiguration gatewayCustomBgpIpAddressIpConfiguration for a virtual network +// gateway connection. +type GatewayCustomBgpIPAddressIPConfiguration struct { + // IPConfigurationID - The IpconfigurationId of ipconfiguration which belongs to gateway. + IPConfigurationID *string `json:"ipConfigurationId,omitempty"` + // CustomBgpIPAddress - The custom BgpPeeringAddress which belongs to IpconfigurationId. + CustomBgpIPAddress *string `json:"customBgpIpAddress,omitempty"` +} + +// GatewayLoadBalancerTunnelInterface gateway load balancer tunnel interface of a load balancer backend +// address pool. +type GatewayLoadBalancerTunnelInterface struct { + // Port - Port of gateway load balancer tunnel interface. + Port *int32 `json:"port,omitempty"` + // Identifier - Identifier of gateway load balancer tunnel interface. + Identifier *int32 `json:"identifier,omitempty"` + // Protocol - Protocol of gateway load balancer tunnel interface. Possible values include: 'GatewayLoadBalancerTunnelProtocolNone', 'GatewayLoadBalancerTunnelProtocolNative', 'GatewayLoadBalancerTunnelProtocolVXLAN' + Protocol GatewayLoadBalancerTunnelProtocol `json:"protocol,omitempty"` + // Type - Traffic type of gateway load balancer tunnel interface. Possible values include: 'GatewayLoadBalancerTunnelInterfaceTypeNone', 'GatewayLoadBalancerTunnelInterfaceTypeInternal', 'GatewayLoadBalancerTunnelInterfaceTypeExternal' + Type GatewayLoadBalancerTunnelInterfaceType `json:"type,omitempty"` +} + // GatewayRoute gateway routing details. type GatewayRoute struct { // LocalAddress - READ-ONLY; The gateway's local address. @@ -19580,6 +20900,20 @@ func (future *HubVirtualNetworkConnectionsDeleteFuture) result(client HubVirtual return } +// IDPSQueryObject will describe the query to run against the IDPS signatures DB +type IDPSQueryObject struct { + // Filters - Contain all filters names and values + Filters *[]FilterItems `json:"filters,omitempty"` + // Search - Search term in all columns + Search *string `json:"search,omitempty"` + // OrderBy - Column to sort response by + OrderBy *OrderBy `json:"orderBy,omitempty"` + // ResultsPerPage - The number of the results to return in each page + ResultsPerPage *int32 `json:"resultsPerPage,omitempty"` + // Skip - The number of records matching the filter to skip + Skip *int32 `json:"skip,omitempty"` +} + // InboundNatPool inbound NAT pool of the load balancer. type InboundNatPool struct { // InboundNatPoolPropertiesFormat - Properties of load balancer inbound nat pool. @@ -19724,7 +21058,7 @@ func (inppf InboundNatPoolPropertiesFormat) MarshalJSON() ([]byte, error) { // InboundNatRule inbound NAT rule of the load balancer. type InboundNatRule struct { autorest.Response `json:"-"` - // InboundNatRulePropertiesFormat - Properties of load balancer inbound nat rule. + // InboundNatRulePropertiesFormat - Properties of load balancer inbound NAT rule. *InboundNatRulePropertiesFormat `json:"properties,omitempty"` // Name - The name of the resource that is unique within the set of inbound NAT rules used by the load balancer. This name can be used to access the resource. Name *string `json:"name,omitempty"` @@ -19814,7 +21148,7 @@ func (inr *InboundNatRule) UnmarshalJSON(body []byte) error { // InboundNatRuleListResult response for ListInboundNatRule API service call. type InboundNatRuleListResult struct { autorest.Response `json:"-"` - // Value - A list of inbound nat rules in a load balancer. + // Value - A list of inbound NAT rules in a load balancer. Value *[]InboundNatRule `json:"value,omitempty"` // NextLink - READ-ONLY; The URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` @@ -19979,6 +21313,24 @@ func NewInboundNatRuleListResultPage(cur InboundNatRuleListResult, getNextPage f } } +// InboundNatRulePortMapping individual port mappings for inbound NAT rule created for backend pool. +type InboundNatRulePortMapping struct { + // InboundNatRuleName - READ-ONLY; Name of inbound NAT rule. + InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` + // Protocol - READ-ONLY; The reference to the transport protocol used by the inbound NAT rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' + Protocol TransportProtocol `json:"protocol,omitempty"` + // FrontendPort - READ-ONLY; Frontend port. + FrontendPort *int32 `json:"frontendPort,omitempty"` + // BackendPort - READ-ONLY; Backend port. + BackendPort *int32 `json:"backendPort,omitempty"` +} + +// MarshalJSON is the custom marshaler for InboundNatRulePortMapping. +func (inrpm InboundNatRulePortMapping) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // InboundNatRulePropertiesFormat properties of the inbound NAT rule. type InboundNatRulePropertiesFormat struct { // FrontendIPConfiguration - A reference to frontend IP addresses. @@ -19997,6 +21349,12 @@ type InboundNatRulePropertiesFormat struct { EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` // EnableTCPReset - Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected connection termination. This element is only used when the protocol is set to TCP. EnableTCPReset *bool `json:"enableTcpReset,omitempty"` + // FrontendPortRangeStart - The port range start for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeEnd. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534. + FrontendPortRangeStart *int32 `json:"frontendPortRangeStart,omitempty"` + // FrontendPortRangeEnd - The port range end for the external endpoint. This property is used together with BackendAddressPool and FrontendPortRangeStart. Individual inbound NAT rule port mappings will be created for each backend address from BackendAddressPool. Acceptable values range from 1 to 65534. + FrontendPortRangeEnd *int32 `json:"frontendPortRangeEnd,omitempty"` + // BackendAddressPool - A reference to backendAddressPool resource. + BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the inbound NAT rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -20025,6 +21383,15 @@ func (inrpf InboundNatRulePropertiesFormat) MarshalJSON() ([]byte, error) { if inrpf.EnableTCPReset != nil { objectMap["enableTcpReset"] = inrpf.EnableTCPReset } + if inrpf.FrontendPortRangeStart != nil { + objectMap["frontendPortRangeStart"] = inrpf.FrontendPortRangeStart + } + if inrpf.FrontendPortRangeEnd != nil { + objectMap["frontendPortRangeEnd"] = inrpf.FrontendPortRangeEnd + } + if inrpf.BackendAddressPool != nil { + objectMap["backendAddressPool"] = inrpf.BackendAddressPool + } return json.Marshal(objectMap) } @@ -20760,6 +22127,8 @@ func (iicplcp InterfaceIPConfigurationPrivateLinkConnectionProperties) MarshalJS // InterfaceIPConfigurationPropertiesFormat properties of IP configuration. type InterfaceIPConfigurationPropertiesFormat struct { + // GatewayLoadBalancer - The reference to gateway load balancer frontend IP. + GatewayLoadBalancer *SubResource `json:"gatewayLoadBalancer,omitempty"` // VirtualNetworkTaps - The reference to Virtual Network Taps. VirtualNetworkTaps *[]VirtualNetworkTap `json:"virtualNetworkTaps,omitempty"` // ApplicationGatewayBackendAddressPools - The reference to ApplicationGatewayBackendAddressPool resource. @@ -20791,6 +22160,9 @@ type InterfaceIPConfigurationPropertiesFormat struct { // MarshalJSON is the custom marshaler for InterfaceIPConfigurationPropertiesFormat. func (iicpf InterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) + if iicpf.GatewayLoadBalancer != nil { + objectMap["gatewayLoadBalancer"] = iicpf.GatewayLoadBalancer + } if iicpf.VirtualNetworkTaps != nil { objectMap["virtualNetworkTaps"] = iicpf.VirtualNetworkTaps } @@ -21181,6 +22553,8 @@ type InterfacePropertiesFormat struct { MacAddress *string `json:"macAddress,omitempty"` // Primary - READ-ONLY; Whether this is a primary network interface on a virtual machine. Primary *bool `json:"primary,omitempty"` + // VnetEncryptionSupported - READ-ONLY; Whether the virtual machine this nic is attached to supports encryption. + VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty"` // EnableAcceleratedNetworking - If the network interface is accelerated networking enabled. EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` // EnableIPForwarding - Indicates whether IP forwarding is enabled on this network interface. @@ -21193,12 +22567,16 @@ type InterfacePropertiesFormat struct { ResourceGUID *string `json:"resourceGuid,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the network interface resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // WorkloadType - WorkloadType of the NetworkInterface for BareMetal resources + WorkloadType *string `json:"workloadType,omitempty"` // NicType - Type of Network Interface resource. Possible values include: 'InterfaceNicTypeStandard', 'InterfaceNicTypeElastic' NicType InterfaceNicType `json:"nicType,omitempty"` // PrivateLinkService - Privatelinkservice of the network interface resource. PrivateLinkService *PrivateLinkService `json:"privateLinkService,omitempty"` // MigrationPhase - Migration phase of Network Interface resource. Possible values include: 'InterfaceMigrationPhaseNone', 'InterfaceMigrationPhasePrepare', 'InterfaceMigrationPhaseCommit', 'InterfaceMigrationPhaseAbort', 'InterfaceMigrationPhaseCommitted' MigrationPhase InterfaceMigrationPhase `json:"migrationPhase,omitempty"` + // AuxiliaryMode - Auxiliary mode of Network Interface resource. Possible values include: 'InterfaceAuxiliaryModeNone', 'InterfaceAuxiliaryModeMaxConnections', 'InterfaceAuxiliaryModeFloating' + AuxiliaryMode InterfaceAuxiliaryMode `json:"auxiliaryMode,omitempty"` } // MarshalJSON is the custom marshaler for InterfacePropertiesFormat. @@ -21219,6 +22597,9 @@ func (ipf InterfacePropertiesFormat) MarshalJSON() ([]byte, error) { if ipf.EnableIPForwarding != nil { objectMap["enableIPForwarding"] = ipf.EnableIPForwarding } + if ipf.WorkloadType != nil { + objectMap["workloadType"] = ipf.WorkloadType + } if ipf.NicType != "" { objectMap["nicType"] = ipf.NicType } @@ -21228,6 +22609,9 @@ func (ipf InterfacePropertiesFormat) MarshalJSON() ([]byte, error) { if ipf.MigrationPhase != "" { objectMap["migrationPhase"] = ipf.MigrationPhase } + if ipf.AuxiliaryMode != "" { + objectMap["auxiliaryMode"] = ipf.AuxiliaryMode + } return json.Marshal(objectMap) } @@ -23316,33 +24700,27 @@ func NewListP2SVpnGatewaysResultPage(cur ListP2SVpnGatewaysResult, getNextPage f } } -// ListString ... -type ListString struct { +// ListRoutingIntentResult list of the routing intent result and a URL nextLink to get the next set of +// results. +type ListRoutingIntentResult struct { autorest.Response `json:"-"` - Value *[]string `json:"value,omitempty"` -} - -// ListVirtualHubBgpConnectionResults virtualHubBgpConnections list. -type ListVirtualHubBgpConnectionResults struct { - autorest.Response `json:"-"` - // Value - The list of VirtualHubBgpConnections. - Value *[]BgpConnection `json:"value,omitempty"` - // NextLink - URL to get the next set of results. + // Value - List of RoutingIntent resource. + Value *[]RoutingIntent `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. NextLink *string `json:"nextLink,omitempty"` } -// ListVirtualHubBgpConnectionResultsIterator provides access to a complete listing of BgpConnection -// values. -type ListVirtualHubBgpConnectionResultsIterator struct { +// ListRoutingIntentResultIterator provides access to a complete listing of RoutingIntent values. +type ListRoutingIntentResultIterator struct { i int - page ListVirtualHubBgpConnectionResultsPage + page ListRoutingIntentResultPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ListVirtualHubBgpConnectionResultsIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *ListRoutingIntentResultIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubBgpConnectionResultsIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ListRoutingIntentResultIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -23367,67 +24745,67 @@ func (iter *ListVirtualHubBgpConnectionResultsIterator) NextWithContext(ctx cont // Next advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (iter *ListVirtualHubBgpConnectionResultsIterator) Next() error { +func (iter *ListRoutingIntentResultIterator) Next() error { return iter.NextWithContext(context.Background()) } // NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ListVirtualHubBgpConnectionResultsIterator) NotDone() bool { +func (iter ListRoutingIntentResultIterator) NotDone() bool { return iter.page.NotDone() && iter.i < len(iter.page.Values()) } // Response returns the raw server response from the last page request. -func (iter ListVirtualHubBgpConnectionResultsIterator) Response() ListVirtualHubBgpConnectionResults { +func (iter ListRoutingIntentResultIterator) Response() ListRoutingIntentResult { return iter.page.Response() } // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ListVirtualHubBgpConnectionResultsIterator) Value() BgpConnection { +func (iter ListRoutingIntentResultIterator) Value() RoutingIntent { if !iter.page.NotDone() { - return BgpConnection{} + return RoutingIntent{} } return iter.page.Values()[iter.i] } -// Creates a new instance of the ListVirtualHubBgpConnectionResultsIterator type. -func NewListVirtualHubBgpConnectionResultsIterator(page ListVirtualHubBgpConnectionResultsPage) ListVirtualHubBgpConnectionResultsIterator { - return ListVirtualHubBgpConnectionResultsIterator{page: page} +// Creates a new instance of the ListRoutingIntentResultIterator type. +func NewListRoutingIntentResultIterator(page ListRoutingIntentResultPage) ListRoutingIntentResultIterator { + return ListRoutingIntentResultIterator{page: page} } // IsEmpty returns true if the ListResult contains no values. -func (lvhbcr ListVirtualHubBgpConnectionResults) IsEmpty() bool { - return lvhbcr.Value == nil || len(*lvhbcr.Value) == 0 +func (lrir ListRoutingIntentResult) IsEmpty() bool { + return lrir.Value == nil || len(*lrir.Value) == 0 } // hasNextLink returns true if the NextLink is not empty. -func (lvhbcr ListVirtualHubBgpConnectionResults) hasNextLink() bool { - return lvhbcr.NextLink != nil && len(*lvhbcr.NextLink) != 0 +func (lrir ListRoutingIntentResult) hasNextLink() bool { + return lrir.NextLink != nil && len(*lrir.NextLink) != 0 } -// listVirtualHubBgpConnectionResultsPreparer prepares a request to retrieve the next set of results. +// listRoutingIntentResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. -func (lvhbcr ListVirtualHubBgpConnectionResults) listVirtualHubBgpConnectionResultsPreparer(ctx context.Context) (*http.Request, error) { - if !lvhbcr.hasNextLink() { +func (lrir ListRoutingIntentResult) listRoutingIntentResultPreparer(ctx context.Context) (*http.Request, error) { + if !lrir.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), autorest.AsJSON(), autorest.AsGet(), - autorest.WithBaseURL(to.String(lvhbcr.NextLink))) + autorest.WithBaseURL(to.String(lrir.NextLink))) } -// ListVirtualHubBgpConnectionResultsPage contains a page of BgpConnection values. -type ListVirtualHubBgpConnectionResultsPage struct { - fn func(context.Context, ListVirtualHubBgpConnectionResults) (ListVirtualHubBgpConnectionResults, error) - lvhbcr ListVirtualHubBgpConnectionResults +// ListRoutingIntentResultPage contains a page of RoutingIntent values. +type ListRoutingIntentResultPage struct { + fn func(context.Context, ListRoutingIntentResult) (ListRoutingIntentResult, error) + lrir ListRoutingIntentResult } // NextWithContext advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. -func (page *ListVirtualHubBgpConnectionResultsPage) NextWithContext(ctx context.Context) (err error) { +func (page *ListRoutingIntentResultPage) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubBgpConnectionResultsPage.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ListRoutingIntentResultPage.NextWithContext") defer func() { sc := -1 if page.Response().Response.Response != nil { @@ -23437,11 +24815,11 @@ func (page *ListVirtualHubBgpConnectionResultsPage) NextWithContext(ctx context. }() } for { - next, err := page.fn(ctx, page.lvhbcr) + next, err := page.fn(ctx, page.lrir) if err != nil { return err } - page.lvhbcr = next + page.lrir = next if !next.hasNextLink() || !next.IsEmpty() { break } @@ -23452,57 +24830,223 @@ func (page *ListVirtualHubBgpConnectionResultsPage) NextWithContext(ctx context. // Next advances to the next page of values. If there was an error making // the request the page does not advance and the error is returned. // Deprecated: Use NextWithContext() instead. -func (page *ListVirtualHubBgpConnectionResultsPage) Next() error { +func (page *ListRoutingIntentResultPage) Next() error { return page.NextWithContext(context.Background()) } // NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ListVirtualHubBgpConnectionResultsPage) NotDone() bool { - return !page.lvhbcr.IsEmpty() +func (page ListRoutingIntentResultPage) NotDone() bool { + return !page.lrir.IsEmpty() } // Response returns the raw server response from the last page request. -func (page ListVirtualHubBgpConnectionResultsPage) Response() ListVirtualHubBgpConnectionResults { - return page.lvhbcr +func (page ListRoutingIntentResultPage) Response() ListRoutingIntentResult { + return page.lrir } // Values returns the slice of values for the current page or nil if there are no values. -func (page ListVirtualHubBgpConnectionResultsPage) Values() []BgpConnection { - if page.lvhbcr.IsEmpty() { +func (page ListRoutingIntentResultPage) Values() []RoutingIntent { + if page.lrir.IsEmpty() { return nil } - return *page.lvhbcr.Value + return *page.lrir.Value } -// Creates a new instance of the ListVirtualHubBgpConnectionResultsPage type. -func NewListVirtualHubBgpConnectionResultsPage(cur ListVirtualHubBgpConnectionResults, getNextPage func(context.Context, ListVirtualHubBgpConnectionResults) (ListVirtualHubBgpConnectionResults, error)) ListVirtualHubBgpConnectionResultsPage { - return ListVirtualHubBgpConnectionResultsPage{ - fn: getNextPage, - lvhbcr: cur, +// Creates a new instance of the ListRoutingIntentResultPage type. +func NewListRoutingIntentResultPage(cur ListRoutingIntentResult, getNextPage func(context.Context, ListRoutingIntentResult) (ListRoutingIntentResult, error)) ListRoutingIntentResultPage { + return ListRoutingIntentResultPage{ + fn: getNextPage, + lrir: cur, } } -// ListVirtualHubIPConfigurationResults virtualHubIpConfigurations list. -type ListVirtualHubIPConfigurationResults struct { +// ListString ... +type ListString struct { autorest.Response `json:"-"` - // Value - The list of VirtualHubIpConfigurations. - Value *[]HubIPConfiguration `json:"value,omitempty"` + Value *[]string `json:"value,omitempty"` +} + +// ListVirtualHubBgpConnectionResults virtualHubBgpConnections list. +type ListVirtualHubBgpConnectionResults struct { + autorest.Response `json:"-"` + // Value - The list of VirtualHubBgpConnections. + Value *[]BgpConnection `json:"value,omitempty"` // NextLink - URL to get the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// ListVirtualHubIPConfigurationResultsIterator provides access to a complete listing of HubIPConfiguration +// ListVirtualHubBgpConnectionResultsIterator provides access to a complete listing of BgpConnection // values. -type ListVirtualHubIPConfigurationResultsIterator struct { +type ListVirtualHubBgpConnectionResultsIterator struct { i int - page ListVirtualHubIPConfigurationResultsPage + page ListVirtualHubBgpConnectionResultsPage } // NextWithContext advances to the next value. If there was an error making // the request the iterator does not advance and the error is returned. -func (iter *ListVirtualHubIPConfigurationResultsIterator) NextWithContext(ctx context.Context) (err error) { +func (iter *ListVirtualHubBgpConnectionResultsIterator) NextWithContext(ctx context.Context) (err error) { if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubIPConfigurationResultsIterator.NextWithContext") + ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubBgpConnectionResultsIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ListVirtualHubBgpConnectionResultsIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListVirtualHubBgpConnectionResultsIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ListVirtualHubBgpConnectionResultsIterator) Response() ListVirtualHubBgpConnectionResults { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ListVirtualHubBgpConnectionResultsIterator) Value() BgpConnection { + if !iter.page.NotDone() { + return BgpConnection{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListVirtualHubBgpConnectionResultsIterator type. +func NewListVirtualHubBgpConnectionResultsIterator(page ListVirtualHubBgpConnectionResultsPage) ListVirtualHubBgpConnectionResultsIterator { + return ListVirtualHubBgpConnectionResultsIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lvhbcr ListVirtualHubBgpConnectionResults) IsEmpty() bool { + return lvhbcr.Value == nil || len(*lvhbcr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lvhbcr ListVirtualHubBgpConnectionResults) hasNextLink() bool { + return lvhbcr.NextLink != nil && len(*lvhbcr.NextLink) != 0 +} + +// listVirtualHubBgpConnectionResultsPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lvhbcr ListVirtualHubBgpConnectionResults) listVirtualHubBgpConnectionResultsPreparer(ctx context.Context) (*http.Request, error) { + if !lvhbcr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lvhbcr.NextLink))) +} + +// ListVirtualHubBgpConnectionResultsPage contains a page of BgpConnection values. +type ListVirtualHubBgpConnectionResultsPage struct { + fn func(context.Context, ListVirtualHubBgpConnectionResults) (ListVirtualHubBgpConnectionResults, error) + lvhbcr ListVirtualHubBgpConnectionResults +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ListVirtualHubBgpConnectionResultsPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubBgpConnectionResultsPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lvhbcr) + if err != nil { + return err + } + page.lvhbcr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ListVirtualHubBgpConnectionResultsPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVirtualHubBgpConnectionResultsPage) NotDone() bool { + return !page.lvhbcr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListVirtualHubBgpConnectionResultsPage) Response() ListVirtualHubBgpConnectionResults { + return page.lvhbcr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVirtualHubBgpConnectionResultsPage) Values() []BgpConnection { + if page.lvhbcr.IsEmpty() { + return nil + } + return *page.lvhbcr.Value +} + +// Creates a new instance of the ListVirtualHubBgpConnectionResultsPage type. +func NewListVirtualHubBgpConnectionResultsPage(cur ListVirtualHubBgpConnectionResults, getNextPage func(context.Context, ListVirtualHubBgpConnectionResults) (ListVirtualHubBgpConnectionResults, error)) ListVirtualHubBgpConnectionResultsPage { + return ListVirtualHubBgpConnectionResultsPage{ + fn: getNextPage, + lvhbcr: cur, + } +} + +// ListVirtualHubIPConfigurationResults virtualHubIpConfigurations list. +type ListVirtualHubIPConfigurationResults struct { + autorest.Response `json:"-"` + // Value - The list of VirtualHubIpConfigurations. + Value *[]HubIPConfiguration `json:"value,omitempty"` + // NextLink - URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListVirtualHubIPConfigurationResultsIterator provides access to a complete listing of HubIPConfiguration +// values. +type ListVirtualHubIPConfigurationResultsIterator struct { + i int + page ListVirtualHubIPConfigurationResultsPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ListVirtualHubIPConfigurationResultsIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubIPConfigurationResultsIterator.NextWithContext") defer func() { sc := -1 if iter.Response().Response.Response != nil { @@ -23963,6 +25507,167 @@ func NewListVirtualHubsResultPage(cur ListVirtualHubsResult, getNextPage func(co } } +// ListVirtualNetworkGatewayNatRulesResult result of the request to list all nat rules to a virtual network +// gateway. It contains a list of Nat rules and a URL nextLink to get the next set of results. +type ListVirtualNetworkGatewayNatRulesResult struct { + autorest.Response `json:"-"` + // Value - List of Nat Rules. + Value *[]VirtualNetworkGatewayNatRule `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListVirtualNetworkGatewayNatRulesResultIterator provides access to a complete listing of +// VirtualNetworkGatewayNatRule values. +type ListVirtualNetworkGatewayNatRulesResultIterator struct { + i int + page ListVirtualNetworkGatewayNatRulesResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ListVirtualNetworkGatewayNatRulesResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualNetworkGatewayNatRulesResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ListVirtualNetworkGatewayNatRulesResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListVirtualNetworkGatewayNatRulesResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ListVirtualNetworkGatewayNatRulesResultIterator) Response() ListVirtualNetworkGatewayNatRulesResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ListVirtualNetworkGatewayNatRulesResultIterator) Value() VirtualNetworkGatewayNatRule { + if !iter.page.NotDone() { + return VirtualNetworkGatewayNatRule{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListVirtualNetworkGatewayNatRulesResultIterator type. +func NewListVirtualNetworkGatewayNatRulesResultIterator(page ListVirtualNetworkGatewayNatRulesResultPage) ListVirtualNetworkGatewayNatRulesResultIterator { + return ListVirtualNetworkGatewayNatRulesResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lvngnrr ListVirtualNetworkGatewayNatRulesResult) IsEmpty() bool { + return lvngnrr.Value == nil || len(*lvngnrr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lvngnrr ListVirtualNetworkGatewayNatRulesResult) hasNextLink() bool { + return lvngnrr.NextLink != nil && len(*lvngnrr.NextLink) != 0 +} + +// listVirtualNetworkGatewayNatRulesResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lvngnrr ListVirtualNetworkGatewayNatRulesResult) listVirtualNetworkGatewayNatRulesResultPreparer(ctx context.Context) (*http.Request, error) { + if !lvngnrr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lvngnrr.NextLink))) +} + +// ListVirtualNetworkGatewayNatRulesResultPage contains a page of VirtualNetworkGatewayNatRule values. +type ListVirtualNetworkGatewayNatRulesResultPage struct { + fn func(context.Context, ListVirtualNetworkGatewayNatRulesResult) (ListVirtualNetworkGatewayNatRulesResult, error) + lvngnrr ListVirtualNetworkGatewayNatRulesResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ListVirtualNetworkGatewayNatRulesResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualNetworkGatewayNatRulesResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lvngnrr) + if err != nil { + return err + } + page.lvngnrr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ListVirtualNetworkGatewayNatRulesResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVirtualNetworkGatewayNatRulesResultPage) NotDone() bool { + return !page.lvngnrr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListVirtualNetworkGatewayNatRulesResultPage) Response() ListVirtualNetworkGatewayNatRulesResult { + return page.lvngnrr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVirtualNetworkGatewayNatRulesResultPage) Values() []VirtualNetworkGatewayNatRule { + if page.lvngnrr.IsEmpty() { + return nil + } + return *page.lvngnrr.Value +} + +// Creates a new instance of the ListVirtualNetworkGatewayNatRulesResultPage type. +func NewListVirtualNetworkGatewayNatRulesResultPage(cur ListVirtualNetworkGatewayNatRulesResult, getNextPage func(context.Context, ListVirtualNetworkGatewayNatRulesResult) (ListVirtualNetworkGatewayNatRulesResult, error)) ListVirtualNetworkGatewayNatRulesResultPage { + return ListVirtualNetworkGatewayNatRulesResultPage{ + fn: getNextPage, + lvngnrr: cur, + } +} + // ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a // URL nextLink to get the next set of results. type ListVirtualWANsResult struct { @@ -24603,6 +26308,169 @@ func NewListVpnGatewaysResultPage(cur ListVpnGatewaysResult, getNextPage func(co } } +// ListVpnServerConfigurationPolicyGroupsResult result of the request to list +// VpnServerConfigurationPolicyGroups. It contains a list of VpnServerConfigurationPolicyGroups and a URL +// nextLink to get the next set of results. +type ListVpnServerConfigurationPolicyGroupsResult struct { + autorest.Response `json:"-"` + // Value - List of VpnServerConfigurationPolicyGroups. + Value *[]VpnServerConfigurationPolicyGroup `json:"value,omitempty"` + // NextLink - URL to get the next set of operation list results if there are any. + NextLink *string `json:"nextLink,omitempty"` +} + +// ListVpnServerConfigurationPolicyGroupsResultIterator provides access to a complete listing of +// VpnServerConfigurationPolicyGroup values. +type ListVpnServerConfigurationPolicyGroupsResultIterator struct { + i int + page ListVpnServerConfigurationPolicyGroupsResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ListVpnServerConfigurationPolicyGroupsResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnServerConfigurationPolicyGroupsResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ListVpnServerConfigurationPolicyGroupsResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ListVpnServerConfigurationPolicyGroupsResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ListVpnServerConfigurationPolicyGroupsResultIterator) Response() ListVpnServerConfigurationPolicyGroupsResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ListVpnServerConfigurationPolicyGroupsResultIterator) Value() VpnServerConfigurationPolicyGroup { + if !iter.page.NotDone() { + return VpnServerConfigurationPolicyGroup{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ListVpnServerConfigurationPolicyGroupsResultIterator type. +func NewListVpnServerConfigurationPolicyGroupsResultIterator(page ListVpnServerConfigurationPolicyGroupsResultPage) ListVpnServerConfigurationPolicyGroupsResultIterator { + return ListVpnServerConfigurationPolicyGroupsResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (lvscpgr ListVpnServerConfigurationPolicyGroupsResult) IsEmpty() bool { + return lvscpgr.Value == nil || len(*lvscpgr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (lvscpgr ListVpnServerConfigurationPolicyGroupsResult) hasNextLink() bool { + return lvscpgr.NextLink != nil && len(*lvscpgr.NextLink) != 0 +} + +// listVpnServerConfigurationPolicyGroupsResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (lvscpgr ListVpnServerConfigurationPolicyGroupsResult) listVpnServerConfigurationPolicyGroupsResultPreparer(ctx context.Context) (*http.Request, error) { + if !lvscpgr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(lvscpgr.NextLink))) +} + +// ListVpnServerConfigurationPolicyGroupsResultPage contains a page of VpnServerConfigurationPolicyGroup +// values. +type ListVpnServerConfigurationPolicyGroupsResultPage struct { + fn func(context.Context, ListVpnServerConfigurationPolicyGroupsResult) (ListVpnServerConfigurationPolicyGroupsResult, error) + lvscpgr ListVpnServerConfigurationPolicyGroupsResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ListVpnServerConfigurationPolicyGroupsResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnServerConfigurationPolicyGroupsResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.lvscpgr) + if err != nil { + return err + } + page.lvscpgr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ListVpnServerConfigurationPolicyGroupsResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ListVpnServerConfigurationPolicyGroupsResultPage) NotDone() bool { + return !page.lvscpgr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ListVpnServerConfigurationPolicyGroupsResultPage) Response() ListVpnServerConfigurationPolicyGroupsResult { + return page.lvscpgr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ListVpnServerConfigurationPolicyGroupsResultPage) Values() []VpnServerConfigurationPolicyGroup { + if page.lvscpgr.IsEmpty() { + return nil + } + return *page.lvscpgr.Value +} + +// Creates a new instance of the ListVpnServerConfigurationPolicyGroupsResultPage type. +func NewListVpnServerConfigurationPolicyGroupsResultPage(cur ListVpnServerConfigurationPolicyGroupsResult, getNextPage func(context.Context, ListVpnServerConfigurationPolicyGroupsResult) (ListVpnServerConfigurationPolicyGroupsResult, error)) ListVpnServerConfigurationPolicyGroupsResultPage { + return ListVpnServerConfigurationPolicyGroupsResultPage{ + fn: getNextPage, + lvscpgr: cur, + } +} + // ListVpnServerConfigurationsResult result of the request to list all VpnServerConfigurations. It contains // a list of VpnServerConfigurations and a URL nextLink to get the next set of results. type ListVpnServerConfigurationsResult struct { @@ -25702,6 +27570,10 @@ type LoadBalancerBackendAddressPropertiesFormat struct { NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty"` // LoadBalancerFrontendIPConfiguration - Reference to the frontend ip address configuration defined in regional loadbalancer. LoadBalancerFrontendIPConfiguration *SubResource `json:"loadBalancerFrontendIPConfiguration,omitempty"` + // InboundNatRulesPortMapping - READ-ONLY; Collection of inbound NAT rule port mappings. + InboundNatRulesPortMapping *[]NatRulePortMapping `json:"inboundNatRulesPortMapping,omitempty"` + // AdminState - A list of administrative states which once set can override health probe so that Load Balancer will always forward new connections to backend, or deny new connections and reset existing connections. Possible values include: 'LoadBalancerBackendAddressAdminStateNone', 'LoadBalancerBackendAddressAdminStateUp', 'LoadBalancerBackendAddressAdminStateDown', 'LoadBalancerBackendAddressAdminStateDrain' + AdminState LoadBalancerBackendAddressAdminState `json:"adminState,omitempty"` } // MarshalJSON is the custom marshaler for LoadBalancerBackendAddressPropertiesFormat. @@ -25719,6 +27591,9 @@ func (lbbapf LoadBalancerBackendAddressPropertiesFormat) MarshalJSON() ([]byte, if lbbapf.LoadBalancerFrontendIPConfiguration != nil { objectMap["loadBalancerFrontendIPConfiguration"] = lbbapf.LoadBalancerFrontendIPConfiguration } + if lbbapf.AdminState != "" { + objectMap["adminState"] = lbbapf.AdminState + } return json.Marshal(objectMap) } @@ -26576,7 +28451,7 @@ type LoadBalancerPropertiesFormat struct { Probes *[]Probe `json:"probes,omitempty"` // InboundNatRules - Collection of inbound NAT Rules used by a load balancer. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules. InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"` - // InboundNatPools - Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules. + // InboundNatPools - Defines an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound NAT rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules. InboundNatPools *[]InboundNatPool `json:"inboundNatPools,omitempty"` // OutboundRules - The outbound rules. OutboundRules *[]OutboundRule `json:"outboundRules,omitempty"` @@ -26695,12 +28570,158 @@ func (future *LoadBalancersDeleteFuture) result(client LoadBalancersClient) (ar // LoadBalancerSku SKU of a load balancer. type LoadBalancerSku struct { - // Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard' + // Name - Name of a load balancer SKU. Possible values include: 'LoadBalancerSkuNameBasic', 'LoadBalancerSkuNameStandard', 'LoadBalancerSkuNameGateway' Name LoadBalancerSkuName `json:"name,omitempty"` // Tier - Tier of a load balancer SKU. Possible values include: 'LoadBalancerSkuTierRegional', 'LoadBalancerSkuTierGlobal' Tier LoadBalancerSkuTier `json:"tier,omitempty"` } +// LoadBalancersListInboundNatRulePortMappingsFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type LoadBalancersListInboundNatRulePortMappingsFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(LoadBalancersClient) (BackendAddressInboundNatRulePortMappings, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *LoadBalancersListInboundNatRulePortMappingsFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for LoadBalancersListInboundNatRulePortMappingsFuture.Result. +func (future *LoadBalancersListInboundNatRulePortMappingsFuture) result(client LoadBalancersClient) (bainrpm BackendAddressInboundNatRulePortMappings, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersListInboundNatRulePortMappingsFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + bainrpm.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.LoadBalancersListInboundNatRulePortMappingsFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if bainrpm.Response.Response, err = future.GetResult(sender); err == nil && bainrpm.Response.Response.StatusCode != http.StatusNoContent { + bainrpm, err = client.ListInboundNatRulePortMappingsResponder(bainrpm.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersListInboundNatRulePortMappingsFuture", "Result", bainrpm.Response.Response, "Failure responding to request") + } + } + return +} + +// LoadBalancersSwapPublicIPAddressesFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type LoadBalancersSwapPublicIPAddressesFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(LoadBalancersClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *LoadBalancersSwapPublicIPAddressesFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for LoadBalancersSwapPublicIPAddressesFuture.Result. +func (future *LoadBalancersSwapPublicIPAddressesFuture) result(client LoadBalancersClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancersSwapPublicIPAddressesFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.LoadBalancersSwapPublicIPAddressesFuture") + return + } + ar.Response = future.Response() + return +} + +// LoadBalancerVipSwapRequest the request for a VIP swap. +type LoadBalancerVipSwapRequest struct { + // FrontendIPConfigurations - A list of frontend IP configuration resources that should swap VIPs. + FrontendIPConfigurations *[]LoadBalancerVipSwapRequestFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` +} + +// LoadBalancerVipSwapRequestFrontendIPConfiguration VIP swap request's frontend IP configuration object. +type LoadBalancerVipSwapRequestFrontendIPConfiguration struct { + // ID - The ID of frontend IP configuration resource. + ID *string `json:"id,omitempty"` + // LoadBalancerVipSwapRequestFrontendIPConfigurationProperties - The properties of VIP swap request's frontend IP configuration object. + *LoadBalancerVipSwapRequestFrontendIPConfigurationProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for LoadBalancerVipSwapRequestFrontendIPConfiguration. +func (lbvsrfic LoadBalancerVipSwapRequestFrontendIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if lbvsrfic.ID != nil { + objectMap["id"] = lbvsrfic.ID + } + if lbvsrfic.LoadBalancerVipSwapRequestFrontendIPConfigurationProperties != nil { + objectMap["properties"] = lbvsrfic.LoadBalancerVipSwapRequestFrontendIPConfigurationProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for LoadBalancerVipSwapRequestFrontendIPConfiguration struct. +func (lbvsrfic *LoadBalancerVipSwapRequestFrontendIPConfiguration) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + lbvsrfic.ID = &ID + } + case "properties": + if v != nil { + var loadBalancerVipSwapRequestFrontendIPConfigurationProperties LoadBalancerVipSwapRequestFrontendIPConfigurationProperties + err = json.Unmarshal(*v, &loadBalancerVipSwapRequestFrontendIPConfigurationProperties) + if err != nil { + return err + } + lbvsrfic.LoadBalancerVipSwapRequestFrontendIPConfigurationProperties = &loadBalancerVipSwapRequestFrontendIPConfigurationProperties + } + } + } + + return nil +} + +// LoadBalancerVipSwapRequestFrontendIPConfigurationProperties the properties of VIP swap request's +// frontend IP configuration object. +type LoadBalancerVipSwapRequestFrontendIPConfigurationProperties struct { + // PublicIPAddress - A reference to public IP address resource. + PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"` +} + // LoadBalancingRule a load balancing rule for a load balancer. type LoadBalancingRule struct { autorest.Response `json:"-"` @@ -26797,6 +28818,8 @@ type LoadBalancingRulePropertiesFormat struct { FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` // BackendAddressPool - A reference to a pool of DIPs. Inbound traffic is randomly load balanced across IPs in the backend IPs. BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` + // BackendAddressPools - An array of references to pool of DIPs. + BackendAddressPools *[]SubResource `json:"backendAddressPools,omitempty"` // Probe - The reference to the load balancer probe used by the load balancing rule. Probe *SubResource `json:"probe,omitempty"` // Protocol - The reference to the transport protocol used by the load balancing rule. Possible values include: 'TransportProtocolUDP', 'TransportProtocolTCP', 'TransportProtocolAll' @@ -26828,6 +28851,9 @@ func (lbrpf LoadBalancingRulePropertiesFormat) MarshalJSON() ([]byte, error) { if lbrpf.BackendAddressPool != nil { objectMap["backendAddressPool"] = lbrpf.BackendAddressPool } + if lbrpf.BackendAddressPools != nil { + objectMap["backendAddressPools"] = lbrpf.BackendAddressPools + } if lbrpf.Probe != nil { objectMap["probe"] = lbrpf.Probe } @@ -27910,6 +29936,16 @@ func (nr NatRule) AsBasicFirewallPolicyRule() (BasicFirewallPolicyRule, bool) { return &nr, true } +// NatRulePortMapping individual port mappings for inbound NAT rule created for backend pool. +type NatRulePortMapping struct { + // InboundNatRuleName - Name of inbound NAT rule. + InboundNatRuleName *string `json:"inboundNatRuleName,omitempty"` + // FrontendPort - Frontend port. + FrontendPort *int32 `json:"frontendPort,omitempty"` + // BackendPort - Backend port. + BackendPort *int32 `json:"backendPort,omitempty"` +} + // NatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running // operation. type NatRulesCreateOrUpdateFuture struct { @@ -28302,6 +30338,14 @@ type OperationPropertiesFormatServiceSpecification struct { LogSpecifications *[]LogSpecification `json:"logSpecifications,omitempty"` } +// OrderBy describes a column to sort +type OrderBy struct { + // Field - Describes the actual column name to sort by + Field *string `json:"field,omitempty"` + // Order - Describes if results should be in ascending/descending order. Possible values include: 'FirewallPolicyIDPSQuerySortOrderAscending', 'FirewallPolicyIDPSQuerySortOrderDescending' + Order FirewallPolicyIDPSQuerySortOrder `json:"order,omitempty"` +} + // OutboundRule outbound rule of the load balancer. type OutboundRule struct { autorest.Response `json:"-"` @@ -28436,12 +30480,14 @@ func (orpf OutboundRulePropertiesFormat) MarshalJSON() ([]byte, error) { // OwaspCrsExclusionEntry allow to exclude some variable satisfy the condition for the WAF check. type OwaspCrsExclusionEntry struct { - // MatchVariable - The variable to be excluded. Possible values include: 'OwaspCrsExclusionEntryMatchVariableRequestHeaderNames', 'OwaspCrsExclusionEntryMatchVariableRequestCookieNames', 'OwaspCrsExclusionEntryMatchVariableRequestArgNames' + // MatchVariable - The variable to be excluded. Possible values include: 'OwaspCrsExclusionEntryMatchVariableRequestHeaderNames', 'OwaspCrsExclusionEntryMatchVariableRequestCookieNames', 'OwaspCrsExclusionEntryMatchVariableRequestArgNames', 'OwaspCrsExclusionEntryMatchVariableRequestHeaderKeys', 'OwaspCrsExclusionEntryMatchVariableRequestHeaderValues', 'OwaspCrsExclusionEntryMatchVariableRequestCookieKeys', 'OwaspCrsExclusionEntryMatchVariableRequestCookieValues', 'OwaspCrsExclusionEntryMatchVariableRequestArgKeys', 'OwaspCrsExclusionEntryMatchVariableRequestArgValues' MatchVariable OwaspCrsExclusionEntryMatchVariable `json:"matchVariable,omitempty"` // SelectorMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to. Possible values include: 'OwaspCrsExclusionEntrySelectorMatchOperatorEquals', 'OwaspCrsExclusionEntrySelectorMatchOperatorContains', 'OwaspCrsExclusionEntrySelectorMatchOperatorStartsWith', 'OwaspCrsExclusionEntrySelectorMatchOperatorEndsWith', 'OwaspCrsExclusionEntrySelectorMatchOperatorEqualsAny' SelectorMatchOperator OwaspCrsExclusionEntrySelectorMatchOperator `json:"selectorMatchOperator,omitempty"` // Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to. Selector *string `json:"selector,omitempty"` + // ExclusionManagedRuleSets - The managed rule sets that are associated with the exclusion. + ExclusionManagedRuleSets *[]ExclusionManagedRuleSet `json:"exclusionManagedRuleSets,omitempty"` } // P2SConnectionConfiguration p2SConnectionConfiguration Resource. @@ -28530,6 +30576,10 @@ type P2SConnectionConfigurationProperties struct { RoutingConfiguration *RoutingConfiguration `json:"routingConfiguration,omitempty"` // EnableInternetSecurity - Flag indicating whether the enable internet security flag is turned on for the P2S Connections or not. EnableInternetSecurity *bool `json:"enableInternetSecurity,omitempty"` + // ConfigurationPolicyGroupAssociations - READ-ONLY; List of Configuration Policy Groups that this P2SConnectionConfiguration is attached to. + ConfigurationPolicyGroupAssociations *[]SubResource `json:"configurationPolicyGroupAssociations,omitempty"` + // PreviousConfigurationPolicyGroupAssociations - READ-ONLY; List of previous Configuration Policy Groups that this P2SConnectionConfiguration was attached to. + PreviousConfigurationPolicyGroupAssociations *[]VpnServerConfigurationPolicyGroup `json:"previousConfigurationPolicyGroupAssociations,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the P2SConnectionConfiguration resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } @@ -30794,6 +32844,91 @@ func (pecp PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// PrivateEndpointIPConfiguration an IP Configuration of the private endpoint. +type PrivateEndpointIPConfiguration struct { + // PrivateEndpointIPConfigurationProperties - Properties of private endpoint IP configurations. + *PrivateEndpointIPConfigurationProperties `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The resource type. + Type *string `json:"type,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateEndpointIPConfiguration. +func (peic PrivateEndpointIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if peic.PrivateEndpointIPConfigurationProperties != nil { + objectMap["properties"] = peic.PrivateEndpointIPConfigurationProperties + } + if peic.Name != nil { + objectMap["name"] = peic.Name + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PrivateEndpointIPConfiguration struct. +func (peic *PrivateEndpointIPConfiguration) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var privateEndpointIPConfigurationProperties PrivateEndpointIPConfigurationProperties + err = json.Unmarshal(*v, &privateEndpointIPConfigurationProperties) + if err != nil { + return err + } + peic.PrivateEndpointIPConfigurationProperties = &privateEndpointIPConfigurationProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + peic.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + peic.Type = &typeVar + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + peic.Etag = &etag + } + } + } + + return nil +} + +// PrivateEndpointIPConfigurationProperties properties of an IP Configuration of the private endpoint. +type PrivateEndpointIPConfigurationProperties struct { + // GroupID - The ID of a group obtained from the remote resource that this private endpoint should connect to. + GroupID *string `json:"groupId,omitempty"` + // MemberName - The member name of a group obtained from the remote resource that this private endpoint should connect to. + MemberName *string `json:"memberName,omitempty"` + // PrivateIPAddress - A private ip address obtained from the private endpoint's subnet. + PrivateIPAddress *string `json:"privateIPAddress,omitempty"` +} + // PrivateEndpointListResult response for the ListPrivateEndpoints API service call. type PrivateEndpointListResult struct { autorest.Response `json:"-"` @@ -30976,6 +33111,12 @@ type PrivateEndpointProperties struct { ManualPrivateLinkServiceConnections *[]PrivateLinkServiceConnection `json:"manualPrivateLinkServiceConnections,omitempty"` // CustomDNSConfigs - An array of custom dns configurations. CustomDNSConfigs *[]CustomDNSConfigPropertiesFormat `json:"customDnsConfigs,omitempty"` + // ApplicationSecurityGroups - Application security groups in which the private endpoint IP configuration is included. + ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` + // IPConfigurations - A list of IP configurations of the private endpoint. This will be used to map to the First Party Service's endpoints. + IPConfigurations *[]PrivateEndpointIPConfiguration `json:"ipConfigurations,omitempty"` + // CustomNetworkInterfaceName - The custom name of the network interface attached to the private endpoint. + CustomNetworkInterfaceName *string `json:"customNetworkInterfaceName,omitempty"` } // MarshalJSON is the custom marshaler for PrivateEndpointProperties. @@ -30993,6 +33134,15 @@ func (pep PrivateEndpointProperties) MarshalJSON() ([]byte, error) { if pep.CustomDNSConfigs != nil { objectMap["customDnsConfigs"] = pep.CustomDNSConfigs } + if pep.ApplicationSecurityGroups != nil { + objectMap["applicationSecurityGroups"] = pep.ApplicationSecurityGroups + } + if pep.IPConfigurations != nil { + objectMap["ipConfigurations"] = pep.IPConfigurations + } + if pep.CustomNetworkInterfaceName != nil { + objectMap["customNetworkInterfaceName"] = pep.CustomNetworkInterfaceName + } return json.Marshal(objectMap) } @@ -32826,6 +34976,8 @@ type PublicIPAddressPropertiesFormat struct { MigrationPhase PublicIPAddressMigrationPhase `json:"migrationPhase,omitempty"` // LinkedPublicIPAddress - The linked public IP address of the public IP address resource. LinkedPublicIPAddress *PublicIPAddress `json:"linkedPublicIPAddress,omitempty"` + // DeleteOption - Specify what happens to the public IP address when the VM using it is deleted. Possible values include: 'DeleteOptionsDelete', 'DeleteOptionsDetach' + DeleteOption DeleteOptions `json:"deleteOption,omitempty"` } // MarshalJSON is the custom marshaler for PublicIPAddressPropertiesFormat. @@ -32867,6 +35019,9 @@ func (piapf PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) { if piapf.LinkedPublicIPAddress != nil { objectMap["linkedPublicIPAddress"] = piapf.LinkedPublicIPAddress } + if piapf.DeleteOption != "" { + objectMap["deleteOption"] = piapf.DeleteOption + } return json.Marshal(objectMap) } @@ -33413,6 +35568,23 @@ func (future *PutBastionShareableLinkFuture) result(client BaseClient) (bsllrp B return } +// QosDefinition quality of Service defines the traffic configuration between endpoints. Mandatory to have +// one marking. +type QosDefinition struct { + // Markings - List of markings to be used in the configuration. + Markings *[]int32 `json:"markings,omitempty"` + // SourceIPRanges - Source IP ranges. + SourceIPRanges *[]QosIPRange `json:"sourceIpRanges,omitempty"` + // DestinationIPRanges - Destination IP ranges. + DestinationIPRanges *[]QosIPRange `json:"destinationIpRanges,omitempty"` + // SourcePortRanges - Sources port ranges. + SourcePortRanges *[]QosPortRange `json:"sourcePortRanges,omitempty"` + // DestinationPortRanges - Destination port ranges. + DestinationPortRanges *[]QosPortRange `json:"destinationPortRanges,omitempty"` + // Protocol - RNM supported protocol types. Possible values include: 'ProtocolTypeDoNotUse', 'ProtocolTypeIcmp', 'ProtocolTypeTCP', 'ProtocolTypeUDP', 'ProtocolTypeGre', 'ProtocolTypeEsp', 'ProtocolTypeAh', 'ProtocolTypeVxlan', 'ProtocolTypeAll' + Protocol ProtocolType `json:"protocol,omitempty"` +} + // QosIPRange qos Traffic Profiler IP Range properties. type QosIPRange struct { // StartIP - Start IP Address. @@ -33429,6 +35601,24 @@ type QosPortRange struct { End *int32 `json:"end,omitempty"` } +// QueryInboundNatRulePortMappingRequest the request for a QueryInboundNatRulePortMapping API. Either +// IpConfiguration or IpAddress should be set +type QueryInboundNatRulePortMappingRequest struct { + // IPConfiguration - NetworkInterfaceIPConfiguration set in load balancer backend address. + IPConfiguration *SubResource `json:"ipConfiguration,omitempty"` + // IPAddress - IP address set in load balancer backend address. + IPAddress *string `json:"ipAddress,omitempty"` +} + +// QueryResults query result +type QueryResults struct { + autorest.Response `json:"-"` + // MatchingRecordsCount - Number of total records matching the query. + MatchingRecordsCount *int64 `json:"matchingRecordsCount,omitempty"` + // Signatures - Array containing the results of the query + Signatures *[]SingleQueryResult `json:"signatures,omitempty"` +} + // QueryTroubleshootingParameters parameters that define the resource to query the troubleshooting result. type QueryTroubleshootingParameters struct { // TargetResourceID - The target resource ID to query the troubleshooting result. @@ -35148,6 +37338,203 @@ type RoutingConfiguration struct { VnetRoutes *VnetRoute `json:"vnetRoutes,omitempty"` } +// RoutingIntent the routing intent child resource of a Virtual hub. +type RoutingIntent struct { + autorest.Response `json:"-"` + // RoutingIntentProperties - Properties of the RoutingIntent resource. + *RoutingIntentProperties `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for RoutingIntent. +func (ri RoutingIntent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ri.RoutingIntentProperties != nil { + objectMap["properties"] = ri.RoutingIntentProperties + } + if ri.Name != nil { + objectMap["name"] = ri.Name + } + if ri.ID != nil { + objectMap["id"] = ri.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for RoutingIntent struct. +func (ri *RoutingIntent) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var routingIntentProperties RoutingIntentProperties + err = json.Unmarshal(*v, &routingIntentProperties) + if err != nil { + return err + } + ri.RoutingIntentProperties = &routingIntentProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + ri.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + ri.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + ri.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + ri.ID = &ID + } + } + } + + return nil +} + +// RoutingIntentCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type RoutingIntentCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(RoutingIntentClient) (RoutingIntent, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *RoutingIntentCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for RoutingIntentCreateOrUpdateFuture.Result. +func (future *RoutingIntentCreateOrUpdateFuture) result(client RoutingIntentClient) (ri RoutingIntent, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutingIntentCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ri.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.RoutingIntentCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ri.Response.Response, err = future.GetResult(sender); err == nil && ri.Response.Response.StatusCode != http.StatusNoContent { + ri, err = client.CreateOrUpdateResponder(ri.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutingIntentCreateOrUpdateFuture", "Result", ri.Response.Response, "Failure responding to request") + } + } + return +} + +// RoutingIntentDeleteFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. +type RoutingIntentDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(RoutingIntentClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *RoutingIntentDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for RoutingIntentDeleteFuture.Result. +func (future *RoutingIntentDeleteFuture) result(client RoutingIntentClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutingIntentDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.RoutingIntentDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// RoutingIntentProperties the properties of a RoutingIntent resource. +type RoutingIntentProperties struct { + // RoutingPolicies - List of routing policies. + RoutingPolicies *[]RoutingPolicy `json:"routingPolicies,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the RoutingIntent resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for RoutingIntentProperties. +func (rip RoutingIntentProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rip.RoutingPolicies != nil { + objectMap["routingPolicies"] = rip.RoutingPolicies + } + return json.Marshal(objectMap) +} + +// RoutingPolicy the routing policy object used in a RoutingIntent resource. +type RoutingPolicy struct { + // Name - The unique name for the routing policy. + Name *string `json:"name,omitempty"` + // Destinations - List of all destinations which this routing policy is applicable to (for example: Internet, PrivateTraffic). + Destinations *[]string `json:"destinations,omitempty"` + // NextHop - The next hop resource id on which this routing policy is applicable to. + NextHop *string `json:"nextHop,omitempty"` +} + // Rule rule of type network. type Rule struct { // IPProtocols - Array of FirewallPolicyRuleNetworkProtocols. @@ -36853,6 +39240,8 @@ type ServiceEndpointPolicyDefinition struct { Name *string `json:"name,omitempty"` // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` + // Type - The type of the resource. + Type *string `json:"type,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` } @@ -36866,6 +39255,9 @@ func (sepd ServiceEndpointPolicyDefinition) MarshalJSON() ([]byte, error) { if sepd.Name != nil { objectMap["name"] = sepd.Name } + if sepd.Type != nil { + objectMap["type"] = sepd.Type + } if sepd.ID != nil { objectMap["id"] = sepd.ID } @@ -36908,6 +39300,15 @@ func (sepd *ServiceEndpointPolicyDefinition) UnmarshalJSON(body []byte) error { } sepd.Etag = &etag } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + sepd.Type = &typeVar + } case "id": if v != nil { var ID string @@ -37370,6 +39771,10 @@ type ServiceEndpointPolicyPropertiesFormat struct { ResourceGUID *string `json:"resourceGuid,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the service endpoint policy resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // ServiceAlias - The alias indicating if the policy belongs to a service + ServiceAlias *string `json:"serviceAlias,omitempty"` + // ContextualServiceEndpointPolicies - A collection of contextual service endpoint policy. + ContextualServiceEndpointPolicies *[]string `json:"contextualServiceEndpointPolicies,omitempty"` } // MarshalJSON is the custom marshaler for ServiceEndpointPolicyPropertiesFormat. @@ -37378,6 +39783,12 @@ func (seppf ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) if seppf.ServiceEndpointPolicyDefinitions != nil { objectMap["serviceEndpointPolicyDefinitions"] = seppf.ServiceEndpointPolicyDefinitions } + if seppf.ServiceAlias != nil { + objectMap["serviceAlias"] = seppf.ServiceAlias + } + if seppf.ContextualServiceEndpointPolicies != nil { + objectMap["contextualServiceEndpointPolicies"] = seppf.ContextualServiceEndpointPolicies + } return json.Marshal(objectMap) } @@ -37411,6 +39822,8 @@ type ServiceTagInformation struct { Name *string `json:"name,omitempty"` // ID - READ-ONLY; The ID of service tag. ID *string `json:"id,omitempty"` + // ServiceTagChangeNumber - READ-ONLY; The iteration number of service tag object for region. + ServiceTagChangeNumber *string `json:"serviceTagChangeNumber,omitempty"` } // MarshalJSON is the custom marshaler for ServiceTagInformation. @@ -37419,6 +39832,176 @@ func (sti ServiceTagInformation) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// ServiceTagInformationListResult response for Get ServiceTagInformation API service call. Retrieves the +// list of service tag information resources. +type ServiceTagInformationListResult struct { + autorest.Response `json:"-"` + // Value - The list of service tag information resources. + Value *[]ServiceTagInformation `json:"value,omitempty"` + // NextLink - READ-ONLY; The URL to get the next set of results. + NextLink *string `json:"nextLink,omitempty"` +} + +// MarshalJSON is the custom marshaler for ServiceTagInformationListResult. +func (stilr ServiceTagInformationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if stilr.Value != nil { + objectMap["value"] = stilr.Value + } + return json.Marshal(objectMap) +} + +// ServiceTagInformationListResultIterator provides access to a complete listing of ServiceTagInformation +// values. +type ServiceTagInformationListResultIterator struct { + i int + page ServiceTagInformationListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ServiceTagInformationListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceTagInformationListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ServiceTagInformationListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ServiceTagInformationListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ServiceTagInformationListResultIterator) Response() ServiceTagInformationListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ServiceTagInformationListResultIterator) Value() ServiceTagInformation { + if !iter.page.NotDone() { + return ServiceTagInformation{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ServiceTagInformationListResultIterator type. +func NewServiceTagInformationListResultIterator(page ServiceTagInformationListResultPage) ServiceTagInformationListResultIterator { + return ServiceTagInformationListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (stilr ServiceTagInformationListResult) IsEmpty() bool { + return stilr.Value == nil || len(*stilr.Value) == 0 +} + +// hasNextLink returns true if the NextLink is not empty. +func (stilr ServiceTagInformationListResult) hasNextLink() bool { + return stilr.NextLink != nil && len(*stilr.NextLink) != 0 +} + +// serviceTagInformationListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (stilr ServiceTagInformationListResult) serviceTagInformationListResultPreparer(ctx context.Context) (*http.Request, error) { + if !stilr.hasNextLink() { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(stilr.NextLink))) +} + +// ServiceTagInformationListResultPage contains a page of ServiceTagInformation values. +type ServiceTagInformationListResultPage struct { + fn func(context.Context, ServiceTagInformationListResult) (ServiceTagInformationListResult, error) + stilr ServiceTagInformationListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ServiceTagInformationListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceTagInformationListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + for { + next, err := page.fn(ctx, page.stilr) + if err != nil { + return err + } + page.stilr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } + } + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ServiceTagInformationListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ServiceTagInformationListResultPage) NotDone() bool { + return !page.stilr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ServiceTagInformationListResultPage) Response() ServiceTagInformationListResult { + return page.stilr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ServiceTagInformationListResultPage) Values() []ServiceTagInformation { + if page.stilr.IsEmpty() { + return nil + } + return *page.stilr.Value +} + +// Creates a new instance of the ServiceTagInformationListResultPage type. +func NewServiceTagInformationListResultPage(cur ServiceTagInformationListResult, getNextPage func(context.Context, ServiceTagInformationListResult) (ServiceTagInformationListResult, error)) ServiceTagInformationListResultPage { + return ServiceTagInformationListResultPage{ + fn: getNextPage, + stilr: cur, + } +} + // ServiceTagInformationPropertiesFormat properties of the service tag information. type ServiceTagInformationPropertiesFormat struct { // ChangeNumber - READ-ONLY; The iteration number of service tag. @@ -37470,6 +40053,87 @@ type SessionIds struct { SessionIds *[]string `json:"sessionIds,omitempty"` } +// SignatureOverridesFilterValuesQuery describes the filter values possibles for a given column +type SignatureOverridesFilterValuesQuery struct { + // FilterName - Describes the name of the column which values will be returned + FilterName *string `json:"filterName,omitempty"` +} + +// SignatureOverridesFilterValuesResponse describes the list of all possible values for a specific filter +// value +type SignatureOverridesFilterValuesResponse struct { + autorest.Response `json:"-"` + // FilterValues - Describes the possible values + FilterValues *[]string `json:"filterValues,omitempty"` +} + +// SignaturesOverrides contains all specific policy signatures overrides for the IDPS +type SignaturesOverrides struct { + autorest.Response `json:"-"` + // Name - Contains the name of the resource (default) + Name *string `json:"name,omitempty"` + // ID - Will contain the resource id of the signature override resource + ID *string `json:"id,omitempty"` + // Type - Will contain the type of the resource: Microsoft.Network/firewallPolicies/intrusionDetectionSignaturesOverrides + Type *string `json:"type,omitempty"` + // Properties - Will contain the properties of the resource (the actual signature overrides) + Properties *SignaturesOverridesProperties `json:"properties,omitempty"` +} + +// SignaturesOverridesList describes an object containing an array with a single item +type SignaturesOverridesList struct { + autorest.Response `json:"-"` + // Value - Describes a list consisting exactly one item describing the policy's signature override status + Value *[]SignaturesOverrides `json:"value,omitempty"` +} + +// SignaturesOverridesProperties will contain the properties of the resource (the actual signature +// overrides) +type SignaturesOverridesProperties struct { + Signatures map[string]*string `json:"signatures"` +} + +// MarshalJSON is the custom marshaler for SignaturesOverridesProperties. +func (so SignaturesOverridesProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if so.Signatures != nil { + objectMap["signatures"] = so.Signatures + } + return json.Marshal(objectMap) +} + +// SingleQueryResult ... +type SingleQueryResult struct { + // SignatureID - The ID of the signature + SignatureID *int32 `json:"signatureId,omitempty"` + // Mode - The current mode enforced, 0 - Disabled, 1 - Alert, 2 -Deny + Mode *int32 `json:"mode,omitempty"` + // Severity - Describes the severity of signature: 1 - Low, 2 - Medium, 3 - High + Severity *int32 `json:"severity,omitempty"` + // Direction - Describes in which direction signature is being enforced: 0 - Inbound, 1 - OutBound, 2 - Bidirectional + Direction *int32 `json:"direction,omitempty"` + // Group - Describes the groups the signature belongs to + Group *string `json:"group,omitempty"` + // Description - Describes what is the signature enforces + Description *string `json:"description,omitempty"` + // Protocol - Describes the protocol the signatures is being enforced in + Protocol *string `json:"protocol,omitempty"` + // SourcePorts - Describes the list of source ports related to this signature + SourcePorts *[]string `json:"sourcePorts,omitempty"` + // DestinationPorts - Describes the list of destination ports related to this signature + DestinationPorts *[]string `json:"destinationPorts,omitempty"` + // LastUpdated - Describes the last updated time of the signature (provided from 3rd party vendor) + LastUpdated *string `json:"lastUpdated,omitempty"` + // InheritedFromParentPolicy - Describes if this override is inherited from base policy or not + InheritedFromParentPolicy *bool `json:"inheritedFromParentPolicy,omitempty"` +} + +// Sku the sku of this Bastion Host. +type Sku struct { + // Name - The name of this Bastion Host. Possible values include: 'BastionHostSkuNameBasic', 'BastionHostSkuNameStandard' + Name BastionHostSkuName `json:"name,omitempty"` +} + // StaticRoute list of all Static Routes. type StaticRoute struct { // Name - The name of the StaticRoute that is unique within a VnetRoute. @@ -38771,6 +41435,8 @@ type VirtualAppliancePropertiesFormat struct { CloudInitConfiguration *string `json:"cloudInitConfiguration,omitempty"` // VirtualApplianceAsn - VirtualAppliance ASN. VirtualApplianceAsn *int64 `json:"virtualApplianceAsn,omitempty"` + // SSHPublicKey - Public key for SSH login. + SSHPublicKey *string `json:"sshPublicKey,omitempty"` // VirtualApplianceNics - READ-ONLY; List of Virtual Appliance Network Interfaces. VirtualApplianceNics *[]VirtualApplianceNicProperties `json:"virtualApplianceNics,omitempty"` // VirtualApplianceSites - READ-ONLY; List of references to VirtualApplianceSite. @@ -38802,6 +41468,9 @@ func (vapf VirtualAppliancePropertiesFormat) MarshalJSON() ([]byte, error) { if vapf.VirtualApplianceAsn != nil { objectMap["virtualApplianceAsn"] = vapf.VirtualApplianceAsn } + if vapf.SSHPublicKey != nil { + objectMap["sshPublicKey"] = vapf.SSHPublicKey + } return json.Marshal(objectMap) } @@ -39562,6 +42231,8 @@ type VirtualHub struct { *VirtualHubProperties `json:"properties,omitempty"` // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` + // Kind - READ-ONLY; Kind of service virtual hub. This is metadata used for the Azure portal experience for Route Server. + Kind *string `json:"kind,omitempty"` // ID - Resource ID. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Resource name. @@ -39619,6 +42290,15 @@ func (vh *VirtualHub) UnmarshalJSON(body []byte) error { } vh.Etag = &etag } + case "kind": + if v != nil { + var kind string + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + vh.Kind = &kind + } case "id": if v != nil { var ID string @@ -39980,6 +42660,10 @@ type VirtualHubProperties struct { VirtualRouterIps *[]string `json:"virtualRouterIps,omitempty"` // AllowBranchToBranchTraffic - Flag to control transit for VirtualRouter hub. AllowBranchToBranchTraffic *bool `json:"allowBranchToBranchTraffic,omitempty"` + // PreferredRoutingGateway - The preferred gateway to route on-prem traffic. Possible values include: 'PreferredRoutingGatewayExpressRoute', 'PreferredRoutingGatewayVpnGateway', 'PreferredRoutingGatewayNone' + PreferredRoutingGateway PreferredRoutingGateway `json:"preferredRoutingGateway,omitempty"` + // HubRoutingPreference - The hubRoutingPreference of this VirtualHub. Possible values include: 'HubRoutingPreferenceExpressRoute', 'HubRoutingPreferenceVpnGateway', 'HubRoutingPreferenceASPath' + HubRoutingPreference HubRoutingPreference `json:"hubRoutingPreference,omitempty"` } // MarshalJSON is the custom marshaler for VirtualHubProperties. @@ -40030,6 +42714,12 @@ func (vhp VirtualHubProperties) MarshalJSON() ([]byte, error) { if vhp.AllowBranchToBranchTraffic != nil { objectMap["allowBranchToBranchTraffic"] = vhp.AllowBranchToBranchTraffic } + if vhp.PreferredRoutingGateway != "" { + objectMap["preferredRoutingGateway"] = vhp.PreferredRoutingGateway + } + if vhp.HubRoutingPreference != "" { + objectMap["hubRoutingPreference"] = vhp.HubRoutingPreference + } return json.Marshal(objectMap) } @@ -40511,13 +43201,22 @@ type VirtualNetworkConnectionGatewayReference struct { ID *string `json:"id,omitempty"` } +// VirtualNetworkEncryption indicates if encryption is enabled on virtual network and if VM without +// encryption is allowed in encrypted VNet. +type VirtualNetworkEncryption struct { + // Enabled - Indicates if encryption is enabled on the virtual network. + Enabled *bool `json:"enabled,omitempty"` + // Enforcement - If the encrypted VNet allows VM that does not support encryption. Possible values include: 'VirtualNetworkEncryptionEnforcementDropUnencrypted', 'VirtualNetworkEncryptionEnforcementAllowUnencrypted' + Enforcement VirtualNetworkEncryptionEnforcement `json:"enforcement,omitempty"` +} + // VirtualNetworkGateway a common class for general resource information. type VirtualNetworkGateway struct { autorest.Response `json:"-"` - // ExtendedLocation - The extended location of type local virtual network gateway. - ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` // VirtualNetworkGatewayPropertiesFormat - Properties of the virtual network gateway. *VirtualNetworkGatewayPropertiesFormat `json:"properties,omitempty"` + // ExtendedLocation - The extended location of type local virtual network gateway. + ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` // ID - Resource ID. @@ -40535,12 +43234,12 @@ type VirtualNetworkGateway struct { // MarshalJSON is the custom marshaler for VirtualNetworkGateway. func (vng VirtualNetworkGateway) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if vng.ExtendedLocation != nil { - objectMap["extendedLocation"] = vng.ExtendedLocation - } if vng.VirtualNetworkGatewayPropertiesFormat != nil { objectMap["properties"] = vng.VirtualNetworkGatewayPropertiesFormat } + if vng.ExtendedLocation != nil { + objectMap["extendedLocation"] = vng.ExtendedLocation + } if vng.ID != nil { objectMap["id"] = vng.ID } @@ -40562,23 +43261,23 @@ func (vng *VirtualNetworkGateway) UnmarshalJSON(body []byte) error { } for k, v := range m { switch k { - case "extendedLocation": + case "properties": if v != nil { - var extendedLocation ExtendedLocation - err = json.Unmarshal(*v, &extendedLocation) + var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat + err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat) if err != nil { return err } - vng.ExtendedLocation = &extendedLocation + vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat } - case "properties": + case "extendedLocation": if v != nil { - var virtualNetworkGatewayPropertiesFormat VirtualNetworkGatewayPropertiesFormat - err = json.Unmarshal(*v, &virtualNetworkGatewayPropertiesFormat) + var extendedLocation ExtendedLocation + err = json.Unmarshal(*v, &extendedLocation) if err != nil { return err } - vng.VirtualNetworkGatewayPropertiesFormat = &virtualNetworkGatewayPropertiesFormat + vng.ExtendedLocation = &extendedLocation } case "etag": if v != nil { @@ -40901,6 +43600,8 @@ type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct { Peer *SubResource `json:"peer,omitempty"` // EnableBgp - EnableBgp flag. EnableBgp *bool `json:"enableBgp,omitempty"` + // GatewayCustomBgpIPAddresses - GatewayCustomBgpIpAddresses to be used for virtual network gateway Connection. + GatewayCustomBgpIPAddresses *[]GatewayCustomBgpIPAddressIPConfiguration `json:"gatewayCustomBgpIpAddresses,omitempty"` // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors. UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` // IpsecPolicies - The IPSec Policies to be considered by this connection. @@ -40951,6 +43652,9 @@ func (vngclepf VirtualNetworkGatewayConnectionListEntityPropertiesFormat) Marsha if vngclepf.EnableBgp != nil { objectMap["enableBgp"] = vngclepf.EnableBgp } + if vngclepf.GatewayCustomBgpIPAddresses != nil { + objectMap["gatewayCustomBgpIpAddresses"] = vngclepf.GatewayCustomBgpIPAddresses + } if vngclepf.UsePolicyBasedTrafficSelectors != nil { objectMap["usePolicyBasedTrafficSelectors"] = vngclepf.UsePolicyBasedTrafficSelectors } @@ -41146,6 +43850,10 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct { VirtualNetworkGateway2 *VirtualNetworkGateway `json:"virtualNetworkGateway2,omitempty"` // LocalNetworkGateway2 - The reference to local network gateway resource. LocalNetworkGateway2 *LocalNetworkGateway `json:"localNetworkGateway2,omitempty"` + // IngressNatRules - List of ingress NatRules. + IngressNatRules *[]SubResource `json:"ingressNatRules,omitempty"` + // EgressNatRules - List of egress NatRules. + EgressNatRules *[]SubResource `json:"egressNatRules,omitempty"` // ConnectionType - Gateway connection type. Possible values include: 'VirtualNetworkGatewayConnectionTypeIPsec', 'VirtualNetworkGatewayConnectionTypeVnet2Vnet', 'VirtualNetworkGatewayConnectionTypeExpressRoute', 'VirtualNetworkGatewayConnectionTypeVPNClient' ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"` // ConnectionProtocol - Connection protocol used for this connection. Possible values include: 'VirtualNetworkGatewayConnectionProtocolIKEv2', 'VirtualNetworkGatewayConnectionProtocolIKEv1' @@ -41170,6 +43878,8 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct { Peer *SubResource `json:"peer,omitempty"` // EnableBgp - EnableBgp flag. EnableBgp *bool `json:"enableBgp,omitempty"` + // GatewayCustomBgpIPAddresses - GatewayCustomBgpIpAddresses to be used for virtual network gateway Connection. + GatewayCustomBgpIPAddresses *[]GatewayCustomBgpIPAddressIPConfiguration `json:"gatewayCustomBgpIpAddresses,omitempty"` // UseLocalAzureIPAddress - Use private local Azure IP for the connection. UseLocalAzureIPAddress *bool `json:"useLocalAzureIpAddress,omitempty"` // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors. @@ -41201,6 +43911,12 @@ func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]b if vngcpf.LocalNetworkGateway2 != nil { objectMap["localNetworkGateway2"] = vngcpf.LocalNetworkGateway2 } + if vngcpf.IngressNatRules != nil { + objectMap["ingressNatRules"] = vngcpf.IngressNatRules + } + if vngcpf.EgressNatRules != nil { + objectMap["egressNatRules"] = vngcpf.EgressNatRules + } if vngcpf.ConnectionType != "" { objectMap["connectionType"] = vngcpf.ConnectionType } @@ -41225,6 +43941,9 @@ func (vngcpf VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]b if vngcpf.EnableBgp != nil { objectMap["enableBgp"] = vngcpf.EnableBgp } + if vngcpf.GatewayCustomBgpIPAddresses != nil { + objectMap["gatewayCustomBgpIpAddresses"] = vngcpf.GatewayCustomBgpIPAddresses + } if vngcpf.UseLocalAzureIPAddress != nil { objectMap["useLocalAzureIpAddress"] = vngcpf.UseLocalAzureIPAddress } @@ -42065,6 +44784,213 @@ func NewVirtualNetworkGatewayListResultPage(cur VirtualNetworkGatewayListResult, } } +// VirtualNetworkGatewayNatRule virtualNetworkGatewayNatRule Resource. +type VirtualNetworkGatewayNatRule struct { + autorest.Response `json:"-"` + // VirtualNetworkGatewayNatRuleProperties - Properties of the Virtual Network Gateway NAT rule. + *VirtualNetworkGatewayNatRuleProperties `json:"properties,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkGatewayNatRule. +func (vngnr VirtualNetworkGatewayNatRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vngnr.VirtualNetworkGatewayNatRuleProperties != nil { + objectMap["properties"] = vngnr.VirtualNetworkGatewayNatRuleProperties + } + if vngnr.Name != nil { + objectMap["name"] = vngnr.Name + } + if vngnr.ID != nil { + objectMap["id"] = vngnr.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VirtualNetworkGatewayNatRule struct. +func (vngnr *VirtualNetworkGatewayNatRule) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var virtualNetworkGatewayNatRuleProperties VirtualNetworkGatewayNatRuleProperties + err = json.Unmarshal(*v, &virtualNetworkGatewayNatRuleProperties) + if err != nil { + return err + } + vngnr.VirtualNetworkGatewayNatRuleProperties = &virtualNetworkGatewayNatRuleProperties + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vngnr.Name = &name + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vngnr.Etag = &etag + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vngnr.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vngnr.ID = &ID + } + } + } + + return nil +} + +// VirtualNetworkGatewayNatRuleProperties parameters for VirtualNetworkGatewayNatRule. +type VirtualNetworkGatewayNatRuleProperties struct { + // ProvisioningState - READ-ONLY; The provisioning state of the NAT Rule resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + // Type - The type of NAT rule for VPN NAT. Possible values include: 'VpnNatRuleTypeStatic', 'VpnNatRuleTypeDynamic' + Type VpnNatRuleType `json:"type,omitempty"` + // Mode - The Source NAT direction of a VPN NAT. Possible values include: 'VpnNatRuleModeEgressSnat', 'VpnNatRuleModeIngressSnat' + Mode VpnNatRuleMode `json:"mode,omitempty"` + // InternalMappings - The private IP address internal mapping for NAT. + InternalMappings *[]VpnNatRuleMapping `json:"internalMappings,omitempty"` + // ExternalMappings - The private IP address external mapping for NAT. + ExternalMappings *[]VpnNatRuleMapping `json:"externalMappings,omitempty"` + // IPConfigurationID - The IP Configuration ID this NAT rule applies to. + IPConfigurationID *string `json:"ipConfigurationId,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualNetworkGatewayNatRuleProperties. +func (vngnrp VirtualNetworkGatewayNatRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vngnrp.Type != "" { + objectMap["type"] = vngnrp.Type + } + if vngnrp.Mode != "" { + objectMap["mode"] = vngnrp.Mode + } + if vngnrp.InternalMappings != nil { + objectMap["internalMappings"] = vngnrp.InternalMappings + } + if vngnrp.ExternalMappings != nil { + objectMap["externalMappings"] = vngnrp.ExternalMappings + } + if vngnrp.IPConfigurationID != nil { + objectMap["ipConfigurationId"] = vngnrp.IPConfigurationID + } + return json.Marshal(objectMap) +} + +// VirtualNetworkGatewayNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the +// results of a long-running operation. +type VirtualNetworkGatewayNatRulesCreateOrUpdateFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewayNatRulesClient) (VirtualNetworkGatewayNatRule, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewayNatRulesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewayNatRulesCreateOrUpdateFuture.Result. +func (future *VirtualNetworkGatewayNatRulesCreateOrUpdateFuture) result(client VirtualNetworkGatewayNatRulesClient) (vngnr VirtualNetworkGatewayNatRule, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + vngnr.Response.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayNatRulesCreateOrUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if vngnr.Response.Response, err = future.GetResult(sender); err == nil && vngnr.Response.Response.StatusCode != http.StatusNoContent { + vngnr, err = client.CreateOrUpdateResponder(vngnr.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesCreateOrUpdateFuture", "Result", vngnr.Response.Response, "Failure responding to request") + } + } + return +} + +// VirtualNetworkGatewayNatRulesDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type VirtualNetworkGatewayNatRulesDeleteFuture struct { + azure.FutureAPI + // Result returns the result of the asynchronous operation. + // If the operation has not completed it will return an error. + Result func(VirtualNetworkGatewayNatRulesClient) (autorest.Response, error) +} + +// UnmarshalJSON is the custom unmarshaller for CreateFuture. +func (future *VirtualNetworkGatewayNatRulesDeleteFuture) UnmarshalJSON(body []byte) error { + var azFuture azure.Future + if err := json.Unmarshal(body, &azFuture); err != nil { + return err + } + future.FutureAPI = &azFuture + future.Result = future.result + return nil +} + +// result is the default implementation for VirtualNetworkGatewayNatRulesDeleteFuture.Result. +func (future *VirtualNetworkGatewayNatRulesDeleteFuture) result(client VirtualNetworkGatewayNatRulesClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + ar.Response = future.Response() + err = azure.NewAsyncOpIncompleteError("network.VirtualNetworkGatewayNatRulesDeleteFuture") + return + } + ar.Response = future.Response() + return +} + // VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties. type VirtualNetworkGatewayPropertiesFormat struct { // IPConfigurations - IP configurations for virtual network gateway. @@ -42081,6 +45007,8 @@ type VirtualNetworkGatewayPropertiesFormat struct { EnablePrivateIPAddress *bool `json:"enablePrivateIpAddress,omitempty"` // ActiveActive - ActiveActive flag. ActiveActive *bool `json:"activeActive,omitempty"` + // DisableIPSecReplayProtection - disableIPSecReplayProtection flag. + DisableIPSecReplayProtection *bool `json:"disableIPSecReplayProtection,omitempty"` // GatewayDefaultSite - The reference to the LocalNetworkGateway resource which represents local network site having default routes. Assign Null value in case of removing existing default site setting. GatewayDefaultSite *SubResource `json:"gatewayDefaultSite,omitempty"` // Sku - The reference to the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway. @@ -42101,6 +45029,10 @@ type VirtualNetworkGatewayPropertiesFormat struct { InboundDNSForwardingEndpoint *string `json:"inboundDnsForwardingEndpoint,omitempty"` // VNetExtendedLocationResourceID - Customer vnet resource id. VirtualNetworkGateway of type local gateway is associated with the customer vnet. VNetExtendedLocationResourceID *string `json:"vNetExtendedLocationResourceId,omitempty"` + // NatRules - NatRules for virtual network gateway. + NatRules *[]VirtualNetworkGatewayNatRule `json:"natRules,omitempty"` + // EnableBgpRouteTranslationForNat - EnableBgpRouteTranslationForNat flag. + EnableBgpRouteTranslationForNat *bool `json:"enableBgpRouteTranslationForNat,omitempty"` } // MarshalJSON is the custom marshaler for VirtualNetworkGatewayPropertiesFormat. @@ -42127,6 +45059,9 @@ func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) if vngpf.ActiveActive != nil { objectMap["activeActive"] = vngpf.ActiveActive } + if vngpf.DisableIPSecReplayProtection != nil { + objectMap["disableIPSecReplayProtection"] = vngpf.DisableIPSecReplayProtection + } if vngpf.GatewayDefaultSite != nil { objectMap["gatewayDefaultSite"] = vngpf.GatewayDefaultSite } @@ -42148,6 +45083,12 @@ func (vngpf VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) if vngpf.VNetExtendedLocationResourceID != nil { objectMap["vNetExtendedLocationResourceId"] = vngpf.VNetExtendedLocationResourceID } + if vngpf.NatRules != nil { + objectMap["natRules"] = vngpf.NatRules + } + if vngpf.EnableBgpRouteTranslationForNat != nil { + objectMap["enableBgpRouteTranslationForNat"] = vngpf.EnableBgpRouteTranslationForNat + } return json.Marshal(objectMap) } @@ -43480,12 +46421,18 @@ type VirtualNetworkPeeringPropertiesFormat struct { UseRemoteGateways *bool `json:"useRemoteGateways,omitempty"` // RemoteVirtualNetwork - The reference to the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). RemoteVirtualNetwork *SubResource `json:"remoteVirtualNetwork,omitempty"` - // RemoteAddressSpace - The reference to the remote virtual network address space. + // RemoteAddressSpace - The reference to the address space peered with the remote virtual network. RemoteAddressSpace *AddressSpace `json:"remoteAddressSpace,omitempty"` + // RemoteVirtualNetworkAddressSpace - The reference to the current address space of the remote virtual network. + RemoteVirtualNetworkAddressSpace *AddressSpace `json:"remoteVirtualNetworkAddressSpace,omitempty"` // RemoteBgpCommunities - The reference to the remote virtual network's Bgp Communities. RemoteBgpCommunities *VirtualNetworkBgpCommunities `json:"remoteBgpCommunities,omitempty"` + // RemoteVirtualNetworkEncryption - READ-ONLY; The reference to the remote virtual network's encryption + RemoteVirtualNetworkEncryption *VirtualNetworkEncryption `json:"remoteVirtualNetworkEncryption,omitempty"` // PeeringState - The status of the virtual network peering. Possible values include: 'VirtualNetworkPeeringStateInitiated', 'VirtualNetworkPeeringStateConnected', 'VirtualNetworkPeeringStateDisconnected' PeeringState VirtualNetworkPeeringState `json:"peeringState,omitempty"` + // PeeringSyncLevel - The peering sync status of the virtual network peering. Possible values include: 'VirtualNetworkPeeringLevelFullyInSync', 'VirtualNetworkPeeringLevelRemoteNotInSync', 'VirtualNetworkPeeringLevelLocalNotInSync', 'VirtualNetworkPeeringLevelLocalAndRemoteNotInSync' + PeeringSyncLevel VirtualNetworkPeeringLevel `json:"peeringSyncLevel,omitempty"` // ProvisioningState - READ-ONLY; The provisioning state of the virtual network peering resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` // DoNotVerifyRemoteGateways - If we need to verify the provisioning state of the remote gateway. @@ -43515,12 +46462,18 @@ func (vnppf VirtualNetworkPeeringPropertiesFormat) MarshalJSON() ([]byte, error) if vnppf.RemoteAddressSpace != nil { objectMap["remoteAddressSpace"] = vnppf.RemoteAddressSpace } + if vnppf.RemoteVirtualNetworkAddressSpace != nil { + objectMap["remoteVirtualNetworkAddressSpace"] = vnppf.RemoteVirtualNetworkAddressSpace + } if vnppf.RemoteBgpCommunities != nil { objectMap["remoteBgpCommunities"] = vnppf.RemoteBgpCommunities } if vnppf.PeeringState != "" { objectMap["peeringState"] = vnppf.PeeringState } + if vnppf.PeeringSyncLevel != "" { + objectMap["peeringSyncLevel"] = vnppf.PeeringSyncLevel + } if vnppf.DoNotVerifyRemoteGateways != nil { objectMap["doNotVerifyRemoteGateways"] = vnppf.DoNotVerifyRemoteGateways } @@ -43613,6 +46566,8 @@ type VirtualNetworkPropertiesFormat struct { AddressSpace *AddressSpace `json:"addressSpace,omitempty"` // DhcpOptions - The dhcpOptions that contains an array of DNS servers available to VMs deployed in the virtual network. DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"` + // FlowTimeoutInMinutes - The FlowTimeout value (in minutes) for the Virtual Network + FlowTimeoutInMinutes *int32 `json:"flowTimeoutInMinutes,omitempty"` // Subnets - A list of subnets in a Virtual Network. Subnets *[]Subnet `json:"subnets,omitempty"` // VirtualNetworkPeerings - A list of peerings in a Virtual Network. @@ -43629,6 +46584,8 @@ type VirtualNetworkPropertiesFormat struct { DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"` // BgpCommunities - Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET. BgpCommunities *VirtualNetworkBgpCommunities `json:"bgpCommunities,omitempty"` + // Encryption - Indicates if encryption is enabled on virtual network and if VM without encryption is allowed in encrypted VNet. + Encryption *VirtualNetworkEncryption `json:"encryption,omitempty"` // IPAllocations - Array of IpAllocation which reference this VNET. IPAllocations *[]SubResource `json:"ipAllocations,omitempty"` } @@ -43642,6 +46599,9 @@ func (vnpf VirtualNetworkPropertiesFormat) MarshalJSON() ([]byte, error) { if vnpf.DhcpOptions != nil { objectMap["dhcpOptions"] = vnpf.DhcpOptions } + if vnpf.FlowTimeoutInMinutes != nil { + objectMap["flowTimeoutInMinutes"] = vnpf.FlowTimeoutInMinutes + } if vnpf.Subnets != nil { objectMap["subnets"] = vnpf.Subnets } @@ -43660,6 +46620,9 @@ func (vnpf VirtualNetworkPropertiesFormat) MarshalJSON() ([]byte, error) { if vnpf.BgpCommunities != nil { objectMap["bgpCommunities"] = vnpf.BgpCommunities } + if vnpf.Encryption != nil { + objectMap["encryption"] = vnpf.Encryption + } if vnpf.IPAllocations != nil { objectMap["ipAllocations"] = vnpf.IPAllocations } @@ -45199,6 +48162,17 @@ func (vVar VM) MarshalJSON() ([]byte, error) { type VnetRoute struct { // StaticRoutes - List of all Static Routes. StaticRoutes *[]StaticRoute `json:"staticRoutes,omitempty"` + // BgpConnections - READ-ONLY; The list of references to HubBgpConnection objects. + BgpConnections *[]SubResource `json:"bgpConnections,omitempty"` +} + +// MarshalJSON is the custom marshaler for VnetRoute. +func (vr VnetRoute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vr.StaticRoutes != nil { + objectMap["staticRoutes"] = vr.StaticRoutes + } + return json.Marshal(objectMap) } // VpnClientConfiguration vpnClientConfiguration for P2S client. @@ -46169,6 +49143,8 @@ type VpnGatewayProperties struct { VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"` // IPConfigurations - READ-ONLY; List of all IPs configured on the gateway. IPConfigurations *[]VpnGatewayIPConfiguration `json:"ipConfigurations,omitempty"` + // EnableBgpRouteTranslationForNat - Enable BGP routes translation for NAT on this VpnGateway. + EnableBgpRouteTranslationForNat *bool `json:"enableBgpRouteTranslationForNat,omitempty"` // IsRoutingPreferenceInternet - Enable Routing Preference property for the Public IP Interface of the VpnGateway. IsRoutingPreferenceInternet *bool `json:"isRoutingPreferenceInternet,omitempty"` // NatRules - List of all the nat Rules associated with the gateway. @@ -46190,6 +49166,9 @@ func (vgp VpnGatewayProperties) MarshalJSON() ([]byte, error) { if vgp.VpnGatewayScaleUnit != nil { objectMap["vpnGatewayScaleUnit"] = vgp.VpnGatewayScaleUnit } + if vgp.EnableBgpRouteTranslationForNat != nil { + objectMap["enableBgpRouteTranslationForNat"] = vgp.EnableBgpRouteTranslationForNat + } if vgp.IsRoutingPreferenceInternet != nil { objectMap["isRoutingPreferenceInternet"] = vgp.IsRoutingPreferenceInternet } @@ -46551,6 +49530,8 @@ type VpnLinkProviderProperties struct { type VpnNatRuleMapping struct { // AddressSpace - Address space for Vpn NatRule mapping. AddressSpace *string `json:"addressSpace,omitempty"` + // PortRange - Port range for Vpn NatRule mapping. + PortRange *string `json:"portRange,omitempty"` } // VpnPacketCaptureStartParameters start packet capture parameters on virtual network gateway. @@ -46705,6 +49686,135 @@ func (vsc *VpnServerConfiguration) UnmarshalJSON(body []byte) error { return nil } +// VpnServerConfigurationPolicyGroup vpnServerConfigurationPolicyGroup Resource. +type VpnServerConfigurationPolicyGroup struct { + autorest.Response `json:"-"` + // VpnServerConfigurationPolicyGroupProperties - Properties of the VpnServerConfigurationPolicyGroup. + *VpnServerConfigurationPolicyGroupProperties `json:"properties,omitempty"` + // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string `json:"etag,omitempty"` + // Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type. + Type *string `json:"type,omitempty"` + // ID - Resource ID. + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for VpnServerConfigurationPolicyGroup. +func (vscpg VpnServerConfigurationPolicyGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vscpg.VpnServerConfigurationPolicyGroupProperties != nil { + objectMap["properties"] = vscpg.VpnServerConfigurationPolicyGroupProperties + } + if vscpg.Name != nil { + objectMap["name"] = vscpg.Name + } + if vscpg.ID != nil { + objectMap["id"] = vscpg.ID + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for VpnServerConfigurationPolicyGroup struct. +func (vscpg *VpnServerConfigurationPolicyGroup) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var vpnServerConfigurationPolicyGroupProperties VpnServerConfigurationPolicyGroupProperties + err = json.Unmarshal(*v, &vpnServerConfigurationPolicyGroupProperties) + if err != nil { + return err + } + vscpg.VpnServerConfigurationPolicyGroupProperties = &vpnServerConfigurationPolicyGroupProperties + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + vscpg.Etag = &etag + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + vscpg.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + vscpg.Type = &typeVar + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + vscpg.ID = &ID + } + } + } + + return nil +} + +// VpnServerConfigurationPolicyGroupMember vpnServerConfiguration PolicyGroup member +type VpnServerConfigurationPolicyGroupMember struct { + // Name - Name of the VpnServerConfigurationPolicyGroupMember. + Name *string `json:"name,omitempty"` + // AttributeType - The Vpn Policy member attribute type. Possible values include: 'VpnPolicyMemberAttributeTypeCertificateGroupID', 'VpnPolicyMemberAttributeTypeAADGroupID', 'VpnPolicyMemberAttributeTypeRadiusAzureGroupID' + AttributeType VpnPolicyMemberAttributeType `json:"attributeType,omitempty"` + // AttributeValue - The value of Attribute used for this VpnServerConfigurationPolicyGroupMember. + AttributeValue *string `json:"attributeValue,omitempty"` +} + +// VpnServerConfigurationPolicyGroupProperties parameters for VpnServerConfigurationPolicyGroup. +type VpnServerConfigurationPolicyGroupProperties struct { + // IsDefault - Shows if this is a Default VpnServerConfigurationPolicyGroup or not. + IsDefault *bool `json:"isDefault,omitempty"` + // Priority - Priority for VpnServerConfigurationPolicyGroup. + Priority *int32 `json:"priority,omitempty"` + // PolicyMembers - Multiple PolicyMembers for VpnServerConfigurationPolicyGroup. + PolicyMembers *[]VpnServerConfigurationPolicyGroupMember `json:"policyMembers,omitempty"` + // P2SConnectionConfigurations - READ-ONLY; List of references to P2SConnectionConfigurations. + P2SConnectionConfigurations *[]SubResource `json:"p2SConnectionConfigurations,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the VpnServerConfigurationPolicyGroup resource. Possible values include: 'ProvisioningStateSucceeded', 'ProvisioningStateUpdating', 'ProvisioningStateDeleting', 'ProvisioningStateFailed' + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// MarshalJSON is the custom marshaler for VpnServerConfigurationPolicyGroupProperties. +func (vscpgp VpnServerConfigurationPolicyGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if vscpgp.IsDefault != nil { + objectMap["isDefault"] = vscpgp.IsDefault + } + if vscpgp.Priority != nil { + objectMap["priority"] = vscpgp.Priority + } + if vscpgp.PolicyMembers != nil { + objectMap["policyMembers"] = vscpgp.PolicyMembers + } + return json.Marshal(objectMap) +} + // VpnServerConfigurationProperties parameters for VpnServerConfiguration. type VpnServerConfigurationProperties struct { // Name - The name of the VpnServerConfiguration that is unique within a resource group. @@ -46735,6 +49845,8 @@ type VpnServerConfigurationProperties struct { ProvisioningState *string `json:"provisioningState,omitempty"` // P2SVpnGateways - READ-ONLY; List of references to P2SVpnGateways. P2SVpnGateways *[]P2SVpnGateway `json:"p2SVpnGateways,omitempty"` + // ConfigurationPolicyGroups - List of all VpnServerConfigurationPolicyGroups. + ConfigurationPolicyGroups *[]VpnServerConfigurationPolicyGroup `json:"configurationPolicyGroups,omitempty"` // Etag - READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string `json:"etag,omitempty"` } @@ -46778,6 +49890,9 @@ func (vscp VpnServerConfigurationProperties) MarshalJSON() ([]byte, error) { if vscp.AadAuthenticationParameters != nil { objectMap["aadAuthenticationParameters"] = vscp.AadAuthenticationParameters } + if vscp.ConfigurationPolicyGroups != nil { + objectMap["configurationPolicyGroups"] = vscp.ConfigurationPolicyGroups + } return json.Marshal(objectMap) } @@ -47258,6 +50373,8 @@ type VpnSiteLinkConnectionProperties struct { SharedKey *string `json:"sharedKey,omitempty"` // EnableBgp - EnableBgp flag. EnableBgp *bool `json:"enableBgp,omitempty"` + // VpnGatewayCustomBgpAddresses - vpnGatewayCustomBgpAddresses used by this connection. + VpnGatewayCustomBgpAddresses *[]GatewayCustomBgpIPAddressIPConfiguration `json:"vpnGatewayCustomBgpAddresses,omitempty"` // UsePolicyBasedTrafficSelectors - Enable policy-based traffic selectors. UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` // IpsecPolicies - The IPSec Policies to be considered by this connection. @@ -47301,6 +50418,9 @@ func (vslcp VpnSiteLinkConnectionProperties) MarshalJSON() ([]byte, error) { if vslcp.EnableBgp != nil { objectMap["enableBgp"] = vslcp.EnableBgp } + if vslcp.VpnGatewayCustomBgpAddresses != nil { + objectMap["vpnGatewayCustomBgpAddresses"] = vslcp.VpnGatewayCustomBgpAddresses + } if vslcp.UsePolicyBasedTrafficSelectors != nil { objectMap["usePolicyBasedTrafficSelectors"] = vslcp.UsePolicyBasedTrafficSelectors } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/natgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/natgateways.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/natgateways.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/natgateways.go index 1e936255d86bf..83c7d146cab1d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/natgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/natgateways.go @@ -69,7 +69,7 @@ func (client NatGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -151,7 +151,7 @@ func (client NatGatewaysClient) DeletePreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -237,7 +237,7 @@ func (client NatGatewaysClient) GetPreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -319,7 +319,7 @@ func (client NatGatewaysClient) ListPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -432,7 +432,7 @@ func (client NatGatewaysClient) ListAllPreparer(ctx context.Context) (*http.Requ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -546,7 +546,7 @@ func (client NatGatewaysClient) UpdateTagsPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/natrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/natrules.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/natrules.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/natrules.go index 9867b2b2aeb5c..cff3437cc005f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/natrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/natrules.go @@ -71,7 +71,7 @@ func (client NatRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -156,7 +156,7 @@ func (client NatRulesClient) DeletePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -243,7 +243,7 @@ func (client NatRulesClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -324,7 +324,7 @@ func (client NatRulesClient) ListByVpnGatewayPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/operations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/operations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/operations.go index bcc24507f9869..675cac56998ae 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/operations.go @@ -71,7 +71,7 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe // ListPreparer prepares the List request. func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/p2svpngateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/p2svpngateways.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/p2svpngateways.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/p2svpngateways.go index 44b76ad902882..8c8e673466a1d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/p2svpngateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/p2svpngateways.go @@ -69,7 +69,7 @@ func (client P2sVpnGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -151,7 +151,7 @@ func (client P2sVpnGatewaysClient) DeletePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -231,7 +231,7 @@ func (client P2sVpnGatewaysClient) DisconnectP2sVpnConnectionsPreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -312,7 +312,7 @@ func (client P2sVpnGatewaysClient) GenerateVpnProfilePreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -400,7 +400,7 @@ func (client P2sVpnGatewaysClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -470,7 +470,7 @@ func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthPreparer(ctx context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -551,7 +551,7 @@ func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthDetailedPreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -639,7 +639,7 @@ func (client P2sVpnGatewaysClient) ListPreparer(ctx context.Context) (*http.Requ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -755,7 +755,7 @@ func (client P2sVpnGatewaysClient) ListByResourceGroupPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -861,7 +861,7 @@ func (client P2sVpnGatewaysClient) ResetPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -941,7 +941,7 @@ func (client P2sVpnGatewaysClient) UpdateTagsPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/packetcaptures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/packetcaptures.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/packetcaptures.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/packetcaptures.go index 981e753039a34..3e74bd4af0988 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/packetcaptures.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/packetcaptures.go @@ -93,7 +93,7 @@ func (client PacketCapturesClient) CreatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -176,7 +176,7 @@ func (client PacketCapturesClient) DeletePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -263,7 +263,7 @@ func (client PacketCapturesClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -334,7 +334,7 @@ func (client PacketCapturesClient) GetStatusPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -420,7 +420,7 @@ func (client PacketCapturesClient) ListPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -491,7 +491,7 @@ func (client PacketCapturesClient) StopPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/peerexpressroutecircuitconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/peerexpressroutecircuitconnections.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/peerexpressroutecircuitconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/peerexpressroutecircuitconnections.go index 16f69caf05444..09c06f5616106 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/peerexpressroutecircuitconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/peerexpressroutecircuitconnections.go @@ -81,7 +81,7 @@ func (client PeerExpressRouteCircuitConnectionsClient) GetPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -164,7 +164,7 @@ func (client PeerExpressRouteCircuitConnectionsClient) ListPreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/privatednszonegroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/privatednszonegroups.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/privatednszonegroups.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/privatednszonegroups.go index 4fd49c723d80b..b0baed9f4b84c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/privatednszonegroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/privatednszonegroups.go @@ -72,7 +72,7 @@ func (client PrivateDNSZoneGroupsClient) CreateOrUpdatePreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -156,7 +156,7 @@ func (client PrivateDNSZoneGroupsClient) DeletePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -243,7 +243,7 @@ func (client PrivateDNSZoneGroupsClient) GetPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -324,7 +324,7 @@ func (client PrivateDNSZoneGroupsClient) ListPreparer(ctx context.Context, priva "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/privateendpoints.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/privateendpoints.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/privateendpoints.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/privateendpoints.go index e4323b5ff4ed4..d42061efab6f7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/privateendpoints.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/privateendpoints.go @@ -10,7 +10,6 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -48,15 +47,6 @@ func (client PrivateEndpointsClient) CreateOrUpdate(ctx context.Context, resourc tracing.EndSpan(ctx, sc, err) }() } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ExtendedLocation", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ExtendedLocation.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ExtendedLocation.Type", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("network.PrivateEndpointsClient", "CreateOrUpdate", err.Error()) - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, privateEndpointName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -80,7 +70,7 @@ func (client PrivateEndpointsClient) CreateOrUpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -162,7 +152,7 @@ func (client PrivateEndpointsClient) DeletePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -248,7 +238,7 @@ func (client PrivateEndpointsClient) GetPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -330,7 +320,7 @@ func (client PrivateEndpointsClient) ListPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -443,7 +433,7 @@ func (client PrivateEndpointsClient) ListBySubscriptionPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/privatelinkservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/privatelinkservices.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/privatelinkservices.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/privatelinkservices.go index 77c34f421f04e..a7610b5b9eb36 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/privatelinkservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/privatelinkservices.go @@ -10,7 +10,6 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -69,7 +68,7 @@ func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityPrepare "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -152,7 +151,7 @@ func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -211,15 +210,6 @@ func (client PrivateLinkServicesClient) CreateOrUpdate(ctx context.Context, reso tracing.EndSpan(ctx, sc, err) }() } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ExtendedLocation", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ExtendedLocation.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ExtendedLocation.Type", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("network.PrivateLinkServicesClient", "CreateOrUpdate", err.Error()) - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -243,7 +233,7 @@ func (client PrivateLinkServicesClient) CreateOrUpdatePreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -325,7 +315,7 @@ func (client PrivateLinkServicesClient) DeletePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -405,7 +395,7 @@ func (client PrivateLinkServicesClient) DeletePrivateEndpointConnectionPreparer( "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -491,7 +481,7 @@ func (client PrivateLinkServicesClient) GetPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -574,7 +564,7 @@ func (client PrivateLinkServicesClient) GetPrivateEndpointConnectionPreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -656,7 +646,7 @@ func (client PrivateLinkServicesClient) ListPreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -773,7 +763,7 @@ func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesPrepa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -892,7 +882,7 @@ func (client PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByRes "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1005,7 +995,7 @@ func (client PrivateLinkServicesClient) ListBySubscriptionPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1123,7 +1113,7 @@ func (client PrivateLinkServicesClient) ListPrivateEndpointConnectionsPreparer(c "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1209,19 +1199,6 @@ func (client PrivateLinkServicesClient) UpdatePrivateEndpointConnection(ctx cont tracing.EndSpan(ctx, sc, err) }() } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.PrivateEndpointConnectionProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.PrivateEndpointConnectionProperties.PrivateEndpoint", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.PrivateEndpointConnectionProperties.PrivateEndpoint.ExtendedLocation", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.PrivateEndpointConnectionProperties.PrivateEndpoint.ExtendedLocation.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.PrivateEndpointConnectionProperties.PrivateEndpoint.ExtendedLocation.Type", Name: validation.Null, Rule: true, Chain: nil}, - }}, - }}, - }}}}}); err != nil { - return result, validation.NewError("network.PrivateLinkServicesClient", "UpdatePrivateEndpointConnection", err.Error()) - } - req, err := client.UpdatePrivateEndpointConnectionPreparer(ctx, resourceGroupName, serviceName, peConnectionName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "UpdatePrivateEndpointConnection", nil, "Failure preparing request") @@ -1253,7 +1230,7 @@ func (client PrivateLinkServicesClient) UpdatePrivateEndpointConnectionPreparer( "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/profiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/profiles.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/profiles.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/profiles.go index 30cd9bc0a7c37..b8b34572acedc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/profiles.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/profiles.go @@ -76,7 +76,7 @@ func (client ProfilesClient) CreateOrUpdatePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -148,7 +148,7 @@ func (client ProfilesClient) DeletePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -234,7 +234,7 @@ func (client ProfilesClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -316,7 +316,7 @@ func (client ProfilesClient) ListPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -429,7 +429,7 @@ func (client ProfilesClient) ListAllPreparer(ctx context.Context) (*http.Request "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -543,7 +543,7 @@ func (client ProfilesClient) UpdateTagsPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/publicipaddresses.go similarity index 97% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/publicipaddresses.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/publicipaddresses.go index c6c2f5a76690a..6056b28902b11 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/publicipaddresses.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/publicipaddresses.go @@ -50,18 +50,14 @@ func (client PublicIPAddressesClient) CreateOrUpdate(ctx context.Context, resour } if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ExtendedLocation", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ExtendedLocation.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ExtendedLocation.Type", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, - }}, - {Target: "parameters.PublicIPAddressPropertiesFormat.ServicePublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, - {Target: "parameters.PublicIPAddressPropertiesFormat.LinkedPublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, - }}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, + }}, + {Target: "parameters.PublicIPAddressPropertiesFormat.ServicePublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + {Target: "parameters.PublicIPAddressPropertiesFormat.LinkedPublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + }}}}}); err != nil { return result, validation.NewError("network.PublicIPAddressesClient", "CreateOrUpdate", err.Error()) } @@ -88,7 +84,7 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -170,7 +166,7 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -256,7 +252,7 @@ func (client PublicIPAddressesClient) GetPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -344,7 +340,7 @@ func (client PublicIPAddressesClient) GetCloudServicePublicIPAddressPreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -432,7 +428,7 @@ func (client PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddressPr "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), } - const APIVersion = "2018-10-01" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -514,7 +510,7 @@ func (client PublicIPAddressesClient) ListPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -627,7 +623,7 @@ func (client PublicIPAddressesClient) ListAllPreparer(ctx context.Context) (*htt "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -745,7 +741,7 @@ func (client PublicIPAddressesClient) ListCloudServicePublicIPAddressesPreparer( "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -870,7 +866,7 @@ func (client PublicIPAddressesClient) ListCloudServiceRoleInstancePublicIPAddres "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -989,7 +985,7 @@ func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddresse "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), } - const APIVersion = "2018-10-01" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1114,7 +1110,7 @@ func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddres "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), } - const APIVersion = "2018-10-01" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1228,7 +1224,7 @@ func (client PublicIPAddressesClient) UpdateTagsPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/publicipprefixes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/publicipprefixes.go similarity index 96% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/publicipprefixes.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/publicipprefixes.go index 13d37a17a27a7..5d7a29762114f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/publicipprefixes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/publicipprefixes.go @@ -10,7 +10,6 @@ import ( "context" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" "github.com/Azure/go-autorest/tracing" "net/http" ) @@ -48,15 +47,6 @@ func (client PublicIPPrefixesClient) CreateOrUpdate(ctx context.Context, resourc tracing.EndSpan(ctx, sc, err) }() } - if err := validation.Validate([]validation.Validation{ - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ExtendedLocation", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ExtendedLocation.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ExtendedLocation.Type", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { - return result, validation.NewError("network.PublicIPPrefixesClient", "CreateOrUpdate", err.Error()) - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, publicIPPrefixName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "CreateOrUpdate", nil, "Failure preparing request") @@ -80,7 +70,7 @@ func (client PublicIPPrefixesClient) CreateOrUpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -162,7 +152,7 @@ func (client PublicIPPrefixesClient) DeletePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -248,7 +238,7 @@ func (client PublicIPPrefixesClient) GetPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -330,7 +320,7 @@ func (client PublicIPPrefixesClient) ListPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -443,7 +433,7 @@ func (client PublicIPPrefixesClient) ListAllPreparer(ctx context.Context) (*http "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -557,7 +547,7 @@ func (client PublicIPPrefixesClient) UpdateTagsPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/resourcenavigationlinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/resourcenavigationlinks.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/resourcenavigationlinks.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/resourcenavigationlinks.go index 40ff941773aec..ea9b569fd7170 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/resourcenavigationlinks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/resourcenavigationlinks.go @@ -78,7 +78,7 @@ func (client ResourceNavigationLinksClient) ListPreparer(ctx context.Context, re "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/routefilterrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/routefilterrules.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/routefilterrules.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/routefilterrules.go index 76b26375428a7..2f76f810a30f6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/routefilterrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/routefilterrules.go @@ -82,7 +82,7 @@ func (client RouteFilterRulesClient) CreateOrUpdatePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -166,7 +166,7 @@ func (client RouteFilterRulesClient) DeletePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -253,7 +253,7 @@ func (client RouteFilterRulesClient) GetPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -334,7 +334,7 @@ func (client RouteFilterRulesClient) ListByRouteFilterPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/routefilters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/routefilters.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/routefilters.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/routefilters.go index 1b1318cb5af87..b809ebd7944cf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/routefilters.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/routefilters.go @@ -69,7 +69,7 @@ func (client RouteFiltersClient) CreateOrUpdatePreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -151,7 +151,7 @@ func (client RouteFiltersClient) DeletePreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -237,7 +237,7 @@ func (client RouteFiltersClient) GetPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -316,7 +316,7 @@ func (client RouteFiltersClient) ListPreparer(ctx context.Context) (*http.Reques "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -432,7 +432,7 @@ func (client RouteFiltersClient) ListByResourceGroupPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -546,7 +546,7 @@ func (client RouteFiltersClient) UpdateTagsPreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/routes.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/routes.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/routes.go index 816472cb65b2b..f189aeebf85c4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/routes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/routes.go @@ -71,7 +71,7 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -155,7 +155,7 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -242,7 +242,7 @@ func (client RoutesClient) GetPreparer(ctx context.Context, resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -323,7 +323,7 @@ func (client RoutesClient) ListPreparer(ctx context.Context, resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/routetables.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/routetables.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/routetables.go index 7895315ec9a8e..f946c9041b038 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/routetables.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/routetables.go @@ -69,7 +69,7 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -151,7 +151,7 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -237,7 +237,7 @@ func (client RouteTablesClient) GetPreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -319,7 +319,7 @@ func (client RouteTablesClient) ListPreparer(ctx context.Context, resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -432,7 +432,7 @@ func (client RouteTablesClient) ListAllPreparer(ctx context.Context) (*http.Requ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -546,7 +546,7 @@ func (client RouteTablesClient) UpdateTagsPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/routingintent.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/routingintent.go new file mode 100644 index 0000000000000..2a3d7fdb8f737 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/routingintent.go @@ -0,0 +1,393 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// RoutingIntentClient is the network Client +type RoutingIntentClient struct { + BaseClient +} + +// NewRoutingIntentClient creates an instance of the RoutingIntentClient client. +func NewRoutingIntentClient(subscriptionID string) RoutingIntentClient { + return NewRoutingIntentClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewRoutingIntentClientWithBaseURI creates an instance of the RoutingIntentClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +func NewRoutingIntentClientWithBaseURI(baseURI string, subscriptionID string) RoutingIntentClient { + return RoutingIntentClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. +// Parameters: +// resourceGroupName - the resource group name of the RoutingIntent. +// virtualHubName - the name of the VirtualHub. +// routingIntentName - the name of the per VirtualHub singleton Routing Intent resource. +// routingIntentParameters - parameters supplied to create or update RoutingIntent. +func (client RoutingIntentClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, routingIntentParameters RoutingIntent) (result RoutingIntentCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RoutingIntentClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualHubName, routingIntentName, routingIntentParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutingIntentClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutingIntentClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client RoutingIntentClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, routingIntentParameters RoutingIntent) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routingIntentName": autorest.Encode("path", routingIntentName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + routingIntentParameters.Etag = nil + routingIntentParameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}", pathParameters), + autorest.WithJSON(routingIntentParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client RoutingIntentClient) CreateOrUpdateSender(req *http.Request) (future RoutingIntentCreateOrUpdateFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client RoutingIntentClient) CreateOrUpdateResponder(resp *http.Response) (result RoutingIntent, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a RoutingIntent. +// Parameters: +// resourceGroupName - the resource group name of the RoutingIntent. +// virtualHubName - the name of the VirtualHub. +// routingIntentName - the name of the RoutingIntent. +func (client RoutingIntentClient) Delete(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string) (result RoutingIntentDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RoutingIntentClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, virtualHubName, routingIntentName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutingIntentClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutingIntentClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client RoutingIntentClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routingIntentName": autorest.Encode("path", routingIntentName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client RoutingIntentClient) DeleteSender(req *http.Request) (future RoutingIntentDeleteFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client RoutingIntentClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the details of a RoutingIntent. +// Parameters: +// resourceGroupName - the resource group name of the RoutingIntent. +// virtualHubName - the name of the VirtualHub. +// routingIntentName - the name of the RoutingIntent. +func (client RoutingIntentClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string) (result RoutingIntent, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RoutingIntentClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, virtualHubName, routingIntentName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutingIntentClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.RoutingIntentClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutingIntentClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client RoutingIntentClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "routingIntentName": autorest.Encode("path", routingIntentName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client RoutingIntentClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client RoutingIntentClient) GetResponder(resp *http.Response) (result RoutingIntent, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List retrieves the details of all RoutingIntent child resources of the VirtualHub. +// Parameters: +// resourceGroupName - the resource group name of the VirtualHub. +// virtualHubName - the name of the VirtualHub. +func (client RoutingIntentClient) List(ctx context.Context, resourceGroupName string, virtualHubName string) (result ListRoutingIntentResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RoutingIntentClient.List") + defer func() { + sc := -1 + if result.lrir.Response.Response != nil { + sc = result.lrir.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, resourceGroupName, virtualHubName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutingIntentClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.lrir.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.RoutingIntentClient", "List", resp, "Failure sending request") + return + } + + result.lrir, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutingIntentClient", "List", resp, "Failure responding to request") + return + } + if result.lrir.hasNextLink() && result.lrir.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client RoutingIntentClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualHubName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualHubName": autorest.Encode("path", virtualHubName), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client RoutingIntentClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client RoutingIntentClient) ListResponder(resp *http.Response) (result ListRoutingIntentResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client RoutingIntentClient) listNextResults(ctx context.Context, lastResults ListRoutingIntentResult) (result ListRoutingIntentResult, err error) { + req, err := lastResults.listRoutingIntentResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.RoutingIntentClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.RoutingIntentClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.RoutingIntentClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client RoutingIntentClient) ListComplete(ctx context.Context, resourceGroupName string, virtualHubName string) (result ListRoutingIntentResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/RoutingIntentClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, resourceGroupName, virtualHubName) + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/securitygroups.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/securitygroups.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/securitygroups.go index 80c6fa705b449..fc059a966b0ed 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/securitygroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/securitygroups.go @@ -69,7 +69,7 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -151,7 +151,7 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -237,7 +237,7 @@ func (client SecurityGroupsClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -319,7 +319,7 @@ func (client SecurityGroupsClient) ListPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -432,7 +432,7 @@ func (client SecurityGroupsClient) ListAllPreparer(ctx context.Context) (*http.R "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -546,7 +546,7 @@ func (client SecurityGroupsClient) UpdateTagsPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/securitypartnerproviders.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/securitypartnerproviders.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/securitypartnerproviders.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/securitypartnerproviders.go index 82f5776d89b51..dd7f1dd0f17f1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/securitypartnerproviders.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/securitypartnerproviders.go @@ -70,7 +70,7 @@ func (client SecurityPartnerProvidersClient) CreateOrUpdatePreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -152,7 +152,7 @@ func (client SecurityPartnerProvidersClient) DeletePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -237,7 +237,7 @@ func (client SecurityPartnerProvidersClient) GetPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -313,7 +313,7 @@ func (client SecurityPartnerProvidersClient) ListPreparer(ctx context.Context) ( "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -429,7 +429,7 @@ func (client SecurityPartnerProvidersClient) ListByResourceGroupPreparer(ctx con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -543,7 +543,7 @@ func (client SecurityPartnerProvidersClient) UpdateTagsPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/securityrules.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/securityrules.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/securityrules.go index 6e8cd14af8320..6e75a8eefb3ec 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/securityrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/securityrules.go @@ -71,7 +71,7 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -155,7 +155,7 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -242,7 +242,7 @@ func (client SecurityRulesClient) GetPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -323,7 +323,7 @@ func (client SecurityRulesClient) ListPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/serviceassociationlinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/serviceassociationlinks.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/serviceassociationlinks.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/serviceassociationlinks.go index b95cca215e719..097a5f0e76d06 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/serviceassociationlinks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/serviceassociationlinks.go @@ -78,7 +78,7 @@ func (client ServiceAssociationLinksClient) ListPreparer(ctx context.Context, re "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/serviceendpointpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/serviceendpointpolicies.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/serviceendpointpolicies.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/serviceendpointpolicies.go index 0b1a7f73fd149..f894adbca990a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/serviceendpointpolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/serviceendpointpolicies.go @@ -70,7 +70,7 @@ func (client ServiceEndpointPoliciesClient) CreateOrUpdatePreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -153,7 +153,7 @@ func (client ServiceEndpointPoliciesClient) DeletePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -239,7 +239,7 @@ func (client ServiceEndpointPoliciesClient) GetPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -318,7 +318,7 @@ func (client ServiceEndpointPoliciesClient) ListPreparer(ctx context.Context) (* "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -434,7 +434,7 @@ func (client ServiceEndpointPoliciesClient) ListByResourceGroupPreparer(ctx cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -548,7 +548,7 @@ func (client ServiceEndpointPoliciesClient) UpdateTagsPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/serviceendpointpolicydefinitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/serviceendpointpolicydefinitions.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/serviceendpointpolicydefinitions.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/serviceendpointpolicydefinitions.go index e86fa590641fd..89eaa8bb537e5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/serviceendpointpolicydefinitions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/serviceendpointpolicydefinitions.go @@ -73,7 +73,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdatePreparer(ctx "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -157,7 +157,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) DeletePreparer(ctx context. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -244,7 +244,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) GetPreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -325,7 +325,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupPreparer "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/servicetaginformation.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/servicetaginformation.go new file mode 100644 index 0000000000000..43306797828fc --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/servicetaginformation.go @@ -0,0 +1,158 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ServiceTagInformationClient is the network Client +type ServiceTagInformationClient struct { + BaseClient +} + +// NewServiceTagInformationClient creates an instance of the ServiceTagInformationClient client. +func NewServiceTagInformationClient(subscriptionID string) ServiceTagInformationClient { + return NewServiceTagInformationClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewServiceTagInformationClientWithBaseURI creates an instance of the ServiceTagInformationClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). +func NewServiceTagInformationClientWithBaseURI(baseURI string, subscriptionID string) ServiceTagInformationClient { + return ServiceTagInformationClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets a list of service tag information resources with pagination. +// Parameters: +// location - the location that will be used as a reference for cloud (not as a filter based on location, you +// will get the list of service tags with prefix details across all regions but limited to the cloud that your +// subscription belongs to). +// noAddressPrefixes - do not return address prefixes for the tag(s). +// tagName - return tag information for a particular tag. +func (client ServiceTagInformationClient) List(ctx context.Context, location string, noAddressPrefixes *bool, tagName string) (result ServiceTagInformationListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceTagInformationClient.List") + defer func() { + sc := -1 + if result.stilr.Response.Response != nil { + sc = result.stilr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx, location, noAddressPrefixes, tagName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceTagInformationClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.stilr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ServiceTagInformationClient", "List", resp, "Failure sending request") + return + } + + result.stilr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceTagInformationClient", "List", resp, "Failure responding to request") + return + } + if result.stilr.hasNextLink() && result.stilr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListPreparer prepares the List request. +func (client ServiceTagInformationClient) ListPreparer(ctx context.Context, location string, noAddressPrefixes *bool, tagName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if noAddressPrefixes != nil { + queryParameters["noAddressPrefixes"] = autorest.Encode("query", *noAddressPrefixes) + } + if len(tagName) > 0 { + queryParameters["tagName"] = autorest.Encode("query", tagName) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTagDetails", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ServiceTagInformationClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ServiceTagInformationClient) ListResponder(resp *http.Response) (result ServiceTagInformationListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client ServiceTagInformationClient) listNextResults(ctx context.Context, lastResults ServiceTagInformationListResult) (result ServiceTagInformationListResult, err error) { + req, err := lastResults.serviceTagInformationListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ServiceTagInformationClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.ServiceTagInformationClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ServiceTagInformationClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client ServiceTagInformationClient) ListComplete(ctx context.Context, location string, noAddressPrefixes *bool, tagName string) (result ServiceTagInformationListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ServiceTagInformationClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx, location, noAddressPrefixes, tagName) + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/servicetags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/servicetags.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/servicetags.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/servicetags.go index 44c8fc85aa982..7f04ce556e1b7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/servicetags.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/servicetags.go @@ -75,7 +75,7 @@ func (client ServiceTagsClient) ListPreparer(ctx context.Context, location strin "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/subnets.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/subnets.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/subnets.go index 237c6f3afc583..fa4f18c83c7be 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/subnets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/subnets.go @@ -71,7 +71,7 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -155,7 +155,7 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -243,7 +243,7 @@ func (client SubnetsClient) GetPreparer(ctx context.Context, resourceGroupName s "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -327,7 +327,7 @@ func (client SubnetsClient) ListPreparer(ctx context.Context, resourceGroupName "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -437,7 +437,7 @@ func (client SubnetsClient) PrepareNetworkPoliciesPreparer(ctx context.Context, "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -521,7 +521,7 @@ func (client SubnetsClient) UnprepareNetworkPoliciesPreparer(ctx context.Context "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/usages.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/usages.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/usages.go index 7529ba16cd00f..f3a9b82cc598f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/usages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/usages.go @@ -85,7 +85,7 @@ func (client UsagesClient) ListPreparer(ctx context.Context, location string) (* "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/version.go similarity index 90% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/version.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/version.go index 426a4253811af..5f7329994a004 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/version.go @@ -10,7 +10,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + Version() + " network/2020-11-01" + return "Azure-SDK-For-Go/" + Version() + " network/2021-08-01" } // Version returns the semantic version (see http://semver.org) of the client. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualappliances.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualappliances.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualappliances.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualappliances.go index e0aed9b9ba4e9..fd8e6a55a7a2f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualappliances.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualappliances.go @@ -82,7 +82,7 @@ func (client VirtualAppliancesClient) CreateOrUpdatePreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -164,7 +164,7 @@ func (client VirtualAppliancesClient) DeletePreparer(ctx context.Context, resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -250,7 +250,7 @@ func (client VirtualAppliancesClient) GetPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -329,7 +329,7 @@ func (client VirtualAppliancesClient) ListPreparer(ctx context.Context) (*http.R "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -445,7 +445,7 @@ func (client VirtualAppliancesClient) ListByResourceGroupPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -559,7 +559,7 @@ func (client VirtualAppliancesClient) UpdateTagsPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualappliancesites.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualappliancesites.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualappliancesites.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualappliancesites.go index 2b3ff52b2bab5..932a0a5f7fe3b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualappliancesites.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualappliancesites.go @@ -72,7 +72,7 @@ func (client VirtualApplianceSitesClient) CreateOrUpdatePreparer(ctx context.Con "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -157,7 +157,7 @@ func (client VirtualApplianceSitesClient) DeletePreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -244,7 +244,7 @@ func (client VirtualApplianceSitesClient) GetPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -325,7 +325,7 @@ func (client VirtualApplianceSitesClient) ListPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualapplianceskus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualapplianceskus.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualapplianceskus.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualapplianceskus.go index 3da46550eb0b5..7cb46dfa72b2d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualapplianceskus.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualapplianceskus.go @@ -74,7 +74,7 @@ func (client VirtualApplianceSkusClient) GetPreparer(ctx context.Context, skuNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -150,7 +150,7 @@ func (client VirtualApplianceSkusClient) ListPreparer(ctx context.Context) (*htt "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualhubbgpconnection.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualhubbgpconnection.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualhubbgpconnection.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualhubbgpconnection.go index 3a65078676977..f46aaa5c60bc7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualhubbgpconnection.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualhubbgpconnection.go @@ -85,7 +85,7 @@ func (client VirtualHubBgpConnectionClient) CreateOrUpdatePreparer(ctx context.C "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -170,7 +170,7 @@ func (client VirtualHubBgpConnectionClient) DeletePreparer(ctx context.Context, "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -257,7 +257,7 @@ func (client VirtualHubBgpConnectionClient) GetPreparer(ctx context.Context, res "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualhubbgpconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualhubbgpconnections.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualhubbgpconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualhubbgpconnections.go index 53351222dceec..b6aae280990dc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualhubbgpconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualhubbgpconnections.go @@ -81,7 +81,7 @@ func (client VirtualHubBgpConnectionsClient) ListPreparer(ctx context.Context, r "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -189,7 +189,7 @@ func (client VirtualHubBgpConnectionsClient) ListAdvertisedRoutesPreparer(ctx co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -270,7 +270,7 @@ func (client VirtualHubBgpConnectionsClient) ListLearnedRoutesPreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualhubipconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualhubipconfiguration.go similarity index 92% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualhubipconfiguration.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualhubipconfiguration.go index 4c2962fa0d242..9d283a6e4fe99 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualhubipconfiguration.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualhubipconfiguration.go @@ -54,18 +54,14 @@ func (client VirtualHubIPConfigurationClient) CreateOrUpdate(ctx context.Context {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.HubIPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.HubIPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.HubIPConfigurationPropertiesFormat.PublicIPAddress.ExtendedLocation", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.HubIPConfigurationPropertiesFormat.PublicIPAddress.ExtendedLocation.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.HubIPConfigurationPropertiesFormat.PublicIPAddress.ExtendedLocation.Type", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.HubIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.HubIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.HubIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.HubIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, - }}, - {Target: "parameters.HubIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.ServicePublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, - {Target: "parameters.HubIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.LinkedPublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + Chain: []validation.Constraint{{Target: "parameters.HubIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.HubIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.HubIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.HubIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, }}, + {Target: "parameters.HubIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.ServicePublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + {Target: "parameters.HubIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.LinkedPublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + }}, }}, }}}}}); err != nil { return result, validation.NewError("network.VirtualHubIPConfigurationClient", "CreateOrUpdate", err.Error()) @@ -95,7 +91,7 @@ func (client VirtualHubIPConfigurationClient) CreateOrUpdatePreparer(ctx context "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -180,7 +176,7 @@ func (client VirtualHubIPConfigurationClient) DeletePreparer(ctx context.Context "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -267,7 +263,7 @@ func (client VirtualHubIPConfigurationClient) GetPreparer(ctx context.Context, r "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -348,7 +344,7 @@ func (client VirtualHubIPConfigurationClient) ListPreparer(ctx context.Context, "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualhubroutetablev2s.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualhubroutetablev2s.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualhubroutetablev2s.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualhubroutetablev2s.go index 1dbeea6ddb680..85d1612d3ddaf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualhubroutetablev2s.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualhubroutetablev2s.go @@ -73,7 +73,7 @@ func (client VirtualHubRouteTableV2sClient) CreateOrUpdatePreparer(ctx context.C "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -157,7 +157,7 @@ func (client VirtualHubRouteTableV2sClient) DeletePreparer(ctx context.Context, "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -244,7 +244,7 @@ func (client VirtualHubRouteTableV2sClient) GetPreparer(ctx context.Context, res "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -325,7 +325,7 @@ func (client VirtualHubRouteTableV2sClient) ListPreparer(ctx context.Context, re "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualhubs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualhubs.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualhubs.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualhubs.go index a427a09ab317c..8bae5f0ca7c5b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualhubs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualhubs.go @@ -81,12 +81,13 @@ func (client VirtualHubsClient) CreateOrUpdatePreparer(ctx context.Context, reso "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } virtualHubParameters.Etag = nil + virtualHubParameters.Kind = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -163,7 +164,7 @@ func (client VirtualHubsClient) DeletePreparer(ctx context.Context, resourceGrou "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -248,7 +249,7 @@ func (client VirtualHubsClient) GetPreparer(ctx context.Context, resourceGroupNa "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -319,7 +320,7 @@ func (client VirtualHubsClient) GetEffectiveVirtualHubRoutesPreparer(ctx context "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -409,7 +410,7 @@ func (client VirtualHubsClient) ListPreparer(ctx context.Context) (*http.Request "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -525,7 +526,7 @@ func (client VirtualHubsClient) ListByResourceGroupPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -639,7 +640,7 @@ func (client VirtualHubsClient) UpdateTagsPreparer(ctx context.Context, resource "virtualHubName": autorest.Encode("path", virtualHubName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualnetworkgatewayconnections.go similarity index 95% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualnetworkgatewayconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualnetworkgatewayconnections.go index 37d7c48e3880c..578c038273476 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualnetworkgatewayconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualnetworkgatewayconnections.go @@ -52,32 +52,24 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdate(ctx context. {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1.ExtendedLocation", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1.ExtendedLocation.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1.ExtendedLocation.Type", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1.VirtualNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1.VirtualNetworkGatewayPropertiesFormat.BgpSettings", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, - }}, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1.VirtualNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1.VirtualNetworkGatewayPropertiesFormat.BgpSettings", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway1.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, + }}, }}, {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.ExtendedLocation", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.ExtendedLocation.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.ExtendedLocation.Type", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.VirtualNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.VirtualNetworkGatewayPropertiesFormat.BgpSettings", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, - }}, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.VirtualNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.VirtualNetworkGatewayPropertiesFormat.BgpSettings", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.VirtualNetworkGateway2.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, }}, + }}, }}, {Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.LocalNetworkGateway2", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat.LocalNetworkGateway2.LocalNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, @@ -116,7 +108,7 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -198,7 +190,7 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context. "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -283,7 +275,7 @@ func (client VirtualNetworkGatewayConnectionsClient) GetPreparer(ctx context.Con "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -353,7 +345,7 @@ func (client VirtualNetworkGatewayConnectionsClient) GetIkeSasPreparer(ctx conte "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -440,7 +432,7 @@ func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyPreparer(ctx co "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -520,7 +512,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ListPreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -626,7 +618,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetConnectionPreparer(ctx "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -717,7 +709,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -808,7 +800,7 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -891,7 +883,7 @@ func (client VirtualNetworkGatewayConnectionsClient) StartPacketCapturePreparer( "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -977,7 +969,7 @@ func (client VirtualNetworkGatewayConnectionsClient) StopPacketCapturePreparer(c "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1059,7 +1051,7 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsPreparer(ctx cont "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualnetworkgatewaynatrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualnetworkgatewaynatrules.go new file mode 100644 index 0000000000000..fd083dab12fe6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualnetworkgatewaynatrules.go @@ -0,0 +1,395 @@ +package network + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// VirtualNetworkGatewayNatRulesClient is the network Client +type VirtualNetworkGatewayNatRulesClient struct { + BaseClient +} + +// NewVirtualNetworkGatewayNatRulesClient creates an instance of the VirtualNetworkGatewayNatRulesClient client. +func NewVirtualNetworkGatewayNatRulesClient(subscriptionID string) VirtualNetworkGatewayNatRulesClient { + return NewVirtualNetworkGatewayNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualNetworkGatewayNatRulesClientWithBaseURI creates an instance of the VirtualNetworkGatewayNatRulesClient +// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI +// (sovereign clouds, Azure stack). +func NewVirtualNetworkGatewayNatRulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkGatewayNatRulesClient { + return VirtualNetworkGatewayNatRulesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the +// existing nat rules. +// Parameters: +// resourceGroupName - the resource group name of the Virtual Network Gateway. +// virtualNetworkGatewayName - the name of the gateway. +// natRuleName - the name of the nat rule. +// natRuleParameters - parameters supplied to create or Update a Nat Rule. +func (client VirtualNetworkGatewayNatRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, natRuleParameters VirtualNetworkGatewayNatRule) (result VirtualNetworkGatewayNatRulesCreateOrUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayNatRulesClient.CreateOrUpdate") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName, natRuleParameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + result, err = client.CreateOrUpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request") + return + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualNetworkGatewayNatRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, natRuleParameters VirtualNetworkGatewayNatRule) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "natRuleName": autorest.Encode("path", natRuleName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + natRuleParameters.Etag = nil + natRuleParameters.Type = nil + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}", pathParameters), + autorest.WithJSON(natRuleParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewayNatRulesClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayNatRulesCreateOrUpdateFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayNatRulesClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkGatewayNatRule, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a nat rule. +// Parameters: +// resourceGroupName - the resource group name of the Virtual Network Gateway. +// virtualNetworkGatewayName - the name of the gateway. +// natRuleName - the name of the nat rule. +func (client VirtualNetworkGatewayNatRulesClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string) (result VirtualNetworkGatewayNatRulesDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayNatRulesClient.Delete") + defer func() { + sc := -1 + if result.FutureAPI != nil && result.FutureAPI.Response() != nil { + sc = result.FutureAPI.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client VirtualNetworkGatewayNatRulesClient) DeletePreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "natRuleName": autorest.Encode("path", natRuleName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewayNatRulesClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayNatRulesDeleteFuture, err error) { + var resp *http.Response + future.FutureAPI = &azure.Future{} + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + var azf azure.Future + azf, err = azure.NewFutureFromResponse(resp) + future.FutureAPI = &azf + future.Result = future.result + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayNatRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the details of a nat rule. +// Parameters: +// resourceGroupName - the resource group name of the Virtual Network Gateway. +// virtualNetworkGatewayName - the name of the gateway. +// natRuleName - the name of the nat rule. +func (client VirtualNetworkGatewayNatRulesClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string) (result VirtualNetworkGatewayNatRule, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayNatRulesClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetPreparer(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualNetworkGatewayNatRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "natRuleName": autorest.Encode("path", natRuleName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewayNatRulesClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayNatRulesClient) GetResponder(resp *http.Response) (result VirtualNetworkGatewayNatRule, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByVirtualNetworkGateway retrieves all nat rules for a particular virtual network gateway. +// Parameters: +// resourceGroupName - the resource group name of the virtual network gateway. +// virtualNetworkGatewayName - the name of the gateway. +func (client VirtualNetworkGatewayNatRulesClient) ListByVirtualNetworkGateway(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result ListVirtualNetworkGatewayNatRulesResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayNatRulesClient.ListByVirtualNetworkGateway") + defer func() { + sc := -1 + if result.lvngnrr.Response.Response != nil { + sc = result.lvngnrr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listByVirtualNetworkGatewayNextResults + req, err := client.ListByVirtualNetworkGatewayPreparer(ctx, resourceGroupName, virtualNetworkGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "ListByVirtualNetworkGateway", nil, "Failure preparing request") + return + } + + resp, err := client.ListByVirtualNetworkGatewaySender(req) + if err != nil { + result.lvngnrr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "ListByVirtualNetworkGateway", resp, "Failure sending request") + return + } + + result.lvngnrr, err = client.ListByVirtualNetworkGatewayResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "ListByVirtualNetworkGateway", resp, "Failure responding to request") + return + } + if result.lvngnrr.hasNextLink() && result.lvngnrr.IsEmpty() { + err = result.NextWithContext(ctx) + return + } + + return +} + +// ListByVirtualNetworkGatewayPreparer prepares the ListByVirtualNetworkGateway request. +func (client VirtualNetworkGatewayNatRulesClient) ListByVirtualNetworkGatewayPreparer(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2021-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByVirtualNetworkGatewaySender sends the ListByVirtualNetworkGateway request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewayNatRulesClient) ListByVirtualNetworkGatewaySender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListByVirtualNetworkGatewayResponder handles the response to the ListByVirtualNetworkGateway request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewayNatRulesClient) ListByVirtualNetworkGatewayResponder(resp *http.Response) (result ListVirtualNetworkGatewayNatRulesResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByVirtualNetworkGatewayNextResults retrieves the next set of results, if any. +func (client VirtualNetworkGatewayNatRulesClient) listByVirtualNetworkGatewayNextResults(ctx context.Context, lastResults ListVirtualNetworkGatewayNatRulesResult) (result ListVirtualNetworkGatewayNatRulesResult, err error) { + req, err := lastResults.listVirtualNetworkGatewayNatRulesResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "listByVirtualNetworkGatewayNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByVirtualNetworkGatewaySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "listByVirtualNetworkGatewayNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByVirtualNetworkGatewayResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "listByVirtualNetworkGatewayNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByVirtualNetworkGatewayComplete enumerates all values, automatically crossing page boundaries as required. +func (client VirtualNetworkGatewayNatRulesClient) ListByVirtualNetworkGatewayComplete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result ListVirtualNetworkGatewayNatRulesResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayNatRulesClient.ListByVirtualNetworkGateway") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByVirtualNetworkGateway(ctx, resourceGroupName, virtualNetworkGatewayName) + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualnetworkgateways.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualnetworkgateways.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualnetworkgateways.go index f1248eda5d912..2943d5e9a6f66 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualnetworkgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualnetworkgateways.go @@ -50,18 +50,14 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, r } if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ExtendedLocation", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ExtendedLocation.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ExtendedLocation.Type", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.VirtualNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayPropertiesFormat.BgpSettings", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, - {Target: "parameters.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, - }}, + Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayPropertiesFormat.BgpSettings", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.InclusiveMaximum, Rule: int64(4294967295), Chain: nil}, + {Target: "parameters.VirtualNetworkGatewayPropertiesFormat.BgpSettings.Asn", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}, }}, - }}}}}); err != nil { + }}, + }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkGatewaysClient", "CreateOrUpdate", err.Error()) } @@ -88,7 +84,7 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -170,7 +166,7 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -250,7 +246,7 @@ func (client VirtualNetworkGatewaysClient) DisconnectVirtualNetworkGatewayVpnCon "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -332,7 +328,7 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(ctx "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -415,7 +411,7 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfilePreparer(ctx contex "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -503,7 +499,7 @@ func (client VirtualNetworkGatewaysClient) GetPreparer(ctx context.Context, reso "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -574,7 +570,7 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(ctx conte "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, "peer": autorest.Encode("query", peer), @@ -655,7 +651,7 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(ctx context. "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -738,7 +734,7 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(ctx context. "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -818,7 +814,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealthPreparer( "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -899,7 +895,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersPreparer(c "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -979,7 +975,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLPreparer(ctx c "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1068,7 +1064,7 @@ func (client VirtualNetworkGatewaysClient) ListPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1186,7 +1182,7 @@ func (client VirtualNetworkGatewaysClient) ListConnectionsPreparer(ctx context.C "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1294,7 +1290,7 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1377,7 +1373,7 @@ func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKeyPreparer(ctx c "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1465,7 +1461,7 @@ func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersPreparer(c "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1547,7 +1543,7 @@ func (client VirtualNetworkGatewaysClient) StartPacketCapturePreparer(ctx contex "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1632,7 +1628,7 @@ func (client VirtualNetworkGatewaysClient) StopPacketCapturePreparer(ctx context "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1720,7 +1716,7 @@ func (client VirtualNetworkGatewaysClient) SupportedVpnDevicesPreparer(ctx conte "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1790,7 +1786,7 @@ func (client VirtualNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Contex "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1880,7 +1876,7 @@ func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScriptPreparer( "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualnetworkpeerings.go similarity index 94% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualnetworkpeerings.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualnetworkpeerings.go index e171a582e2ff4..f556b1fd82348 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualnetworkpeerings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualnetworkpeerings.go @@ -39,7 +39,9 @@ func NewVirtualNetworkPeeringsClientWithBaseURI(baseURI string, subscriptionID s // virtualNetworkPeeringName - the name of the peering. // virtualNetworkPeeringParameters - parameters supplied to the create or update virtual network peering // operation. -func (client VirtualNetworkPeeringsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering) (result VirtualNetworkPeeringsCreateOrUpdateFuture, err error) { +// syncRemoteAddressSpace - parameter indicates the intention to sync the peering with the current address +// space on the remote vNet after it's updated. +func (client VirtualNetworkPeeringsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering, syncRemoteAddressSpace SyncRemoteAddressSpace) (result VirtualNetworkPeeringsCreateOrUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringsClient.CreateOrUpdate") defer func() { @@ -55,11 +57,13 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdate(ctx context.Context, r Constraints: []validation.Constraint{{Target: "virtualNetworkPeeringParameters.VirtualNetworkPeeringPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "virtualNetworkPeeringParameters.VirtualNetworkPeeringPropertiesFormat.RemoteBgpCommunities", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "virtualNetworkPeeringParameters.VirtualNetworkPeeringPropertiesFormat.RemoteBgpCommunities.VirtualNetworkCommunity", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "virtualNetworkPeeringParameters.VirtualNetworkPeeringPropertiesFormat.RemoteVirtualNetworkEncryption", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "virtualNetworkPeeringParameters.VirtualNetworkPeeringPropertiesFormat.RemoteVirtualNetworkEncryption.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworkPeeringsClient", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters, syncRemoteAddressSpace) if err != nil { err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -75,7 +79,7 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdate(ctx context.Context, r } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering) (*http.Request, error) { +func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering, syncRemoteAddressSpace SyncRemoteAddressSpace) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -83,10 +87,13 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Co "virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(string(syncRemoteAddressSpace)) > 0 { + queryParameters["syncRemoteAddressSpace"] = autorest.Encode("query", syncRemoteAddressSpace) + } virtualNetworkPeeringParameters.Etag = nil preparer := autorest.CreatePreparer( @@ -167,7 +174,7 @@ func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, r "virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -254,7 +261,7 @@ func (client VirtualNetworkPeeringsClient) GetPreparer(ctx context.Context, reso "virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -335,7 +342,7 @@ func (client VirtualNetworkPeeringsClient) ListPreparer(ctx context.Context, res "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualnetworks.go similarity index 97% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualnetworks.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualnetworks.go index 90c619668caab..9febb3dec5d54 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualnetworks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualnetworks.go @@ -77,7 +77,7 @@ func (client VirtualNetworksClient) CheckIPAddressAvailabilityPreparer(ctx conte "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, "ipAddress": autorest.Encode("query", IPAddress), @@ -127,14 +127,12 @@ func (client VirtualNetworksClient) CreateOrUpdate(ctx context.Context, resource } if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.ExtendedLocation", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.ExtendedLocation.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.ExtendedLocation.Type", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.VirtualNetworkPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkPropertiesFormat.BgpCommunities", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkPropertiesFormat.BgpCommunities.VirtualNetworkCommunity", Name: validation.Null, Rule: true, Chain: nil}}}, - }}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkPropertiesFormat.BgpCommunities", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkPropertiesFormat.BgpCommunities.VirtualNetworkCommunity", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.VirtualNetworkPropertiesFormat.Encryption", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkPropertiesFormat.Encryption.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, + }}}}}); err != nil { return result, validation.NewError("network.VirtualNetworksClient", "CreateOrUpdate", err.Error()) } @@ -161,7 +159,7 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context, "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -243,7 +241,7 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -329,7 +327,7 @@ func (client VirtualNetworksClient) GetPreparer(ctx context.Context, resourceGro "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -411,7 +409,7 @@ func (client VirtualNetworksClient) ListPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -524,7 +522,7 @@ func (client VirtualNetworksClient) ListAllPreparer(ctx context.Context) (*http. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -642,7 +640,7 @@ func (client VirtualNetworksClient) ListUsagePreparer(ctx context.Context, resou "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -756,7 +754,7 @@ func (client VirtualNetworksClient) UpdateTagsPreparer(ctx context.Context, reso "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualnetworktaps.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualnetworktaps.go similarity index 89% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualnetworktaps.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualnetworktaps.go index b7cee2b4a9a4a..7d6bc121f9e80 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualnetworktaps.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualnetworktaps.go @@ -54,36 +54,28 @@ func (client VirtualNetworkTapsClient) CreateOrUpdate(ctx context.Context, resou Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.ExtendedLocation", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.ExtendedLocation.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.ExtendedLocation.Type", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, - }}, - {Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.ServicePublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, - {Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.LinkedPublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, }}, + {Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.ServicePublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + {Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationNetworkInterfaceIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.LinkedPublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + }}, }}, }}, }}, {Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.ExtendedLocation", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.ExtendedLocation.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.ExtendedLocation.Type", Name: validation.Null, Rule: true, Chain: nil}, - }}, - {Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, - }}, - {Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.ServicePublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, - {Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.LinkedPublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, }}, + {Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.ServicePublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + {Target: "parameters.VirtualNetworkTapPropertiesFormat.DestinationLoadBalancerFrontEndIPConfiguration.FrontendIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.LinkedPublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}, + }}, }}, }}, }}, @@ -114,7 +106,7 @@ func (client VirtualNetworkTapsClient) CreateOrUpdatePreparer(ctx context.Contex "tapName": autorest.Encode("path", tapName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -196,7 +188,7 @@ func (client VirtualNetworkTapsClient) DeletePreparer(ctx context.Context, resou "tapName": autorest.Encode("path", tapName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -281,7 +273,7 @@ func (client VirtualNetworkTapsClient) GetPreparer(ctx context.Context, resource "tapName": autorest.Encode("path", tapName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -357,7 +349,7 @@ func (client VirtualNetworkTapsClient) ListAllPreparer(ctx context.Context) (*ht "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -473,7 +465,7 @@ func (client VirtualNetworkTapsClient) ListByResourceGroupPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -587,7 +579,7 @@ func (client VirtualNetworkTapsClient) UpdateTagsPreparer(ctx context.Context, r "tapName": autorest.Encode("path", tapName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualrouterpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualrouterpeerings.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualrouterpeerings.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualrouterpeerings.go index 48d66160ca6ad..4ed695c16f962 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualrouterpeerings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualrouterpeerings.go @@ -84,7 +84,7 @@ func (client VirtualRouterPeeringsClient) CreateOrUpdatePreparer(ctx context.Con "virtualRouterName": autorest.Encode("path", virtualRouterName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -169,7 +169,7 @@ func (client VirtualRouterPeeringsClient) DeletePreparer(ctx context.Context, re "virtualRouterName": autorest.Encode("path", virtualRouterName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -256,7 +256,7 @@ func (client VirtualRouterPeeringsClient) GetPreparer(ctx context.Context, resou "virtualRouterName": autorest.Encode("path", virtualRouterName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -337,7 +337,7 @@ func (client VirtualRouterPeeringsClient) ListPreparer(ctx context.Context, reso "virtualRouterName": autorest.Encode("path", virtualRouterName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualrouters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualrouters.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualrouters.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualrouters.go index 1160c48151834..a4da32dbc5828 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualrouters.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualrouters.go @@ -81,7 +81,7 @@ func (client VirtualRoutersClient) CreateOrUpdatePreparer(ctx context.Context, r "virtualRouterName": autorest.Encode("path", virtualRouterName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -163,7 +163,7 @@ func (client VirtualRoutersClient) DeletePreparer(ctx context.Context, resourceG "virtualRouterName": autorest.Encode("path", virtualRouterName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -249,7 +249,7 @@ func (client VirtualRoutersClient) GetPreparer(ctx context.Context, resourceGrou "virtualRouterName": autorest.Encode("path", virtualRouterName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -328,7 +328,7 @@ func (client VirtualRoutersClient) ListPreparer(ctx context.Context) (*http.Requ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -444,7 +444,7 @@ func (client VirtualRoutersClient) ListByResourceGroupPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualwans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualwans.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualwans.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualwans.go index 7175800b3d582..cf2385c7948fa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/virtualwans.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/virtualwans.go @@ -69,7 +69,7 @@ func (client VirtualWansClient) CreateOrUpdatePreparer(ctx context.Context, reso "VirtualWANName": autorest.Encode("path", virtualWANName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -151,7 +151,7 @@ func (client VirtualWansClient) DeletePreparer(ctx context.Context, resourceGrou "VirtualWANName": autorest.Encode("path", virtualWANName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -236,7 +236,7 @@ func (client VirtualWansClient) GetPreparer(ctx context.Context, resourceGroupNa "VirtualWANName": autorest.Encode("path", virtualWANName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -312,7 +312,7 @@ func (client VirtualWansClient) ListPreparer(ctx context.Context) (*http.Request "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -428,7 +428,7 @@ func (client VirtualWansClient) ListByResourceGroupPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -542,7 +542,7 @@ func (client VirtualWansClient) UpdateTagsPreparer(ctx context.Context, resource "VirtualWANName": autorest.Encode("path", virtualWANName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnconnections.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnconnections.go index 03113a76df1cd..bfa051bca4480 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnconnections.go @@ -72,7 +72,7 @@ func (client VpnConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -156,7 +156,7 @@ func (client VpnConnectionsClient) DeletePreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -243,7 +243,7 @@ func (client VpnConnectionsClient) GetPreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -324,7 +324,7 @@ func (client VpnConnectionsClient) ListByVpnGatewayPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -434,7 +434,7 @@ func (client VpnConnectionsClient) StartPacketCapturePreparer(ctx context.Contex "vpnConnectionName": autorest.Encode("path", vpnConnectionName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -521,7 +521,7 @@ func (client VpnConnectionsClient) StopPacketCapturePreparer(ctx context.Context "vpnConnectionName": autorest.Encode("path", vpnConnectionName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpngateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpngateways.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpngateways.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpngateways.go index 81c28f263bdfd..ea9d2837eccb8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpngateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpngateways.go @@ -83,7 +83,7 @@ func (client VpnGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -165,7 +165,7 @@ func (client VpnGatewaysClient) DeletePreparer(ctx context.Context, resourceGrou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -250,7 +250,7 @@ func (client VpnGatewaysClient) GetPreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -326,7 +326,7 @@ func (client VpnGatewaysClient) ListPreparer(ctx context.Context) (*http.Request "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -442,7 +442,7 @@ func (client VpnGatewaysClient) ListByResourceGroupPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -548,7 +548,7 @@ func (client VpnGatewaysClient) ResetPreparer(ctx context.Context, resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -628,7 +628,7 @@ func (client VpnGatewaysClient) StartPacketCapturePreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -713,7 +713,7 @@ func (client VpnGatewaysClient) StopPacketCapturePreparer(ctx context.Context, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -798,7 +798,7 @@ func (client VpnGatewaysClient) UpdateTagsPreparer(ctx context.Context, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnlinkconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnlinkconnections.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnlinkconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnlinkconnections.go index f541f6f1d752a..f84a1b158e0ef 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnlinkconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnlinkconnections.go @@ -73,7 +73,7 @@ func (client VpnLinkConnectionsClient) GetIkeSasPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -166,7 +166,7 @@ func (client VpnLinkConnectionsClient) ListByVpnConnectionPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -276,7 +276,7 @@ func (client VpnLinkConnectionsClient) ResetConnectionPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnserverconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnserverconfigurations.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnserverconfigurations.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnserverconfigurations.go index 41d98157fdab9..14784a6411128 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnserverconfigurations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnserverconfigurations.go @@ -71,7 +71,7 @@ func (client VpnServerConfigurationsClient) CreateOrUpdatePreparer(ctx context.C "vpnServerConfigurationName": autorest.Encode("path", vpnServerConfigurationName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -153,7 +153,7 @@ func (client VpnServerConfigurationsClient) DeletePreparer(ctx context.Context, "vpnServerConfigurationName": autorest.Encode("path", vpnServerConfigurationName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -238,7 +238,7 @@ func (client VpnServerConfigurationsClient) GetPreparer(ctx context.Context, res "vpnServerConfigurationName": autorest.Encode("path", vpnServerConfigurationName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -314,7 +314,7 @@ func (client VpnServerConfigurationsClient) ListPreparer(ctx context.Context) (* "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -430,7 +430,7 @@ func (client VpnServerConfigurationsClient) ListByResourceGroupPreparer(ctx cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -544,7 +544,7 @@ func (client VpnServerConfigurationsClient) UpdateTagsPreparer(ctx context.Conte "vpnServerConfigurationName": autorest.Encode("path", vpnServerConfigurationName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go index ad514172b61bc..21176b057549a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go @@ -70,7 +70,7 @@ func (client VpnServerConfigurationsAssociatedWithVirtualWanClient) ListPreparer "virtualWANName": autorest.Encode("path", virtualWANName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnsitelinkconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnsitelinkconnections.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnsitelinkconnections.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnsitelinkconnections.go index 6026e78ee32aa..b4b1695a678b7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnsitelinkconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnsitelinkconnections.go @@ -80,7 +80,7 @@ func (client VpnSiteLinkConnectionsClient) GetPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnsitelinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnsitelinks.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnsitelinks.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnsitelinks.go index 9e86a3cf6dfd7..284ac1665d373 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnsitelinks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnsitelinks.go @@ -77,7 +77,7 @@ func (client VpnSiteLinksClient) GetPreparer(ctx context.Context, resourceGroupN "vpnSiteName": autorest.Encode("path", vpnSiteName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -158,7 +158,7 @@ func (client VpnSiteLinksClient) ListByVpnSitePreparer(ctx context.Context, reso "vpnSiteName": autorest.Encode("path", vpnSiteName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnsites.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnsites.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnsites.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnsites.go index a42629d26f94b..4524ca65ab0c6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnsites.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnsites.go @@ -83,7 +83,7 @@ func (client VpnSitesClient) CreateOrUpdatePreparer(ctx context.Context, resourc "vpnSiteName": autorest.Encode("path", vpnSiteName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -165,7 +165,7 @@ func (client VpnSitesClient) DeletePreparer(ctx context.Context, resourceGroupNa "vpnSiteName": autorest.Encode("path", vpnSiteName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -250,7 +250,7 @@ func (client VpnSitesClient) GetPreparer(ctx context.Context, resourceGroupName "vpnSiteName": autorest.Encode("path", vpnSiteName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -326,7 +326,7 @@ func (client VpnSitesClient) ListPreparer(ctx context.Context) (*http.Request, e "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -442,7 +442,7 @@ func (client VpnSitesClient) ListByResourceGroupPreparer(ctx context.Context, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -556,7 +556,7 @@ func (client VpnSitesClient) UpdateTagsPreparer(ctx context.Context, resourceGro "vpnSiteName": autorest.Encode("path", vpnSiteName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnsitesconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnsitesconfiguration.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnsitesconfiguration.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnsitesconfiguration.go index d3778b2698a31..1cc56fb2eccf6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/vpnsitesconfiguration.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/vpnsitesconfiguration.go @@ -77,7 +77,7 @@ func (client VpnSitesConfigurationClient) DownloadPreparer(ctx context.Context, "virtualWANName": autorest.Encode("path", virtualWANName), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/watchers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/watchers.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/watchers.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/watchers.go index ba9ddf35f6977..abdca8fdd90b2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/watchers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/watchers.go @@ -89,7 +89,7 @@ func (client WatchersClient) CheckConnectivityPreparer(ctx context.Context, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -178,7 +178,7 @@ func (client WatchersClient) CreateOrUpdatePreparer(ctx context.Context, resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -250,7 +250,7 @@ func (client WatchersClient) DeletePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -335,7 +335,7 @@ func (client WatchersClient) GetPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -415,7 +415,7 @@ func (client WatchersClient) GetAzureReachabilityReportPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -503,7 +503,7 @@ func (client WatchersClient) GetFlowLogStatusPreparer(ctx context.Context, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -596,7 +596,7 @@ func (client WatchersClient) GetNetworkConfigurationDiagnosticPreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -686,7 +686,7 @@ func (client WatchersClient) GetNextHopPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -775,7 +775,7 @@ func (client WatchersClient) GetTopologyPreparer(ctx context.Context, resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -857,7 +857,7 @@ func (client WatchersClient) GetTroubleshootingPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -945,7 +945,7 @@ func (client WatchersClient) GetTroubleshootingResultPreparer(ctx context.Contex "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1033,7 +1033,7 @@ func (client WatchersClient) GetVMSecurityRulesPreparer(ctx context.Context, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1119,7 +1119,7 @@ func (client WatchersClient) ListPreparer(ctx context.Context, resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1190,7 +1190,7 @@ func (client WatchersClient) ListAllPreparer(ctx context.Context) (*http.Request "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1261,7 +1261,7 @@ func (client WatchersClient) ListAvailableProvidersPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1353,7 +1353,7 @@ func (client WatchersClient) SetFlowLogConfigurationPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1442,7 +1442,7 @@ func (client WatchersClient) UpdateTagsPreparer(ctx context.Context, resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1524,7 +1524,7 @@ func (client WatchersClient) VerifyIPFlowPreparer(ctx context.Context, resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/webapplicationfirewallpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/webapplicationfirewallpolicies.go similarity index 98% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/webapplicationfirewallpolicies.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/webapplicationfirewallpolicies.go index 296402f6d8ee5..5a0a6a2b315e7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/webapplicationfirewallpolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/webapplicationfirewallpolicies.go @@ -55,9 +55,7 @@ func (client WebApplicationFirewallPoliciesClient) CreateOrUpdate(ctx context.Co Constraints: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.MaxRequestBodySizeInKb", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.MaxRequestBodySizeInKb", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil}, - {Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}, - }}, + Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: int64(8), Chain: nil}}}, {Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.FileUploadLimitInMb", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.WebApplicationFirewallPolicyPropertiesFormat.PolicySettings.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}}, }}, @@ -97,7 +95,7 @@ func (client WebApplicationFirewallPoliciesClient) CreateOrUpdatePreparer(ctx co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -175,7 +173,7 @@ func (client WebApplicationFirewallPoliciesClient) DeletePreparer(ctx context.Co "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -266,7 +264,7 @@ func (client WebApplicationFirewallPoliciesClient) GetPreparer(ctx context.Conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -345,7 +343,7 @@ func (client WebApplicationFirewallPoliciesClient) ListPreparer(ctx context.Cont "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -458,7 +456,7 @@ func (client WebApplicationFirewallPoliciesClient) ListAllPreparer(ctx context.C "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/webcategories.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/webcategories.go similarity index 99% rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/webcategories.go rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/webcategories.go index 81d9c0e9a2473..13fb4c1fb72ed 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network/webcategories.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network/webcategories.go @@ -74,7 +74,7 @@ func (client WebCategoriesClient) GetPreparer(ctx context.Context, name string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -153,7 +153,7 @@ func (client WebCategoriesClient) ListBySubscriptionPreparer(ctx context.Context "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-11-01" + const APIVersion = "2021-08-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1/resource.pb.go b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1/resource.pb.go index 692746c049f99..194dd70dfbd87 100644 --- a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1/resource.pb.go +++ b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1/resource.pb.go @@ -14,14 +14,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.3 +// protoc-gen-go v1.26.0 +// protoc v3.17.3 // source: opencensus/proto/resource/v1/resource.proto package v1 import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -35,10 +34,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Resource information. type Resource struct { state protoimpl.MessageState @@ -115,7 +110,7 @@ var file_opencensus_proto_resource_v1_resource_proto_rawDesc = []byte{ 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x42, 0x98, 0x01, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, + 0x02, 0x38, 0x01, 0x42, 0x9b, 0x01, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, @@ -123,9 +118,9 @@ var file_opencensus_proto_resource_v1_resource_proto_rawDesc = []byte{ 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76, 0x31, 0xea, - 0x02, 0x1c, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x02, 0x1f, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x3a, 0x3a, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x3a, 0x3a, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace.pb.go b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace.pb.go index 66664fe11ee64..d35612ca05806 100644 --- a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace.pb.go +++ b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace.pb.go @@ -14,19 +14,18 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.3 +// protoc-gen-go v1.26.0 +// protoc v3.17.3 // source: opencensus/proto/trace/v1/trace.proto package v1 import ( v1 "github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1" - proto "github.com/golang/protobuf/proto" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - wrappers "github.com/golang/protobuf/ptypes/wrappers" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" reflect "reflect" sync "sync" ) @@ -38,10 +37,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Type of span. Can be used to specify additional relationships between spans // in addition to a parent/child relationship. type Span_SpanKind int32 @@ -272,7 +267,7 @@ type Span struct { // keep end_time > start_time for consistency. // // This field is required. - StartTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + StartTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // The end time of the span. On the client side, this is the time kept by // the local machine where the span execution ends. On the server side, this // is the time when the server application handler stops running. @@ -282,7 +277,7 @@ type Span struct { // keep end_time > start_time for consistency. // // This field is required. - EndTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + EndTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // A set of attributes on the span. Attributes *Span_Attributes `protobuf:"bytes,7,opt,name=attributes,proto3" json:"attributes,omitempty"` // A stack trace captured at the start of the span. @@ -304,10 +299,10 @@ type Span struct { // to the same process as the current span. This flag is most commonly // used to indicate the need to adjust time as clocks in different // processes may not be synchronized. - SameProcessAsParentSpan *wrappers.BoolValue `protobuf:"bytes,12,opt,name=same_process_as_parent_span,json=sameProcessAsParentSpan,proto3" json:"same_process_as_parent_span,omitempty"` + SameProcessAsParentSpan *wrapperspb.BoolValue `protobuf:"bytes,12,opt,name=same_process_as_parent_span,json=sameProcessAsParentSpan,proto3" json:"same_process_as_parent_span,omitempty"` // An optional number of child spans that were generated while this span // was active. If set, allows an implementation to detect missing child spans. - ChildSpanCount *wrappers.UInt32Value `protobuf:"bytes,13,opt,name=child_span_count,json=childSpanCount,proto3" json:"child_span_count,omitempty"` + ChildSpanCount *wrapperspb.UInt32Value `protobuf:"bytes,13,opt,name=child_span_count,json=childSpanCount,proto3" json:"child_span_count,omitempty"` } func (x *Span) Reset() { @@ -384,14 +379,14 @@ func (x *Span) GetKind() Span_SpanKind { return Span_SPAN_KIND_UNSPECIFIED } -func (x *Span) GetStartTime() *timestamp.Timestamp { +func (x *Span) GetStartTime() *timestamppb.Timestamp { if x != nil { return x.StartTime } return nil } -func (x *Span) GetEndTime() *timestamp.Timestamp { +func (x *Span) GetEndTime() *timestamppb.Timestamp { if x != nil { return x.EndTime } @@ -440,14 +435,14 @@ func (x *Span) GetResource() *v1.Resource { return nil } -func (x *Span) GetSameProcessAsParentSpan() *wrappers.BoolValue { +func (x *Span) GetSameProcessAsParentSpan() *wrapperspb.BoolValue { if x != nil { return x.SameProcessAsParentSpan } return nil } -func (x *Span) GetChildSpanCount() *wrappers.UInt32Value { +func (x *Span) GetChildSpanCount() *wrapperspb.UInt32Value { if x != nil { return x.ChildSpanCount } @@ -952,7 +947,7 @@ type Span_TimeEvent struct { unknownFields protoimpl.UnknownFields // The time the event occurred. - Time *timestamp.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` + Time *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` // A `TimeEvent` can contain either an `Annotation` object or a // `MessageEvent` object, but not both. // @@ -994,7 +989,7 @@ func (*Span_TimeEvent) Descriptor() ([]byte, []int) { return file_opencensus_proto_trace_v1_trace_proto_rawDescGZIP(), []int{0, 2} } -func (x *Span_TimeEvent) GetTime() *timestamp.Timestamp { +func (x *Span_TimeEvent) GetTime() *timestamppb.Timestamp { if x != nil { return x.Time } @@ -1899,16 +1894,16 @@ var file_opencensus_proto_trace_v1_trace_proto_rawDesc = []byte{ 0x6c, 0x75, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x8c, 0x01, 0x0a, 0x1c, 0x69, 0x6f, 0x2e, 0x6f, 0x70, 0x65, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x8f, 0x01, 0x0a, 0x1c, 0x69, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x72, 0x61, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x2f, - 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x31, 0xea, 0x02, 0x19, 0x4f, 0x70, 0x65, 0x6e, 0x43, - 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x61, 0x63, - 0x65, 0x2e, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x31, 0xea, 0x02, 0x1c, 0x4f, 0x70, 0x65, 0x6e, 0x43, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3a, 0x54, 0x72, + 0x61, 0x63, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1947,10 +1942,10 @@ var file_opencensus_proto_trace_v1_trace_proto_goTypes = []interface{}{ (*Span_TimeEvent_MessageEvent)(nil), // 18: opencensus.proto.trace.v1.Span.TimeEvent.MessageEvent (*StackTrace_StackFrame)(nil), // 19: opencensus.proto.trace.v1.StackTrace.StackFrame (*StackTrace_StackFrames)(nil), // 20: opencensus.proto.trace.v1.StackTrace.StackFrames - (*timestamp.Timestamp)(nil), // 21: google.protobuf.Timestamp + (*timestamppb.Timestamp)(nil), // 21: google.protobuf.Timestamp (*v1.Resource)(nil), // 22: opencensus.proto.resource.v1.Resource - (*wrappers.BoolValue)(nil), // 23: google.protobuf.BoolValue - (*wrappers.UInt32Value)(nil), // 24: google.protobuf.UInt32Value + (*wrapperspb.BoolValue)(nil), // 23: google.protobuf.BoolValue + (*wrapperspb.UInt32Value)(nil), // 24: google.protobuf.UInt32Value } var file_opencensus_proto_trace_v1_trace_proto_depIdxs = []int32{ 9, // 0: opencensus.proto.trace.v1.Span.tracestate:type_name -> opencensus.proto.trace.v1.Span.Tracestate diff --git a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace_config.pb.go b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace_config.pb.go index 0c19a4d2c9a4e..ee62b2e358edd 100644 --- a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace_config.pb.go +++ b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace_config.pb.go @@ -14,14 +14,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.12.3 +// protoc-gen-go v1.26.0 +// protoc v3.17.3 // source: opencensus/proto/trace/v1/trace_config.proto package v1 import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -35,10 +34,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // How spans should be sampled: // - Always off // - Always on @@ -432,7 +427,7 @@ var file_opencensus_proto_trace_v1_trace_config_proto_rawDesc = []byte{ 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x4c, 0x57, 0x41, 0x59, 0x53, 0x5f, 0x50, 0x41, 0x52, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x22, 0x27, 0x0a, 0x13, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x71, 0x70, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x71, 0x70, 0x73, 0x42, 0x92, 0x01, 0x0a, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x71, 0x70, 0x73, 0x42, 0x95, 0x01, 0x0a, 0x1c, 0x69, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x54, 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, @@ -440,9 +435,9 @@ var file_opencensus_proto_trace_v1_trace_config_proto_rawDesc = []byte{ 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x2f, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x2f, 0x76, 0x31, 0xea, 0x02, 0x19, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x65, 0x6e, 0x73, - 0x75, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x65, 0x2f, 0x76, 0x31, 0xea, 0x02, 0x1c, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x65, 0x6e, 0x73, + 0x75, 0x73, 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3a, 0x54, 0x72, 0x61, 0x63, 0x65, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/vendor/github.com/cespare/xxhash/v2/README.md b/vendor/github.com/cespare/xxhash/v2/README.md index 792b4a60b3465..8bf0e5b781532 100644 --- a/vendor/github.com/cespare/xxhash/v2/README.md +++ b/vendor/github.com/cespare/xxhash/v2/README.md @@ -3,8 +3,7 @@ [![Go Reference](https://pkg.go.dev/badge/github.com/cespare/xxhash/v2.svg)](https://pkg.go.dev/github.com/cespare/xxhash/v2) [![Test](https://github.com/cespare/xxhash/actions/workflows/test.yml/badge.svg)](https://github.com/cespare/xxhash/actions/workflows/test.yml) -xxhash is a Go implementation of the 64-bit -[xxHash](http://cyan4973.github.io/xxHash/) algorithm, XXH64. This is a +xxhash is a Go implementation of the 64-bit [xxHash] algorithm, XXH64. This is a high-quality hashing algorithm that is much faster than anything in the Go standard library. @@ -25,8 +24,11 @@ func (*Digest) WriteString(string) (int, error) func (*Digest) Sum64() uint64 ``` -This implementation provides a fast pure-Go implementation and an even faster -assembly implementation for amd64. +The package is written with optimized pure Go and also contains even faster +assembly implementations for amd64 and arm64. If desired, the `purego` build tag +opts into using the Go code even on those architectures. + +[xxHash]: http://cyan4973.github.io/xxHash/ ## Compatibility @@ -45,19 +47,20 @@ I recommend using the latest release of Go. Here are some quick benchmarks comparing the pure-Go and assembly implementations of Sum64. -| input size | purego | asm | -| --- | --- | --- | -| 5 B | 979.66 MB/s | 1291.17 MB/s | -| 100 B | 7475.26 MB/s | 7973.40 MB/s | -| 4 KB | 17573.46 MB/s | 17602.65 MB/s | -| 10 MB | 17131.46 MB/s | 17142.16 MB/s | +| input size | purego | asm | +| ---------- | --------- | --------- | +| 4 B | 1.3 GB/s | 1.2 GB/s | +| 16 B | 2.9 GB/s | 3.5 GB/s | +| 100 B | 6.9 GB/s | 8.1 GB/s | +| 4 KB | 11.7 GB/s | 16.7 GB/s | +| 10 MB | 12.0 GB/s | 17.3 GB/s | -These numbers were generated on Ubuntu 18.04 with an Intel i7-8700K CPU using -the following commands under Go 1.11.2: +These numbers were generated on Ubuntu 20.04 with an Intel Xeon Platinum 8252C +CPU using the following commands under Go 1.19.2: ``` -$ go test -tags purego -benchtime 10s -bench '/xxhash,direct,bytes' -$ go test -benchtime 10s -bench '/xxhash,direct,bytes' +benchstat <(go test -tags purego -benchtime 500ms -count 15 -bench 'Sum64$') +benchstat <(go test -benchtime 500ms -count 15 -bench 'Sum64$') ``` ## Projects using this package diff --git a/vendor/github.com/cespare/xxhash/v2/testall.sh b/vendor/github.com/cespare/xxhash/v2/testall.sh new file mode 100644 index 0000000000000..94b9c443987cf --- /dev/null +++ b/vendor/github.com/cespare/xxhash/v2/testall.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -eu -o pipefail + +# Small convenience script for running the tests with various combinations of +# arch/tags. This assumes we're running on amd64 and have qemu available. + +go test ./... +go test -tags purego ./... +GOARCH=arm64 go test +GOARCH=arm64 go test -tags purego diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash.go b/vendor/github.com/cespare/xxhash/v2/xxhash.go index 15c835d5417c0..a9e0d45c9dcc7 100644 --- a/vendor/github.com/cespare/xxhash/v2/xxhash.go +++ b/vendor/github.com/cespare/xxhash/v2/xxhash.go @@ -16,19 +16,11 @@ const ( prime5 uint64 = 2870177450012600261 ) -// NOTE(caleb): I'm using both consts and vars of the primes. Using consts where -// possible in the Go code is worth a small (but measurable) performance boost -// by avoiding some MOVQs. Vars are needed for the asm and also are useful for -// convenience in the Go code in a few places where we need to intentionally -// avoid constant arithmetic (e.g., v1 := prime1 + prime2 fails because the -// result overflows a uint64). -var ( - prime1v = prime1 - prime2v = prime2 - prime3v = prime3 - prime4v = prime4 - prime5v = prime5 -) +// Store the primes in an array as well. +// +// The consts are used when possible in Go code to avoid MOVs but we need a +// contiguous array of the assembly code. +var primes = [...]uint64{prime1, prime2, prime3, prime4, prime5} // Digest implements hash.Hash64. type Digest struct { @@ -50,10 +42,10 @@ func New() *Digest { // Reset clears the Digest's state so that it can be reused. func (d *Digest) Reset() { - d.v1 = prime1v + prime2 + d.v1 = primes[0] + prime2 d.v2 = prime2 d.v3 = 0 - d.v4 = -prime1v + d.v4 = -primes[0] d.total = 0 d.n = 0 } @@ -69,21 +61,23 @@ func (d *Digest) Write(b []byte) (n int, err error) { n = len(b) d.total += uint64(n) + memleft := d.mem[d.n&(len(d.mem)-1):] + if d.n+n < 32 { // This new data doesn't even fill the current block. - copy(d.mem[d.n:], b) + copy(memleft, b) d.n += n return } if d.n > 0 { // Finish off the partial block. - copy(d.mem[d.n:], b) + c := copy(memleft, b) d.v1 = round(d.v1, u64(d.mem[0:8])) d.v2 = round(d.v2, u64(d.mem[8:16])) d.v3 = round(d.v3, u64(d.mem[16:24])) d.v4 = round(d.v4, u64(d.mem[24:32])) - b = b[32-d.n:] + b = b[c:] d.n = 0 } @@ -133,21 +127,20 @@ func (d *Digest) Sum64() uint64 { h += d.total - i, end := 0, d.n - for ; i+8 <= end; i += 8 { - k1 := round(0, u64(d.mem[i:i+8])) + b := d.mem[:d.n&(len(d.mem)-1)] + for ; len(b) >= 8; b = b[8:] { + k1 := round(0, u64(b[:8])) h ^= k1 h = rol27(h)*prime1 + prime4 } - if i+4 <= end { - h ^= uint64(u32(d.mem[i:i+4])) * prime1 + if len(b) >= 4 { + h ^= uint64(u32(b[:4])) * prime1 h = rol23(h)*prime2 + prime3 - i += 4 + b = b[4:] } - for i < end { - h ^= uint64(d.mem[i]) * prime5 + for ; len(b) > 0; b = b[1:] { + h ^= uint64(b[0]) * prime5 h = rol11(h) * prime1 - i++ } h ^= h >> 33 diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s b/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s index be8db5bf79601..3e8b132579ec2 100644 --- a/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s +++ b/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s @@ -1,215 +1,209 @@ +//go:build !appengine && gc && !purego // +build !appengine // +build gc // +build !purego #include "textflag.h" -// Register allocation: -// AX h -// SI pointer to advance through b -// DX n -// BX loop end -// R8 v1, k1 -// R9 v2 -// R10 v3 -// R11 v4 -// R12 tmp -// R13 prime1v -// R14 prime2v -// DI prime4v - -// round reads from and advances the buffer pointer in SI. -// It assumes that R13 has prime1v and R14 has prime2v. -#define round(r) \ - MOVQ (SI), R12 \ - ADDQ $8, SI \ - IMULQ R14, R12 \ - ADDQ R12, r \ - ROLQ $31, r \ - IMULQ R13, r - -// mergeRound applies a merge round on the two registers acc and val. -// It assumes that R13 has prime1v, R14 has prime2v, and DI has prime4v. -#define mergeRound(acc, val) \ - IMULQ R14, val \ - ROLQ $31, val \ - IMULQ R13, val \ - XORQ val, acc \ - IMULQ R13, acc \ - ADDQ DI, acc +// Registers: +#define h AX +#define d AX +#define p SI // pointer to advance through b +#define n DX +#define end BX // loop end +#define v1 R8 +#define v2 R9 +#define v3 R10 +#define v4 R11 +#define x R12 +#define prime1 R13 +#define prime2 R14 +#define prime4 DI + +#define round(acc, x) \ + IMULQ prime2, x \ + ADDQ x, acc \ + ROLQ $31, acc \ + IMULQ prime1, acc + +// round0 performs the operation x = round(0, x). +#define round0(x) \ + IMULQ prime2, x \ + ROLQ $31, x \ + IMULQ prime1, x + +// mergeRound applies a merge round on the two registers acc and x. +// It assumes that prime1, prime2, and prime4 have been loaded. +#define mergeRound(acc, x) \ + round0(x) \ + XORQ x, acc \ + IMULQ prime1, acc \ + ADDQ prime4, acc + +// blockLoop processes as many 32-byte blocks as possible, +// updating v1, v2, v3, and v4. It assumes that there is at least one block +// to process. +#define blockLoop() \ +loop: \ + MOVQ +0(p), x \ + round(v1, x) \ + MOVQ +8(p), x \ + round(v2, x) \ + MOVQ +16(p), x \ + round(v3, x) \ + MOVQ +24(p), x \ + round(v4, x) \ + ADDQ $32, p \ + CMPQ p, end \ + JLE loop // func Sum64(b []byte) uint64 -TEXT ·Sum64(SB), NOSPLIT, $0-32 +TEXT ·Sum64(SB), NOSPLIT|NOFRAME, $0-32 // Load fixed primes. - MOVQ ·prime1v(SB), R13 - MOVQ ·prime2v(SB), R14 - MOVQ ·prime4v(SB), DI + MOVQ ·primes+0(SB), prime1 + MOVQ ·primes+8(SB), prime2 + MOVQ ·primes+24(SB), prime4 // Load slice. - MOVQ b_base+0(FP), SI - MOVQ b_len+8(FP), DX - LEAQ (SI)(DX*1), BX + MOVQ b_base+0(FP), p + MOVQ b_len+8(FP), n + LEAQ (p)(n*1), end // The first loop limit will be len(b)-32. - SUBQ $32, BX + SUBQ $32, end // Check whether we have at least one block. - CMPQ DX, $32 + CMPQ n, $32 JLT noBlocks // Set up initial state (v1, v2, v3, v4). - MOVQ R13, R8 - ADDQ R14, R8 - MOVQ R14, R9 - XORQ R10, R10 - XORQ R11, R11 - SUBQ R13, R11 - - // Loop until SI > BX. -blockLoop: - round(R8) - round(R9) - round(R10) - round(R11) - - CMPQ SI, BX - JLE blockLoop - - MOVQ R8, AX - ROLQ $1, AX - MOVQ R9, R12 - ROLQ $7, R12 - ADDQ R12, AX - MOVQ R10, R12 - ROLQ $12, R12 - ADDQ R12, AX - MOVQ R11, R12 - ROLQ $18, R12 - ADDQ R12, AX - - mergeRound(AX, R8) - mergeRound(AX, R9) - mergeRound(AX, R10) - mergeRound(AX, R11) + MOVQ prime1, v1 + ADDQ prime2, v1 + MOVQ prime2, v2 + XORQ v3, v3 + XORQ v4, v4 + SUBQ prime1, v4 + + blockLoop() + + MOVQ v1, h + ROLQ $1, h + MOVQ v2, x + ROLQ $7, x + ADDQ x, h + MOVQ v3, x + ROLQ $12, x + ADDQ x, h + MOVQ v4, x + ROLQ $18, x + ADDQ x, h + + mergeRound(h, v1) + mergeRound(h, v2) + mergeRound(h, v3) + mergeRound(h, v4) JMP afterBlocks noBlocks: - MOVQ ·prime5v(SB), AX + MOVQ ·primes+32(SB), h afterBlocks: - ADDQ DX, AX - - // Right now BX has len(b)-32, and we want to loop until SI > len(b)-8. - ADDQ $24, BX - - CMPQ SI, BX - JG fourByte - -wordLoop: - // Calculate k1. - MOVQ (SI), R8 - ADDQ $8, SI - IMULQ R14, R8 - ROLQ $31, R8 - IMULQ R13, R8 - - XORQ R8, AX - ROLQ $27, AX - IMULQ R13, AX - ADDQ DI, AX - - CMPQ SI, BX - JLE wordLoop - -fourByte: - ADDQ $4, BX - CMPQ SI, BX - JG singles - - MOVL (SI), R8 - ADDQ $4, SI - IMULQ R13, R8 - XORQ R8, AX - - ROLQ $23, AX - IMULQ R14, AX - ADDQ ·prime3v(SB), AX - -singles: - ADDQ $4, BX - CMPQ SI, BX + ADDQ n, h + + ADDQ $24, end + CMPQ p, end + JG try4 + +loop8: + MOVQ (p), x + ADDQ $8, p + round0(x) + XORQ x, h + ROLQ $27, h + IMULQ prime1, h + ADDQ prime4, h + + CMPQ p, end + JLE loop8 + +try4: + ADDQ $4, end + CMPQ p, end + JG try1 + + MOVL (p), x + ADDQ $4, p + IMULQ prime1, x + XORQ x, h + + ROLQ $23, h + IMULQ prime2, h + ADDQ ·primes+16(SB), h + +try1: + ADDQ $4, end + CMPQ p, end JGE finalize -singlesLoop: - MOVBQZX (SI), R12 - ADDQ $1, SI - IMULQ ·prime5v(SB), R12 - XORQ R12, AX +loop1: + MOVBQZX (p), x + ADDQ $1, p + IMULQ ·primes+32(SB), x + XORQ x, h + ROLQ $11, h + IMULQ prime1, h - ROLQ $11, AX - IMULQ R13, AX - - CMPQ SI, BX - JL singlesLoop + CMPQ p, end + JL loop1 finalize: - MOVQ AX, R12 - SHRQ $33, R12 - XORQ R12, AX - IMULQ R14, AX - MOVQ AX, R12 - SHRQ $29, R12 - XORQ R12, AX - IMULQ ·prime3v(SB), AX - MOVQ AX, R12 - SHRQ $32, R12 - XORQ R12, AX - - MOVQ AX, ret+24(FP) + MOVQ h, x + SHRQ $33, x + XORQ x, h + IMULQ prime2, h + MOVQ h, x + SHRQ $29, x + XORQ x, h + IMULQ ·primes+16(SB), h + MOVQ h, x + SHRQ $32, x + XORQ x, h + + MOVQ h, ret+24(FP) RET -// writeBlocks uses the same registers as above except that it uses AX to store -// the d pointer. - // func writeBlocks(d *Digest, b []byte) int -TEXT ·writeBlocks(SB), NOSPLIT, $0-40 +TEXT ·writeBlocks(SB), NOSPLIT|NOFRAME, $0-40 // Load fixed primes needed for round. - MOVQ ·prime1v(SB), R13 - MOVQ ·prime2v(SB), R14 + MOVQ ·primes+0(SB), prime1 + MOVQ ·primes+8(SB), prime2 // Load slice. - MOVQ b_base+8(FP), SI - MOVQ b_len+16(FP), DX - LEAQ (SI)(DX*1), BX - SUBQ $32, BX + MOVQ b_base+8(FP), p + MOVQ b_len+16(FP), n + LEAQ (p)(n*1), end + SUBQ $32, end // Load vN from d. - MOVQ d+0(FP), AX - MOVQ 0(AX), R8 // v1 - MOVQ 8(AX), R9 // v2 - MOVQ 16(AX), R10 // v3 - MOVQ 24(AX), R11 // v4 + MOVQ s+0(FP), d + MOVQ 0(d), v1 + MOVQ 8(d), v2 + MOVQ 16(d), v3 + MOVQ 24(d), v4 // We don't need to check the loop condition here; this function is // always called with at least one block of data to process. -blockLoop: - round(R8) - round(R9) - round(R10) - round(R11) - - CMPQ SI, BX - JLE blockLoop + blockLoop() // Copy vN back to d. - MOVQ R8, 0(AX) - MOVQ R9, 8(AX) - MOVQ R10, 16(AX) - MOVQ R11, 24(AX) - - // The number of bytes written is SI minus the old base pointer. - SUBQ b_base+8(FP), SI - MOVQ SI, ret+32(FP) + MOVQ v1, 0(d) + MOVQ v2, 8(d) + MOVQ v3, 16(d) + MOVQ v4, 24(d) + + // The number of bytes written is p minus the old base pointer. + SUBQ b_base+8(FP), p + MOVQ p, ret+32(FP) RET diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_arm64.s b/vendor/github.com/cespare/xxhash/v2/xxhash_arm64.s new file mode 100644 index 0000000000000..7e3145a221864 --- /dev/null +++ b/vendor/github.com/cespare/xxhash/v2/xxhash_arm64.s @@ -0,0 +1,183 @@ +//go:build !appengine && gc && !purego +// +build !appengine +// +build gc +// +build !purego + +#include "textflag.h" + +// Registers: +#define digest R1 +#define h R2 // return value +#define p R3 // input pointer +#define n R4 // input length +#define nblocks R5 // n / 32 +#define prime1 R7 +#define prime2 R8 +#define prime3 R9 +#define prime4 R10 +#define prime5 R11 +#define v1 R12 +#define v2 R13 +#define v3 R14 +#define v4 R15 +#define x1 R20 +#define x2 R21 +#define x3 R22 +#define x4 R23 + +#define round(acc, x) \ + MADD prime2, acc, x, acc \ + ROR $64-31, acc \ + MUL prime1, acc + +// round0 performs the operation x = round(0, x). +#define round0(x) \ + MUL prime2, x \ + ROR $64-31, x \ + MUL prime1, x + +#define mergeRound(acc, x) \ + round0(x) \ + EOR x, acc \ + MADD acc, prime4, prime1, acc + +// blockLoop processes as many 32-byte blocks as possible, +// updating v1, v2, v3, and v4. It assumes that n >= 32. +#define blockLoop() \ + LSR $5, n, nblocks \ + PCALIGN $16 \ + loop: \ + LDP.P 16(p), (x1, x2) \ + LDP.P 16(p), (x3, x4) \ + round(v1, x1) \ + round(v2, x2) \ + round(v3, x3) \ + round(v4, x4) \ + SUB $1, nblocks \ + CBNZ nblocks, loop + +// func Sum64(b []byte) uint64 +TEXT ·Sum64(SB), NOSPLIT|NOFRAME, $0-32 + LDP b_base+0(FP), (p, n) + + LDP ·primes+0(SB), (prime1, prime2) + LDP ·primes+16(SB), (prime3, prime4) + MOVD ·primes+32(SB), prime5 + + CMP $32, n + CSEL LT, prime5, ZR, h // if n < 32 { h = prime5 } else { h = 0 } + BLT afterLoop + + ADD prime1, prime2, v1 + MOVD prime2, v2 + MOVD $0, v3 + NEG prime1, v4 + + blockLoop() + + ROR $64-1, v1, x1 + ROR $64-7, v2, x2 + ADD x1, x2 + ROR $64-12, v3, x3 + ROR $64-18, v4, x4 + ADD x3, x4 + ADD x2, x4, h + + mergeRound(h, v1) + mergeRound(h, v2) + mergeRound(h, v3) + mergeRound(h, v4) + +afterLoop: + ADD n, h + + TBZ $4, n, try8 + LDP.P 16(p), (x1, x2) + + round0(x1) + + // NOTE: here and below, sequencing the EOR after the ROR (using a + // rotated register) is worth a small but measurable speedup for small + // inputs. + ROR $64-27, h + EOR x1 @> 64-27, h, h + MADD h, prime4, prime1, h + + round0(x2) + ROR $64-27, h + EOR x2 @> 64-27, h, h + MADD h, prime4, prime1, h + +try8: + TBZ $3, n, try4 + MOVD.P 8(p), x1 + + round0(x1) + ROR $64-27, h + EOR x1 @> 64-27, h, h + MADD h, prime4, prime1, h + +try4: + TBZ $2, n, try2 + MOVWU.P 4(p), x2 + + MUL prime1, x2 + ROR $64-23, h + EOR x2 @> 64-23, h, h + MADD h, prime3, prime2, h + +try2: + TBZ $1, n, try1 + MOVHU.P 2(p), x3 + AND $255, x3, x1 + LSR $8, x3, x2 + + MUL prime5, x1 + ROR $64-11, h + EOR x1 @> 64-11, h, h + MUL prime1, h + + MUL prime5, x2 + ROR $64-11, h + EOR x2 @> 64-11, h, h + MUL prime1, h + +try1: + TBZ $0, n, finalize + MOVBU (p), x4 + + MUL prime5, x4 + ROR $64-11, h + EOR x4 @> 64-11, h, h + MUL prime1, h + +finalize: + EOR h >> 33, h + MUL prime2, h + EOR h >> 29, h + MUL prime3, h + EOR h >> 32, h + + MOVD h, ret+24(FP) + RET + +// func writeBlocks(d *Digest, b []byte) int +TEXT ·writeBlocks(SB), NOSPLIT|NOFRAME, $0-40 + LDP ·primes+0(SB), (prime1, prime2) + + // Load state. Assume v[1-4] are stored contiguously. + MOVD d+0(FP), digest + LDP 0(digest), (v1, v2) + LDP 16(digest), (v3, v4) + + LDP b_base+8(FP), (p, n) + + blockLoop() + + // Store updated state. + STP (v1, v2), 0(digest) + STP (v3, v4), 16(digest) + + BIC $31, n + MOVD n, ret+32(FP) + RET diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.go b/vendor/github.com/cespare/xxhash/v2/xxhash_asm.go similarity index 73% rename from vendor/github.com/cespare/xxhash/v2/xxhash_amd64.go rename to vendor/github.com/cespare/xxhash/v2/xxhash_asm.go index ad14b807f4d96..9216e0a40c1a4 100644 --- a/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.go +++ b/vendor/github.com/cespare/xxhash/v2/xxhash_asm.go @@ -1,3 +1,5 @@ +//go:build (amd64 || arm64) && !appengine && gc && !purego +// +build amd64 arm64 // +build !appengine // +build gc // +build !purego diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_other.go b/vendor/github.com/cespare/xxhash/v2/xxhash_other.go index 4a5a821603e5b..26df13bba4b79 100644 --- a/vendor/github.com/cespare/xxhash/v2/xxhash_other.go +++ b/vendor/github.com/cespare/xxhash/v2/xxhash_other.go @@ -1,4 +1,5 @@ -// +build !amd64 appengine !gc purego +//go:build (!amd64 && !arm64) || appengine || !gc || purego +// +build !amd64,!arm64 appengine !gc purego package xxhash @@ -14,10 +15,10 @@ func Sum64(b []byte) uint64 { var h uint64 if n >= 32 { - v1 := prime1v + prime2 + v1 := primes[0] + prime2 v2 := prime2 v3 := uint64(0) - v4 := -prime1v + v4 := -primes[0] for len(b) >= 32 { v1 = round(v1, u64(b[0:8:len(b)])) v2 = round(v2, u64(b[8:16:len(b)])) @@ -36,19 +37,18 @@ func Sum64(b []byte) uint64 { h += uint64(n) - i, end := 0, len(b) - for ; i+8 <= end; i += 8 { - k1 := round(0, u64(b[i:i+8:len(b)])) + for ; len(b) >= 8; b = b[8:] { + k1 := round(0, u64(b[:8])) h ^= k1 h = rol27(h)*prime1 + prime4 } - if i+4 <= end { - h ^= uint64(u32(b[i:i+4:len(b)])) * prime1 + if len(b) >= 4 { + h ^= uint64(u32(b[:4])) * prime1 h = rol23(h)*prime2 + prime3 - i += 4 + b = b[4:] } - for ; i < end; i++ { - h ^= uint64(b[i]) * prime5 + for ; len(b) > 0; b = b[1:] { + h ^= uint64(b[0]) * prime5 h = rol11(h) * prime1 } diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go b/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go index fc9bea7a31f2b..e86f1b5fd8e4c 100644 --- a/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go +++ b/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go @@ -1,3 +1,4 @@ +//go:build appengine // +build appengine // This file contains the safe implementations of otherwise unsafe-using code. diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go b/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go index 376e0ca2e4974..1c1638fd88a1d 100644 --- a/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go +++ b/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go @@ -1,3 +1,4 @@ +//go:build !appengine // +build !appengine // This file encapsulates usage of unsafe. @@ -11,7 +12,7 @@ import ( // In the future it's possible that compiler optimizations will make these // XxxString functions unnecessary by realizing that calls such as -// Sum64([]byte(s)) don't need to copy s. See https://golang.org/issue/2205. +// Sum64([]byte(s)) don't need to copy s. See https://go.dev/issue/2205. // If that happens, even if we keep these functions they can be replaced with // the trivial safe code. diff --git a/vendor/github.com/cilium/proxy/go/envoy/admin/v3/certs.pb.go b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/certs.pb.go new file mode 100644 index 0000000000000..d38d2580e15a4 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/certs.pb.go @@ -0,0 +1,612 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/admin/v3/certs.proto + +package adminv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Proto representation of certificate details. Admin endpoint uses this wrapper for “/certs“ to +// display certificate information. See :ref:`/certs ` for more +// information. +type Certificates struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of certificates known to an Envoy. + Certificates []*Certificate `protobuf:"bytes,1,rep,name=certificates,proto3" json:"certificates,omitempty"` +} + +func (x *Certificates) Reset() { + *x = Certificates{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_certs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Certificates) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Certificates) ProtoMessage() {} + +func (x *Certificates) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_certs_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Certificates.ProtoReflect.Descriptor instead. +func (*Certificates) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_certs_proto_rawDescGZIP(), []int{0} +} + +func (x *Certificates) GetCertificates() []*Certificate { + if x != nil { + return x.Certificates + } + return nil +} + +type Certificate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Details of CA certificate. + CaCert []*CertificateDetails `protobuf:"bytes,1,rep,name=ca_cert,json=caCert,proto3" json:"ca_cert,omitempty"` + // Details of Certificate Chain + CertChain []*CertificateDetails `protobuf:"bytes,2,rep,name=cert_chain,json=certChain,proto3" json:"cert_chain,omitempty"` +} + +func (x *Certificate) Reset() { + *x = Certificate{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_certs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Certificate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Certificate) ProtoMessage() {} + +func (x *Certificate) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_certs_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Certificate.ProtoReflect.Descriptor instead. +func (*Certificate) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_certs_proto_rawDescGZIP(), []int{1} +} + +func (x *Certificate) GetCaCert() []*CertificateDetails { + if x != nil { + return x.CaCert + } + return nil +} + +func (x *Certificate) GetCertChain() []*CertificateDetails { + if x != nil { + return x.CertChain + } + return nil +} + +// [#next-free-field: 8] +type CertificateDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Path of the certificate. + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + // Certificate Serial Number. + SerialNumber string `protobuf:"bytes,2,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"` + // List of Subject Alternate names. + SubjectAltNames []*SubjectAlternateName `protobuf:"bytes,3,rep,name=subject_alt_names,json=subjectAltNames,proto3" json:"subject_alt_names,omitempty"` + // Minimum of days until expiration of certificate and it's chain. + DaysUntilExpiration uint64 `protobuf:"varint,4,opt,name=days_until_expiration,json=daysUntilExpiration,proto3" json:"days_until_expiration,omitempty"` + // Indicates the time from which the certificate is valid. + ValidFrom *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=valid_from,json=validFrom,proto3" json:"valid_from,omitempty"` + // Indicates the time at which the certificate expires. + ExpirationTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=expiration_time,json=expirationTime,proto3" json:"expiration_time,omitempty"` + // Details related to the OCSP response associated with this certificate, if any. + OcspDetails *CertificateDetails_OcspDetails `protobuf:"bytes,7,opt,name=ocsp_details,json=ocspDetails,proto3" json:"ocsp_details,omitempty"` +} + +func (x *CertificateDetails) Reset() { + *x = CertificateDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_certs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CertificateDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CertificateDetails) ProtoMessage() {} + +func (x *CertificateDetails) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_certs_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CertificateDetails.ProtoReflect.Descriptor instead. +func (*CertificateDetails) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_certs_proto_rawDescGZIP(), []int{2} +} + +func (x *CertificateDetails) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *CertificateDetails) GetSerialNumber() string { + if x != nil { + return x.SerialNumber + } + return "" +} + +func (x *CertificateDetails) GetSubjectAltNames() []*SubjectAlternateName { + if x != nil { + return x.SubjectAltNames + } + return nil +} + +func (x *CertificateDetails) GetDaysUntilExpiration() uint64 { + if x != nil { + return x.DaysUntilExpiration + } + return 0 +} + +func (x *CertificateDetails) GetValidFrom() *timestamppb.Timestamp { + if x != nil { + return x.ValidFrom + } + return nil +} + +func (x *CertificateDetails) GetExpirationTime() *timestamppb.Timestamp { + if x != nil { + return x.ExpirationTime + } + return nil +} + +func (x *CertificateDetails) GetOcspDetails() *CertificateDetails_OcspDetails { + if x != nil { + return x.OcspDetails + } + return nil +} + +type SubjectAlternateName struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Subject Alternate Name. + // + // Types that are assignable to Name: + // + // *SubjectAlternateName_Dns + // *SubjectAlternateName_Uri + // *SubjectAlternateName_IpAddress + Name isSubjectAlternateName_Name `protobuf_oneof:"name"` +} + +func (x *SubjectAlternateName) Reset() { + *x = SubjectAlternateName{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_certs_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubjectAlternateName) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubjectAlternateName) ProtoMessage() {} + +func (x *SubjectAlternateName) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_certs_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubjectAlternateName.ProtoReflect.Descriptor instead. +func (*SubjectAlternateName) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_certs_proto_rawDescGZIP(), []int{3} +} + +func (m *SubjectAlternateName) GetName() isSubjectAlternateName_Name { + if m != nil { + return m.Name + } + return nil +} + +func (x *SubjectAlternateName) GetDns() string { + if x, ok := x.GetName().(*SubjectAlternateName_Dns); ok { + return x.Dns + } + return "" +} + +func (x *SubjectAlternateName) GetUri() string { + if x, ok := x.GetName().(*SubjectAlternateName_Uri); ok { + return x.Uri + } + return "" +} + +func (x *SubjectAlternateName) GetIpAddress() string { + if x, ok := x.GetName().(*SubjectAlternateName_IpAddress); ok { + return x.IpAddress + } + return "" +} + +type isSubjectAlternateName_Name interface { + isSubjectAlternateName_Name() +} + +type SubjectAlternateName_Dns struct { + Dns string `protobuf:"bytes,1,opt,name=dns,proto3,oneof"` +} + +type SubjectAlternateName_Uri struct { + Uri string `protobuf:"bytes,2,opt,name=uri,proto3,oneof"` +} + +type SubjectAlternateName_IpAddress struct { + IpAddress string `protobuf:"bytes,3,opt,name=ip_address,json=ipAddress,proto3,oneof"` +} + +func (*SubjectAlternateName_Dns) isSubjectAlternateName_Name() {} + +func (*SubjectAlternateName_Uri) isSubjectAlternateName_Name() {} + +func (*SubjectAlternateName_IpAddress) isSubjectAlternateName_Name() {} + +type CertificateDetails_OcspDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Indicates the time from which the OCSP response is valid. + ValidFrom *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=valid_from,json=validFrom,proto3" json:"valid_from,omitempty"` + // Indicates the time at which the OCSP response expires. + Expiration *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expiration,proto3" json:"expiration,omitempty"` +} + +func (x *CertificateDetails_OcspDetails) Reset() { + *x = CertificateDetails_OcspDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_certs_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CertificateDetails_OcspDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CertificateDetails_OcspDetails) ProtoMessage() {} + +func (x *CertificateDetails_OcspDetails) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_certs_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CertificateDetails_OcspDetails.ProtoReflect.Descriptor instead. +func (*CertificateDetails_OcspDetails) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_certs_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *CertificateDetails_OcspDetails) GetValidFrom() *timestamppb.Timestamp { + if x != nil { + return x.ValidFrom + } + return nil +} + +func (x *CertificateDetails_OcspDetails) GetExpiration() *timestamppb.Timestamp { + if x != nil { + return x.Expiration + } + return nil +} + +var File_envoy_admin_v3_certs_proto protoreflect.FileDescriptor + +var file_envoy_admin_v3_certs_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, + 0x2f, 0x63, 0x65, 0x72, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 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, 0x1d, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x78, 0x0a, 0x0c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x12, + 0x3f, 0x0a, 0x0c, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x52, 0x0c, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, + 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x22, 0xb5, 0x01, 0x0a, 0x0b, 0x43, 0x65, + 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x63, 0x61, 0x5f, + 0x63, 0x65, 0x72, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x72, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x06, + 0x63, 0x61, 0x43, 0x65, 0x72, 0x74, 0x12, 0x41, 0x0a, 0x0a, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x72, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x09, + 0x63, 0x65, 0x72, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, + 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x22, 0xdc, 0x04, 0x0a, 0x12, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x23, 0x0a, 0x0d, + 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x12, 0x50, 0x0a, 0x11, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x6c, 0x74, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x64, 0x61, 0x79, 0x73, 0x5f, 0x75, 0x6e, 0x74, 0x69, + 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x13, 0x64, 0x61, 0x79, 0x73, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x45, 0x78, 0x70, + 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x05, 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, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x46, 0x72, + 0x6f, 0x6d, 0x12, 0x43, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 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, 0x0e, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x51, 0x0a, 0x0c, 0x6f, 0x63, 0x73, 0x70, 0x5f, + 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x2e, 0x4f, 0x63, 0x73, 0x70, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0b, 0x6f, + 0x63, 0x73, 0x70, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x1a, 0x84, 0x01, 0x0a, 0x0b, 0x4f, + 0x63, 0x73, 0x70, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 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, 0x09, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x3a, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 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, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x65, + 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x22, 0x98, 0x01, 0x0a, 0x14, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x03, 0x64, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x64, 0x6e, 0x73, 0x12, 0x12, 0x0a, + 0x03, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x75, 0x72, + 0x69, 0x12, 0x1f, 0x0a, 0x0a, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x73, 0x0a, 0x1c, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x43, 0x65, 0x72, + 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, + 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_admin_v3_certs_proto_rawDescOnce sync.Once + file_envoy_admin_v3_certs_proto_rawDescData = file_envoy_admin_v3_certs_proto_rawDesc +) + +func file_envoy_admin_v3_certs_proto_rawDescGZIP() []byte { + file_envoy_admin_v3_certs_proto_rawDescOnce.Do(func() { + file_envoy_admin_v3_certs_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_admin_v3_certs_proto_rawDescData) + }) + return file_envoy_admin_v3_certs_proto_rawDescData +} + +var file_envoy_admin_v3_certs_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_envoy_admin_v3_certs_proto_goTypes = []interface{}{ + (*Certificates)(nil), // 0: envoy.admin.v3.Certificates + (*Certificate)(nil), // 1: envoy.admin.v3.Certificate + (*CertificateDetails)(nil), // 2: envoy.admin.v3.CertificateDetails + (*SubjectAlternateName)(nil), // 3: envoy.admin.v3.SubjectAlternateName + (*CertificateDetails_OcspDetails)(nil), // 4: envoy.admin.v3.CertificateDetails.OcspDetails + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp +} +var file_envoy_admin_v3_certs_proto_depIdxs = []int32{ + 1, // 0: envoy.admin.v3.Certificates.certificates:type_name -> envoy.admin.v3.Certificate + 2, // 1: envoy.admin.v3.Certificate.ca_cert:type_name -> envoy.admin.v3.CertificateDetails + 2, // 2: envoy.admin.v3.Certificate.cert_chain:type_name -> envoy.admin.v3.CertificateDetails + 3, // 3: envoy.admin.v3.CertificateDetails.subject_alt_names:type_name -> envoy.admin.v3.SubjectAlternateName + 5, // 4: envoy.admin.v3.CertificateDetails.valid_from:type_name -> google.protobuf.Timestamp + 5, // 5: envoy.admin.v3.CertificateDetails.expiration_time:type_name -> google.protobuf.Timestamp + 4, // 6: envoy.admin.v3.CertificateDetails.ocsp_details:type_name -> envoy.admin.v3.CertificateDetails.OcspDetails + 5, // 7: envoy.admin.v3.CertificateDetails.OcspDetails.valid_from:type_name -> google.protobuf.Timestamp + 5, // 8: envoy.admin.v3.CertificateDetails.OcspDetails.expiration:type_name -> google.protobuf.Timestamp + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_envoy_admin_v3_certs_proto_init() } +func file_envoy_admin_v3_certs_proto_init() { + if File_envoy_admin_v3_certs_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_admin_v3_certs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Certificates); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_certs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Certificate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_certs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CertificateDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_certs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubjectAlternateName); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_certs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CertificateDetails_OcspDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_admin_v3_certs_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*SubjectAlternateName_Dns)(nil), + (*SubjectAlternateName_Uri)(nil), + (*SubjectAlternateName_IpAddress)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_admin_v3_certs_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_admin_v3_certs_proto_goTypes, + DependencyIndexes: file_envoy_admin_v3_certs_proto_depIdxs, + MessageInfos: file_envoy_admin_v3_certs_proto_msgTypes, + }.Build() + File_envoy_admin_v3_certs_proto = out.File + file_envoy_admin_v3_certs_proto_rawDesc = nil + file_envoy_admin_v3_certs_proto_goTypes = nil + file_envoy_admin_v3_certs_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/admin/v3/certs.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/certs.pb.validate.go new file mode 100644 index 0000000000000..b49240389ab82 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/certs.pb.validate.go @@ -0,0 +1,836 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/admin/v3/certs.proto + +package adminv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Certificates 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 *Certificates) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Certificates 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 CertificatesMultiError, or +// nil if none found. +func (m *Certificates) ValidateAll() error { + return m.validate(true) +} + +func (m *Certificates) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetCertificates() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificatesValidationError{ + field: fmt.Sprintf("Certificates[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificatesValidationError{ + field: fmt.Sprintf("Certificates[%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 CertificatesValidationError{ + field: fmt.Sprintf("Certificates[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return CertificatesMultiError(errors) + } + return nil +} + +// CertificatesMultiError is an error wrapping multiple validation errors +// returned by Certificates.ValidateAll() if the designated constraints aren't met. +type CertificatesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CertificatesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CertificatesMultiError) AllErrors() []error { return m } + +// CertificatesValidationError is the validation error returned by +// Certificates.Validate if the designated constraints aren't met. +type CertificatesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CertificatesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CertificatesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CertificatesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CertificatesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CertificatesValidationError) ErrorName() string { return "CertificatesValidationError" } + +// Error satisfies the builtin error interface +func (e CertificatesValidationError) 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 %sCertificates.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CertificatesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CertificatesValidationError{} + +// Validate checks the field values on Certificate 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 *Certificate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Certificate 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 CertificateMultiError, or +// nil if none found. +func (m *Certificate) ValidateAll() error { + return m.validate(true) +} + +func (m *Certificate) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetCaCert() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateValidationError{ + field: fmt.Sprintf("CaCert[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateValidationError{ + field: fmt.Sprintf("CaCert[%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 CertificateValidationError{ + field: fmt.Sprintf("CaCert[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetCertChain() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateValidationError{ + field: fmt.Sprintf("CertChain[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateValidationError{ + field: fmt.Sprintf("CertChain[%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 CertificateValidationError{ + field: fmt.Sprintf("CertChain[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return CertificateMultiError(errors) + } + return nil +} + +// CertificateMultiError is an error wrapping multiple validation errors +// returned by Certificate.ValidateAll() if the designated constraints aren't met. +type CertificateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CertificateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CertificateMultiError) AllErrors() []error { return m } + +// CertificateValidationError is the validation error returned by +// Certificate.Validate if the designated constraints aren't met. +type CertificateValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CertificateValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CertificateValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CertificateValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CertificateValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CertificateValidationError) ErrorName() string { return "CertificateValidationError" } + +// Error satisfies the builtin error interface +func (e CertificateValidationError) 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 %sCertificate.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CertificateValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CertificateValidationError{} + +// Validate checks the field values on CertificateDetails 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 *CertificateDetails) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CertificateDetails 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 +// CertificateDetailsMultiError, or nil if none found. +func (m *CertificateDetails) ValidateAll() error { + return m.validate(true) +} + +func (m *CertificateDetails) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Path + + // no validation rules for SerialNumber + + for idx, item := range m.GetSubjectAltNames() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateDetailsValidationError{ + field: fmt.Sprintf("SubjectAltNames[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateDetailsValidationError{ + field: fmt.Sprintf("SubjectAltNames[%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 CertificateDetailsValidationError{ + field: fmt.Sprintf("SubjectAltNames[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for DaysUntilExpiration + + if all { + switch v := interface{}(m.GetValidFrom()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateDetailsValidationError{ + field: "ValidFrom", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateDetailsValidationError{ + field: "ValidFrom", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidFrom()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CertificateDetailsValidationError{ + field: "ValidFrom", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetExpirationTime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateDetailsValidationError{ + field: "ExpirationTime", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateDetailsValidationError{ + field: "ExpirationTime", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExpirationTime()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CertificateDetailsValidationError{ + field: "ExpirationTime", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetOcspDetails()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateDetailsValidationError{ + field: "OcspDetails", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateDetailsValidationError{ + field: "OcspDetails", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOcspDetails()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CertificateDetailsValidationError{ + field: "OcspDetails", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return CertificateDetailsMultiError(errors) + } + return nil +} + +// CertificateDetailsMultiError is an error wrapping multiple validation errors +// returned by CertificateDetails.ValidateAll() if the designated constraints +// aren't met. +type CertificateDetailsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CertificateDetailsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CertificateDetailsMultiError) AllErrors() []error { return m } + +// CertificateDetailsValidationError is the validation error returned by +// CertificateDetails.Validate if the designated constraints aren't met. +type CertificateDetailsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CertificateDetailsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CertificateDetailsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CertificateDetailsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CertificateDetailsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CertificateDetailsValidationError) ErrorName() string { + return "CertificateDetailsValidationError" +} + +// Error satisfies the builtin error interface +func (e CertificateDetailsValidationError) 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 %sCertificateDetails.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CertificateDetailsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CertificateDetailsValidationError{} + +// Validate checks the field values on SubjectAlternateName 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 *SubjectAlternateName) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SubjectAlternateName 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 +// SubjectAlternateNameMultiError, or nil if none found. +func (m *SubjectAlternateName) ValidateAll() error { + return m.validate(true) +} + +func (m *SubjectAlternateName) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.Name.(type) { + + case *SubjectAlternateName_Dns: + // no validation rules for Dns + + case *SubjectAlternateName_Uri: + // no validation rules for Uri + + case *SubjectAlternateName_IpAddress: + // no validation rules for IpAddress + + } + + if len(errors) > 0 { + return SubjectAlternateNameMultiError(errors) + } + return nil +} + +// SubjectAlternateNameMultiError is an error wrapping multiple validation +// errors returned by SubjectAlternateName.ValidateAll() if the designated +// constraints aren't met. +type SubjectAlternateNameMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SubjectAlternateNameMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SubjectAlternateNameMultiError) AllErrors() []error { return m } + +// SubjectAlternateNameValidationError is the validation error returned by +// SubjectAlternateName.Validate if the designated constraints aren't met. +type SubjectAlternateNameValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SubjectAlternateNameValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SubjectAlternateNameValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SubjectAlternateNameValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SubjectAlternateNameValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SubjectAlternateNameValidationError) ErrorName() string { + return "SubjectAlternateNameValidationError" +} + +// Error satisfies the builtin error interface +func (e SubjectAlternateNameValidationError) 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 %sSubjectAlternateName.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SubjectAlternateNameValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SubjectAlternateNameValidationError{} + +// Validate checks the field values on CertificateDetails_OcspDetails 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 *CertificateDetails_OcspDetails) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CertificateDetails_OcspDetails 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 +// CertificateDetails_OcspDetailsMultiError, or nil if none found. +func (m *CertificateDetails_OcspDetails) ValidateAll() error { + return m.validate(true) +} + +func (m *CertificateDetails_OcspDetails) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetValidFrom()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateDetails_OcspDetailsValidationError{ + field: "ValidFrom", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateDetails_OcspDetailsValidationError{ + field: "ValidFrom", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidFrom()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CertificateDetails_OcspDetailsValidationError{ + field: "ValidFrom", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetExpiration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CertificateDetails_OcspDetailsValidationError{ + field: "Expiration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CertificateDetails_OcspDetailsValidationError{ + field: "Expiration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExpiration()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CertificateDetails_OcspDetailsValidationError{ + field: "Expiration", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return CertificateDetails_OcspDetailsMultiError(errors) + } + return nil +} + +// CertificateDetails_OcspDetailsMultiError is an error wrapping multiple +// validation errors returned by CertificateDetails_OcspDetails.ValidateAll() +// if the designated constraints aren't met. +type CertificateDetails_OcspDetailsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CertificateDetails_OcspDetailsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CertificateDetails_OcspDetailsMultiError) AllErrors() []error { return m } + +// CertificateDetails_OcspDetailsValidationError is the validation error +// returned by CertificateDetails_OcspDetails.Validate if the designated +// constraints aren't met. +type CertificateDetails_OcspDetailsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CertificateDetails_OcspDetailsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CertificateDetails_OcspDetailsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CertificateDetails_OcspDetailsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CertificateDetails_OcspDetailsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CertificateDetails_OcspDetailsValidationError) ErrorName() string { + return "CertificateDetails_OcspDetailsValidationError" +} + +// Error satisfies the builtin error interface +func (e CertificateDetails_OcspDetailsValidationError) 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 %sCertificateDetails_OcspDetails.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CertificateDetails_OcspDetailsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CertificateDetails_OcspDetailsValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/admin/v3/clusters.pb.go b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/clusters.pb.go new file mode 100644 index 0000000000000..016ca88989ac4 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/clusters.pb.go @@ -0,0 +1,737 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/admin/v3/clusters.proto + +package adminv3 + +import ( + v31 "github.com/cilium/proxy/go/envoy/config/cluster/v3" + v32 "github.com/cilium/proxy/go/envoy/config/core/v3" + v3 "github.com/cilium/proxy/go/envoy/type/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Admin endpoint uses this wrapper for “/clusters“ to display cluster status information. +// See :ref:`/clusters ` for more information. +type Clusters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Mapping from cluster name to each cluster's status. + ClusterStatuses []*ClusterStatus `protobuf:"bytes,1,rep,name=cluster_statuses,json=clusterStatuses,proto3" json:"cluster_statuses,omitempty"` +} + +func (x *Clusters) Reset() { + *x = Clusters{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_clusters_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Clusters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Clusters) ProtoMessage() {} + +func (x *Clusters) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_clusters_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Clusters.ProtoReflect.Descriptor instead. +func (*Clusters) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_clusters_proto_rawDescGZIP(), []int{0} +} + +func (x *Clusters) GetClusterStatuses() []*ClusterStatus { + if x != nil { + return x.ClusterStatuses + } + return nil +} + +// Details an individual cluster's current status. +// [#next-free-field: 8] +type ClusterStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of the cluster. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Denotes whether this cluster was added via API or configured statically. + AddedViaApi bool `protobuf:"varint,2,opt,name=added_via_api,json=addedViaApi,proto3" json:"added_via_api,omitempty"` + // The success rate threshold used in the last interval. + // If + // :ref:`outlier_detection.split_external_local_origin_errors` + // is “false“, all errors: externally and locally generated were used to calculate the threshold. + // If + // :ref:`outlier_detection.split_external_local_origin_errors` + // is “true“, only externally generated errors were used to calculate the threshold. + // The threshold is used to eject hosts based on their success rate. See + // :ref:`Cluster outlier detection ` documentation for details. + // + // Note: this field may be omitted in any of the three following cases: + // + // 1. There were not enough hosts with enough request volume to proceed with success rate based + // outlier ejection. + // 2. The threshold is computed to be < 0 because a negative value implies that there was no + // threshold for that interval. + // 3. Outlier detection is not enabled for this cluster. + SuccessRateEjectionThreshold *v3.Percent `protobuf:"bytes,3,opt,name=success_rate_ejection_threshold,json=successRateEjectionThreshold,proto3" json:"success_rate_ejection_threshold,omitempty"` + // Mapping from host address to the host's current status. + HostStatuses []*HostStatus `protobuf:"bytes,4,rep,name=host_statuses,json=hostStatuses,proto3" json:"host_statuses,omitempty"` + // The success rate threshold used in the last interval when only locally originated failures were + // taken into account and externally originated errors were treated as success. + // This field should be interpreted only when + // :ref:`outlier_detection.split_external_local_origin_errors` + // is “true“. The threshold is used to eject hosts based on their success rate. + // See :ref:`Cluster outlier detection ` documentation for + // details. + // + // Note: this field may be omitted in any of the three following cases: + // + // 1. There were not enough hosts with enough request volume to proceed with success rate based + // outlier ejection. + // 2. The threshold is computed to be < 0 because a negative value implies that there was no + // threshold for that interval. + // 3. Outlier detection is not enabled for this cluster. + LocalOriginSuccessRateEjectionThreshold *v3.Percent `protobuf:"bytes,5,opt,name=local_origin_success_rate_ejection_threshold,json=localOriginSuccessRateEjectionThreshold,proto3" json:"local_origin_success_rate_ejection_threshold,omitempty"` + // :ref:`Circuit breaking ` settings of the cluster. + CircuitBreakers *v31.CircuitBreakers `protobuf:"bytes,6,opt,name=circuit_breakers,json=circuitBreakers,proto3" json:"circuit_breakers,omitempty"` + // Observability name of the cluster. + ObservabilityName string `protobuf:"bytes,7,opt,name=observability_name,json=observabilityName,proto3" json:"observability_name,omitempty"` +} + +func (x *ClusterStatus) Reset() { + *x = ClusterStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_clusters_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterStatus) ProtoMessage() {} + +func (x *ClusterStatus) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_clusters_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterStatus.ProtoReflect.Descriptor instead. +func (*ClusterStatus) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_clusters_proto_rawDescGZIP(), []int{1} +} + +func (x *ClusterStatus) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ClusterStatus) GetAddedViaApi() bool { + if x != nil { + return x.AddedViaApi + } + return false +} + +func (x *ClusterStatus) GetSuccessRateEjectionThreshold() *v3.Percent { + if x != nil { + return x.SuccessRateEjectionThreshold + } + return nil +} + +func (x *ClusterStatus) GetHostStatuses() []*HostStatus { + if x != nil { + return x.HostStatuses + } + return nil +} + +func (x *ClusterStatus) GetLocalOriginSuccessRateEjectionThreshold() *v3.Percent { + if x != nil { + return x.LocalOriginSuccessRateEjectionThreshold + } + return nil +} + +func (x *ClusterStatus) GetCircuitBreakers() *v31.CircuitBreakers { + if x != nil { + return x.CircuitBreakers + } + return nil +} + +func (x *ClusterStatus) GetObservabilityName() string { + if x != nil { + return x.ObservabilityName + } + return "" +} + +// Current state of a particular host. +// [#next-free-field: 10] +type HostStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Address of this host. + Address *v32.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // List of stats specific to this host. + Stats []*SimpleMetric `protobuf:"bytes,2,rep,name=stats,proto3" json:"stats,omitempty"` + // The host's current health status. + HealthStatus *HostHealthStatus `protobuf:"bytes,3,opt,name=health_status,json=healthStatus,proto3" json:"health_status,omitempty"` + // Request success rate for this host over the last calculated interval. + // If + // :ref:`outlier_detection.split_external_local_origin_errors` + // is “false“, all errors: externally and locally generated were used in success rate + // calculation. If + // :ref:`outlier_detection.split_external_local_origin_errors` + // is “true“, only externally generated errors were used in success rate calculation. + // See :ref:`Cluster outlier detection ` documentation for + // details. + // + // Note: the message will not be present if host did not have enough request volume to calculate + // success rate or the cluster did not have enough hosts to run through success rate outlier + // ejection. + SuccessRate *v3.Percent `protobuf:"bytes,4,opt,name=success_rate,json=successRate,proto3" json:"success_rate,omitempty"` + // The host's weight. If not configured, the value defaults to 1. + Weight uint32 `protobuf:"varint,5,opt,name=weight,proto3" json:"weight,omitempty"` + // The hostname of the host, if applicable. + Hostname string `protobuf:"bytes,6,opt,name=hostname,proto3" json:"hostname,omitempty"` + // The host's priority. If not configured, the value defaults to 0 (highest priority). + Priority uint32 `protobuf:"varint,7,opt,name=priority,proto3" json:"priority,omitempty"` + // Request success rate for this host over the last calculated + // interval when only locally originated errors are taken into account and externally originated + // errors were treated as success. + // This field should be interpreted only when + // :ref:`outlier_detection.split_external_local_origin_errors` + // is “true“. + // See :ref:`Cluster outlier detection ` documentation for + // details. + // + // Note: the message will not be present if host did not have enough request volume to calculate + // success rate or the cluster did not have enough hosts to run through success rate outlier + // ejection. + LocalOriginSuccessRate *v3.Percent `protobuf:"bytes,8,opt,name=local_origin_success_rate,json=localOriginSuccessRate,proto3" json:"local_origin_success_rate,omitempty"` + // locality of the host. + Locality *v32.Locality `protobuf:"bytes,9,opt,name=locality,proto3" json:"locality,omitempty"` +} + +func (x *HostStatus) Reset() { + *x = HostStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_clusters_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HostStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HostStatus) ProtoMessage() {} + +func (x *HostStatus) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_clusters_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HostStatus.ProtoReflect.Descriptor instead. +func (*HostStatus) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_clusters_proto_rawDescGZIP(), []int{2} +} + +func (x *HostStatus) GetAddress() *v32.Address { + if x != nil { + return x.Address + } + return nil +} + +func (x *HostStatus) GetStats() []*SimpleMetric { + if x != nil { + return x.Stats + } + return nil +} + +func (x *HostStatus) GetHealthStatus() *HostHealthStatus { + if x != nil { + return x.HealthStatus + } + return nil +} + +func (x *HostStatus) GetSuccessRate() *v3.Percent { + if x != nil { + return x.SuccessRate + } + return nil +} + +func (x *HostStatus) GetWeight() uint32 { + if x != nil { + return x.Weight + } + return 0 +} + +func (x *HostStatus) GetHostname() string { + if x != nil { + return x.Hostname + } + return "" +} + +func (x *HostStatus) GetPriority() uint32 { + if x != nil { + return x.Priority + } + return 0 +} + +func (x *HostStatus) GetLocalOriginSuccessRate() *v3.Percent { + if x != nil { + return x.LocalOriginSuccessRate + } + return nil +} + +func (x *HostStatus) GetLocality() *v32.Locality { + if x != nil { + return x.Locality + } + return nil +} + +// Health status for a host. +// [#next-free-field: 9] +type HostHealthStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The host is currently failing active health checks. + FailedActiveHealthCheck bool `protobuf:"varint,1,opt,name=failed_active_health_check,json=failedActiveHealthCheck,proto3" json:"failed_active_health_check,omitempty"` + // The host is currently considered an outlier and has been ejected. + FailedOutlierCheck bool `protobuf:"varint,2,opt,name=failed_outlier_check,json=failedOutlierCheck,proto3" json:"failed_outlier_check,omitempty"` + // The host is currently being marked as degraded through active health checking. + FailedActiveDegradedCheck bool `protobuf:"varint,4,opt,name=failed_active_degraded_check,json=failedActiveDegradedCheck,proto3" json:"failed_active_degraded_check,omitempty"` + // The host has been removed from service discovery, but is being stabilized due to active + // health checking. + PendingDynamicRemoval bool `protobuf:"varint,5,opt,name=pending_dynamic_removal,json=pendingDynamicRemoval,proto3" json:"pending_dynamic_removal,omitempty"` + // The host has not yet been health checked. + PendingActiveHc bool `protobuf:"varint,6,opt,name=pending_active_hc,json=pendingActiveHc,proto3" json:"pending_active_hc,omitempty"` + // The host should be excluded from panic, spillover, etc. calculations because it was explicitly + // taken out of rotation via protocol signal and is not meant to be routed to. + ExcludedViaImmediateHcFail bool `protobuf:"varint,7,opt,name=excluded_via_immediate_hc_fail,json=excludedViaImmediateHcFail,proto3" json:"excluded_via_immediate_hc_fail,omitempty"` + // The host failed active HC due to timeout. + ActiveHcTimeout bool `protobuf:"varint,8,opt,name=active_hc_timeout,json=activeHcTimeout,proto3" json:"active_hc_timeout,omitempty"` + // Health status as reported by EDS. Note: only HEALTHY and UNHEALTHY are currently supported + // here. + // [#comment:TODO(mrice32): pipe through remaining EDS health status possibilities.] + EdsHealthStatus v32.HealthStatus `protobuf:"varint,3,opt,name=eds_health_status,json=edsHealthStatus,proto3,enum=envoy.config.core.v3.HealthStatus" json:"eds_health_status,omitempty"` +} + +func (x *HostHealthStatus) Reset() { + *x = HostHealthStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_clusters_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HostHealthStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HostHealthStatus) ProtoMessage() {} + +func (x *HostHealthStatus) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_clusters_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HostHealthStatus.ProtoReflect.Descriptor instead. +func (*HostHealthStatus) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_clusters_proto_rawDescGZIP(), []int{3} +} + +func (x *HostHealthStatus) GetFailedActiveHealthCheck() bool { + if x != nil { + return x.FailedActiveHealthCheck + } + return false +} + +func (x *HostHealthStatus) GetFailedOutlierCheck() bool { + if x != nil { + return x.FailedOutlierCheck + } + return false +} + +func (x *HostHealthStatus) GetFailedActiveDegradedCheck() bool { + if x != nil { + return x.FailedActiveDegradedCheck + } + return false +} + +func (x *HostHealthStatus) GetPendingDynamicRemoval() bool { + if x != nil { + return x.PendingDynamicRemoval + } + return false +} + +func (x *HostHealthStatus) GetPendingActiveHc() bool { + if x != nil { + return x.PendingActiveHc + } + return false +} + +func (x *HostHealthStatus) GetExcludedViaImmediateHcFail() bool { + if x != nil { + return x.ExcludedViaImmediateHcFail + } + return false +} + +func (x *HostHealthStatus) GetActiveHcTimeout() bool { + if x != nil { + return x.ActiveHcTimeout + } + return false +} + +func (x *HostHealthStatus) GetEdsHealthStatus() v32.HealthStatus { + if x != nil { + return x.EdsHealthStatus + } + return v32.HealthStatus_UNKNOWN +} + +var File_envoy_admin_v3_clusters_proto protoreflect.FileDescriptor + +var file_envoy_admin_v3_clusters_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, + 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x0e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x1a, + 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x5f, 0x62, + 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x76, 0x33, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x79, 0x0a, 0x08, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x48, 0x0a, 0x10, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, + 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x3a, + 0x23, 0x9a, 0xc5, 0x88, 0x1e, 0x1e, 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x73, 0x22, 0x8c, 0x04, 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x64, + 0x64, 0x65, 0x64, 0x5f, 0x76, 0x69, 0x61, 0x5f, 0x61, 0x70, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x65, 0x64, 0x56, 0x69, 0x61, 0x41, 0x70, 0x69, 0x12, 0x5d, + 0x0a, 0x1f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x65, + 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, + 0x1c, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x61, 0x74, 0x65, 0x45, 0x6a, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x3f, 0x0a, + 0x0d, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x0c, 0x68, 0x6f, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x75, + 0x0a, 0x2c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6a, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x27, 0x6c, 0x6f, + 0x63, 0x61, 0x6c, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x52, 0x61, 0x74, 0x65, 0x45, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x68, 0x72, 0x65, + 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x53, 0x0a, 0x10, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, + 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x72, 0x63, 0x75, 0x69, + 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x52, 0x0f, 0x63, 0x69, 0x72, 0x63, 0x75, + 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x6f, 0x62, + 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, + 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x22, 0x81, 0x04, 0x0a, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x37, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x32, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x69, 0x6d, 0x70, + 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x12, + 0x45, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x39, 0x0a, 0x0c, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, + 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x61, 0x74, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, + 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, + 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x12, 0x51, 0x0a, 0x19, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x16, 0x6c, 0x6f, + 0x63, 0x61, 0x6c, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x52, 0x61, 0x74, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, + 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, + 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x6f, 0x73, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x93, 0x04, 0x0a, 0x10, 0x48, 0x6f, 0x73, 0x74, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x1a, + 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x68, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x17, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x48, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x61, 0x69, + 0x6c, 0x65, 0x64, 0x5f, 0x6f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4f, + 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x3f, 0x0a, 0x1c, 0x66, + 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x67, + 0x72, 0x61, 0x64, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x19, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x44, + 0x65, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x36, 0x0a, 0x17, + 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, + 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x70, + 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x61, 0x6c, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, + 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x68, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x48, 0x63, + 0x12, 0x42, 0x0a, 0x1e, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x5f, 0x76, 0x69, 0x61, + 0x5f, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x5f, 0x68, 0x63, 0x5f, 0x66, 0x61, + 0x69, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x64, 0x56, 0x69, 0x61, 0x49, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x48, 0x63, + 0x46, 0x61, 0x69, 0x6c, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x68, + 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x48, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x12, 0x4e, 0x0a, 0x11, 0x65, 0x64, 0x73, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x0f, 0x65, 0x64, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x6f, 0x73, + 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x76, 0x0a, + 0x1c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_admin_v3_clusters_proto_rawDescOnce sync.Once + file_envoy_admin_v3_clusters_proto_rawDescData = file_envoy_admin_v3_clusters_proto_rawDesc +) + +func file_envoy_admin_v3_clusters_proto_rawDescGZIP() []byte { + file_envoy_admin_v3_clusters_proto_rawDescOnce.Do(func() { + file_envoy_admin_v3_clusters_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_admin_v3_clusters_proto_rawDescData) + }) + return file_envoy_admin_v3_clusters_proto_rawDescData +} + +var file_envoy_admin_v3_clusters_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_envoy_admin_v3_clusters_proto_goTypes = []interface{}{ + (*Clusters)(nil), // 0: envoy.admin.v3.Clusters + (*ClusterStatus)(nil), // 1: envoy.admin.v3.ClusterStatus + (*HostStatus)(nil), // 2: envoy.admin.v3.HostStatus + (*HostHealthStatus)(nil), // 3: envoy.admin.v3.HostHealthStatus + (*v3.Percent)(nil), // 4: envoy.type.v3.Percent + (*v31.CircuitBreakers)(nil), // 5: envoy.config.cluster.v3.CircuitBreakers + (*v32.Address)(nil), // 6: envoy.config.core.v3.Address + (*SimpleMetric)(nil), // 7: envoy.admin.v3.SimpleMetric + (*v32.Locality)(nil), // 8: envoy.config.core.v3.Locality + (v32.HealthStatus)(0), // 9: envoy.config.core.v3.HealthStatus +} +var file_envoy_admin_v3_clusters_proto_depIdxs = []int32{ + 1, // 0: envoy.admin.v3.Clusters.cluster_statuses:type_name -> envoy.admin.v3.ClusterStatus + 4, // 1: envoy.admin.v3.ClusterStatus.success_rate_ejection_threshold:type_name -> envoy.type.v3.Percent + 2, // 2: envoy.admin.v3.ClusterStatus.host_statuses:type_name -> envoy.admin.v3.HostStatus + 4, // 3: envoy.admin.v3.ClusterStatus.local_origin_success_rate_ejection_threshold:type_name -> envoy.type.v3.Percent + 5, // 4: envoy.admin.v3.ClusterStatus.circuit_breakers:type_name -> envoy.config.cluster.v3.CircuitBreakers + 6, // 5: envoy.admin.v3.HostStatus.address:type_name -> envoy.config.core.v3.Address + 7, // 6: envoy.admin.v3.HostStatus.stats:type_name -> envoy.admin.v3.SimpleMetric + 3, // 7: envoy.admin.v3.HostStatus.health_status:type_name -> envoy.admin.v3.HostHealthStatus + 4, // 8: envoy.admin.v3.HostStatus.success_rate:type_name -> envoy.type.v3.Percent + 4, // 9: envoy.admin.v3.HostStatus.local_origin_success_rate:type_name -> envoy.type.v3.Percent + 8, // 10: envoy.admin.v3.HostStatus.locality:type_name -> envoy.config.core.v3.Locality + 9, // 11: envoy.admin.v3.HostHealthStatus.eds_health_status:type_name -> envoy.config.core.v3.HealthStatus + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_envoy_admin_v3_clusters_proto_init() } +func file_envoy_admin_v3_clusters_proto_init() { + if File_envoy_admin_v3_clusters_proto != nil { + return + } + file_envoy_admin_v3_metrics_proto_init() + if !protoimpl.UnsafeEnabled { + file_envoy_admin_v3_clusters_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Clusters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_clusters_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_clusters_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HostStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_clusters_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HostHealthStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_admin_v3_clusters_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_admin_v3_clusters_proto_goTypes, + DependencyIndexes: file_envoy_admin_v3_clusters_proto_depIdxs, + MessageInfos: file_envoy_admin_v3_clusters_proto_msgTypes, + }.Build() + File_envoy_admin_v3_clusters_proto = out.File + file_envoy_admin_v3_clusters_proto_rawDesc = nil + file_envoy_admin_v3_clusters_proto_goTypes = nil + file_envoy_admin_v3_clusters_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/admin/v3/clusters.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/clusters.pb.validate.go new file mode 100644 index 0000000000000..468c16f3689c5 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/clusters.pb.validate.go @@ -0,0 +1,796 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/admin/v3/clusters.proto + +package adminv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" + + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort + + _ = v3.HealthStatus(0) +) + +// Validate checks the field values on Clusters 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 *Clusters) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Clusters 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 ClustersMultiError, or nil +// if none found. +func (m *Clusters) ValidateAll() error { + return m.validate(true) +} + +func (m *Clusters) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetClusterStatuses() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersValidationError{ + field: fmt.Sprintf("ClusterStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersValidationError{ + field: fmt.Sprintf("ClusterStatuses[%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 ClustersValidationError{ + field: fmt.Sprintf("ClusterStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ClustersMultiError(errors) + } + return nil +} + +// ClustersMultiError is an error wrapping multiple validation errors returned +// by Clusters.ValidateAll() if the designated constraints aren't met. +type ClustersMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClustersMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClustersMultiError) AllErrors() []error { return m } + +// ClustersValidationError is the validation error returned by +// Clusters.Validate if the designated constraints aren't met. +type ClustersValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ClustersValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ClustersValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ClustersValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ClustersValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ClustersValidationError) ErrorName() string { return "ClustersValidationError" } + +// Error satisfies the builtin error interface +func (e ClustersValidationError) 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 %sClusters.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ClustersValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ClustersValidationError{} + +// Validate checks the field values on ClusterStatus 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 *ClusterStatus) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterStatus 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 ClusterStatusMultiError, or +// nil if none found. +func (m *ClusterStatus) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterStatus) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + // no validation rules for AddedViaApi + + if all { + switch v := interface{}(m.GetSuccessRateEjectionThreshold()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterStatusValidationError{ + field: "SuccessRateEjectionThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterStatusValidationError{ + field: "SuccessRateEjectionThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSuccessRateEjectionThreshold()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterStatusValidationError{ + field: "SuccessRateEjectionThreshold", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetHostStatuses() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterStatusValidationError{ + field: fmt.Sprintf("HostStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterStatusValidationError{ + field: fmt.Sprintf("HostStatuses[%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 ClusterStatusValidationError{ + field: fmt.Sprintf("HostStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetLocalOriginSuccessRateEjectionThreshold()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterStatusValidationError{ + field: "LocalOriginSuccessRateEjectionThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterStatusValidationError{ + field: "LocalOriginSuccessRateEjectionThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocalOriginSuccessRateEjectionThreshold()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterStatusValidationError{ + field: "LocalOriginSuccessRateEjectionThreshold", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetCircuitBreakers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterStatusValidationError{ + field: "CircuitBreakers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterStatusValidationError{ + field: "CircuitBreakers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCircuitBreakers()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClusterStatusValidationError{ + field: "CircuitBreakers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ObservabilityName + + if len(errors) > 0 { + return ClusterStatusMultiError(errors) + } + return nil +} + +// ClusterStatusMultiError is an error wrapping multiple validation errors +// returned by ClusterStatus.ValidateAll() if the designated constraints +// aren't met. +type ClusterStatusMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterStatusMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterStatusMultiError) AllErrors() []error { return m } + +// ClusterStatusValidationError is the validation error returned by +// ClusterStatus.Validate if the designated constraints aren't met. +type ClusterStatusValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ClusterStatusValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ClusterStatusValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ClusterStatusValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ClusterStatusValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ClusterStatusValidationError) ErrorName() string { return "ClusterStatusValidationError" } + +// Error satisfies the builtin error interface +func (e ClusterStatusValidationError) 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 %sClusterStatus.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ClusterStatusValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ClusterStatusValidationError{} + +// Validate checks the field values on HostStatus 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 *HostStatus) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HostStatus 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 HostStatusMultiError, or +// nil if none found. +func (m *HostStatus) ValidateAll() error { + return m.validate(true) +} + +func (m *HostStatus) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HostStatusValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetStats() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: fmt.Sprintf("Stats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: fmt.Sprintf("Stats[%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 HostStatusValidationError{ + field: fmt.Sprintf("Stats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetHealthStatus()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "HealthStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "HealthStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHealthStatus()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HostStatusValidationError{ + field: "HealthStatus", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetSuccessRate()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "SuccessRate", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "SuccessRate", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSuccessRate()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HostStatusValidationError{ + field: "SuccessRate", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Weight + + // no validation rules for Hostname + + // no validation rules for Priority + + if all { + switch v := interface{}(m.GetLocalOriginSuccessRate()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "LocalOriginSuccessRate", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "LocalOriginSuccessRate", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocalOriginSuccessRate()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HostStatusValidationError{ + field: "LocalOriginSuccessRate", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetLocality()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HostStatusValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HostStatusValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return HostStatusMultiError(errors) + } + return nil +} + +// HostStatusMultiError is an error wrapping multiple validation errors +// returned by HostStatus.ValidateAll() if the designated constraints aren't met. +type HostStatusMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HostStatusMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HostStatusMultiError) AllErrors() []error { return m } + +// HostStatusValidationError is the validation error returned by +// HostStatus.Validate if the designated constraints aren't met. +type HostStatusValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HostStatusValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HostStatusValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HostStatusValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HostStatusValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HostStatusValidationError) ErrorName() string { return "HostStatusValidationError" } + +// Error satisfies the builtin error interface +func (e HostStatusValidationError) 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 %sHostStatus.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HostStatusValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HostStatusValidationError{} + +// Validate checks the field values on HostHealthStatus 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 *HostHealthStatus) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HostHealthStatus 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 +// HostHealthStatusMultiError, or nil if none found. +func (m *HostHealthStatus) ValidateAll() error { + return m.validate(true) +} + +func (m *HostHealthStatus) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for FailedActiveHealthCheck + + // no validation rules for FailedOutlierCheck + + // no validation rules for FailedActiveDegradedCheck + + // no validation rules for PendingDynamicRemoval + + // no validation rules for PendingActiveHc + + // no validation rules for ExcludedViaImmediateHcFail + + // no validation rules for ActiveHcTimeout + + // no validation rules for EdsHealthStatus + + if len(errors) > 0 { + return HostHealthStatusMultiError(errors) + } + return nil +} + +// HostHealthStatusMultiError is an error wrapping multiple validation errors +// returned by HostHealthStatus.ValidateAll() if the designated constraints +// aren't met. +type HostHealthStatusMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HostHealthStatusMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HostHealthStatusMultiError) AllErrors() []error { return m } + +// HostHealthStatusValidationError is the validation error returned by +// HostHealthStatus.Validate if the designated constraints aren't met. +type HostHealthStatusValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HostHealthStatusValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HostHealthStatusValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HostHealthStatusValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HostHealthStatusValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HostHealthStatusValidationError) ErrorName() string { return "HostHealthStatusValidationError" } + +// Error satisfies the builtin error interface +func (e HostHealthStatusValidationError) 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 %sHostHealthStatus.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HostHealthStatusValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HostHealthStatusValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/admin/v3/config_dump.pb.go b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/config_dump.pb.go new file mode 100644 index 0000000000000..81aa9293e146d --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/config_dump.pb.go @@ -0,0 +1,641 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/admin/v3/config_dump.proto + +package adminv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/bootstrap/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// The :ref:`/config_dump ` admin endpoint uses this wrapper +// message to maintain and serve arbitrary configuration information from any component in Envoy. +type ConfigDump struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This list is serialized and dumped in its entirety at the + // :ref:`/config_dump ` endpoint. + // + // The following configurations are currently supported and will be dumped in the order given + // below: + // + // * “bootstrap“: :ref:`BootstrapConfigDump ` + // * “clusters“: :ref:`ClustersConfigDump ` + // * “endpoints“: :ref:`EndpointsConfigDump ` + // * “listeners“: :ref:`ListenersConfigDump ` + // * “scoped_routes“: :ref:`ScopedRoutesConfigDump ` + // * “routes“: :ref:`RoutesConfigDump ` + // * “secrets“: :ref:`SecretsConfigDump ` + // + // EDS Configuration will only be dumped by using parameter “?include_eds“ + // + // You can filter output with the resource and mask query parameters. + // See :ref:`/config_dump?resource={} `, + // :ref:`/config_dump?mask={} `, + // or :ref:`/config_dump?resource={},mask={} + // ` for more information. + Configs []*anypb.Any `protobuf:"bytes,1,rep,name=configs,proto3" json:"configs,omitempty"` +} + +func (x *ConfigDump) Reset() { + *x = ConfigDump{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_config_dump_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConfigDump) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfigDump) ProtoMessage() {} + +func (x *ConfigDump) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_config_dump_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfigDump.ProtoReflect.Descriptor instead. +func (*ConfigDump) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_proto_rawDescGZIP(), []int{0} +} + +func (x *ConfigDump) GetConfigs() []*anypb.Any { + if x != nil { + return x.Configs + } + return nil +} + +// This message describes the bootstrap configuration that Envoy was started with. This includes +// any CLI overrides that were merged. Bootstrap configuration information can be used to recreate +// the static portions of an Envoy configuration by reusing the output as the bootstrap +// configuration for another Envoy. +type BootstrapConfigDump struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bootstrap *v3.Bootstrap `protobuf:"bytes,1,opt,name=bootstrap,proto3" json:"bootstrap,omitempty"` + // The timestamp when the BootstrapConfig was last updated. + LastUpdated *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` +} + +func (x *BootstrapConfigDump) Reset() { + *x = BootstrapConfigDump{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_config_dump_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootstrapConfigDump) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootstrapConfigDump) ProtoMessage() {} + +func (x *BootstrapConfigDump) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_config_dump_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootstrapConfigDump.ProtoReflect.Descriptor instead. +func (*BootstrapConfigDump) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_proto_rawDescGZIP(), []int{1} +} + +func (x *BootstrapConfigDump) GetBootstrap() *v3.Bootstrap { + if x != nil { + return x.Bootstrap + } + return nil +} + +func (x *BootstrapConfigDump) GetLastUpdated() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdated + } + return nil +} + +// Envoys SDS implementation fills this message with all secrets fetched dynamically via SDS. +type SecretsConfigDump struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The statically loaded secrets. + StaticSecrets []*SecretsConfigDump_StaticSecret `protobuf:"bytes,1,rep,name=static_secrets,json=staticSecrets,proto3" json:"static_secrets,omitempty"` + // The dynamically loaded active secrets. These are secrets that are available to service + // clusters or listeners. + DynamicActiveSecrets []*SecretsConfigDump_DynamicSecret `protobuf:"bytes,2,rep,name=dynamic_active_secrets,json=dynamicActiveSecrets,proto3" json:"dynamic_active_secrets,omitempty"` + // The dynamically loaded warming secrets. These are secrets that are currently undergoing + // warming in preparation to service clusters or listeners. + DynamicWarmingSecrets []*SecretsConfigDump_DynamicSecret `protobuf:"bytes,3,rep,name=dynamic_warming_secrets,json=dynamicWarmingSecrets,proto3" json:"dynamic_warming_secrets,omitempty"` +} + +func (x *SecretsConfigDump) Reset() { + *x = SecretsConfigDump{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_config_dump_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SecretsConfigDump) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecretsConfigDump) ProtoMessage() {} + +func (x *SecretsConfigDump) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_config_dump_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SecretsConfigDump.ProtoReflect.Descriptor instead. +func (*SecretsConfigDump) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_proto_rawDescGZIP(), []int{2} +} + +func (x *SecretsConfigDump) GetStaticSecrets() []*SecretsConfigDump_StaticSecret { + if x != nil { + return x.StaticSecrets + } + return nil +} + +func (x *SecretsConfigDump) GetDynamicActiveSecrets() []*SecretsConfigDump_DynamicSecret { + if x != nil { + return x.DynamicActiveSecrets + } + return nil +} + +func (x *SecretsConfigDump) GetDynamicWarmingSecrets() []*SecretsConfigDump_DynamicSecret { + if x != nil { + return x.DynamicWarmingSecrets + } + return nil +} + +// DynamicSecret contains secret information fetched via SDS. +// [#next-free-field: 7] +type SecretsConfigDump_DynamicSecret struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name assigned to the secret. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // This is the per-resource version information. + VersionInfo string `protobuf:"bytes,2,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` + // The timestamp when the secret was last updated. + LastUpdated *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` + // The actual secret information. + // Security sensitive information is redacted (replaced with "[redacted]") for + // private keys and passwords in TLS certificates. + Secret *anypb.Any `protobuf:"bytes,4,opt,name=secret,proto3" json:"secret,omitempty"` + // Set if the last update failed, cleared after the next successful update. + // The *error_state* field contains the rejected version of this particular + // resource along with the reason and timestamp. For successfully updated or + // acknowledged resource, this field should be empty. + // [#not-implemented-hide:] + ErrorState *UpdateFailureState `protobuf:"bytes,5,opt,name=error_state,json=errorState,proto3" json:"error_state,omitempty"` + // The client status of this resource. + // [#not-implemented-hide:] + ClientStatus ClientResourceStatus `protobuf:"varint,6,opt,name=client_status,json=clientStatus,proto3,enum=envoy.admin.v3.ClientResourceStatus" json:"client_status,omitempty"` +} + +func (x *SecretsConfigDump_DynamicSecret) Reset() { + *x = SecretsConfigDump_DynamicSecret{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_config_dump_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SecretsConfigDump_DynamicSecret) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecretsConfigDump_DynamicSecret) ProtoMessage() {} + +func (x *SecretsConfigDump_DynamicSecret) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_config_dump_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SecretsConfigDump_DynamicSecret.ProtoReflect.Descriptor instead. +func (*SecretsConfigDump_DynamicSecret) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *SecretsConfigDump_DynamicSecret) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SecretsConfigDump_DynamicSecret) GetVersionInfo() string { + if x != nil { + return x.VersionInfo + } + return "" +} + +func (x *SecretsConfigDump_DynamicSecret) GetLastUpdated() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdated + } + return nil +} + +func (x *SecretsConfigDump_DynamicSecret) GetSecret() *anypb.Any { + if x != nil { + return x.Secret + } + return nil +} + +func (x *SecretsConfigDump_DynamicSecret) GetErrorState() *UpdateFailureState { + if x != nil { + return x.ErrorState + } + return nil +} + +func (x *SecretsConfigDump_DynamicSecret) GetClientStatus() ClientResourceStatus { + if x != nil { + return x.ClientStatus + } + return ClientResourceStatus_UNKNOWN +} + +// StaticSecret specifies statically loaded secret in bootstrap. +type SecretsConfigDump_StaticSecret struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name assigned to the secret. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The timestamp when the secret was last updated. + LastUpdated *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` + // The actual secret information. + // Security sensitive information is redacted (replaced with "[redacted]") for + // private keys and passwords in TLS certificates. + Secret *anypb.Any `protobuf:"bytes,3,opt,name=secret,proto3" json:"secret,omitempty"` +} + +func (x *SecretsConfigDump_StaticSecret) Reset() { + *x = SecretsConfigDump_StaticSecret{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_config_dump_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SecretsConfigDump_StaticSecret) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecretsConfigDump_StaticSecret) ProtoMessage() {} + +func (x *SecretsConfigDump_StaticSecret) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_config_dump_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SecretsConfigDump_StaticSecret.ProtoReflect.Descriptor instead. +func (*SecretsConfigDump_StaticSecret) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_proto_rawDescGZIP(), []int{2, 1} +} + +func (x *SecretsConfigDump_StaticSecret) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SecretsConfigDump_StaticSecret) GetLastUpdated() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdated + } + return nil +} + +func (x *SecretsConfigDump_StaticSecret) GetSecret() *anypb.Any { + if x != nil { + return x.Secret + } + return nil +} + +var File_envoy_admin_v3_config_dump_proto protoreflect.FileDescriptor + +var file_envoy_admin_v3_config_dump_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x0e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x33, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, + 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x73, + 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, + 0x72, 0x61, 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, + 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, 0x1a, 0x1f, 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, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x63, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, + 0x6d, 0x70, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 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, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x73, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x22, 0xc8, 0x01, 0x0a, 0x13, 0x42, 0x6f, + 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, + 0x70, 0x12, 0x42, 0x0a, 0x09, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x76, 0x33, + 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x74, + 0x73, 0x74, 0x72, 0x61, 0x70, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 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, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x44, 0x75, 0x6d, 0x70, 0x22, 0xb7, 0x07, 0x0a, 0x11, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x55, 0x0a, 0x0e, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x73, 0x12, 0x65, 0x0a, 0x16, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x33, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x52, 0x14, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x67, 0x0a, 0x17, 0x64, 0x79, 0x6e, 0x61, + 0x6d, 0x69, 0x63, 0x5f, 0x77, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, + 0x61, 0x6d, 0x69, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x15, 0x64, 0x79, 0x6e, 0x61, + 0x6d, 0x69, 0x63, 0x57, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x73, 0x1a, 0xff, 0x02, 0x0a, 0x0d, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, + 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 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, 0x0b, 0x6c, 0x61, + 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 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, + 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x43, 0x0a, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x49, 0x0a, 0x0d, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x1a, 0xca, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, + 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 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, 0x0b, 0x6c, 0x61, 0x73, 0x74, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x18, 0x03, 0x20, 0x01, 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, 0x06, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, + 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x42, 0x78, + 0x0a, 0x1c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0f, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_admin_v3_config_dump_proto_rawDescOnce sync.Once + file_envoy_admin_v3_config_dump_proto_rawDescData = file_envoy_admin_v3_config_dump_proto_rawDesc +) + +func file_envoy_admin_v3_config_dump_proto_rawDescGZIP() []byte { + file_envoy_admin_v3_config_dump_proto_rawDescOnce.Do(func() { + file_envoy_admin_v3_config_dump_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_admin_v3_config_dump_proto_rawDescData) + }) + return file_envoy_admin_v3_config_dump_proto_rawDescData +} + +var file_envoy_admin_v3_config_dump_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_envoy_admin_v3_config_dump_proto_goTypes = []interface{}{ + (*ConfigDump)(nil), // 0: envoy.admin.v3.ConfigDump + (*BootstrapConfigDump)(nil), // 1: envoy.admin.v3.BootstrapConfigDump + (*SecretsConfigDump)(nil), // 2: envoy.admin.v3.SecretsConfigDump + (*SecretsConfigDump_DynamicSecret)(nil), // 3: envoy.admin.v3.SecretsConfigDump.DynamicSecret + (*SecretsConfigDump_StaticSecret)(nil), // 4: envoy.admin.v3.SecretsConfigDump.StaticSecret + (*anypb.Any)(nil), // 5: google.protobuf.Any + (*v3.Bootstrap)(nil), // 6: envoy.config.bootstrap.v3.Bootstrap + (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp + (*UpdateFailureState)(nil), // 8: envoy.admin.v3.UpdateFailureState + (ClientResourceStatus)(0), // 9: envoy.admin.v3.ClientResourceStatus +} +var file_envoy_admin_v3_config_dump_proto_depIdxs = []int32{ + 5, // 0: envoy.admin.v3.ConfigDump.configs:type_name -> google.protobuf.Any + 6, // 1: envoy.admin.v3.BootstrapConfigDump.bootstrap:type_name -> envoy.config.bootstrap.v3.Bootstrap + 7, // 2: envoy.admin.v3.BootstrapConfigDump.last_updated:type_name -> google.protobuf.Timestamp + 4, // 3: envoy.admin.v3.SecretsConfigDump.static_secrets:type_name -> envoy.admin.v3.SecretsConfigDump.StaticSecret + 3, // 4: envoy.admin.v3.SecretsConfigDump.dynamic_active_secrets:type_name -> envoy.admin.v3.SecretsConfigDump.DynamicSecret + 3, // 5: envoy.admin.v3.SecretsConfigDump.dynamic_warming_secrets:type_name -> envoy.admin.v3.SecretsConfigDump.DynamicSecret + 7, // 6: envoy.admin.v3.SecretsConfigDump.DynamicSecret.last_updated:type_name -> google.protobuf.Timestamp + 5, // 7: envoy.admin.v3.SecretsConfigDump.DynamicSecret.secret:type_name -> google.protobuf.Any + 8, // 8: envoy.admin.v3.SecretsConfigDump.DynamicSecret.error_state:type_name -> envoy.admin.v3.UpdateFailureState + 9, // 9: envoy.admin.v3.SecretsConfigDump.DynamicSecret.client_status:type_name -> envoy.admin.v3.ClientResourceStatus + 7, // 10: envoy.admin.v3.SecretsConfigDump.StaticSecret.last_updated:type_name -> google.protobuf.Timestamp + 5, // 11: envoy.admin.v3.SecretsConfigDump.StaticSecret.secret:type_name -> google.protobuf.Any + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_envoy_admin_v3_config_dump_proto_init() } +func file_envoy_admin_v3_config_dump_proto_init() { + if File_envoy_admin_v3_config_dump_proto != nil { + return + } + file_envoy_admin_v3_config_dump_shared_proto_init() + if !protoimpl.UnsafeEnabled { + file_envoy_admin_v3_config_dump_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConfigDump); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_config_dump_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootstrapConfigDump); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_config_dump_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecretsConfigDump); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_config_dump_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecretsConfigDump_DynamicSecret); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_config_dump_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecretsConfigDump_StaticSecret); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_admin_v3_config_dump_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_admin_v3_config_dump_proto_goTypes, + DependencyIndexes: file_envoy_admin_v3_config_dump_proto_depIdxs, + MessageInfos: file_envoy_admin_v3_config_dump_proto_msgTypes, + }.Build() + File_envoy_admin_v3_config_dump_proto = out.File + file_envoy_admin_v3_config_dump_proto_rawDesc = nil + file_envoy_admin_v3_config_dump_proto_goTypes = nil + file_envoy_admin_v3_config_dump_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/admin/v3/config_dump.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/config_dump.pb.validate.go new file mode 100644 index 0000000000000..c73ac14af55b6 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/config_dump.pb.validate.go @@ -0,0 +1,887 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/admin/v3/config_dump.proto + +package adminv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ConfigDump 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 *ConfigDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ConfigDump 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 ConfigDumpMultiError, or +// nil if none found. +func (m *ConfigDump) ValidateAll() error { + return m.validate(true) +} + +func (m *ConfigDump) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetConfigs() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigDumpValidationError{ + field: fmt.Sprintf("Configs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigDumpValidationError{ + field: fmt.Sprintf("Configs[%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 ConfigDumpValidationError{ + field: fmt.Sprintf("Configs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ConfigDumpMultiError(errors) + } + return nil +} + +// ConfigDumpMultiError is an error wrapping multiple validation errors +// returned by ConfigDump.ValidateAll() if the designated constraints aren't met. +type ConfigDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigDumpMultiError) AllErrors() []error { return m } + +// ConfigDumpValidationError is the validation error returned by +// ConfigDump.Validate if the designated constraints aren't met. +type ConfigDumpValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConfigDumpValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConfigDumpValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConfigDumpValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConfigDumpValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConfigDumpValidationError) ErrorName() string { return "ConfigDumpValidationError" } + +// Error satisfies the builtin error interface +func (e ConfigDumpValidationError) 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 %sConfigDump.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConfigDumpValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConfigDumpValidationError{} + +// Validate checks the field values on BootstrapConfigDump 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 *BootstrapConfigDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BootstrapConfigDump 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 +// BootstrapConfigDumpMultiError, or nil if none found. +func (m *BootstrapConfigDump) ValidateAll() error { + return m.validate(true) +} + +func (m *BootstrapConfigDump) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetBootstrap()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapConfigDumpValidationError{ + field: "Bootstrap", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapConfigDumpValidationError{ + field: "Bootstrap", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBootstrap()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BootstrapConfigDumpValidationError{ + field: "Bootstrap", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BootstrapConfigDumpValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BootstrapConfigDumpValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BootstrapConfigDumpValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return BootstrapConfigDumpMultiError(errors) + } + return nil +} + +// BootstrapConfigDumpMultiError is an error wrapping multiple validation +// errors returned by BootstrapConfigDump.ValidateAll() if the designated +// constraints aren't met. +type BootstrapConfigDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BootstrapConfigDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BootstrapConfigDumpMultiError) AllErrors() []error { return m } + +// BootstrapConfigDumpValidationError is the validation error returned by +// BootstrapConfigDump.Validate if the designated constraints aren't met. +type BootstrapConfigDumpValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BootstrapConfigDumpValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BootstrapConfigDumpValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BootstrapConfigDumpValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BootstrapConfigDumpValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BootstrapConfigDumpValidationError) ErrorName() string { + return "BootstrapConfigDumpValidationError" +} + +// Error satisfies the builtin error interface +func (e BootstrapConfigDumpValidationError) 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 %sBootstrapConfigDump.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BootstrapConfigDumpValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BootstrapConfigDumpValidationError{} + +// Validate checks the field values on SecretsConfigDump 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 *SecretsConfigDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SecretsConfigDump 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 +// SecretsConfigDumpMultiError, or nil if none found. +func (m *SecretsConfigDump) ValidateAll() error { + return m.validate(true) +} + +func (m *SecretsConfigDump) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetStaticSecrets() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretsConfigDumpValidationError{ + field: fmt.Sprintf("StaticSecrets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretsConfigDumpValidationError{ + field: fmt.Sprintf("StaticSecrets[%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 SecretsConfigDumpValidationError{ + field: fmt.Sprintf("StaticSecrets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetDynamicActiveSecrets() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretsConfigDumpValidationError{ + field: fmt.Sprintf("DynamicActiveSecrets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretsConfigDumpValidationError{ + field: fmt.Sprintf("DynamicActiveSecrets[%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 SecretsConfigDumpValidationError{ + field: fmt.Sprintf("DynamicActiveSecrets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetDynamicWarmingSecrets() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretsConfigDumpValidationError{ + field: fmt.Sprintf("DynamicWarmingSecrets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretsConfigDumpValidationError{ + field: fmt.Sprintf("DynamicWarmingSecrets[%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 SecretsConfigDumpValidationError{ + field: fmt.Sprintf("DynamicWarmingSecrets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return SecretsConfigDumpMultiError(errors) + } + return nil +} + +// SecretsConfigDumpMultiError is an error wrapping multiple validation errors +// returned by SecretsConfigDump.ValidateAll() if the designated constraints +// aren't met. +type SecretsConfigDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SecretsConfigDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SecretsConfigDumpMultiError) AllErrors() []error { return m } + +// SecretsConfigDumpValidationError is the validation error returned by +// SecretsConfigDump.Validate if the designated constraints aren't met. +type SecretsConfigDumpValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SecretsConfigDumpValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SecretsConfigDumpValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SecretsConfigDumpValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SecretsConfigDumpValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SecretsConfigDumpValidationError) ErrorName() string { + return "SecretsConfigDumpValidationError" +} + +// Error satisfies the builtin error interface +func (e SecretsConfigDumpValidationError) 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 %sSecretsConfigDump.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SecretsConfigDumpValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SecretsConfigDumpValidationError{} + +// Validate checks the field values on SecretsConfigDump_DynamicSecret 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 *SecretsConfigDump_DynamicSecret) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SecretsConfigDump_DynamicSecret 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 +// SecretsConfigDump_DynamicSecretMultiError, or nil if none found. +func (m *SecretsConfigDump_DynamicSecret) ValidateAll() error { + return m.validate(true) +} + +func (m *SecretsConfigDump_DynamicSecret) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + // no validation rules for VersionInfo + + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SecretsConfigDump_DynamicSecretValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetSecret()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{ + field: "Secret", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{ + field: "Secret", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSecret()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SecretsConfigDump_DynamicSecretValidationError{ + field: "Secret", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetErrorState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretsConfigDump_DynamicSecretValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SecretsConfigDump_DynamicSecretValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ClientStatus + + if len(errors) > 0 { + return SecretsConfigDump_DynamicSecretMultiError(errors) + } + return nil +} + +// SecretsConfigDump_DynamicSecretMultiError is an error wrapping multiple +// validation errors returned by SecretsConfigDump_DynamicSecret.ValidateAll() +// if the designated constraints aren't met. +type SecretsConfigDump_DynamicSecretMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SecretsConfigDump_DynamicSecretMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SecretsConfigDump_DynamicSecretMultiError) AllErrors() []error { return m } + +// SecretsConfigDump_DynamicSecretValidationError is the validation error +// returned by SecretsConfigDump_DynamicSecret.Validate if the designated +// constraints aren't met. +type SecretsConfigDump_DynamicSecretValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SecretsConfigDump_DynamicSecretValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SecretsConfigDump_DynamicSecretValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SecretsConfigDump_DynamicSecretValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SecretsConfigDump_DynamicSecretValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SecretsConfigDump_DynamicSecretValidationError) ErrorName() string { + return "SecretsConfigDump_DynamicSecretValidationError" +} + +// Error satisfies the builtin error interface +func (e SecretsConfigDump_DynamicSecretValidationError) 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 %sSecretsConfigDump_DynamicSecret.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SecretsConfigDump_DynamicSecretValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SecretsConfigDump_DynamicSecretValidationError{} + +// Validate checks the field values on SecretsConfigDump_StaticSecret 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 *SecretsConfigDump_StaticSecret) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SecretsConfigDump_StaticSecret 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 +// SecretsConfigDump_StaticSecretMultiError, or nil if none found. +func (m *SecretsConfigDump_StaticSecret) ValidateAll() error { + return m.validate(true) +} + +func (m *SecretsConfigDump_StaticSecret) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretsConfigDump_StaticSecretValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretsConfigDump_StaticSecretValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SecretsConfigDump_StaticSecretValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetSecret()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecretsConfigDump_StaticSecretValidationError{ + field: "Secret", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecretsConfigDump_StaticSecretValidationError{ + field: "Secret", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSecret()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SecretsConfigDump_StaticSecretValidationError{ + field: "Secret", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return SecretsConfigDump_StaticSecretMultiError(errors) + } + return nil +} + +// SecretsConfigDump_StaticSecretMultiError is an error wrapping multiple +// validation errors returned by SecretsConfigDump_StaticSecret.ValidateAll() +// if the designated constraints aren't met. +type SecretsConfigDump_StaticSecretMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SecretsConfigDump_StaticSecretMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SecretsConfigDump_StaticSecretMultiError) AllErrors() []error { return m } + +// SecretsConfigDump_StaticSecretValidationError is the validation error +// returned by SecretsConfigDump_StaticSecret.Validate if the designated +// constraints aren't met. +type SecretsConfigDump_StaticSecretValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SecretsConfigDump_StaticSecretValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SecretsConfigDump_StaticSecretValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SecretsConfigDump_StaticSecretValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SecretsConfigDump_StaticSecretValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SecretsConfigDump_StaticSecretValidationError) ErrorName() string { + return "SecretsConfigDump_StaticSecretValidationError" +} + +// Error satisfies the builtin error interface +func (e SecretsConfigDump_StaticSecretValidationError) 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 %sSecretsConfigDump_StaticSecret.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SecretsConfigDump_StaticSecretValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SecretsConfigDump_StaticSecretValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/admin/v3/config_dump_shared.pb.go b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/config_dump_shared.pb.go new file mode 100644 index 0000000000000..c7b52d185d2ce --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/config_dump_shared.pb.go @@ -0,0 +1,2038 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/admin/v3/config_dump_shared.proto + +package adminv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Resource status from the view of a xDS client, which tells the synchronization +// status between the xDS client and the xDS server. +type ClientResourceStatus int32 + +const ( + // Resource status is not available/unknown. + ClientResourceStatus_UNKNOWN ClientResourceStatus = 0 + // Client requested this resource but hasn't received any update from management + // server. The client will not fail requests, but will queue them until update + // arrives or the client times out waiting for the resource. + ClientResourceStatus_REQUESTED ClientResourceStatus = 1 + // This resource has been requested by the client but has either not been + // delivered by the server or was previously delivered by the server and then + // subsequently removed from resources provided by the server. For more + // information, please refer to the :ref:`"Knowing When a Requested Resource + // Does Not Exist" ` section. + ClientResourceStatus_DOES_NOT_EXIST ClientResourceStatus = 2 + // Client received this resource and replied with ACK. + ClientResourceStatus_ACKED ClientResourceStatus = 3 + // Client received this resource and replied with NACK. + ClientResourceStatus_NACKED ClientResourceStatus = 4 +) + +// Enum value maps for ClientResourceStatus. +var ( + ClientResourceStatus_name = map[int32]string{ + 0: "UNKNOWN", + 1: "REQUESTED", + 2: "DOES_NOT_EXIST", + 3: "ACKED", + 4: "NACKED", + } + ClientResourceStatus_value = map[string]int32{ + "UNKNOWN": 0, + "REQUESTED": 1, + "DOES_NOT_EXIST": 2, + "ACKED": 3, + "NACKED": 4, + } +) + +func (x ClientResourceStatus) Enum() *ClientResourceStatus { + p := new(ClientResourceStatus) + *p = x + return p +} + +func (x ClientResourceStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ClientResourceStatus) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_admin_v3_config_dump_shared_proto_enumTypes[0].Descriptor() +} + +func (ClientResourceStatus) Type() protoreflect.EnumType { + return &file_envoy_admin_v3_config_dump_shared_proto_enumTypes[0] +} + +func (x ClientResourceStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ClientResourceStatus.Descriptor instead. +func (ClientResourceStatus) EnumDescriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_shared_proto_rawDescGZIP(), []int{0} +} + +type UpdateFailureState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // What the component configuration would have been if the update had succeeded. + // This field may not be populated by xDS clients due to storage overhead. + FailedConfiguration *anypb.Any `protobuf:"bytes,1,opt,name=failed_configuration,json=failedConfiguration,proto3" json:"failed_configuration,omitempty"` + // Time of the latest failed update attempt. + LastUpdateAttempt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_update_attempt,json=lastUpdateAttempt,proto3" json:"last_update_attempt,omitempty"` + // Details about the last failed update attempt. + Details string `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"` + // This is the version of the rejected resource. + // [#not-implemented-hide:] + VersionInfo string `protobuf:"bytes,4,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` +} + +func (x *UpdateFailureState) Reset() { + *x = UpdateFailureState{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateFailureState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateFailureState) ProtoMessage() {} + +func (x *UpdateFailureState) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateFailureState.ProtoReflect.Descriptor instead. +func (*UpdateFailureState) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_shared_proto_rawDescGZIP(), []int{0} +} + +func (x *UpdateFailureState) GetFailedConfiguration() *anypb.Any { + if x != nil { + return x.FailedConfiguration + } + return nil +} + +func (x *UpdateFailureState) GetLastUpdateAttempt() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdateAttempt + } + return nil +} + +func (x *UpdateFailureState) GetDetails() string { + if x != nil { + return x.Details + } + return "" +} + +func (x *UpdateFailureState) GetVersionInfo() string { + if x != nil { + return x.VersionInfo + } + return "" +} + +// Envoy's listener manager fills this message with all currently known listeners. Listener +// configuration information can be used to recreate an Envoy configuration by populating all +// listeners as static listeners or by returning them in a LDS response. +type ListenersConfigDump struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This is the :ref:`version_info ` in the + // last processed LDS discovery response. If there are only static bootstrap listeners, this field + // will be "". + VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` + // The statically loaded listener configs. + StaticListeners []*ListenersConfigDump_StaticListener `protobuf:"bytes,2,rep,name=static_listeners,json=staticListeners,proto3" json:"static_listeners,omitempty"` + // State for any warming, active, or draining listeners. + DynamicListeners []*ListenersConfigDump_DynamicListener `protobuf:"bytes,3,rep,name=dynamic_listeners,json=dynamicListeners,proto3" json:"dynamic_listeners,omitempty"` +} + +func (x *ListenersConfigDump) Reset() { + *x = ListenersConfigDump{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListenersConfigDump) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListenersConfigDump) ProtoMessage() {} + +func (x *ListenersConfigDump) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListenersConfigDump.ProtoReflect.Descriptor instead. +func (*ListenersConfigDump) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_shared_proto_rawDescGZIP(), []int{1} +} + +func (x *ListenersConfigDump) GetVersionInfo() string { + if x != nil { + return x.VersionInfo + } + return "" +} + +func (x *ListenersConfigDump) GetStaticListeners() []*ListenersConfigDump_StaticListener { + if x != nil { + return x.StaticListeners + } + return nil +} + +func (x *ListenersConfigDump) GetDynamicListeners() []*ListenersConfigDump_DynamicListener { + if x != nil { + return x.DynamicListeners + } + return nil +} + +// Envoy's cluster manager fills this message with all currently known clusters. Cluster +// configuration information can be used to recreate an Envoy configuration by populating all +// clusters as static clusters or by returning them in a CDS response. +type ClustersConfigDump struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This is the :ref:`version_info ` in the + // last processed CDS discovery response. If there are only static bootstrap clusters, this field + // will be "". + VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` + // The statically loaded cluster configs. + StaticClusters []*ClustersConfigDump_StaticCluster `protobuf:"bytes,2,rep,name=static_clusters,json=staticClusters,proto3" json:"static_clusters,omitempty"` + // The dynamically loaded active clusters. These are clusters that are available to service + // data plane traffic. + DynamicActiveClusters []*ClustersConfigDump_DynamicCluster `protobuf:"bytes,3,rep,name=dynamic_active_clusters,json=dynamicActiveClusters,proto3" json:"dynamic_active_clusters,omitempty"` + // The dynamically loaded warming clusters. These are clusters that are currently undergoing + // warming in preparation to service data plane traffic. Note that if attempting to recreate an + // Envoy configuration from a configuration dump, the warming clusters should generally be + // discarded. + DynamicWarmingClusters []*ClustersConfigDump_DynamicCluster `protobuf:"bytes,4,rep,name=dynamic_warming_clusters,json=dynamicWarmingClusters,proto3" json:"dynamic_warming_clusters,omitempty"` +} + +func (x *ClustersConfigDump) Reset() { + *x = ClustersConfigDump{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClustersConfigDump) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClustersConfigDump) ProtoMessage() {} + +func (x *ClustersConfigDump) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClustersConfigDump.ProtoReflect.Descriptor instead. +func (*ClustersConfigDump) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_shared_proto_rawDescGZIP(), []int{2} +} + +func (x *ClustersConfigDump) GetVersionInfo() string { + if x != nil { + return x.VersionInfo + } + return "" +} + +func (x *ClustersConfigDump) GetStaticClusters() []*ClustersConfigDump_StaticCluster { + if x != nil { + return x.StaticClusters + } + return nil +} + +func (x *ClustersConfigDump) GetDynamicActiveClusters() []*ClustersConfigDump_DynamicCluster { + if x != nil { + return x.DynamicActiveClusters + } + return nil +} + +func (x *ClustersConfigDump) GetDynamicWarmingClusters() []*ClustersConfigDump_DynamicCluster { + if x != nil { + return x.DynamicWarmingClusters + } + return nil +} + +// Envoy's RDS implementation fills this message with all currently loaded routes, as described by +// their RouteConfiguration objects. Static routes that are either defined in the bootstrap configuration +// or defined inline while configuring listeners are separated from those configured dynamically via RDS. +// Route configuration information can be used to recreate an Envoy configuration by populating all routes +// as static routes or by returning them in RDS responses. +type RoutesConfigDump struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The statically loaded route configs. + StaticRouteConfigs []*RoutesConfigDump_StaticRouteConfig `protobuf:"bytes,2,rep,name=static_route_configs,json=staticRouteConfigs,proto3" json:"static_route_configs,omitempty"` + // The dynamically loaded route configs. + DynamicRouteConfigs []*RoutesConfigDump_DynamicRouteConfig `protobuf:"bytes,3,rep,name=dynamic_route_configs,json=dynamicRouteConfigs,proto3" json:"dynamic_route_configs,omitempty"` +} + +func (x *RoutesConfigDump) Reset() { + *x = RoutesConfigDump{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RoutesConfigDump) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RoutesConfigDump) ProtoMessage() {} + +func (x *RoutesConfigDump) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RoutesConfigDump.ProtoReflect.Descriptor instead. +func (*RoutesConfigDump) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_shared_proto_rawDescGZIP(), []int{3} +} + +func (x *RoutesConfigDump) GetStaticRouteConfigs() []*RoutesConfigDump_StaticRouteConfig { + if x != nil { + return x.StaticRouteConfigs + } + return nil +} + +func (x *RoutesConfigDump) GetDynamicRouteConfigs() []*RoutesConfigDump_DynamicRouteConfig { + if x != nil { + return x.DynamicRouteConfigs + } + return nil +} + +// Envoy's scoped RDS implementation fills this message with all currently loaded route +// configuration scopes (defined via ScopedRouteConfigurationsSet protos). This message lists both +// the scopes defined inline with the higher order object (i.e., the HttpConnectionManager) and the +// dynamically obtained scopes via the SRDS API. +type ScopedRoutesConfigDump struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The statically loaded scoped route configs. + InlineScopedRouteConfigs []*ScopedRoutesConfigDump_InlineScopedRouteConfigs `protobuf:"bytes,1,rep,name=inline_scoped_route_configs,json=inlineScopedRouteConfigs,proto3" json:"inline_scoped_route_configs,omitempty"` + // The dynamically loaded scoped route configs. + DynamicScopedRouteConfigs []*ScopedRoutesConfigDump_DynamicScopedRouteConfigs `protobuf:"bytes,2,rep,name=dynamic_scoped_route_configs,json=dynamicScopedRouteConfigs,proto3" json:"dynamic_scoped_route_configs,omitempty"` +} + +func (x *ScopedRoutesConfigDump) Reset() { + *x = ScopedRoutesConfigDump{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ScopedRoutesConfigDump) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScopedRoutesConfigDump) ProtoMessage() {} + +func (x *ScopedRoutesConfigDump) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ScopedRoutesConfigDump.ProtoReflect.Descriptor instead. +func (*ScopedRoutesConfigDump) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_shared_proto_rawDescGZIP(), []int{4} +} + +func (x *ScopedRoutesConfigDump) GetInlineScopedRouteConfigs() []*ScopedRoutesConfigDump_InlineScopedRouteConfigs { + if x != nil { + return x.InlineScopedRouteConfigs + } + return nil +} + +func (x *ScopedRoutesConfigDump) GetDynamicScopedRouteConfigs() []*ScopedRoutesConfigDump_DynamicScopedRouteConfigs { + if x != nil { + return x.DynamicScopedRouteConfigs + } + return nil +} + +// Envoy's admin fill this message with all currently known endpoints. Endpoint +// configuration information can be used to recreate an Envoy configuration by populating all +// endpoints as static endpoints or by returning them in an EDS response. +type EndpointsConfigDump struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The statically loaded endpoint configs. + StaticEndpointConfigs []*EndpointsConfigDump_StaticEndpointConfig `protobuf:"bytes,2,rep,name=static_endpoint_configs,json=staticEndpointConfigs,proto3" json:"static_endpoint_configs,omitempty"` + // The dynamically loaded endpoint configs. + DynamicEndpointConfigs []*EndpointsConfigDump_DynamicEndpointConfig `protobuf:"bytes,3,rep,name=dynamic_endpoint_configs,json=dynamicEndpointConfigs,proto3" json:"dynamic_endpoint_configs,omitempty"` +} + +func (x *EndpointsConfigDump) Reset() { + *x = EndpointsConfigDump{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EndpointsConfigDump) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EndpointsConfigDump) ProtoMessage() {} + +func (x *EndpointsConfigDump) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EndpointsConfigDump.ProtoReflect.Descriptor instead. +func (*EndpointsConfigDump) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_shared_proto_rawDescGZIP(), []int{5} +} + +func (x *EndpointsConfigDump) GetStaticEndpointConfigs() []*EndpointsConfigDump_StaticEndpointConfig { + if x != nil { + return x.StaticEndpointConfigs + } + return nil +} + +func (x *EndpointsConfigDump) GetDynamicEndpointConfigs() []*EndpointsConfigDump_DynamicEndpointConfig { + if x != nil { + return x.DynamicEndpointConfigs + } + return nil +} + +// Describes a statically loaded listener. +type ListenersConfigDump_StaticListener struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The listener config. + Listener *anypb.Any `protobuf:"bytes,1,opt,name=listener,proto3" json:"listener,omitempty"` + // The timestamp when the Listener was last successfully updated. + LastUpdated *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` +} + +func (x *ListenersConfigDump_StaticListener) Reset() { + *x = ListenersConfigDump_StaticListener{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListenersConfigDump_StaticListener) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListenersConfigDump_StaticListener) ProtoMessage() {} + +func (x *ListenersConfigDump_StaticListener) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListenersConfigDump_StaticListener.ProtoReflect.Descriptor instead. +func (*ListenersConfigDump_StaticListener) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_shared_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *ListenersConfigDump_StaticListener) GetListener() *anypb.Any { + if x != nil { + return x.Listener + } + return nil +} + +func (x *ListenersConfigDump_StaticListener) GetLastUpdated() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdated + } + return nil +} + +type ListenersConfigDump_DynamicListenerState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This is the per-resource version information. This version is currently taken from the + // :ref:`version_info ` field at the time + // that the listener was loaded. In the future, discrete per-listener versions may be supported + // by the API. + VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` + // The listener config. + Listener *anypb.Any `protobuf:"bytes,2,opt,name=listener,proto3" json:"listener,omitempty"` + // The timestamp when the Listener was last successfully updated. + LastUpdated *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` +} + +func (x *ListenersConfigDump_DynamicListenerState) Reset() { + *x = ListenersConfigDump_DynamicListenerState{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListenersConfigDump_DynamicListenerState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListenersConfigDump_DynamicListenerState) ProtoMessage() {} + +func (x *ListenersConfigDump_DynamicListenerState) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListenersConfigDump_DynamicListenerState.ProtoReflect.Descriptor instead. +func (*ListenersConfigDump_DynamicListenerState) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_shared_proto_rawDescGZIP(), []int{1, 1} +} + +func (x *ListenersConfigDump_DynamicListenerState) GetVersionInfo() string { + if x != nil { + return x.VersionInfo + } + return "" +} + +func (x *ListenersConfigDump_DynamicListenerState) GetListener() *anypb.Any { + if x != nil { + return x.Listener + } + return nil +} + +func (x *ListenersConfigDump_DynamicListenerState) GetLastUpdated() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdated + } + return nil +} + +// Describes a dynamically loaded listener via the LDS API. +// [#next-free-field: 7] +type ListenersConfigDump_DynamicListener struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name or unique id of this listener, pulled from the DynamicListenerState config. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The listener state for any active listener by this name. + // These are listeners that are available to service data plane traffic. + ActiveState *ListenersConfigDump_DynamicListenerState `protobuf:"bytes,2,opt,name=active_state,json=activeState,proto3" json:"active_state,omitempty"` + // The listener state for any warming listener by this name. + // These are listeners that are currently undergoing warming in preparation to service data + // plane traffic. Note that if attempting to recreate an Envoy configuration from a + // configuration dump, the warming listeners should generally be discarded. + WarmingState *ListenersConfigDump_DynamicListenerState `protobuf:"bytes,3,opt,name=warming_state,json=warmingState,proto3" json:"warming_state,omitempty"` + // The listener state for any draining listener by this name. + // These are listeners that are currently undergoing draining in preparation to stop servicing + // data plane traffic. Note that if attempting to recreate an Envoy configuration from a + // configuration dump, the draining listeners should generally be discarded. + DrainingState *ListenersConfigDump_DynamicListenerState `protobuf:"bytes,4,opt,name=draining_state,json=drainingState,proto3" json:"draining_state,omitempty"` + // Set if the last update failed, cleared after the next successful update. + // The “error_state“ field contains the rejected version of this particular + // resource along with the reason and timestamp. For successfully updated or + // acknowledged resource, this field should be empty. + ErrorState *UpdateFailureState `protobuf:"bytes,5,opt,name=error_state,json=errorState,proto3" json:"error_state,omitempty"` + // The client status of this resource. + // [#not-implemented-hide:] + ClientStatus ClientResourceStatus `protobuf:"varint,6,opt,name=client_status,json=clientStatus,proto3,enum=envoy.admin.v3.ClientResourceStatus" json:"client_status,omitempty"` +} + +func (x *ListenersConfigDump_DynamicListener) Reset() { + *x = ListenersConfigDump_DynamicListener{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListenersConfigDump_DynamicListener) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListenersConfigDump_DynamicListener) ProtoMessage() {} + +func (x *ListenersConfigDump_DynamicListener) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListenersConfigDump_DynamicListener.ProtoReflect.Descriptor instead. +func (*ListenersConfigDump_DynamicListener) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_shared_proto_rawDescGZIP(), []int{1, 2} +} + +func (x *ListenersConfigDump_DynamicListener) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ListenersConfigDump_DynamicListener) GetActiveState() *ListenersConfigDump_DynamicListenerState { + if x != nil { + return x.ActiveState + } + return nil +} + +func (x *ListenersConfigDump_DynamicListener) GetWarmingState() *ListenersConfigDump_DynamicListenerState { + if x != nil { + return x.WarmingState + } + return nil +} + +func (x *ListenersConfigDump_DynamicListener) GetDrainingState() *ListenersConfigDump_DynamicListenerState { + if x != nil { + return x.DrainingState + } + return nil +} + +func (x *ListenersConfigDump_DynamicListener) GetErrorState() *UpdateFailureState { + if x != nil { + return x.ErrorState + } + return nil +} + +func (x *ListenersConfigDump_DynamicListener) GetClientStatus() ClientResourceStatus { + if x != nil { + return x.ClientStatus + } + return ClientResourceStatus_UNKNOWN +} + +// Describes a statically loaded cluster. +type ClustersConfigDump_StaticCluster struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The cluster config. + Cluster *anypb.Any `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` + // The timestamp when the Cluster was last updated. + LastUpdated *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` +} + +func (x *ClustersConfigDump_StaticCluster) Reset() { + *x = ClustersConfigDump_StaticCluster{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClustersConfigDump_StaticCluster) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClustersConfigDump_StaticCluster) ProtoMessage() {} + +func (x *ClustersConfigDump_StaticCluster) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClustersConfigDump_StaticCluster.ProtoReflect.Descriptor instead. +func (*ClustersConfigDump_StaticCluster) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_shared_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *ClustersConfigDump_StaticCluster) GetCluster() *anypb.Any { + if x != nil { + return x.Cluster + } + return nil +} + +func (x *ClustersConfigDump_StaticCluster) GetLastUpdated() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdated + } + return nil +} + +// Describes a dynamically loaded cluster via the CDS API. +// [#next-free-field: 6] +type ClustersConfigDump_DynamicCluster struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This is the per-resource version information. This version is currently taken from the + // :ref:`version_info ` field at the time + // that the cluster was loaded. In the future, discrete per-cluster versions may be supported by + // the API. + VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` + // The cluster config. + Cluster *anypb.Any `protobuf:"bytes,2,opt,name=cluster,proto3" json:"cluster,omitempty"` + // The timestamp when the Cluster was last updated. + LastUpdated *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` + // Set if the last update failed, cleared after the next successful update. + // The “error_state“ field contains the rejected version of this particular + // resource along with the reason and timestamp. For successfully updated or + // acknowledged resource, this field should be empty. + // [#not-implemented-hide:] + ErrorState *UpdateFailureState `protobuf:"bytes,4,opt,name=error_state,json=errorState,proto3" json:"error_state,omitempty"` + // The client status of this resource. + // [#not-implemented-hide:] + ClientStatus ClientResourceStatus `protobuf:"varint,5,opt,name=client_status,json=clientStatus,proto3,enum=envoy.admin.v3.ClientResourceStatus" json:"client_status,omitempty"` +} + +func (x *ClustersConfigDump_DynamicCluster) Reset() { + *x = ClustersConfigDump_DynamicCluster{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClustersConfigDump_DynamicCluster) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClustersConfigDump_DynamicCluster) ProtoMessage() {} + +func (x *ClustersConfigDump_DynamicCluster) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClustersConfigDump_DynamicCluster.ProtoReflect.Descriptor instead. +func (*ClustersConfigDump_DynamicCluster) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_shared_proto_rawDescGZIP(), []int{2, 1} +} + +func (x *ClustersConfigDump_DynamicCluster) GetVersionInfo() string { + if x != nil { + return x.VersionInfo + } + return "" +} + +func (x *ClustersConfigDump_DynamicCluster) GetCluster() *anypb.Any { + if x != nil { + return x.Cluster + } + return nil +} + +func (x *ClustersConfigDump_DynamicCluster) GetLastUpdated() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdated + } + return nil +} + +func (x *ClustersConfigDump_DynamicCluster) GetErrorState() *UpdateFailureState { + if x != nil { + return x.ErrorState + } + return nil +} + +func (x *ClustersConfigDump_DynamicCluster) GetClientStatus() ClientResourceStatus { + if x != nil { + return x.ClientStatus + } + return ClientResourceStatus_UNKNOWN +} + +type RoutesConfigDump_StaticRouteConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The route config. + RouteConfig *anypb.Any `protobuf:"bytes,1,opt,name=route_config,json=routeConfig,proto3" json:"route_config,omitempty"` + // The timestamp when the Route was last updated. + LastUpdated *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` +} + +func (x *RoutesConfigDump_StaticRouteConfig) Reset() { + *x = RoutesConfigDump_StaticRouteConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RoutesConfigDump_StaticRouteConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RoutesConfigDump_StaticRouteConfig) ProtoMessage() {} + +func (x *RoutesConfigDump_StaticRouteConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RoutesConfigDump_StaticRouteConfig.ProtoReflect.Descriptor instead. +func (*RoutesConfigDump_StaticRouteConfig) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_shared_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *RoutesConfigDump_StaticRouteConfig) GetRouteConfig() *anypb.Any { + if x != nil { + return x.RouteConfig + } + return nil +} + +func (x *RoutesConfigDump_StaticRouteConfig) GetLastUpdated() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdated + } + return nil +} + +// [#next-free-field: 6] +type RoutesConfigDump_DynamicRouteConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This is the per-resource version information. This version is currently taken from the + // :ref:`version_info ` field at the time that + // the route configuration was loaded. + VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` + // The route config. + RouteConfig *anypb.Any `protobuf:"bytes,2,opt,name=route_config,json=routeConfig,proto3" json:"route_config,omitempty"` + // The timestamp when the Route was last updated. + LastUpdated *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` + // Set if the last update failed, cleared after the next successful update. + // The “error_state“ field contains the rejected version of this particular + // resource along with the reason and timestamp. For successfully updated or + // acknowledged resource, this field should be empty. + // [#not-implemented-hide:] + ErrorState *UpdateFailureState `protobuf:"bytes,4,opt,name=error_state,json=errorState,proto3" json:"error_state,omitempty"` + // The client status of this resource. + // [#not-implemented-hide:] + ClientStatus ClientResourceStatus `protobuf:"varint,5,opt,name=client_status,json=clientStatus,proto3,enum=envoy.admin.v3.ClientResourceStatus" json:"client_status,omitempty"` +} + +func (x *RoutesConfigDump_DynamicRouteConfig) Reset() { + *x = RoutesConfigDump_DynamicRouteConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RoutesConfigDump_DynamicRouteConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RoutesConfigDump_DynamicRouteConfig) ProtoMessage() {} + +func (x *RoutesConfigDump_DynamicRouteConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RoutesConfigDump_DynamicRouteConfig.ProtoReflect.Descriptor instead. +func (*RoutesConfigDump_DynamicRouteConfig) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_shared_proto_rawDescGZIP(), []int{3, 1} +} + +func (x *RoutesConfigDump_DynamicRouteConfig) GetVersionInfo() string { + if x != nil { + return x.VersionInfo + } + return "" +} + +func (x *RoutesConfigDump_DynamicRouteConfig) GetRouteConfig() *anypb.Any { + if x != nil { + return x.RouteConfig + } + return nil +} + +func (x *RoutesConfigDump_DynamicRouteConfig) GetLastUpdated() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdated + } + return nil +} + +func (x *RoutesConfigDump_DynamicRouteConfig) GetErrorState() *UpdateFailureState { + if x != nil { + return x.ErrorState + } + return nil +} + +func (x *RoutesConfigDump_DynamicRouteConfig) GetClientStatus() ClientResourceStatus { + if x != nil { + return x.ClientStatus + } + return ClientResourceStatus_UNKNOWN +} + +type ScopedRoutesConfigDump_InlineScopedRouteConfigs struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name assigned to the scoped route configurations. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The scoped route configurations. + ScopedRouteConfigs []*anypb.Any `protobuf:"bytes,2,rep,name=scoped_route_configs,json=scopedRouteConfigs,proto3" json:"scoped_route_configs,omitempty"` + // The timestamp when the scoped route config set was last updated. + LastUpdated *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` +} + +func (x *ScopedRoutesConfigDump_InlineScopedRouteConfigs) Reset() { + *x = ScopedRoutesConfigDump_InlineScopedRouteConfigs{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ScopedRoutesConfigDump_InlineScopedRouteConfigs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScopedRoutesConfigDump_InlineScopedRouteConfigs) ProtoMessage() {} + +func (x *ScopedRoutesConfigDump_InlineScopedRouteConfigs) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ScopedRoutesConfigDump_InlineScopedRouteConfigs.ProtoReflect.Descriptor instead. +func (*ScopedRoutesConfigDump_InlineScopedRouteConfigs) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_shared_proto_rawDescGZIP(), []int{4, 0} +} + +func (x *ScopedRoutesConfigDump_InlineScopedRouteConfigs) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ScopedRoutesConfigDump_InlineScopedRouteConfigs) GetScopedRouteConfigs() []*anypb.Any { + if x != nil { + return x.ScopedRouteConfigs + } + return nil +} + +func (x *ScopedRoutesConfigDump_InlineScopedRouteConfigs) GetLastUpdated() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdated + } + return nil +} + +// [#next-free-field: 7] +type ScopedRoutesConfigDump_DynamicScopedRouteConfigs struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name assigned to the scoped route configurations. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // This is the per-resource version information. This version is currently taken from the + // :ref:`version_info ` field at the time that + // the scoped routes configuration was loaded. + VersionInfo string `protobuf:"bytes,2,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` + // The scoped route configurations. + ScopedRouteConfigs []*anypb.Any `protobuf:"bytes,3,rep,name=scoped_route_configs,json=scopedRouteConfigs,proto3" json:"scoped_route_configs,omitempty"` + // The timestamp when the scoped route config set was last updated. + LastUpdated *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` + // Set if the last update failed, cleared after the next successful update. + // The “error_state“ field contains the rejected version of this particular + // resource along with the reason and timestamp. For successfully updated or + // acknowledged resource, this field should be empty. + // [#not-implemented-hide:] + ErrorState *UpdateFailureState `protobuf:"bytes,5,opt,name=error_state,json=errorState,proto3" json:"error_state,omitempty"` + // The client status of this resource. + // [#not-implemented-hide:] + ClientStatus ClientResourceStatus `protobuf:"varint,6,opt,name=client_status,json=clientStatus,proto3,enum=envoy.admin.v3.ClientResourceStatus" json:"client_status,omitempty"` +} + +func (x *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) Reset() { + *x = ScopedRoutesConfigDump_DynamicScopedRouteConfigs{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScopedRoutesConfigDump_DynamicScopedRouteConfigs) ProtoMessage() {} + +func (x *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ScopedRoutesConfigDump_DynamicScopedRouteConfigs.ProtoReflect.Descriptor instead. +func (*ScopedRoutesConfigDump_DynamicScopedRouteConfigs) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_shared_proto_rawDescGZIP(), []int{4, 1} +} + +func (x *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) GetVersionInfo() string { + if x != nil { + return x.VersionInfo + } + return "" +} + +func (x *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) GetScopedRouteConfigs() []*anypb.Any { + if x != nil { + return x.ScopedRouteConfigs + } + return nil +} + +func (x *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) GetLastUpdated() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdated + } + return nil +} + +func (x *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) GetErrorState() *UpdateFailureState { + if x != nil { + return x.ErrorState + } + return nil +} + +func (x *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) GetClientStatus() ClientResourceStatus { + if x != nil { + return x.ClientStatus + } + return ClientResourceStatus_UNKNOWN +} + +type EndpointsConfigDump_StaticEndpointConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The endpoint config. + EndpointConfig *anypb.Any `protobuf:"bytes,1,opt,name=endpoint_config,json=endpointConfig,proto3" json:"endpoint_config,omitempty"` + // [#not-implemented-hide:] The timestamp when the Endpoint was last updated. + LastUpdated *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` +} + +func (x *EndpointsConfigDump_StaticEndpointConfig) Reset() { + *x = EndpointsConfigDump_StaticEndpointConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EndpointsConfigDump_StaticEndpointConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EndpointsConfigDump_StaticEndpointConfig) ProtoMessage() {} + +func (x *EndpointsConfigDump_StaticEndpointConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EndpointsConfigDump_StaticEndpointConfig.ProtoReflect.Descriptor instead. +func (*EndpointsConfigDump_StaticEndpointConfig) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_shared_proto_rawDescGZIP(), []int{5, 0} +} + +func (x *EndpointsConfigDump_StaticEndpointConfig) GetEndpointConfig() *anypb.Any { + if x != nil { + return x.EndpointConfig + } + return nil +} + +func (x *EndpointsConfigDump_StaticEndpointConfig) GetLastUpdated() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdated + } + return nil +} + +// [#next-free-field: 6] +type EndpointsConfigDump_DynamicEndpointConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // [#not-implemented-hide:] This is the per-resource version information. This version is currently taken from the + // :ref:`version_info ` field at the time that + // the endpoint configuration was loaded. + VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` + // The endpoint config. + EndpointConfig *anypb.Any `protobuf:"bytes,2,opt,name=endpoint_config,json=endpointConfig,proto3" json:"endpoint_config,omitempty"` + // [#not-implemented-hide:] The timestamp when the Endpoint was last updated. + LastUpdated *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` + // Set if the last update failed, cleared after the next successful update. + // The “error_state“ field contains the rejected version of this particular + // resource along with the reason and timestamp. For successfully updated or + // acknowledged resource, this field should be empty. + // [#not-implemented-hide:] + ErrorState *UpdateFailureState `protobuf:"bytes,4,opt,name=error_state,json=errorState,proto3" json:"error_state,omitempty"` + // The client status of this resource. + // [#not-implemented-hide:] + ClientStatus ClientResourceStatus `protobuf:"varint,5,opt,name=client_status,json=clientStatus,proto3,enum=envoy.admin.v3.ClientResourceStatus" json:"client_status,omitempty"` +} + +func (x *EndpointsConfigDump_DynamicEndpointConfig) Reset() { + *x = EndpointsConfigDump_DynamicEndpointConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EndpointsConfigDump_DynamicEndpointConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EndpointsConfigDump_DynamicEndpointConfig) ProtoMessage() {} + +func (x *EndpointsConfigDump_DynamicEndpointConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_config_dump_shared_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EndpointsConfigDump_DynamicEndpointConfig.ProtoReflect.Descriptor instead. +func (*EndpointsConfigDump_DynamicEndpointConfig) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_config_dump_shared_proto_rawDescGZIP(), []int{5, 1} +} + +func (x *EndpointsConfigDump_DynamicEndpointConfig) GetVersionInfo() string { + if x != nil { + return x.VersionInfo + } + return "" +} + +func (x *EndpointsConfigDump_DynamicEndpointConfig) GetEndpointConfig() *anypb.Any { + if x != nil { + return x.EndpointConfig + } + return nil +} + +func (x *EndpointsConfigDump_DynamicEndpointConfig) GetLastUpdated() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdated + } + return nil +} + +func (x *EndpointsConfigDump_DynamicEndpointConfig) GetErrorState() *UpdateFailureState { + if x != nil { + return x.ErrorState + } + return nil +} + +func (x *EndpointsConfigDump_DynamicEndpointConfig) GetClientStatus() ClientResourceStatus { + if x != nil { + return x.ClientStatus + } + return ClientResourceStatus_UNKNOWN +} + +var File_envoy_admin_v3_config_dump_shared_proto protoreflect.FileDescriptor + +var file_envoy_admin_v3_config_dump_shared_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x73, 0x68, 0x61, + 0x72, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 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, 0x1a, 0x1f, 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, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, + 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x02, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x47, + 0x0a, 0x14, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 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, 0x13, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x5f, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 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, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x65, + 0x6d, 0x70, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x21, 0x0a, + 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, + 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, + 0xf3, 0x09, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5d, 0x0a, 0x10, 0x73, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x60, 0x0a, 0x11, 0x64, 0x79, 0x6e, + 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, + 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, 0x10, 0x64, 0x79, 0x6e, 0x61, 0x6d, + 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x1a, 0xc0, 0x01, 0x0a, 0x0e, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x30, + 0x0a, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 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, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, + 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 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, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x3a, + 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x1a, 0xef, + 0x01, 0x0a, 0x14, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30, 0x0a, 0x08, 0x6c, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 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, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x0c, + 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 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, 0x0b, + 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x43, 0x9a, 0xc5, 0x88, + 0x1e, 0x3e, 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, + 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, + 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x1a, 0x92, 0x04, 0x0a, 0x0f, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x5b, 0x0a, 0x0c, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, + 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x5d, 0x0a, 0x0d, 0x77, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, + 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x77, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x5f, 0x0a, 0x0e, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, + 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x43, 0x0a, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x49, 0x0a, 0x0d, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x3e, 0x9a, 0xc5, 0x88, 0x1e, 0x39, 0x0a, 0x37, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x44, 0x75, 0x6d, 0x70, 0x22, 0xca, 0x07, 0x0a, 0x12, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x21, 0x0a, 0x0c, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x59, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x69, 0x0a, 0x17, 0x64, 0x79, + 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, + 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x15, + 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x6b, 0x0a, 0x18, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, + 0x5f, 0x77, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, + 0x6d, 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x16, 0x64, 0x79, 0x6e, 0x61, + 0x6d, 0x69, 0x63, 0x57, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x73, 0x1a, 0xbb, 0x01, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 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, 0x07, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 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, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, + 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x1a, 0xf0, 0x02, 0x0a, 0x0e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 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, 0x07, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 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, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x43, 0x0a, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x49, 0x0a, 0x0d, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, + 0x6d, 0x70, 0x22, 0xdd, 0x06, 0x0a, 0x10, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x64, 0x0a, 0x14, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x63, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x12, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x67, 0x0a, + 0x15, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, + 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x13, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0xca, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a, 0x0c, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, + 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, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 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, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, + 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x1a, 0xff, 0x02, 0x0a, 0x12, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x37, 0x0a, + 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, + 0x01, 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, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 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, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x43, 0x0a, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x49, 0x0a, 0x0d, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x3e, 0x9a, 0xc5, 0x88, 0x1e, 0x39, 0x0a, 0x37, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, + 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, + 0x6d, 0x70, 0x22, 0x8c, 0x08, 0x0a, 0x16, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x7e, 0x0a, + 0x1b, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x49, 0x6e, 0x6c, 0x69, 0x6e, + 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x73, 0x52, 0x18, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, + 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x81, 0x01, + 0x0a, 0x1c, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, + 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, + 0x61, 0x6d, 0x69, 0x63, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x52, 0x19, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x53, + 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x73, 0x1a, 0x81, 0x02, 0x0a, 0x18, 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x63, 0x6f, 0x70, + 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x14, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 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, 0x12, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, + 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 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, 0x0b, 0x6c, 0x61, + 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x4a, 0x9a, 0xc5, 0x88, 0x1e, 0x45, + 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x49, 0x6e, 0x6c, + 0x69, 0x6e, 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0xb6, 0x03, 0x0a, 0x19, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, + 0x63, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x46, 0x0a, 0x14, 0x73, 0x63, + 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 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, 0x12, + 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x18, 0x04, 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, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x43, 0x0a, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x61, + 0x69, 0x6c, 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x49, 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x3a, 0x4b, 0x9a, 0xc5, 0x88, 0x1e, 0x46, 0x0a, 0x44, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x63, + 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x44, 0x75, 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x53, 0x63, 0x6f, 0x70, + 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x3a, 0x31, + 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, + 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, + 0x70, 0x22, 0xde, 0x05, 0x0a, 0x13, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x70, 0x0a, 0x17, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x63, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x15, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x73, 0x0a, 0x18, 0x64, + 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, + 0x6d, 0x70, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x16, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, + 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, + 0x1a, 0x94, 0x01, 0x0a, 0x14, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0f, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, + 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, 0x0e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, + 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 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, 0x0b, 0x6c, 0x61, 0x73, 0x74, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x1a, 0xc8, 0x02, 0x0a, 0x15, 0x44, 0x79, 0x6e, 0x61, + 0x6d, 0x69, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, + 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 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, 0x0e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x18, 0x03, 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, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x12, 0x43, 0x0a, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, + 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x49, 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2a, 0x5d, 0x0a, 0x14, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x51, 0x55, 0x45, + 0x53, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x4f, 0x45, 0x53, 0x5f, 0x4e, + 0x4f, 0x54, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x43, + 0x4b, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, + 0x04, 0x42, 0x7e, 0x0a, 0x1c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x33, 0x42, 0x15, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x53, 0x68, 0x61, + 0x72, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, + 0x33, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_admin_v3_config_dump_shared_proto_rawDescOnce sync.Once + file_envoy_admin_v3_config_dump_shared_proto_rawDescData = file_envoy_admin_v3_config_dump_shared_proto_rawDesc +) + +func file_envoy_admin_v3_config_dump_shared_proto_rawDescGZIP() []byte { + file_envoy_admin_v3_config_dump_shared_proto_rawDescOnce.Do(func() { + file_envoy_admin_v3_config_dump_shared_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_admin_v3_config_dump_shared_proto_rawDescData) + }) + return file_envoy_admin_v3_config_dump_shared_proto_rawDescData +} + +var file_envoy_admin_v3_config_dump_shared_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_admin_v3_config_dump_shared_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_envoy_admin_v3_config_dump_shared_proto_goTypes = []interface{}{ + (ClientResourceStatus)(0), // 0: envoy.admin.v3.ClientResourceStatus + (*UpdateFailureState)(nil), // 1: envoy.admin.v3.UpdateFailureState + (*ListenersConfigDump)(nil), // 2: envoy.admin.v3.ListenersConfigDump + (*ClustersConfigDump)(nil), // 3: envoy.admin.v3.ClustersConfigDump + (*RoutesConfigDump)(nil), // 4: envoy.admin.v3.RoutesConfigDump + (*ScopedRoutesConfigDump)(nil), // 5: envoy.admin.v3.ScopedRoutesConfigDump + (*EndpointsConfigDump)(nil), // 6: envoy.admin.v3.EndpointsConfigDump + (*ListenersConfigDump_StaticListener)(nil), // 7: envoy.admin.v3.ListenersConfigDump.StaticListener + (*ListenersConfigDump_DynamicListenerState)(nil), // 8: envoy.admin.v3.ListenersConfigDump.DynamicListenerState + (*ListenersConfigDump_DynamicListener)(nil), // 9: envoy.admin.v3.ListenersConfigDump.DynamicListener + (*ClustersConfigDump_StaticCluster)(nil), // 10: envoy.admin.v3.ClustersConfigDump.StaticCluster + (*ClustersConfigDump_DynamicCluster)(nil), // 11: envoy.admin.v3.ClustersConfigDump.DynamicCluster + (*RoutesConfigDump_StaticRouteConfig)(nil), // 12: envoy.admin.v3.RoutesConfigDump.StaticRouteConfig + (*RoutesConfigDump_DynamicRouteConfig)(nil), // 13: envoy.admin.v3.RoutesConfigDump.DynamicRouteConfig + (*ScopedRoutesConfigDump_InlineScopedRouteConfigs)(nil), // 14: envoy.admin.v3.ScopedRoutesConfigDump.InlineScopedRouteConfigs + (*ScopedRoutesConfigDump_DynamicScopedRouteConfigs)(nil), // 15: envoy.admin.v3.ScopedRoutesConfigDump.DynamicScopedRouteConfigs + (*EndpointsConfigDump_StaticEndpointConfig)(nil), // 16: envoy.admin.v3.EndpointsConfigDump.StaticEndpointConfig + (*EndpointsConfigDump_DynamicEndpointConfig)(nil), // 17: envoy.admin.v3.EndpointsConfigDump.DynamicEndpointConfig + (*anypb.Any)(nil), // 18: google.protobuf.Any + (*timestamppb.Timestamp)(nil), // 19: google.protobuf.Timestamp +} +var file_envoy_admin_v3_config_dump_shared_proto_depIdxs = []int32{ + 18, // 0: envoy.admin.v3.UpdateFailureState.failed_configuration:type_name -> google.protobuf.Any + 19, // 1: envoy.admin.v3.UpdateFailureState.last_update_attempt:type_name -> google.protobuf.Timestamp + 7, // 2: envoy.admin.v3.ListenersConfigDump.static_listeners:type_name -> envoy.admin.v3.ListenersConfigDump.StaticListener + 9, // 3: envoy.admin.v3.ListenersConfigDump.dynamic_listeners:type_name -> envoy.admin.v3.ListenersConfigDump.DynamicListener + 10, // 4: envoy.admin.v3.ClustersConfigDump.static_clusters:type_name -> envoy.admin.v3.ClustersConfigDump.StaticCluster + 11, // 5: envoy.admin.v3.ClustersConfigDump.dynamic_active_clusters:type_name -> envoy.admin.v3.ClustersConfigDump.DynamicCluster + 11, // 6: envoy.admin.v3.ClustersConfigDump.dynamic_warming_clusters:type_name -> envoy.admin.v3.ClustersConfigDump.DynamicCluster + 12, // 7: envoy.admin.v3.RoutesConfigDump.static_route_configs:type_name -> envoy.admin.v3.RoutesConfigDump.StaticRouteConfig + 13, // 8: envoy.admin.v3.RoutesConfigDump.dynamic_route_configs:type_name -> envoy.admin.v3.RoutesConfigDump.DynamicRouteConfig + 14, // 9: envoy.admin.v3.ScopedRoutesConfigDump.inline_scoped_route_configs:type_name -> envoy.admin.v3.ScopedRoutesConfigDump.InlineScopedRouteConfigs + 15, // 10: envoy.admin.v3.ScopedRoutesConfigDump.dynamic_scoped_route_configs:type_name -> envoy.admin.v3.ScopedRoutesConfigDump.DynamicScopedRouteConfigs + 16, // 11: envoy.admin.v3.EndpointsConfigDump.static_endpoint_configs:type_name -> envoy.admin.v3.EndpointsConfigDump.StaticEndpointConfig + 17, // 12: envoy.admin.v3.EndpointsConfigDump.dynamic_endpoint_configs:type_name -> envoy.admin.v3.EndpointsConfigDump.DynamicEndpointConfig + 18, // 13: envoy.admin.v3.ListenersConfigDump.StaticListener.listener:type_name -> google.protobuf.Any + 19, // 14: envoy.admin.v3.ListenersConfigDump.StaticListener.last_updated:type_name -> google.protobuf.Timestamp + 18, // 15: envoy.admin.v3.ListenersConfigDump.DynamicListenerState.listener:type_name -> google.protobuf.Any + 19, // 16: envoy.admin.v3.ListenersConfigDump.DynamicListenerState.last_updated:type_name -> google.protobuf.Timestamp + 8, // 17: envoy.admin.v3.ListenersConfigDump.DynamicListener.active_state:type_name -> envoy.admin.v3.ListenersConfigDump.DynamicListenerState + 8, // 18: envoy.admin.v3.ListenersConfigDump.DynamicListener.warming_state:type_name -> envoy.admin.v3.ListenersConfigDump.DynamicListenerState + 8, // 19: envoy.admin.v3.ListenersConfigDump.DynamicListener.draining_state:type_name -> envoy.admin.v3.ListenersConfigDump.DynamicListenerState + 1, // 20: envoy.admin.v3.ListenersConfigDump.DynamicListener.error_state:type_name -> envoy.admin.v3.UpdateFailureState + 0, // 21: envoy.admin.v3.ListenersConfigDump.DynamicListener.client_status:type_name -> envoy.admin.v3.ClientResourceStatus + 18, // 22: envoy.admin.v3.ClustersConfigDump.StaticCluster.cluster:type_name -> google.protobuf.Any + 19, // 23: envoy.admin.v3.ClustersConfigDump.StaticCluster.last_updated:type_name -> google.protobuf.Timestamp + 18, // 24: envoy.admin.v3.ClustersConfigDump.DynamicCluster.cluster:type_name -> google.protobuf.Any + 19, // 25: envoy.admin.v3.ClustersConfigDump.DynamicCluster.last_updated:type_name -> google.protobuf.Timestamp + 1, // 26: envoy.admin.v3.ClustersConfigDump.DynamicCluster.error_state:type_name -> envoy.admin.v3.UpdateFailureState + 0, // 27: envoy.admin.v3.ClustersConfigDump.DynamicCluster.client_status:type_name -> envoy.admin.v3.ClientResourceStatus + 18, // 28: envoy.admin.v3.RoutesConfigDump.StaticRouteConfig.route_config:type_name -> google.protobuf.Any + 19, // 29: envoy.admin.v3.RoutesConfigDump.StaticRouteConfig.last_updated:type_name -> google.protobuf.Timestamp + 18, // 30: envoy.admin.v3.RoutesConfigDump.DynamicRouteConfig.route_config:type_name -> google.protobuf.Any + 19, // 31: envoy.admin.v3.RoutesConfigDump.DynamicRouteConfig.last_updated:type_name -> google.protobuf.Timestamp + 1, // 32: envoy.admin.v3.RoutesConfigDump.DynamicRouteConfig.error_state:type_name -> envoy.admin.v3.UpdateFailureState + 0, // 33: envoy.admin.v3.RoutesConfigDump.DynamicRouteConfig.client_status:type_name -> envoy.admin.v3.ClientResourceStatus + 18, // 34: envoy.admin.v3.ScopedRoutesConfigDump.InlineScopedRouteConfigs.scoped_route_configs:type_name -> google.protobuf.Any + 19, // 35: envoy.admin.v3.ScopedRoutesConfigDump.InlineScopedRouteConfigs.last_updated:type_name -> google.protobuf.Timestamp + 18, // 36: envoy.admin.v3.ScopedRoutesConfigDump.DynamicScopedRouteConfigs.scoped_route_configs:type_name -> google.protobuf.Any + 19, // 37: envoy.admin.v3.ScopedRoutesConfigDump.DynamicScopedRouteConfigs.last_updated:type_name -> google.protobuf.Timestamp + 1, // 38: envoy.admin.v3.ScopedRoutesConfigDump.DynamicScopedRouteConfigs.error_state:type_name -> envoy.admin.v3.UpdateFailureState + 0, // 39: envoy.admin.v3.ScopedRoutesConfigDump.DynamicScopedRouteConfigs.client_status:type_name -> envoy.admin.v3.ClientResourceStatus + 18, // 40: envoy.admin.v3.EndpointsConfigDump.StaticEndpointConfig.endpoint_config:type_name -> google.protobuf.Any + 19, // 41: envoy.admin.v3.EndpointsConfigDump.StaticEndpointConfig.last_updated:type_name -> google.protobuf.Timestamp + 18, // 42: envoy.admin.v3.EndpointsConfigDump.DynamicEndpointConfig.endpoint_config:type_name -> google.protobuf.Any + 19, // 43: envoy.admin.v3.EndpointsConfigDump.DynamicEndpointConfig.last_updated:type_name -> google.protobuf.Timestamp + 1, // 44: envoy.admin.v3.EndpointsConfigDump.DynamicEndpointConfig.error_state:type_name -> envoy.admin.v3.UpdateFailureState + 0, // 45: envoy.admin.v3.EndpointsConfigDump.DynamicEndpointConfig.client_status:type_name -> envoy.admin.v3.ClientResourceStatus + 46, // [46:46] is the sub-list for method output_type + 46, // [46:46] is the sub-list for method input_type + 46, // [46:46] is the sub-list for extension type_name + 46, // [46:46] is the sub-list for extension extendee + 0, // [0:46] is the sub-list for field type_name +} + +func init() { file_envoy_admin_v3_config_dump_shared_proto_init() } +func file_envoy_admin_v3_config_dump_shared_proto_init() { + if File_envoy_admin_v3_config_dump_shared_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_admin_v3_config_dump_shared_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateFailureState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_config_dump_shared_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListenersConfigDump); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_config_dump_shared_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClustersConfigDump); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_config_dump_shared_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RoutesConfigDump); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_config_dump_shared_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ScopedRoutesConfigDump); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_config_dump_shared_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EndpointsConfigDump); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_config_dump_shared_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListenersConfigDump_StaticListener); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_config_dump_shared_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListenersConfigDump_DynamicListenerState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_config_dump_shared_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListenersConfigDump_DynamicListener); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_config_dump_shared_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClustersConfigDump_StaticCluster); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_config_dump_shared_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClustersConfigDump_DynamicCluster); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_config_dump_shared_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RoutesConfigDump_StaticRouteConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_config_dump_shared_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RoutesConfigDump_DynamicRouteConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_config_dump_shared_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ScopedRoutesConfigDump_InlineScopedRouteConfigs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_config_dump_shared_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ScopedRoutesConfigDump_DynamicScopedRouteConfigs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_config_dump_shared_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EndpointsConfigDump_StaticEndpointConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_config_dump_shared_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EndpointsConfigDump_DynamicEndpointConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_admin_v3_config_dump_shared_proto_rawDesc, + NumEnums: 1, + NumMessages: 17, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_admin_v3_config_dump_shared_proto_goTypes, + DependencyIndexes: file_envoy_admin_v3_config_dump_shared_proto_depIdxs, + EnumInfos: file_envoy_admin_v3_config_dump_shared_proto_enumTypes, + MessageInfos: file_envoy_admin_v3_config_dump_shared_proto_msgTypes, + }.Build() + File_envoy_admin_v3_config_dump_shared_proto = out.File + file_envoy_admin_v3_config_dump_shared_proto_rawDesc = nil + file_envoy_admin_v3_config_dump_shared_proto_goTypes = nil + file_envoy_admin_v3_config_dump_shared_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/admin/v3/config_dump_shared.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/config_dump_shared.pb.validate.go new file mode 100644 index 0000000000000..8717358163fc9 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/config_dump_shared.pb.validate.go @@ -0,0 +1,3089 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/admin/v3/config_dump_shared.proto + +package adminv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on UpdateFailureState 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 *UpdateFailureState) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UpdateFailureState 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 +// UpdateFailureStateMultiError, or nil if none found. +func (m *UpdateFailureState) ValidateAll() error { + return m.validate(true) +} + +func (m *UpdateFailureState) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetFailedConfiguration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpdateFailureStateValidationError{ + field: "FailedConfiguration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpdateFailureStateValidationError{ + field: "FailedConfiguration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFailedConfiguration()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UpdateFailureStateValidationError{ + field: "FailedConfiguration", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetLastUpdateAttempt()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpdateFailureStateValidationError{ + field: "LastUpdateAttempt", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpdateFailureStateValidationError{ + field: "LastUpdateAttempt", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdateAttempt()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UpdateFailureStateValidationError{ + field: "LastUpdateAttempt", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Details + + // no validation rules for VersionInfo + + if len(errors) > 0 { + return UpdateFailureStateMultiError(errors) + } + return nil +} + +// UpdateFailureStateMultiError is an error wrapping multiple validation errors +// returned by UpdateFailureState.ValidateAll() if the designated constraints +// aren't met. +type UpdateFailureStateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UpdateFailureStateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UpdateFailureStateMultiError) AllErrors() []error { return m } + +// UpdateFailureStateValidationError is the validation error returned by +// UpdateFailureState.Validate if the designated constraints aren't met. +type UpdateFailureStateValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e UpdateFailureStateValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e UpdateFailureStateValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e UpdateFailureStateValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e UpdateFailureStateValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e UpdateFailureStateValidationError) ErrorName() string { + return "UpdateFailureStateValidationError" +} + +// Error satisfies the builtin error interface +func (e UpdateFailureStateValidationError) 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 %sUpdateFailureState.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = UpdateFailureStateValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = UpdateFailureStateValidationError{} + +// Validate checks the field values on ListenersConfigDump 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 *ListenersConfigDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListenersConfigDump 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 +// ListenersConfigDumpMultiError, or nil if none found. +func (m *ListenersConfigDump) ValidateAll() error { + return m.validate(true) +} + +func (m *ListenersConfigDump) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for VersionInfo + + for idx, item := range m.GetStaticListeners() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDumpValidationError{ + field: fmt.Sprintf("StaticListeners[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDumpValidationError{ + field: fmt.Sprintf("StaticListeners[%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 ListenersConfigDumpValidationError{ + field: fmt.Sprintf("StaticListeners[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetDynamicListeners() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDumpValidationError{ + field: fmt.Sprintf("DynamicListeners[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDumpValidationError{ + field: fmt.Sprintf("DynamicListeners[%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 ListenersConfigDumpValidationError{ + field: fmt.Sprintf("DynamicListeners[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ListenersConfigDumpMultiError(errors) + } + return nil +} + +// ListenersConfigDumpMultiError is an error wrapping multiple validation +// errors returned by ListenersConfigDump.ValidateAll() if the designated +// constraints aren't met. +type ListenersConfigDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenersConfigDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenersConfigDumpMultiError) AllErrors() []error { return m } + +// ListenersConfigDumpValidationError is the validation error returned by +// ListenersConfigDump.Validate if the designated constraints aren't met. +type ListenersConfigDumpValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListenersConfigDumpValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListenersConfigDumpValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListenersConfigDumpValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListenersConfigDumpValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListenersConfigDumpValidationError) ErrorName() string { + return "ListenersConfigDumpValidationError" +} + +// Error satisfies the builtin error interface +func (e ListenersConfigDumpValidationError) 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 %sListenersConfigDump.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListenersConfigDumpValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListenersConfigDumpValidationError{} + +// Validate checks the field values on ClustersConfigDump 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 *ClustersConfigDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClustersConfigDump 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 +// ClustersConfigDumpMultiError, or nil if none found. +func (m *ClustersConfigDump) ValidateAll() error { + return m.validate(true) +} + +func (m *ClustersConfigDump) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for VersionInfo + + for idx, item := range m.GetStaticClusters() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersConfigDumpValidationError{ + field: fmt.Sprintf("StaticClusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersConfigDumpValidationError{ + field: fmt.Sprintf("StaticClusters[%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 ClustersConfigDumpValidationError{ + field: fmt.Sprintf("StaticClusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetDynamicActiveClusters() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersConfigDumpValidationError{ + field: fmt.Sprintf("DynamicActiveClusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersConfigDumpValidationError{ + field: fmt.Sprintf("DynamicActiveClusters[%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 ClustersConfigDumpValidationError{ + field: fmt.Sprintf("DynamicActiveClusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetDynamicWarmingClusters() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersConfigDumpValidationError{ + field: fmt.Sprintf("DynamicWarmingClusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersConfigDumpValidationError{ + field: fmt.Sprintf("DynamicWarmingClusters[%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 ClustersConfigDumpValidationError{ + field: fmt.Sprintf("DynamicWarmingClusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ClustersConfigDumpMultiError(errors) + } + return nil +} + +// ClustersConfigDumpMultiError is an error wrapping multiple validation errors +// returned by ClustersConfigDump.ValidateAll() if the designated constraints +// aren't met. +type ClustersConfigDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClustersConfigDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClustersConfigDumpMultiError) AllErrors() []error { return m } + +// ClustersConfigDumpValidationError is the validation error returned by +// ClustersConfigDump.Validate if the designated constraints aren't met. +type ClustersConfigDumpValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ClustersConfigDumpValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ClustersConfigDumpValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ClustersConfigDumpValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ClustersConfigDumpValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ClustersConfigDumpValidationError) ErrorName() string { + return "ClustersConfigDumpValidationError" +} + +// Error satisfies the builtin error interface +func (e ClustersConfigDumpValidationError) 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 %sClustersConfigDump.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ClustersConfigDumpValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ClustersConfigDumpValidationError{} + +// Validate checks the field values on RoutesConfigDump 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 *RoutesConfigDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RoutesConfigDump 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 +// RoutesConfigDumpMultiError, or nil if none found. +func (m *RoutesConfigDump) ValidateAll() error { + return m.validate(true) +} + +func (m *RoutesConfigDump) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetStaticRouteConfigs() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RoutesConfigDumpValidationError{ + field: fmt.Sprintf("StaticRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RoutesConfigDumpValidationError{ + field: fmt.Sprintf("StaticRouteConfigs[%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 RoutesConfigDumpValidationError{ + field: fmt.Sprintf("StaticRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetDynamicRouteConfigs() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RoutesConfigDumpValidationError{ + field: fmt.Sprintf("DynamicRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RoutesConfigDumpValidationError{ + field: fmt.Sprintf("DynamicRouteConfigs[%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 RoutesConfigDumpValidationError{ + field: fmt.Sprintf("DynamicRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return RoutesConfigDumpMultiError(errors) + } + return nil +} + +// RoutesConfigDumpMultiError is an error wrapping multiple validation errors +// returned by RoutesConfigDump.ValidateAll() if the designated constraints +// aren't met. +type RoutesConfigDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RoutesConfigDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RoutesConfigDumpMultiError) AllErrors() []error { return m } + +// RoutesConfigDumpValidationError is the validation error returned by +// RoutesConfigDump.Validate if the designated constraints aren't met. +type RoutesConfigDumpValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RoutesConfigDumpValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RoutesConfigDumpValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RoutesConfigDumpValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RoutesConfigDumpValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RoutesConfigDumpValidationError) ErrorName() string { return "RoutesConfigDumpValidationError" } + +// Error satisfies the builtin error interface +func (e RoutesConfigDumpValidationError) 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 %sRoutesConfigDump.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RoutesConfigDumpValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RoutesConfigDumpValidationError{} + +// Validate checks the field values on ScopedRoutesConfigDump 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 *ScopedRoutesConfigDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ScopedRoutesConfigDump 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 +// ScopedRoutesConfigDumpMultiError, or nil if none found. +func (m *ScopedRoutesConfigDump) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRoutesConfigDump) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetInlineScopedRouteConfigs() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesConfigDumpValidationError{ + field: fmt.Sprintf("InlineScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesConfigDumpValidationError{ + field: fmt.Sprintf("InlineScopedRouteConfigs[%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 ScopedRoutesConfigDumpValidationError{ + field: fmt.Sprintf("InlineScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetDynamicScopedRouteConfigs() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesConfigDumpValidationError{ + field: fmt.Sprintf("DynamicScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesConfigDumpValidationError{ + field: fmt.Sprintf("DynamicScopedRouteConfigs[%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 ScopedRoutesConfigDumpValidationError{ + field: fmt.Sprintf("DynamicScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ScopedRoutesConfigDumpMultiError(errors) + } + return nil +} + +// ScopedRoutesConfigDumpMultiError is an error wrapping multiple validation +// errors returned by ScopedRoutesConfigDump.ValidateAll() if the designated +// constraints aren't met. +type ScopedRoutesConfigDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRoutesConfigDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRoutesConfigDumpMultiError) AllErrors() []error { return m } + +// ScopedRoutesConfigDumpValidationError is the validation error returned by +// ScopedRoutesConfigDump.Validate if the designated constraints aren't met. +type ScopedRoutesConfigDumpValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ScopedRoutesConfigDumpValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ScopedRoutesConfigDumpValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ScopedRoutesConfigDumpValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ScopedRoutesConfigDumpValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ScopedRoutesConfigDumpValidationError) ErrorName() string { + return "ScopedRoutesConfigDumpValidationError" +} + +// Error satisfies the builtin error interface +func (e ScopedRoutesConfigDumpValidationError) 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 %sScopedRoutesConfigDump.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ScopedRoutesConfigDumpValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ScopedRoutesConfigDumpValidationError{} + +// Validate checks the field values on EndpointsConfigDump 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 *EndpointsConfigDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on EndpointsConfigDump 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 +// EndpointsConfigDumpMultiError, or nil if none found. +func (m *EndpointsConfigDump) ValidateAll() error { + return m.validate(true) +} + +func (m *EndpointsConfigDump) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetStaticEndpointConfigs() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointsConfigDumpValidationError{ + field: fmt.Sprintf("StaticEndpointConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointsConfigDumpValidationError{ + field: fmt.Sprintf("StaticEndpointConfigs[%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 EndpointsConfigDumpValidationError{ + field: fmt.Sprintf("StaticEndpointConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetDynamicEndpointConfigs() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointsConfigDumpValidationError{ + field: fmt.Sprintf("DynamicEndpointConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointsConfigDumpValidationError{ + field: fmt.Sprintf("DynamicEndpointConfigs[%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 EndpointsConfigDumpValidationError{ + field: fmt.Sprintf("DynamicEndpointConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return EndpointsConfigDumpMultiError(errors) + } + return nil +} + +// EndpointsConfigDumpMultiError is an error wrapping multiple validation +// errors returned by EndpointsConfigDump.ValidateAll() if the designated +// constraints aren't met. +type EndpointsConfigDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EndpointsConfigDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EndpointsConfigDumpMultiError) AllErrors() []error { return m } + +// EndpointsConfigDumpValidationError is the validation error returned by +// EndpointsConfigDump.Validate if the designated constraints aren't met. +type EndpointsConfigDumpValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e EndpointsConfigDumpValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e EndpointsConfigDumpValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e EndpointsConfigDumpValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e EndpointsConfigDumpValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e EndpointsConfigDumpValidationError) ErrorName() string { + return "EndpointsConfigDumpValidationError" +} + +// Error satisfies the builtin error interface +func (e EndpointsConfigDumpValidationError) 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 %sEndpointsConfigDump.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = EndpointsConfigDumpValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = EndpointsConfigDumpValidationError{} + +// Validate checks the field values on ListenersConfigDump_StaticListener 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 *ListenersConfigDump_StaticListener) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListenersConfigDump_StaticListener +// 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 +// ListenersConfigDump_StaticListenerMultiError, or nil if none found. +func (m *ListenersConfigDump_StaticListener) ValidateAll() error { + return m.validate(true) +} + +func (m *ListenersConfigDump_StaticListener) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetListener()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_StaticListenerValidationError{ + field: "Listener", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_StaticListenerValidationError{ + field: "Listener", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetListener()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenersConfigDump_StaticListenerValidationError{ + field: "Listener", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_StaticListenerValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_StaticListenerValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenersConfigDump_StaticListenerValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ListenersConfigDump_StaticListenerMultiError(errors) + } + return nil +} + +// ListenersConfigDump_StaticListenerMultiError is an error wrapping multiple +// validation errors returned by +// ListenersConfigDump_StaticListener.ValidateAll() if the designated +// constraints aren't met. +type ListenersConfigDump_StaticListenerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenersConfigDump_StaticListenerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenersConfigDump_StaticListenerMultiError) AllErrors() []error { return m } + +// ListenersConfigDump_StaticListenerValidationError is the validation error +// returned by ListenersConfigDump_StaticListener.Validate if the designated +// constraints aren't met. +type ListenersConfigDump_StaticListenerValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListenersConfigDump_StaticListenerValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListenersConfigDump_StaticListenerValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListenersConfigDump_StaticListenerValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListenersConfigDump_StaticListenerValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListenersConfigDump_StaticListenerValidationError) ErrorName() string { + return "ListenersConfigDump_StaticListenerValidationError" +} + +// Error satisfies the builtin error interface +func (e ListenersConfigDump_StaticListenerValidationError) 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 %sListenersConfigDump_StaticListener.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListenersConfigDump_StaticListenerValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListenersConfigDump_StaticListenerValidationError{} + +// Validate checks the field values on ListenersConfigDump_DynamicListenerState +// 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 *ListenersConfigDump_DynamicListenerState) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ListenersConfigDump_DynamicListenerState 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 +// ListenersConfigDump_DynamicListenerStateMultiError, or nil if none found. +func (m *ListenersConfigDump_DynamicListenerState) ValidateAll() error { + return m.validate(true) +} + +func (m *ListenersConfigDump_DynamicListenerState) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for VersionInfo + + if all { + switch v := interface{}(m.GetListener()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{ + field: "Listener", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{ + field: "Listener", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetListener()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenersConfigDump_DynamicListenerStateValidationError{ + field: "Listener", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenersConfigDump_DynamicListenerStateValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ListenersConfigDump_DynamicListenerStateMultiError(errors) + } + return nil +} + +// ListenersConfigDump_DynamicListenerStateMultiError is an error wrapping +// multiple validation errors returned by +// ListenersConfigDump_DynamicListenerState.ValidateAll() if the designated +// constraints aren't met. +type ListenersConfigDump_DynamicListenerStateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenersConfigDump_DynamicListenerStateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenersConfigDump_DynamicListenerStateMultiError) AllErrors() []error { return m } + +// ListenersConfigDump_DynamicListenerStateValidationError is the validation +// error returned by ListenersConfigDump_DynamicListenerState.Validate if the +// designated constraints aren't met. +type ListenersConfigDump_DynamicListenerStateValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListenersConfigDump_DynamicListenerStateValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListenersConfigDump_DynamicListenerStateValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListenersConfigDump_DynamicListenerStateValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListenersConfigDump_DynamicListenerStateValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListenersConfigDump_DynamicListenerStateValidationError) ErrorName() string { + return "ListenersConfigDump_DynamicListenerStateValidationError" +} + +// Error satisfies the builtin error interface +func (e ListenersConfigDump_DynamicListenerStateValidationError) 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 %sListenersConfigDump_DynamicListenerState.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListenersConfigDump_DynamicListenerStateValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListenersConfigDump_DynamicListenerStateValidationError{} + +// Validate checks the field values on ListenersConfigDump_DynamicListener 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 *ListenersConfigDump_DynamicListener) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListenersConfigDump_DynamicListener +// 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 +// ListenersConfigDump_DynamicListenerMultiError, or nil if none found. +func (m *ListenersConfigDump_DynamicListener) ValidateAll() error { + return m.validate(true) +} + +func (m *ListenersConfigDump_DynamicListener) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + if all { + switch v := interface{}(m.GetActiveState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "ActiveState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "ActiveState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetActiveState()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenersConfigDump_DynamicListenerValidationError{ + field: "ActiveState", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetWarmingState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "WarmingState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "WarmingState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWarmingState()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenersConfigDump_DynamicListenerValidationError{ + field: "WarmingState", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetDrainingState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "DrainingState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "DrainingState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDrainingState()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenersConfigDump_DynamicListenerValidationError{ + field: "DrainingState", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetErrorState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenersConfigDump_DynamicListenerValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ClientStatus + + if len(errors) > 0 { + return ListenersConfigDump_DynamicListenerMultiError(errors) + } + return nil +} + +// ListenersConfigDump_DynamicListenerMultiError is an error wrapping multiple +// validation errors returned by +// ListenersConfigDump_DynamicListener.ValidateAll() if the designated +// constraints aren't met. +type ListenersConfigDump_DynamicListenerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenersConfigDump_DynamicListenerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenersConfigDump_DynamicListenerMultiError) AllErrors() []error { return m } + +// ListenersConfigDump_DynamicListenerValidationError is the validation error +// returned by ListenersConfigDump_DynamicListener.Validate if the designated +// constraints aren't met. +type ListenersConfigDump_DynamicListenerValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListenersConfigDump_DynamicListenerValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListenersConfigDump_DynamicListenerValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListenersConfigDump_DynamicListenerValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListenersConfigDump_DynamicListenerValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListenersConfigDump_DynamicListenerValidationError) ErrorName() string { + return "ListenersConfigDump_DynamicListenerValidationError" +} + +// Error satisfies the builtin error interface +func (e ListenersConfigDump_DynamicListenerValidationError) 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 %sListenersConfigDump_DynamicListener.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListenersConfigDump_DynamicListenerValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListenersConfigDump_DynamicListenerValidationError{} + +// Validate checks the field values on ClustersConfigDump_StaticCluster 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 *ClustersConfigDump_StaticCluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClustersConfigDump_StaticCluster 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 +// ClustersConfigDump_StaticClusterMultiError, or nil if none found. +func (m *ClustersConfigDump_StaticCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *ClustersConfigDump_StaticCluster) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetCluster()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersConfigDump_StaticClusterValidationError{ + field: "Cluster", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersConfigDump_StaticClusterValidationError{ + field: "Cluster", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClustersConfigDump_StaticClusterValidationError{ + field: "Cluster", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersConfigDump_StaticClusterValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersConfigDump_StaticClusterValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClustersConfigDump_StaticClusterValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ClustersConfigDump_StaticClusterMultiError(errors) + } + return nil +} + +// ClustersConfigDump_StaticClusterMultiError is an error wrapping multiple +// validation errors returned by +// ClustersConfigDump_StaticCluster.ValidateAll() if the designated +// constraints aren't met. +type ClustersConfigDump_StaticClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClustersConfigDump_StaticClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClustersConfigDump_StaticClusterMultiError) AllErrors() []error { return m } + +// ClustersConfigDump_StaticClusterValidationError is the validation error +// returned by ClustersConfigDump_StaticCluster.Validate if the designated +// constraints aren't met. +type ClustersConfigDump_StaticClusterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ClustersConfigDump_StaticClusterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ClustersConfigDump_StaticClusterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ClustersConfigDump_StaticClusterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ClustersConfigDump_StaticClusterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ClustersConfigDump_StaticClusterValidationError) ErrorName() string { + return "ClustersConfigDump_StaticClusterValidationError" +} + +// Error satisfies the builtin error interface +func (e ClustersConfigDump_StaticClusterValidationError) 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 %sClustersConfigDump_StaticCluster.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ClustersConfigDump_StaticClusterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ClustersConfigDump_StaticClusterValidationError{} + +// Validate checks the field values on ClustersConfigDump_DynamicCluster 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 *ClustersConfigDump_DynamicCluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClustersConfigDump_DynamicCluster +// 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 +// ClustersConfigDump_DynamicClusterMultiError, or nil if none found. +func (m *ClustersConfigDump_DynamicCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *ClustersConfigDump_DynamicCluster) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for VersionInfo + + if all { + switch v := interface{}(m.GetCluster()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{ + field: "Cluster", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{ + field: "Cluster", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClustersConfigDump_DynamicClusterValidationError{ + field: "Cluster", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClustersConfigDump_DynamicClusterValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetErrorState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClustersConfigDump_DynamicClusterValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ClientStatus + + if len(errors) > 0 { + return ClustersConfigDump_DynamicClusterMultiError(errors) + } + return nil +} + +// ClustersConfigDump_DynamicClusterMultiError is an error wrapping multiple +// validation errors returned by +// ClustersConfigDump_DynamicCluster.ValidateAll() if the designated +// constraints aren't met. +type ClustersConfigDump_DynamicClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClustersConfigDump_DynamicClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClustersConfigDump_DynamicClusterMultiError) AllErrors() []error { return m } + +// ClustersConfigDump_DynamicClusterValidationError is the validation error +// returned by ClustersConfigDump_DynamicCluster.Validate if the designated +// constraints aren't met. +type ClustersConfigDump_DynamicClusterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ClustersConfigDump_DynamicClusterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ClustersConfigDump_DynamicClusterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ClustersConfigDump_DynamicClusterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ClustersConfigDump_DynamicClusterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ClustersConfigDump_DynamicClusterValidationError) ErrorName() string { + return "ClustersConfigDump_DynamicClusterValidationError" +} + +// Error satisfies the builtin error interface +func (e ClustersConfigDump_DynamicClusterValidationError) 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 %sClustersConfigDump_DynamicCluster.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ClustersConfigDump_DynamicClusterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ClustersConfigDump_DynamicClusterValidationError{} + +// Validate checks the field values on RoutesConfigDump_StaticRouteConfig 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 *RoutesConfigDump_StaticRouteConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RoutesConfigDump_StaticRouteConfig +// 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 +// RoutesConfigDump_StaticRouteConfigMultiError, or nil if none found. +func (m *RoutesConfigDump_StaticRouteConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *RoutesConfigDump_StaticRouteConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetRouteConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RoutesConfigDump_StaticRouteConfigValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RoutesConfigDump_StaticRouteConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RoutesConfigDump_StaticRouteConfigMultiError(errors) + } + return nil +} + +// RoutesConfigDump_StaticRouteConfigMultiError is an error wrapping multiple +// validation errors returned by +// RoutesConfigDump_StaticRouteConfig.ValidateAll() if the designated +// constraints aren't met. +type RoutesConfigDump_StaticRouteConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RoutesConfigDump_StaticRouteConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RoutesConfigDump_StaticRouteConfigMultiError) AllErrors() []error { return m } + +// RoutesConfigDump_StaticRouteConfigValidationError is the validation error +// returned by RoutesConfigDump_StaticRouteConfig.Validate if the designated +// constraints aren't met. +type RoutesConfigDump_StaticRouteConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RoutesConfigDump_StaticRouteConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RoutesConfigDump_StaticRouteConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RoutesConfigDump_StaticRouteConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RoutesConfigDump_StaticRouteConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RoutesConfigDump_StaticRouteConfigValidationError) ErrorName() string { + return "RoutesConfigDump_StaticRouteConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e RoutesConfigDump_StaticRouteConfigValidationError) 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 %sRoutesConfigDump_StaticRouteConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RoutesConfigDump_StaticRouteConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RoutesConfigDump_StaticRouteConfigValidationError{} + +// Validate checks the field values on RoutesConfigDump_DynamicRouteConfig 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 *RoutesConfigDump_DynamicRouteConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RoutesConfigDump_DynamicRouteConfig +// 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 +// RoutesConfigDump_DynamicRouteConfigMultiError, or nil if none found. +func (m *RoutesConfigDump_DynamicRouteConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *RoutesConfigDump_DynamicRouteConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for VersionInfo + + if all { + switch v := interface{}(m.GetRouteConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RoutesConfigDump_DynamicRouteConfigValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RoutesConfigDump_DynamicRouteConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetErrorState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RoutesConfigDump_DynamicRouteConfigValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ClientStatus + + if len(errors) > 0 { + return RoutesConfigDump_DynamicRouteConfigMultiError(errors) + } + return nil +} + +// RoutesConfigDump_DynamicRouteConfigMultiError is an error wrapping multiple +// validation errors returned by +// RoutesConfigDump_DynamicRouteConfig.ValidateAll() if the designated +// constraints aren't met. +type RoutesConfigDump_DynamicRouteConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RoutesConfigDump_DynamicRouteConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RoutesConfigDump_DynamicRouteConfigMultiError) AllErrors() []error { return m } + +// RoutesConfigDump_DynamicRouteConfigValidationError is the validation error +// returned by RoutesConfigDump_DynamicRouteConfig.Validate if the designated +// constraints aren't met. +type RoutesConfigDump_DynamicRouteConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RoutesConfigDump_DynamicRouteConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RoutesConfigDump_DynamicRouteConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RoutesConfigDump_DynamicRouteConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RoutesConfigDump_DynamicRouteConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RoutesConfigDump_DynamicRouteConfigValidationError) ErrorName() string { + return "RoutesConfigDump_DynamicRouteConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e RoutesConfigDump_DynamicRouteConfigValidationError) 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 %sRoutesConfigDump_DynamicRouteConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RoutesConfigDump_DynamicRouteConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RoutesConfigDump_DynamicRouteConfigValidationError{} + +// Validate checks the field values on +// ScopedRoutesConfigDump_InlineScopedRouteConfigs 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 *ScopedRoutesConfigDump_InlineScopedRouteConfigs) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ScopedRoutesConfigDump_InlineScopedRouteConfigs 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 +// ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError, or nil if none found. +func (m *ScopedRoutesConfigDump_InlineScopedRouteConfigs) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRoutesConfigDump_InlineScopedRouteConfigs) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + for idx, item := range m.GetScopedRouteConfigs() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ + field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ + field: fmt.Sprintf("ScopedRouteConfigs[%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 ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ + field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError(errors) + } + return nil +} + +// ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError is an error +// wrapping multiple validation errors returned by +// ScopedRoutesConfigDump_InlineScopedRouteConfigs.ValidateAll() if the +// designated constraints aren't met. +type ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError) AllErrors() []error { return m } + +// ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError is the +// validation error returned by +// ScopedRoutesConfigDump_InlineScopedRouteConfigs.Validate if the designated +// constraints aren't met. +type ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) Field() string { + return e.field +} + +// Reason function returns reason value. +func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) ErrorName() string { + return "ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError" +} + +// Error satisfies the builtin error interface +func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) 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 %sScopedRoutesConfigDump_InlineScopedRouteConfigs.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{} + +// Validate checks the field values on +// ScopedRoutesConfigDump_DynamicScopedRouteConfigs 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 *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ScopedRoutesConfigDump_DynamicScopedRouteConfigs 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 +// ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError, or nil if none found. +func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) ValidateAll() error { + return m.validate(true) +} + +func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + // no validation rules for VersionInfo + + for idx, item := range m.GetScopedRouteConfigs() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ + field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ + field: fmt.Sprintf("ScopedRouteConfigs[%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 ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ + field: fmt.Sprintf("ScopedRouteConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetErrorState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ClientStatus + + if len(errors) > 0 { + return ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError(errors) + } + return nil +} + +// ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError is an error +// wrapping multiple validation errors returned by +// ScopedRoutesConfigDump_DynamicScopedRouteConfigs.ValidateAll() if the +// designated constraints aren't met. +type ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError) AllErrors() []error { return m } + +// ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError is the +// validation error returned by +// ScopedRoutesConfigDump_DynamicScopedRouteConfigs.Validate if the designated +// constraints aren't met. +type ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) Field() string { + return e.field +} + +// Reason function returns reason value. +func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) Cause() error { + return e.cause +} + +// Key function returns key value. +func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) ErrorName() string { + return "ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError" +} + +// Error satisfies the builtin error interface +func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) 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 %sScopedRoutesConfigDump_DynamicScopedRouteConfigs.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{} + +// Validate checks the field values on EndpointsConfigDump_StaticEndpointConfig +// 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 *EndpointsConfigDump_StaticEndpointConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// EndpointsConfigDump_StaticEndpointConfig 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 +// EndpointsConfigDump_StaticEndpointConfigMultiError, or nil if none found. +func (m *EndpointsConfigDump_StaticEndpointConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *EndpointsConfigDump_StaticEndpointConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetEndpointConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointsConfigDump_StaticEndpointConfigValidationError{ + field: "EndpointConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointsConfigDump_StaticEndpointConfigValidationError{ + field: "EndpointConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEndpointConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return EndpointsConfigDump_StaticEndpointConfigValidationError{ + field: "EndpointConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointsConfigDump_StaticEndpointConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointsConfigDump_StaticEndpointConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return EndpointsConfigDump_StaticEndpointConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return EndpointsConfigDump_StaticEndpointConfigMultiError(errors) + } + return nil +} + +// EndpointsConfigDump_StaticEndpointConfigMultiError is an error wrapping +// multiple validation errors returned by +// EndpointsConfigDump_StaticEndpointConfig.ValidateAll() if the designated +// constraints aren't met. +type EndpointsConfigDump_StaticEndpointConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EndpointsConfigDump_StaticEndpointConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EndpointsConfigDump_StaticEndpointConfigMultiError) AllErrors() []error { return m } + +// EndpointsConfigDump_StaticEndpointConfigValidationError is the validation +// error returned by EndpointsConfigDump_StaticEndpointConfig.Validate if the +// designated constraints aren't met. +type EndpointsConfigDump_StaticEndpointConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e EndpointsConfigDump_StaticEndpointConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e EndpointsConfigDump_StaticEndpointConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e EndpointsConfigDump_StaticEndpointConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e EndpointsConfigDump_StaticEndpointConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e EndpointsConfigDump_StaticEndpointConfigValidationError) ErrorName() string { + return "EndpointsConfigDump_StaticEndpointConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e EndpointsConfigDump_StaticEndpointConfigValidationError) 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 %sEndpointsConfigDump_StaticEndpointConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = EndpointsConfigDump_StaticEndpointConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = EndpointsConfigDump_StaticEndpointConfigValidationError{} + +// Validate checks the field values on +// EndpointsConfigDump_DynamicEndpointConfig 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 *EndpointsConfigDump_DynamicEndpointConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// EndpointsConfigDump_DynamicEndpointConfig 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 +// EndpointsConfigDump_DynamicEndpointConfigMultiError, or nil if none found. +func (m *EndpointsConfigDump_DynamicEndpointConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *EndpointsConfigDump_DynamicEndpointConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for VersionInfo + + if all { + switch v := interface{}(m.GetEndpointConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointsConfigDump_DynamicEndpointConfigValidationError{ + field: "EndpointConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointsConfigDump_DynamicEndpointConfigValidationError{ + field: "EndpointConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEndpointConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return EndpointsConfigDump_DynamicEndpointConfigValidationError{ + field: "EndpointConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointsConfigDump_DynamicEndpointConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointsConfigDump_DynamicEndpointConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return EndpointsConfigDump_DynamicEndpointConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetErrorState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointsConfigDump_DynamicEndpointConfigValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointsConfigDump_DynamicEndpointConfigValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return EndpointsConfigDump_DynamicEndpointConfigValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ClientStatus + + if len(errors) > 0 { + return EndpointsConfigDump_DynamicEndpointConfigMultiError(errors) + } + return nil +} + +// EndpointsConfigDump_DynamicEndpointConfigMultiError is an error wrapping +// multiple validation errors returned by +// EndpointsConfigDump_DynamicEndpointConfig.ValidateAll() if the designated +// constraints aren't met. +type EndpointsConfigDump_DynamicEndpointConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EndpointsConfigDump_DynamicEndpointConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EndpointsConfigDump_DynamicEndpointConfigMultiError) AllErrors() []error { return m } + +// EndpointsConfigDump_DynamicEndpointConfigValidationError is the validation +// error returned by EndpointsConfigDump_DynamicEndpointConfig.Validate if the +// designated constraints aren't met. +type EndpointsConfigDump_DynamicEndpointConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e EndpointsConfigDump_DynamicEndpointConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e EndpointsConfigDump_DynamicEndpointConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e EndpointsConfigDump_DynamicEndpointConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e EndpointsConfigDump_DynamicEndpointConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e EndpointsConfigDump_DynamicEndpointConfigValidationError) ErrorName() string { + return "EndpointsConfigDump_DynamicEndpointConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e EndpointsConfigDump_DynamicEndpointConfigValidationError) 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 %sEndpointsConfigDump_DynamicEndpointConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = EndpointsConfigDump_DynamicEndpointConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = EndpointsConfigDump_DynamicEndpointConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/admin/v3/init_dump.pb.go b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/init_dump.pb.go new file mode 100644 index 0000000000000..05dddd53b6285 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/init_dump.pb.go @@ -0,0 +1,246 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/admin/v3/init_dump.proto + +package adminv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Dumps of unready targets of envoy init managers. Envoy's admin fills this message with init managers, +// which provides the information of their unready targets. +// The :ref:`/init_dump ` will dump all unready targets information. +type UnreadyTargetsDumps struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // You can choose specific component to dump unready targets with mask query parameter. + // See :ref:`/init_dump?mask={} ` for more information. + // The dumps of unready targets of all init managers. + UnreadyTargetsDumps []*UnreadyTargetsDumps_UnreadyTargetsDump `protobuf:"bytes,1,rep,name=unready_targets_dumps,json=unreadyTargetsDumps,proto3" json:"unready_targets_dumps,omitempty"` +} + +func (x *UnreadyTargetsDumps) Reset() { + *x = UnreadyTargetsDumps{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_init_dump_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnreadyTargetsDumps) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnreadyTargetsDumps) ProtoMessage() {} + +func (x *UnreadyTargetsDumps) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_init_dump_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnreadyTargetsDumps.ProtoReflect.Descriptor instead. +func (*UnreadyTargetsDumps) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_init_dump_proto_rawDescGZIP(), []int{0} +} + +func (x *UnreadyTargetsDumps) GetUnreadyTargetsDumps() []*UnreadyTargetsDumps_UnreadyTargetsDump { + if x != nil { + return x.UnreadyTargetsDumps + } + return nil +} + +// Message of unready targets information of an init manager. +type UnreadyTargetsDumps_UnreadyTargetsDump struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of the init manager. Example: "init_manager_xxx". + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Names of unready targets of the init manager. Example: "target_xxx". + TargetNames []string `protobuf:"bytes,2,rep,name=target_names,json=targetNames,proto3" json:"target_names,omitempty"` +} + +func (x *UnreadyTargetsDumps_UnreadyTargetsDump) Reset() { + *x = UnreadyTargetsDumps_UnreadyTargetsDump{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_init_dump_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnreadyTargetsDumps_UnreadyTargetsDump) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnreadyTargetsDumps_UnreadyTargetsDump) ProtoMessage() {} + +func (x *UnreadyTargetsDumps_UnreadyTargetsDump) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_init_dump_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnreadyTargetsDumps_UnreadyTargetsDump.ProtoReflect.Descriptor instead. +func (*UnreadyTargetsDumps_UnreadyTargetsDump) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_init_dump_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *UnreadyTargetsDumps_UnreadyTargetsDump) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *UnreadyTargetsDumps_UnreadyTargetsDump) GetTargetNames() []string { + if x != nil { + return x.TargetNames + } + return nil +} + +var File_envoy_admin_v3_init_dump_proto protoreflect.FileDescriptor + +var file_envoy_admin_v3_init_dump_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, + 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x0e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, + 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xce, 0x01, 0x0a, 0x13, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x73, 0x44, 0x75, 0x6d, 0x70, 0x73, 0x12, 0x6a, 0x0a, 0x15, 0x75, 0x6e, 0x72, 0x65, 0x61, + 0x64, 0x79, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x44, 0x75, 0x6d, 0x70, 0x73, 0x2e, 0x55, 0x6e, 0x72, 0x65, + 0x61, 0x64, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x44, 0x75, 0x6d, 0x70, 0x52, 0x13, + 0x75, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x44, 0x75, + 0x6d, 0x70, 0x73, 0x1a, 0x4b, 0x0a, 0x12, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x79, 0x54, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x73, 0x44, 0x75, 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, + 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x42, 0x76, 0x0a, 0x1c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, + 0x42, 0x0d, 0x49, 0x6e, 0x69, 0x74, 0x44, 0x75, 0x6d, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_admin_v3_init_dump_proto_rawDescOnce sync.Once + file_envoy_admin_v3_init_dump_proto_rawDescData = file_envoy_admin_v3_init_dump_proto_rawDesc +) + +func file_envoy_admin_v3_init_dump_proto_rawDescGZIP() []byte { + file_envoy_admin_v3_init_dump_proto_rawDescOnce.Do(func() { + file_envoy_admin_v3_init_dump_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_admin_v3_init_dump_proto_rawDescData) + }) + return file_envoy_admin_v3_init_dump_proto_rawDescData +} + +var file_envoy_admin_v3_init_dump_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_admin_v3_init_dump_proto_goTypes = []interface{}{ + (*UnreadyTargetsDumps)(nil), // 0: envoy.admin.v3.UnreadyTargetsDumps + (*UnreadyTargetsDumps_UnreadyTargetsDump)(nil), // 1: envoy.admin.v3.UnreadyTargetsDumps.UnreadyTargetsDump +} +var file_envoy_admin_v3_init_dump_proto_depIdxs = []int32{ + 1, // 0: envoy.admin.v3.UnreadyTargetsDumps.unready_targets_dumps:type_name -> envoy.admin.v3.UnreadyTargetsDumps.UnreadyTargetsDump + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_admin_v3_init_dump_proto_init() } +func file_envoy_admin_v3_init_dump_proto_init() { + if File_envoy_admin_v3_init_dump_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_admin_v3_init_dump_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnreadyTargetsDumps); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_init_dump_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnreadyTargetsDumps_UnreadyTargetsDump); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_admin_v3_init_dump_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_admin_v3_init_dump_proto_goTypes, + DependencyIndexes: file_envoy_admin_v3_init_dump_proto_depIdxs, + MessageInfos: file_envoy_admin_v3_init_dump_proto_msgTypes, + }.Build() + File_envoy_admin_v3_init_dump_proto = out.File + file_envoy_admin_v3_init_dump_proto_rawDesc = nil + file_envoy_admin_v3_init_dump_proto_goTypes = nil + file_envoy_admin_v3_init_dump_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/admin/v3/init_dump.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/init_dump.pb.validate.go new file mode 100644 index 0000000000000..5ed703382bd9a --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/init_dump.pb.validate.go @@ -0,0 +1,278 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/admin/v3/init_dump.proto + +package adminv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on UnreadyTargetsDumps 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 *UnreadyTargetsDumps) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UnreadyTargetsDumps 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 +// UnreadyTargetsDumpsMultiError, or nil if none found. +func (m *UnreadyTargetsDumps) ValidateAll() error { + return m.validate(true) +} + +func (m *UnreadyTargetsDumps) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetUnreadyTargetsDumps() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UnreadyTargetsDumpsValidationError{ + field: fmt.Sprintf("UnreadyTargetsDumps[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UnreadyTargetsDumpsValidationError{ + field: fmt.Sprintf("UnreadyTargetsDumps[%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 UnreadyTargetsDumpsValidationError{ + field: fmt.Sprintf("UnreadyTargetsDumps[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return UnreadyTargetsDumpsMultiError(errors) + } + return nil +} + +// UnreadyTargetsDumpsMultiError is an error wrapping multiple validation +// errors returned by UnreadyTargetsDumps.ValidateAll() if the designated +// constraints aren't met. +type UnreadyTargetsDumpsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UnreadyTargetsDumpsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UnreadyTargetsDumpsMultiError) AllErrors() []error { return m } + +// UnreadyTargetsDumpsValidationError is the validation error returned by +// UnreadyTargetsDumps.Validate if the designated constraints aren't met. +type UnreadyTargetsDumpsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e UnreadyTargetsDumpsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e UnreadyTargetsDumpsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e UnreadyTargetsDumpsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e UnreadyTargetsDumpsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e UnreadyTargetsDumpsValidationError) ErrorName() string { + return "UnreadyTargetsDumpsValidationError" +} + +// Error satisfies the builtin error interface +func (e UnreadyTargetsDumpsValidationError) 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 %sUnreadyTargetsDumps.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = UnreadyTargetsDumpsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = UnreadyTargetsDumpsValidationError{} + +// Validate checks the field values on UnreadyTargetsDumps_UnreadyTargetsDump +// 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 *UnreadyTargetsDumps_UnreadyTargetsDump) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// UnreadyTargetsDumps_UnreadyTargetsDump 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 +// UnreadyTargetsDumps_UnreadyTargetsDumpMultiError, or nil if none found. +func (m *UnreadyTargetsDumps_UnreadyTargetsDump) ValidateAll() error { + return m.validate(true) +} + +func (m *UnreadyTargetsDumps_UnreadyTargetsDump) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + if len(errors) > 0 { + return UnreadyTargetsDumps_UnreadyTargetsDumpMultiError(errors) + } + return nil +} + +// UnreadyTargetsDumps_UnreadyTargetsDumpMultiError is an error wrapping +// multiple validation errors returned by +// UnreadyTargetsDumps_UnreadyTargetsDump.ValidateAll() if the designated +// constraints aren't met. +type UnreadyTargetsDumps_UnreadyTargetsDumpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UnreadyTargetsDumps_UnreadyTargetsDumpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UnreadyTargetsDumps_UnreadyTargetsDumpMultiError) AllErrors() []error { return m } + +// UnreadyTargetsDumps_UnreadyTargetsDumpValidationError is the validation +// error returned by UnreadyTargetsDumps_UnreadyTargetsDump.Validate if the +// designated constraints aren't met. +type UnreadyTargetsDumps_UnreadyTargetsDumpValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e UnreadyTargetsDumps_UnreadyTargetsDumpValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e UnreadyTargetsDumps_UnreadyTargetsDumpValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e UnreadyTargetsDumps_UnreadyTargetsDumpValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e UnreadyTargetsDumps_UnreadyTargetsDumpValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e UnreadyTargetsDumps_UnreadyTargetsDumpValidationError) ErrorName() string { + return "UnreadyTargetsDumps_UnreadyTargetsDumpValidationError" +} + +// Error satisfies the builtin error interface +func (e UnreadyTargetsDumps_UnreadyTargetsDumpValidationError) 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 %sUnreadyTargetsDumps_UnreadyTargetsDump.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = UnreadyTargetsDumps_UnreadyTargetsDumpValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = UnreadyTargetsDumps_UnreadyTargetsDumpValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/admin/v3/listeners.pb.go b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/listeners.pb.go new file mode 100644 index 0000000000000..ec5dc68f9a589 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/listeners.pb.go @@ -0,0 +1,274 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/admin/v3/listeners.proto + +package adminv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Admin endpoint uses this wrapper for “/listeners“ to display listener status information. +// See :ref:`/listeners ` for more information. +type Listeners struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of listener statuses. + ListenerStatuses []*ListenerStatus `protobuf:"bytes,1,rep,name=listener_statuses,json=listenerStatuses,proto3" json:"listener_statuses,omitempty"` +} + +func (x *Listeners) Reset() { + *x = Listeners{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_listeners_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Listeners) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Listeners) ProtoMessage() {} + +func (x *Listeners) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_listeners_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Listeners.ProtoReflect.Descriptor instead. +func (*Listeners) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_listeners_proto_rawDescGZIP(), []int{0} +} + +func (x *Listeners) GetListenerStatuses() []*ListenerStatus { + if x != nil { + return x.ListenerStatuses + } + return nil +} + +// Details an individual listener's current status. +type ListenerStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of the listener + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The actual local address that the listener is listening on. If a listener was configured + // to listen on port 0, then this address has the port that was allocated by the OS. + LocalAddress *v3.Address `protobuf:"bytes,2,opt,name=local_address,json=localAddress,proto3" json:"local_address,omitempty"` + // The additional addresses the listener is listening on as specified via the :ref:`additional_addresses ` + // configuration. + // [#not-implemented-hide:] + AdditionalLocalAddresses []*v3.Address `protobuf:"bytes,3,rep,name=additional_local_addresses,json=additionalLocalAddresses,proto3" json:"additional_local_addresses,omitempty"` +} + +func (x *ListenerStatus) Reset() { + *x = ListenerStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_listeners_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListenerStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListenerStatus) ProtoMessage() {} + +func (x *ListenerStatus) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_listeners_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListenerStatus.ProtoReflect.Descriptor instead. +func (*ListenerStatus) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_listeners_proto_rawDescGZIP(), []int{1} +} + +func (x *ListenerStatus) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ListenerStatus) GetLocalAddress() *v3.Address { + if x != nil { + return x.LocalAddress + } + return nil +} + +func (x *ListenerStatus) GetAdditionalLocalAddresses() []*v3.Address { + if x != nil { + return x.AdditionalLocalAddresses + } + return nil +} + +var File_envoy_admin_v3_listeners_proto protoreflect.FileDescriptor + +var file_envoy_admin_v3_listeners_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, + 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x0e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, + 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7e, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x73, 0x12, 0x4b, 0x0a, 0x11, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x10, + 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, + 0x3a, 0x24, 0x9a, 0xc5, 0x88, 0x1e, 0x1f, 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x22, 0xf0, 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x42, 0x0a, + 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x52, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x5b, 0x0a, 0x1a, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x52, 0x18, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x3a, 0x29, + 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x77, 0x0a, 0x1c, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, + 0x76, 0x33, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_admin_v3_listeners_proto_rawDescOnce sync.Once + file_envoy_admin_v3_listeners_proto_rawDescData = file_envoy_admin_v3_listeners_proto_rawDesc +) + +func file_envoy_admin_v3_listeners_proto_rawDescGZIP() []byte { + file_envoy_admin_v3_listeners_proto_rawDescOnce.Do(func() { + file_envoy_admin_v3_listeners_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_admin_v3_listeners_proto_rawDescData) + }) + return file_envoy_admin_v3_listeners_proto_rawDescData +} + +var file_envoy_admin_v3_listeners_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_admin_v3_listeners_proto_goTypes = []interface{}{ + (*Listeners)(nil), // 0: envoy.admin.v3.Listeners + (*ListenerStatus)(nil), // 1: envoy.admin.v3.ListenerStatus + (*v3.Address)(nil), // 2: envoy.config.core.v3.Address +} +var file_envoy_admin_v3_listeners_proto_depIdxs = []int32{ + 1, // 0: envoy.admin.v3.Listeners.listener_statuses:type_name -> envoy.admin.v3.ListenerStatus + 2, // 1: envoy.admin.v3.ListenerStatus.local_address:type_name -> envoy.config.core.v3.Address + 2, // 2: envoy.admin.v3.ListenerStatus.additional_local_addresses:type_name -> envoy.config.core.v3.Address + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_envoy_admin_v3_listeners_proto_init() } +func file_envoy_admin_v3_listeners_proto_init() { + if File_envoy_admin_v3_listeners_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_admin_v3_listeners_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Listeners); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_listeners_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListenerStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_admin_v3_listeners_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_admin_v3_listeners_proto_goTypes, + DependencyIndexes: file_envoy_admin_v3_listeners_proto_depIdxs, + MessageInfos: file_envoy_admin_v3_listeners_proto_msgTypes, + }.Build() + File_envoy_admin_v3_listeners_proto = out.File + file_envoy_admin_v3_listeners_proto_rawDesc = nil + file_envoy_admin_v3_listeners_proto_goTypes = nil + file_envoy_admin_v3_listeners_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/admin/v3/listeners.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/listeners.pb.validate.go new file mode 100644 index 0000000000000..0f2c1b0f62ccf --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/listeners.pb.validate.go @@ -0,0 +1,332 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/admin/v3/listeners.proto + +package adminv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Listeners 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 *Listeners) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Listeners 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 ListenersMultiError, or nil +// if none found. +func (m *Listeners) ValidateAll() error { + return m.validate(true) +} + +func (m *Listeners) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetListenerStatuses() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenersValidationError{ + field: fmt.Sprintf("ListenerStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenersValidationError{ + field: fmt.Sprintf("ListenerStatuses[%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 ListenersValidationError{ + field: fmt.Sprintf("ListenerStatuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ListenersMultiError(errors) + } + return nil +} + +// ListenersMultiError is an error wrapping multiple validation errors returned +// by Listeners.ValidateAll() if the designated constraints aren't met. +type ListenersMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenersMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenersMultiError) AllErrors() []error { return m } + +// ListenersValidationError is the validation error returned by +// Listeners.Validate if the designated constraints aren't met. +type ListenersValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListenersValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListenersValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListenersValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListenersValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListenersValidationError) ErrorName() string { return "ListenersValidationError" } + +// Error satisfies the builtin error interface +func (e ListenersValidationError) 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 %sListeners.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListenersValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListenersValidationError{} + +// Validate checks the field values on ListenerStatus 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 *ListenerStatus) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListenerStatus 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 ListenerStatusMultiError, +// or nil if none found. +func (m *ListenerStatus) ValidateAll() error { + return m.validate(true) +} + +func (m *ListenerStatus) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + if all { + switch v := interface{}(m.GetLocalAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerStatusValidationError{ + field: "LocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerStatusValidationError{ + field: "LocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocalAddress()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListenerStatusValidationError{ + field: "LocalAddress", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetAdditionalLocalAddresses() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListenerStatusValidationError{ + field: fmt.Sprintf("AdditionalLocalAddresses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListenerStatusValidationError{ + field: fmt.Sprintf("AdditionalLocalAddresses[%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 ListenerStatusValidationError{ + field: fmt.Sprintf("AdditionalLocalAddresses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ListenerStatusMultiError(errors) + } + return nil +} + +// ListenerStatusMultiError is an error wrapping multiple validation errors +// returned by ListenerStatus.ValidateAll() if the designated constraints +// aren't met. +type ListenerStatusMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListenerStatusMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListenerStatusMultiError) AllErrors() []error { return m } + +// ListenerStatusValidationError is the validation error returned by +// ListenerStatus.Validate if the designated constraints aren't met. +type ListenerStatusValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListenerStatusValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListenerStatusValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListenerStatusValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListenerStatusValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListenerStatusValidationError) ErrorName() string { return "ListenerStatusValidationError" } + +// Error satisfies the builtin error interface +func (e ListenerStatusValidationError) 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 %sListenerStatus.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListenerStatusValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListenerStatusValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/admin/v3/memory.pb.go b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/memory.pb.go new file mode 100644 index 0000000000000..7e65b186dea6a --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/memory.pb.go @@ -0,0 +1,233 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/admin/v3/memory.proto + +package adminv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Proto representation of the internal memory consumption of an Envoy instance. These represent +// values extracted from an internal TCMalloc instance. For more information, see the section of the +// docs entitled ["Generic Tcmalloc Status"](https://gperftools.github.io/gperftools/tcmalloc.html). +// [#next-free-field: 7] +type Memory struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The number of bytes allocated by the heap for Envoy. This is an alias for + // “generic.current_allocated_bytes“. + Allocated uint64 `protobuf:"varint,1,opt,name=allocated,proto3" json:"allocated,omitempty"` + // The number of bytes reserved by the heap but not necessarily allocated. This is an alias for + // “generic.heap_size“. + HeapSize uint64 `protobuf:"varint,2,opt,name=heap_size,json=heapSize,proto3" json:"heap_size,omitempty"` + // The number of bytes in free, unmapped pages in the page heap. These bytes always count towards + // virtual memory usage, and depending on the OS, typically do not count towards physical memory + // usage. This is an alias for “tcmalloc.pageheap_unmapped_bytes“. + PageheapUnmapped uint64 `protobuf:"varint,3,opt,name=pageheap_unmapped,json=pageheapUnmapped,proto3" json:"pageheap_unmapped,omitempty"` + // The number of bytes in free, mapped pages in the page heap. These bytes always count towards + // virtual memory usage, and unless the underlying memory is swapped out by the OS, they also + // count towards physical memory usage. This is an alias for “tcmalloc.pageheap_free_bytes“. + PageheapFree uint64 `protobuf:"varint,4,opt,name=pageheap_free,json=pageheapFree,proto3" json:"pageheap_free,omitempty"` + // The amount of memory used by the TCMalloc thread caches (for small objects). This is an alias + // for “tcmalloc.current_total_thread_cache_bytes“. + TotalThreadCache uint64 `protobuf:"varint,5,opt,name=total_thread_cache,json=totalThreadCache,proto3" json:"total_thread_cache,omitempty"` + // The number of bytes of the physical memory usage by the allocator. This is an alias for + // “generic.total_physical_bytes“. + TotalPhysicalBytes uint64 `protobuf:"varint,6,opt,name=total_physical_bytes,json=totalPhysicalBytes,proto3" json:"total_physical_bytes,omitempty"` +} + +func (x *Memory) Reset() { + *x = Memory{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_memory_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Memory) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Memory) ProtoMessage() {} + +func (x *Memory) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_memory_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Memory.ProtoReflect.Descriptor instead. +func (*Memory) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_memory_proto_rawDescGZIP(), []int{0} +} + +func (x *Memory) GetAllocated() uint64 { + if x != nil { + return x.Allocated + } + return 0 +} + +func (x *Memory) GetHeapSize() uint64 { + if x != nil { + return x.HeapSize + } + return 0 +} + +func (x *Memory) GetPageheapUnmapped() uint64 { + if x != nil { + return x.PageheapUnmapped + } + return 0 +} + +func (x *Memory) GetPageheapFree() uint64 { + if x != nil { + return x.PageheapFree + } + return 0 +} + +func (x *Memory) GetTotalThreadCache() uint64 { + if x != nil { + return x.TotalThreadCache + } + return 0 +} + +func (x *Memory) GetTotalPhysicalBytes() uint64 { + if x != nil { + return x.TotalPhysicalBytes + } + return 0 +} + +var File_envoy_admin_v3_memory_proto protoreflect.FileDescriptor + +var file_envoy_admin_v3_memory_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, + 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x98, 0x02, 0x0a, 0x06, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x6c, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61, + 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x65, 0x61, 0x70, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x68, 0x65, 0x61, + 0x70, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x61, 0x67, 0x65, 0x68, 0x65, 0x61, + 0x70, 0x5f, 0x75, 0x6e, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x10, 0x70, 0x61, 0x67, 0x65, 0x68, 0x65, 0x61, 0x70, 0x55, 0x6e, 0x6d, 0x61, 0x70, 0x70, + 0x65, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x61, 0x67, 0x65, 0x68, 0x65, 0x61, 0x70, 0x5f, 0x66, + 0x72, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x70, 0x61, 0x67, 0x65, 0x68, + 0x65, 0x61, 0x70, 0x46, 0x72, 0x65, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x5f, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, + 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, + 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, + 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x3a, 0x21, 0x9a, 0xc5, 0x88, 0x1e, 0x1c, 0x0a, 0x1a, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x42, 0x74, 0x0a, 0x1c, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, + 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, + 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_admin_v3_memory_proto_rawDescOnce sync.Once + file_envoy_admin_v3_memory_proto_rawDescData = file_envoy_admin_v3_memory_proto_rawDesc +) + +func file_envoy_admin_v3_memory_proto_rawDescGZIP() []byte { + file_envoy_admin_v3_memory_proto_rawDescOnce.Do(func() { + file_envoy_admin_v3_memory_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_admin_v3_memory_proto_rawDescData) + }) + return file_envoy_admin_v3_memory_proto_rawDescData +} + +var file_envoy_admin_v3_memory_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_admin_v3_memory_proto_goTypes = []interface{}{ + (*Memory)(nil), // 0: envoy.admin.v3.Memory +} +var file_envoy_admin_v3_memory_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_admin_v3_memory_proto_init() } +func file_envoy_admin_v3_memory_proto_init() { + if File_envoy_admin_v3_memory_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_admin_v3_memory_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Memory); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_admin_v3_memory_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_admin_v3_memory_proto_goTypes, + DependencyIndexes: file_envoy_admin_v3_memory_proto_depIdxs, + MessageInfos: file_envoy_admin_v3_memory_proto_msgTypes, + }.Build() + File_envoy_admin_v3_memory_proto = out.File + file_envoy_admin_v3_memory_proto_rawDesc = nil + file_envoy_admin_v3_memory_proto_goTypes = nil + file_envoy_admin_v3_memory_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/admin/v3/memory.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/memory.pb.validate.go new file mode 100644 index 0000000000000..86d6ef63273d0 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/memory.pb.validate.go @@ -0,0 +1,145 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/admin/v3/memory.proto + +package adminv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Memory 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 *Memory) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Memory 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 MemoryMultiError, or nil if none found. +func (m *Memory) ValidateAll() error { + return m.validate(true) +} + +func (m *Memory) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Allocated + + // no validation rules for HeapSize + + // no validation rules for PageheapUnmapped + + // no validation rules for PageheapFree + + // no validation rules for TotalThreadCache + + // no validation rules for TotalPhysicalBytes + + if len(errors) > 0 { + return MemoryMultiError(errors) + } + return nil +} + +// MemoryMultiError is an error wrapping multiple validation errors returned by +// Memory.ValidateAll() if the designated constraints aren't met. +type MemoryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MemoryMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MemoryMultiError) AllErrors() []error { return m } + +// MemoryValidationError is the validation error returned by Memory.Validate if +// the designated constraints aren't met. +type MemoryValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MemoryValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MemoryValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MemoryValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MemoryValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MemoryValidationError) ErrorName() string { return "MemoryValidationError" } + +// Error satisfies the builtin error interface +func (e MemoryValidationError) 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 %sMemory.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MemoryValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MemoryValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/admin/v3/metrics.pb.go b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/metrics.pb.go new file mode 100644 index 0000000000000..d3cca4d982fdd --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/metrics.pb.go @@ -0,0 +1,239 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/admin/v3/metrics.proto + +package adminv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type SimpleMetric_Type int32 + +const ( + SimpleMetric_COUNTER SimpleMetric_Type = 0 + SimpleMetric_GAUGE SimpleMetric_Type = 1 +) + +// Enum value maps for SimpleMetric_Type. +var ( + SimpleMetric_Type_name = map[int32]string{ + 0: "COUNTER", + 1: "GAUGE", + } + SimpleMetric_Type_value = map[string]int32{ + "COUNTER": 0, + "GAUGE": 1, + } +) + +func (x SimpleMetric_Type) Enum() *SimpleMetric_Type { + p := new(SimpleMetric_Type) + *p = x + return p +} + +func (x SimpleMetric_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SimpleMetric_Type) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_admin_v3_metrics_proto_enumTypes[0].Descriptor() +} + +func (SimpleMetric_Type) Type() protoreflect.EnumType { + return &file_envoy_admin_v3_metrics_proto_enumTypes[0] +} + +func (x SimpleMetric_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SimpleMetric_Type.Descriptor instead. +func (SimpleMetric_Type) EnumDescriptor() ([]byte, []int) { + return file_envoy_admin_v3_metrics_proto_rawDescGZIP(), []int{0, 0} +} + +// Proto representation of an Envoy Counter or Gauge value. +type SimpleMetric struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Type of the metric represented. + Type SimpleMetric_Type `protobuf:"varint,1,opt,name=type,proto3,enum=envoy.admin.v3.SimpleMetric_Type" json:"type,omitempty"` + // Current metric value. + Value uint64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` + // Name of the metric. + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *SimpleMetric) Reset() { + *x = SimpleMetric{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_metrics_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SimpleMetric) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SimpleMetric) ProtoMessage() {} + +func (x *SimpleMetric) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_metrics_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SimpleMetric.ProtoReflect.Descriptor instead. +func (*SimpleMetric) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_metrics_proto_rawDescGZIP(), []int{0} +} + +func (x *SimpleMetric) GetType() SimpleMetric_Type { + if x != nil { + return x.Type + } + return SimpleMetric_COUNTER +} + +func (x *SimpleMetric) GetValue() uint64 { + if x != nil { + return x.Value + } + return 0 +} + +func (x *SimpleMetric) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_envoy_admin_v3_metrics_proto protoreflect.FileDescriptor + +var file_envoy_admin_v3_metrics_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, + 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x1a, 0x1d, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xb8, 0x01, 0x0a, 0x0c, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x12, 0x35, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, + 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x2e, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0x1e, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, + 0x55, 0x4e, 0x54, 0x45, 0x52, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x41, 0x55, 0x47, 0x45, + 0x10, 0x01, 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, + 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x42, 0x75, 0x0a, 0x1c, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, + 0x76, 0x33, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_admin_v3_metrics_proto_rawDescOnce sync.Once + file_envoy_admin_v3_metrics_proto_rawDescData = file_envoy_admin_v3_metrics_proto_rawDesc +) + +func file_envoy_admin_v3_metrics_proto_rawDescGZIP() []byte { + file_envoy_admin_v3_metrics_proto_rawDescOnce.Do(func() { + file_envoy_admin_v3_metrics_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_admin_v3_metrics_proto_rawDescData) + }) + return file_envoy_admin_v3_metrics_proto_rawDescData +} + +var file_envoy_admin_v3_metrics_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_admin_v3_metrics_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_admin_v3_metrics_proto_goTypes = []interface{}{ + (SimpleMetric_Type)(0), // 0: envoy.admin.v3.SimpleMetric.Type + (*SimpleMetric)(nil), // 1: envoy.admin.v3.SimpleMetric +} +var file_envoy_admin_v3_metrics_proto_depIdxs = []int32{ + 0, // 0: envoy.admin.v3.SimpleMetric.type:type_name -> envoy.admin.v3.SimpleMetric.Type + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_admin_v3_metrics_proto_init() } +func file_envoy_admin_v3_metrics_proto_init() { + if File_envoy_admin_v3_metrics_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_admin_v3_metrics_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SimpleMetric); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_admin_v3_metrics_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_admin_v3_metrics_proto_goTypes, + DependencyIndexes: file_envoy_admin_v3_metrics_proto_depIdxs, + EnumInfos: file_envoy_admin_v3_metrics_proto_enumTypes, + MessageInfos: file_envoy_admin_v3_metrics_proto_msgTypes, + }.Build() + File_envoy_admin_v3_metrics_proto = out.File + file_envoy_admin_v3_metrics_proto_rawDesc = nil + file_envoy_admin_v3_metrics_proto_goTypes = nil + file_envoy_admin_v3_metrics_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/admin/v3/metrics.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/metrics.pb.validate.go new file mode 100644 index 0000000000000..3796e8f3a3aea --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/metrics.pb.validate.go @@ -0,0 +1,140 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/admin/v3/metrics.proto + +package adminv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on SimpleMetric 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 *SimpleMetric) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SimpleMetric 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 SimpleMetricMultiError, or +// nil if none found. +func (m *SimpleMetric) ValidateAll() error { + return m.validate(true) +} + +func (m *SimpleMetric) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Type + + // no validation rules for Value + + // no validation rules for Name + + if len(errors) > 0 { + return SimpleMetricMultiError(errors) + } + return nil +} + +// SimpleMetricMultiError is an error wrapping multiple validation errors +// returned by SimpleMetric.ValidateAll() if the designated constraints aren't met. +type SimpleMetricMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SimpleMetricMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SimpleMetricMultiError) AllErrors() []error { return m } + +// SimpleMetricValidationError is the validation error returned by +// SimpleMetric.Validate if the designated constraints aren't met. +type SimpleMetricValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SimpleMetricValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SimpleMetricValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SimpleMetricValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SimpleMetricValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SimpleMetricValidationError) ErrorName() string { return "SimpleMetricValidationError" } + +// Error satisfies the builtin error interface +func (e SimpleMetricValidationError) 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 %sSimpleMetric.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SimpleMetricValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SimpleMetricValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/admin/v3/mutex_stats.pb.go b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/mutex_stats.pb.go new file mode 100644 index 0000000000000..04faff52dd58b --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/mutex_stats.pb.go @@ -0,0 +1,196 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/admin/v3/mutex_stats.proto + +package adminv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Proto representation of the statistics collected upon absl::Mutex contention, if Envoy is run +// under :option:`--enable-mutex-tracing`. For more information, see the “absl::Mutex“ +// [docs](https://abseil.io/about/design/mutex#extra-features). +// +// *NB*: The wait cycles below are measured by “absl::base_internal::CycleClock“, and may not +// correspond to core clock frequency. For more information, see the “CycleClock“ +// [docs](https://github.com/abseil/abseil-cpp/blob/master/absl/base/internal/cycleclock.h). +type MutexStats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The number of individual mutex contentions which have occurred since startup. + NumContentions uint64 `protobuf:"varint,1,opt,name=num_contentions,json=numContentions,proto3" json:"num_contentions,omitempty"` + // The length of the current contention wait cycle. + CurrentWaitCycles uint64 `protobuf:"varint,2,opt,name=current_wait_cycles,json=currentWaitCycles,proto3" json:"current_wait_cycles,omitempty"` + // The lifetime total of all contention wait cycles. + LifetimeWaitCycles uint64 `protobuf:"varint,3,opt,name=lifetime_wait_cycles,json=lifetimeWaitCycles,proto3" json:"lifetime_wait_cycles,omitempty"` +} + +func (x *MutexStats) Reset() { + *x = MutexStats{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_mutex_stats_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MutexStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MutexStats) ProtoMessage() {} + +func (x *MutexStats) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_mutex_stats_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MutexStats.ProtoReflect.Descriptor instead. +func (*MutexStats) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_mutex_stats_proto_rawDescGZIP(), []int{0} +} + +func (x *MutexStats) GetNumContentions() uint64 { + if x != nil { + return x.NumContentions + } + return 0 +} + +func (x *MutexStats) GetCurrentWaitCycles() uint64 { + if x != nil { + return x.CurrentWaitCycles + } + return 0 +} + +func (x *MutexStats) GetLifetimeWaitCycles() uint64 { + if x != nil { + return x.LifetimeWaitCycles + } + return 0 +} + +var File_envoy_admin_v3_mutex_stats_proto protoreflect.FileDescriptor + +var file_envoy_admin_v3_mutex_stats_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, + 0x2f, 0x6d, 0x75, 0x74, 0x65, 0x78, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x0e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbe, 0x01, 0x0a, 0x0a, 0x4d, 0x75, 0x74, 0x65, 0x78, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x6e, 0x75, + 0x6d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2e, 0x0a, 0x13, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x63, 0x79, 0x63, + 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x57, 0x61, 0x69, 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x14, + 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x63, 0x79, + 0x63, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x6c, 0x69, 0x66, 0x65, + 0x74, 0x69, 0x6d, 0x65, 0x57, 0x61, 0x69, 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65, 0x73, 0x3a, 0x25, + 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x75, 0x74, 0x65, 0x78, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x42, 0x78, 0x0a, 0x1c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x4d, 0x75, 0x74, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x3b, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_admin_v3_mutex_stats_proto_rawDescOnce sync.Once + file_envoy_admin_v3_mutex_stats_proto_rawDescData = file_envoy_admin_v3_mutex_stats_proto_rawDesc +) + +func file_envoy_admin_v3_mutex_stats_proto_rawDescGZIP() []byte { + file_envoy_admin_v3_mutex_stats_proto_rawDescOnce.Do(func() { + file_envoy_admin_v3_mutex_stats_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_admin_v3_mutex_stats_proto_rawDescData) + }) + return file_envoy_admin_v3_mutex_stats_proto_rawDescData +} + +var file_envoy_admin_v3_mutex_stats_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_admin_v3_mutex_stats_proto_goTypes = []interface{}{ + (*MutexStats)(nil), // 0: envoy.admin.v3.MutexStats +} +var file_envoy_admin_v3_mutex_stats_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_admin_v3_mutex_stats_proto_init() } +func file_envoy_admin_v3_mutex_stats_proto_init() { + if File_envoy_admin_v3_mutex_stats_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_admin_v3_mutex_stats_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MutexStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_admin_v3_mutex_stats_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_admin_v3_mutex_stats_proto_goTypes, + DependencyIndexes: file_envoy_admin_v3_mutex_stats_proto_depIdxs, + MessageInfos: file_envoy_admin_v3_mutex_stats_proto_msgTypes, + }.Build() + File_envoy_admin_v3_mutex_stats_proto = out.File + file_envoy_admin_v3_mutex_stats_proto_rawDesc = nil + file_envoy_admin_v3_mutex_stats_proto_goTypes = nil + file_envoy_admin_v3_mutex_stats_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/admin/v3/mutex_stats.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/mutex_stats.pb.validate.go new file mode 100644 index 0000000000000..562609e83f3fa --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/mutex_stats.pb.validate.go @@ -0,0 +1,140 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/admin/v3/mutex_stats.proto + +package adminv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on MutexStats 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 *MutexStats) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MutexStats 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 MutexStatsMultiError, or +// nil if none found. +func (m *MutexStats) ValidateAll() error { + return m.validate(true) +} + +func (m *MutexStats) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for NumContentions + + // no validation rules for CurrentWaitCycles + + // no validation rules for LifetimeWaitCycles + + if len(errors) > 0 { + return MutexStatsMultiError(errors) + } + return nil +} + +// MutexStatsMultiError is an error wrapping multiple validation errors +// returned by MutexStats.ValidateAll() if the designated constraints aren't met. +type MutexStatsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MutexStatsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MutexStatsMultiError) AllErrors() []error { return m } + +// MutexStatsValidationError is the validation error returned by +// MutexStats.Validate if the designated constraints aren't met. +type MutexStatsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MutexStatsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MutexStatsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MutexStatsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MutexStatsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MutexStatsValidationError) ErrorName() string { return "MutexStatsValidationError" } + +// Error satisfies the builtin error interface +func (e MutexStatsValidationError) 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 %sMutexStats.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MutexStatsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MutexStatsValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/admin/v3/server_info.pb.go b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/server_info.pb.go new file mode 100644 index 0000000000000..2f4fa87803b88 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/server_info.pb.go @@ -0,0 +1,953 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/admin/v3/server_info.proto + +package adminv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type ServerInfo_State int32 + +const ( + // Server is live and serving traffic. + ServerInfo_LIVE ServerInfo_State = 0 + // Server is draining listeners in response to external health checks failing. + ServerInfo_DRAINING ServerInfo_State = 1 + // Server has not yet completed cluster manager initialization. + ServerInfo_PRE_INITIALIZING ServerInfo_State = 2 + // Server is running the cluster manager initialization callbacks (e.g., RDS). + ServerInfo_INITIALIZING ServerInfo_State = 3 +) + +// Enum value maps for ServerInfo_State. +var ( + ServerInfo_State_name = map[int32]string{ + 0: "LIVE", + 1: "DRAINING", + 2: "PRE_INITIALIZING", + 3: "INITIALIZING", + } + ServerInfo_State_value = map[string]int32{ + "LIVE": 0, + "DRAINING": 1, + "PRE_INITIALIZING": 2, + "INITIALIZING": 3, + } +) + +func (x ServerInfo_State) Enum() *ServerInfo_State { + p := new(ServerInfo_State) + *p = x + return p +} + +func (x ServerInfo_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ServerInfo_State) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_admin_v3_server_info_proto_enumTypes[0].Descriptor() +} + +func (ServerInfo_State) Type() protoreflect.EnumType { + return &file_envoy_admin_v3_server_info_proto_enumTypes[0] +} + +func (x ServerInfo_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ServerInfo_State.Descriptor instead. +func (ServerInfo_State) EnumDescriptor() ([]byte, []int) { + return file_envoy_admin_v3_server_info_proto_rawDescGZIP(), []int{0, 0} +} + +type CommandLineOptions_IpVersion int32 + +const ( + CommandLineOptions_v4 CommandLineOptions_IpVersion = 0 + CommandLineOptions_v6 CommandLineOptions_IpVersion = 1 +) + +// Enum value maps for CommandLineOptions_IpVersion. +var ( + CommandLineOptions_IpVersion_name = map[int32]string{ + 0: "v4", + 1: "v6", + } + CommandLineOptions_IpVersion_value = map[string]int32{ + "v4": 0, + "v6": 1, + } +) + +func (x CommandLineOptions_IpVersion) Enum() *CommandLineOptions_IpVersion { + p := new(CommandLineOptions_IpVersion) + *p = x + return p +} + +func (x CommandLineOptions_IpVersion) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CommandLineOptions_IpVersion) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_admin_v3_server_info_proto_enumTypes[1].Descriptor() +} + +func (CommandLineOptions_IpVersion) Type() protoreflect.EnumType { + return &file_envoy_admin_v3_server_info_proto_enumTypes[1] +} + +func (x CommandLineOptions_IpVersion) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CommandLineOptions_IpVersion.Descriptor instead. +func (CommandLineOptions_IpVersion) EnumDescriptor() ([]byte, []int) { + return file_envoy_admin_v3_server_info_proto_rawDescGZIP(), []int{1, 0} +} + +type CommandLineOptions_Mode int32 + +const ( + // Validate configs and then serve traffic normally. + CommandLineOptions_Serve CommandLineOptions_Mode = 0 + // Validate configs and exit. + CommandLineOptions_Validate CommandLineOptions_Mode = 1 + // Completely load and initialize the config, and then exit without running the listener loop. + CommandLineOptions_InitOnly CommandLineOptions_Mode = 2 +) + +// Enum value maps for CommandLineOptions_Mode. +var ( + CommandLineOptions_Mode_name = map[int32]string{ + 0: "Serve", + 1: "Validate", + 2: "InitOnly", + } + CommandLineOptions_Mode_value = map[string]int32{ + "Serve": 0, + "Validate": 1, + "InitOnly": 2, + } +) + +func (x CommandLineOptions_Mode) Enum() *CommandLineOptions_Mode { + p := new(CommandLineOptions_Mode) + *p = x + return p +} + +func (x CommandLineOptions_Mode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CommandLineOptions_Mode) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_admin_v3_server_info_proto_enumTypes[2].Descriptor() +} + +func (CommandLineOptions_Mode) Type() protoreflect.EnumType { + return &file_envoy_admin_v3_server_info_proto_enumTypes[2] +} + +func (x CommandLineOptions_Mode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CommandLineOptions_Mode.Descriptor instead. +func (CommandLineOptions_Mode) EnumDescriptor() ([]byte, []int) { + return file_envoy_admin_v3_server_info_proto_rawDescGZIP(), []int{1, 1} +} + +type CommandLineOptions_DrainStrategy int32 + +const ( + // Gradually discourage connections over the course of the drain period. + CommandLineOptions_Gradual CommandLineOptions_DrainStrategy = 0 + // Discourage all connections for the duration of the drain sequence. + CommandLineOptions_Immediate CommandLineOptions_DrainStrategy = 1 +) + +// Enum value maps for CommandLineOptions_DrainStrategy. +var ( + CommandLineOptions_DrainStrategy_name = map[int32]string{ + 0: "Gradual", + 1: "Immediate", + } + CommandLineOptions_DrainStrategy_value = map[string]int32{ + "Gradual": 0, + "Immediate": 1, + } +) + +func (x CommandLineOptions_DrainStrategy) Enum() *CommandLineOptions_DrainStrategy { + p := new(CommandLineOptions_DrainStrategy) + *p = x + return p +} + +func (x CommandLineOptions_DrainStrategy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CommandLineOptions_DrainStrategy) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_admin_v3_server_info_proto_enumTypes[3].Descriptor() +} + +func (CommandLineOptions_DrainStrategy) Type() protoreflect.EnumType { + return &file_envoy_admin_v3_server_info_proto_enumTypes[3] +} + +func (x CommandLineOptions_DrainStrategy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CommandLineOptions_DrainStrategy.Descriptor instead. +func (CommandLineOptions_DrainStrategy) EnumDescriptor() ([]byte, []int) { + return file_envoy_admin_v3_server_info_proto_rawDescGZIP(), []int{1, 2} +} + +// Proto representation of the value returned by /server_info, containing +// server version/server status information. +// [#next-free-field: 8] +type ServerInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Server version. + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // State of the server. + State ServerInfo_State `protobuf:"varint,2,opt,name=state,proto3,enum=envoy.admin.v3.ServerInfo_State" json:"state,omitempty"` + // Uptime since current epoch was started. + UptimeCurrentEpoch *durationpb.Duration `protobuf:"bytes,3,opt,name=uptime_current_epoch,json=uptimeCurrentEpoch,proto3" json:"uptime_current_epoch,omitempty"` + // Uptime since the start of the first epoch. + UptimeAllEpochs *durationpb.Duration `protobuf:"bytes,4,opt,name=uptime_all_epochs,json=uptimeAllEpochs,proto3" json:"uptime_all_epochs,omitempty"` + // Hot restart version. + HotRestartVersion string `protobuf:"bytes,5,opt,name=hot_restart_version,json=hotRestartVersion,proto3" json:"hot_restart_version,omitempty"` + // Command line options the server is currently running with. + CommandLineOptions *CommandLineOptions `protobuf:"bytes,6,opt,name=command_line_options,json=commandLineOptions,proto3" json:"command_line_options,omitempty"` + // Populated node identity of this server. + Node *v3.Node `protobuf:"bytes,7,opt,name=node,proto3" json:"node,omitempty"` +} + +func (x *ServerInfo) Reset() { + *x = ServerInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_server_info_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerInfo) ProtoMessage() {} + +func (x *ServerInfo) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_server_info_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerInfo.ProtoReflect.Descriptor instead. +func (*ServerInfo) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_server_info_proto_rawDescGZIP(), []int{0} +} + +func (x *ServerInfo) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *ServerInfo) GetState() ServerInfo_State { + if x != nil { + return x.State + } + return ServerInfo_LIVE +} + +func (x *ServerInfo) GetUptimeCurrentEpoch() *durationpb.Duration { + if x != nil { + return x.UptimeCurrentEpoch + } + return nil +} + +func (x *ServerInfo) GetUptimeAllEpochs() *durationpb.Duration { + if x != nil { + return x.UptimeAllEpochs + } + return nil +} + +func (x *ServerInfo) GetHotRestartVersion() string { + if x != nil { + return x.HotRestartVersion + } + return "" +} + +func (x *ServerInfo) GetCommandLineOptions() *CommandLineOptions { + if x != nil { + return x.CommandLineOptions + } + return nil +} + +func (x *ServerInfo) GetNode() *v3.Node { + if x != nil { + return x.Node + } + return nil +} + +// [#next-free-field: 39] +type CommandLineOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // See :option:`--base-id` for details. + BaseId uint64 `protobuf:"varint,1,opt,name=base_id,json=baseId,proto3" json:"base_id,omitempty"` + // See :option:`--use-dynamic-base-id` for details. + UseDynamicBaseId bool `protobuf:"varint,31,opt,name=use_dynamic_base_id,json=useDynamicBaseId,proto3" json:"use_dynamic_base_id,omitempty"` + // See :option:`--base-id-path` for details. + BaseIdPath string `protobuf:"bytes,32,opt,name=base_id_path,json=baseIdPath,proto3" json:"base_id_path,omitempty"` + // See :option:`--concurrency` for details. + Concurrency uint32 `protobuf:"varint,2,opt,name=concurrency,proto3" json:"concurrency,omitempty"` + // See :option:`--config-path` for details. + ConfigPath string `protobuf:"bytes,3,opt,name=config_path,json=configPath,proto3" json:"config_path,omitempty"` + // See :option:`--config-yaml` for details. + ConfigYaml string `protobuf:"bytes,4,opt,name=config_yaml,json=configYaml,proto3" json:"config_yaml,omitempty"` + // See :option:`--allow-unknown-static-fields` for details. + AllowUnknownStaticFields bool `protobuf:"varint,5,opt,name=allow_unknown_static_fields,json=allowUnknownStaticFields,proto3" json:"allow_unknown_static_fields,omitempty"` + // See :option:`--reject-unknown-dynamic-fields` for details. + RejectUnknownDynamicFields bool `protobuf:"varint,26,opt,name=reject_unknown_dynamic_fields,json=rejectUnknownDynamicFields,proto3" json:"reject_unknown_dynamic_fields,omitempty"` + // See :option:`--ignore-unknown-dynamic-fields` for details. + IgnoreUnknownDynamicFields bool `protobuf:"varint,30,opt,name=ignore_unknown_dynamic_fields,json=ignoreUnknownDynamicFields,proto3" json:"ignore_unknown_dynamic_fields,omitempty"` + // See :option:`--admin-address-path` for details. + AdminAddressPath string `protobuf:"bytes,6,opt,name=admin_address_path,json=adminAddressPath,proto3" json:"admin_address_path,omitempty"` + // See :option:`--local-address-ip-version` for details. + LocalAddressIpVersion CommandLineOptions_IpVersion `protobuf:"varint,7,opt,name=local_address_ip_version,json=localAddressIpVersion,proto3,enum=envoy.admin.v3.CommandLineOptions_IpVersion" json:"local_address_ip_version,omitempty"` + // See :option:`--log-level` for details. + LogLevel string `protobuf:"bytes,8,opt,name=log_level,json=logLevel,proto3" json:"log_level,omitempty"` + // See :option:`--component-log-level` for details. + ComponentLogLevel string `protobuf:"bytes,9,opt,name=component_log_level,json=componentLogLevel,proto3" json:"component_log_level,omitempty"` + // See :option:`--log-format` for details. + LogFormat string `protobuf:"bytes,10,opt,name=log_format,json=logFormat,proto3" json:"log_format,omitempty"` + // See :option:`--log-format-escaped` for details. + LogFormatEscaped bool `protobuf:"varint,27,opt,name=log_format_escaped,json=logFormatEscaped,proto3" json:"log_format_escaped,omitempty"` + // See :option:`--log-path` for details. + LogPath string `protobuf:"bytes,11,opt,name=log_path,json=logPath,proto3" json:"log_path,omitempty"` + // See :option:`--service-cluster` for details. + ServiceCluster string `protobuf:"bytes,13,opt,name=service_cluster,json=serviceCluster,proto3" json:"service_cluster,omitempty"` + // See :option:`--service-node` for details. + ServiceNode string `protobuf:"bytes,14,opt,name=service_node,json=serviceNode,proto3" json:"service_node,omitempty"` + // See :option:`--service-zone` for details. + ServiceZone string `protobuf:"bytes,15,opt,name=service_zone,json=serviceZone,proto3" json:"service_zone,omitempty"` + // See :option:`--file-flush-interval-msec` for details. + FileFlushInterval *durationpb.Duration `protobuf:"bytes,16,opt,name=file_flush_interval,json=fileFlushInterval,proto3" json:"file_flush_interval,omitempty"` + // See :option:`--drain-time-s` for details. + DrainTime *durationpb.Duration `protobuf:"bytes,17,opt,name=drain_time,json=drainTime,proto3" json:"drain_time,omitempty"` + // See :option:`--drain-strategy` for details. + DrainStrategy CommandLineOptions_DrainStrategy `protobuf:"varint,33,opt,name=drain_strategy,json=drainStrategy,proto3,enum=envoy.admin.v3.CommandLineOptions_DrainStrategy" json:"drain_strategy,omitempty"` + // See :option:`--parent-shutdown-time-s` for details. + ParentShutdownTime *durationpb.Duration `protobuf:"bytes,18,opt,name=parent_shutdown_time,json=parentShutdownTime,proto3" json:"parent_shutdown_time,omitempty"` + // See :option:`--mode` for details. + Mode CommandLineOptions_Mode `protobuf:"varint,19,opt,name=mode,proto3,enum=envoy.admin.v3.CommandLineOptions_Mode" json:"mode,omitempty"` + // See :option:`--disable-hot-restart` for details. + DisableHotRestart bool `protobuf:"varint,22,opt,name=disable_hot_restart,json=disableHotRestart,proto3" json:"disable_hot_restart,omitempty"` + // See :option:`--enable-mutex-tracing` for details. + EnableMutexTracing bool `protobuf:"varint,23,opt,name=enable_mutex_tracing,json=enableMutexTracing,proto3" json:"enable_mutex_tracing,omitempty"` + // See :option:`--restart-epoch` for details. + RestartEpoch uint32 `protobuf:"varint,24,opt,name=restart_epoch,json=restartEpoch,proto3" json:"restart_epoch,omitempty"` + // See :option:`--cpuset-threads` for details. + CpusetThreads bool `protobuf:"varint,25,opt,name=cpuset_threads,json=cpusetThreads,proto3" json:"cpuset_threads,omitempty"` + // See :option:`--disable-extensions` for details. + DisabledExtensions []string `protobuf:"bytes,28,rep,name=disabled_extensions,json=disabledExtensions,proto3" json:"disabled_extensions,omitempty"` + // See :option:`--enable-fine-grain-logging` for details. + EnableFineGrainLogging bool `protobuf:"varint,34,opt,name=enable_fine_grain_logging,json=enableFineGrainLogging,proto3" json:"enable_fine_grain_logging,omitempty"` + // See :option:`--socket-path` for details. + SocketPath string `protobuf:"bytes,35,opt,name=socket_path,json=socketPath,proto3" json:"socket_path,omitempty"` + // See :option:`--socket-mode` for details. + SocketMode uint32 `protobuf:"varint,36,opt,name=socket_mode,json=socketMode,proto3" json:"socket_mode,omitempty"` + // See :option:`--enable-core-dump` for details. + EnableCoreDump bool `protobuf:"varint,37,opt,name=enable_core_dump,json=enableCoreDump,proto3" json:"enable_core_dump,omitempty"` + // See :option:`--stats-tag` for details. + StatsTag []string `protobuf:"bytes,38,rep,name=stats_tag,json=statsTag,proto3" json:"stats_tag,omitempty"` +} + +func (x *CommandLineOptions) Reset() { + *x = CommandLineOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_server_info_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommandLineOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommandLineOptions) ProtoMessage() {} + +func (x *CommandLineOptions) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_server_info_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommandLineOptions.ProtoReflect.Descriptor instead. +func (*CommandLineOptions) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_server_info_proto_rawDescGZIP(), []int{1} +} + +func (x *CommandLineOptions) GetBaseId() uint64 { + if x != nil { + return x.BaseId + } + return 0 +} + +func (x *CommandLineOptions) GetUseDynamicBaseId() bool { + if x != nil { + return x.UseDynamicBaseId + } + return false +} + +func (x *CommandLineOptions) GetBaseIdPath() string { + if x != nil { + return x.BaseIdPath + } + return "" +} + +func (x *CommandLineOptions) GetConcurrency() uint32 { + if x != nil { + return x.Concurrency + } + return 0 +} + +func (x *CommandLineOptions) GetConfigPath() string { + if x != nil { + return x.ConfigPath + } + return "" +} + +func (x *CommandLineOptions) GetConfigYaml() string { + if x != nil { + return x.ConfigYaml + } + return "" +} + +func (x *CommandLineOptions) GetAllowUnknownStaticFields() bool { + if x != nil { + return x.AllowUnknownStaticFields + } + return false +} + +func (x *CommandLineOptions) GetRejectUnknownDynamicFields() bool { + if x != nil { + return x.RejectUnknownDynamicFields + } + return false +} + +func (x *CommandLineOptions) GetIgnoreUnknownDynamicFields() bool { + if x != nil { + return x.IgnoreUnknownDynamicFields + } + return false +} + +func (x *CommandLineOptions) GetAdminAddressPath() string { + if x != nil { + return x.AdminAddressPath + } + return "" +} + +func (x *CommandLineOptions) GetLocalAddressIpVersion() CommandLineOptions_IpVersion { + if x != nil { + return x.LocalAddressIpVersion + } + return CommandLineOptions_v4 +} + +func (x *CommandLineOptions) GetLogLevel() string { + if x != nil { + return x.LogLevel + } + return "" +} + +func (x *CommandLineOptions) GetComponentLogLevel() string { + if x != nil { + return x.ComponentLogLevel + } + return "" +} + +func (x *CommandLineOptions) GetLogFormat() string { + if x != nil { + return x.LogFormat + } + return "" +} + +func (x *CommandLineOptions) GetLogFormatEscaped() bool { + if x != nil { + return x.LogFormatEscaped + } + return false +} + +func (x *CommandLineOptions) GetLogPath() string { + if x != nil { + return x.LogPath + } + return "" +} + +func (x *CommandLineOptions) GetServiceCluster() string { + if x != nil { + return x.ServiceCluster + } + return "" +} + +func (x *CommandLineOptions) GetServiceNode() string { + if x != nil { + return x.ServiceNode + } + return "" +} + +func (x *CommandLineOptions) GetServiceZone() string { + if x != nil { + return x.ServiceZone + } + return "" +} + +func (x *CommandLineOptions) GetFileFlushInterval() *durationpb.Duration { + if x != nil { + return x.FileFlushInterval + } + return nil +} + +func (x *CommandLineOptions) GetDrainTime() *durationpb.Duration { + if x != nil { + return x.DrainTime + } + return nil +} + +func (x *CommandLineOptions) GetDrainStrategy() CommandLineOptions_DrainStrategy { + if x != nil { + return x.DrainStrategy + } + return CommandLineOptions_Gradual +} + +func (x *CommandLineOptions) GetParentShutdownTime() *durationpb.Duration { + if x != nil { + return x.ParentShutdownTime + } + return nil +} + +func (x *CommandLineOptions) GetMode() CommandLineOptions_Mode { + if x != nil { + return x.Mode + } + return CommandLineOptions_Serve +} + +func (x *CommandLineOptions) GetDisableHotRestart() bool { + if x != nil { + return x.DisableHotRestart + } + return false +} + +func (x *CommandLineOptions) GetEnableMutexTracing() bool { + if x != nil { + return x.EnableMutexTracing + } + return false +} + +func (x *CommandLineOptions) GetRestartEpoch() uint32 { + if x != nil { + return x.RestartEpoch + } + return 0 +} + +func (x *CommandLineOptions) GetCpusetThreads() bool { + if x != nil { + return x.CpusetThreads + } + return false +} + +func (x *CommandLineOptions) GetDisabledExtensions() []string { + if x != nil { + return x.DisabledExtensions + } + return nil +} + +func (x *CommandLineOptions) GetEnableFineGrainLogging() bool { + if x != nil { + return x.EnableFineGrainLogging + } + return false +} + +func (x *CommandLineOptions) GetSocketPath() string { + if x != nil { + return x.SocketPath + } + return "" +} + +func (x *CommandLineOptions) GetSocketMode() uint32 { + if x != nil { + return x.SocketMode + } + return 0 +} + +func (x *CommandLineOptions) GetEnableCoreDump() bool { + if x != nil { + return x.EnableCoreDump + } + return false +} + +func (x *CommandLineOptions) GetStatsTag() []string { + if x != nil { + return x.StatsTag + } + return nil +} + +var File_envoy_admin_v3_server_info_proto protoreflect.FileDescriptor + +var file_envoy_admin_v3_server_info_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, + 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x0e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, 0x04, 0x0a, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x36, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x4b, 0x0a, 0x14, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, + 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x12, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, + 0x6f, 0x63, 0x68, 0x12, 0x45, 0x0a, 0x11, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x61, 0x6c, + 0x6c, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x75, 0x70, 0x74, 0x69, 0x6d, + 0x65, 0x41, 0x6c, 0x6c, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x68, 0x6f, + 0x74, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x54, 0x0a, 0x14, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x2e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, + 0x22, 0x47, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x49, 0x56, + 0x45, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x52, 0x41, 0x49, 0x4e, 0x49, 0x4e, 0x47, 0x10, + 0x01, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x52, 0x45, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, + 0x49, 0x5a, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x4e, 0x49, 0x54, 0x49, + 0x41, 0x4c, 0x49, 0x5a, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, + 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, + 0x22, 0xdb, 0x0e, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x62, 0x61, 0x73, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x62, 0x61, 0x73, 0x65, 0x49, 0x64, + 0x12, 0x2d, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x5f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, + 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x75, + 0x73, 0x65, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x42, 0x61, 0x73, 0x65, 0x49, 0x64, 0x12, + 0x20, 0x0a, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, + 0x20, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x49, 0x64, 0x50, 0x61, 0x74, + 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x63, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, 0x61, + 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x79, + 0x61, 0x6d, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x59, 0x61, 0x6d, 0x6c, 0x12, 0x3d, 0x0a, 0x1b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x75, + 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x73, 0x12, 0x41, 0x0a, 0x1d, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x75, + 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x72, 0x65, 0x6a, + 0x65, 0x63, 0x74, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, + 0x63, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x41, 0x0a, 0x1d, 0x69, 0x67, 0x6e, 0x6f, 0x72, + 0x65, 0x5f, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, + 0x63, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, + 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x44, 0x79, 0x6e, + 0x61, 0x6d, 0x69, 0x63, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x65, 0x0a, 0x18, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x70, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, + 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x49, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x2e, 0x0a, 0x13, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, + 0x76, 0x65, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, + 0x6c, 0x6f, 0x67, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x6c, + 0x6f, 0x67, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, + 0x64, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x6c, 0x6f, 0x67, 0x46, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x45, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x6f, 0x67, + 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x6f, 0x67, + 0x50, 0x61, 0x74, 0x68, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x21, 0x0a, + 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, + 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, + 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5a, + 0x6f, 0x6e, 0x65, 0x12, 0x49, 0x0a, 0x13, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x66, 0x6c, 0x75, 0x73, + 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x66, 0x69, 0x6c, + 0x65, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x38, + 0x0a, 0x0a, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, + 0x72, 0x61, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x57, 0x0a, 0x0e, 0x64, 0x72, 0x61, 0x69, + 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x44, 0x72, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x67, 0x79, 0x52, 0x0d, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, + 0x79, 0x12, 0x4b, 0x0a, 0x14, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x68, 0x75, 0x74, + 0x64, 0x6f, 0x77, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, + 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x64, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x68, 0x6f, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x48, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6d, 0x75, 0x74, 0x65, 0x78, 0x5f, 0x74, 0x72, 0x61, 0x63, + 0x69, 0x6e, 0x67, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x4d, 0x75, 0x74, 0x65, 0x78, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, + 0x0d, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x18, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x45, 0x70, 0x6f, + 0x63, 0x68, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x70, 0x75, 0x73, 0x65, 0x74, 0x5f, 0x74, 0x68, 0x72, + 0x65, 0x61, 0x64, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x63, 0x70, 0x75, 0x73, + 0x65, 0x74, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x64, 0x69, 0x73, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x1c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x39, 0x0a, 0x19, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6e, 0x65, 0x5f, 0x67, 0x72, 0x61, 0x69, 0x6e, 0x5f, + 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x18, 0x22, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x65, 0x47, 0x72, 0x61, 0x69, 0x6e, 0x4c, 0x6f, + 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x23, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x63, 0x6b, + 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x18, 0x25, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0e, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x72, 0x65, 0x44, 0x75, 0x6d, + 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x26, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x73, 0x54, 0x61, 0x67, 0x22, 0x1b, + 0x0a, 0x09, 0x49, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x06, 0x0a, 0x02, 0x76, + 0x34, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x76, 0x36, 0x10, 0x01, 0x22, 0x2d, 0x0a, 0x04, 0x4d, + 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x65, 0x72, 0x76, 0x65, 0x10, 0x00, 0x12, 0x0c, + 0x0a, 0x08, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, + 0x49, 0x6e, 0x69, 0x74, 0x4f, 0x6e, 0x6c, 0x79, 0x10, 0x02, 0x22, 0x2b, 0x0a, 0x0d, 0x44, 0x72, + 0x61, 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x47, + 0x72, 0x61, 0x64, 0x75, 0x61, 0x6c, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x6d, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x74, 0x65, 0x10, 0x01, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x04, 0x08, 0x0c, 0x10, 0x0d, 0x4a, 0x04, 0x08, 0x14, + 0x10, 0x15, 0x4a, 0x04, 0x08, 0x15, 0x10, 0x16, 0x4a, 0x04, 0x08, 0x1d, 0x10, 0x1e, 0x52, 0x09, + 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x6f, + 0x62, 0x6a, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x52, 0x11, 0x62, 0x6f, 0x6f, + 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x78, + 0x0a, 0x1c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0f, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_admin_v3_server_info_proto_rawDescOnce sync.Once + file_envoy_admin_v3_server_info_proto_rawDescData = file_envoy_admin_v3_server_info_proto_rawDesc +) + +func file_envoy_admin_v3_server_info_proto_rawDescGZIP() []byte { + file_envoy_admin_v3_server_info_proto_rawDescOnce.Do(func() { + file_envoy_admin_v3_server_info_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_admin_v3_server_info_proto_rawDescData) + }) + return file_envoy_admin_v3_server_info_proto_rawDescData +} + +var file_envoy_admin_v3_server_info_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_envoy_admin_v3_server_info_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_admin_v3_server_info_proto_goTypes = []interface{}{ + (ServerInfo_State)(0), // 0: envoy.admin.v3.ServerInfo.State + (CommandLineOptions_IpVersion)(0), // 1: envoy.admin.v3.CommandLineOptions.IpVersion + (CommandLineOptions_Mode)(0), // 2: envoy.admin.v3.CommandLineOptions.Mode + (CommandLineOptions_DrainStrategy)(0), // 3: envoy.admin.v3.CommandLineOptions.DrainStrategy + (*ServerInfo)(nil), // 4: envoy.admin.v3.ServerInfo + (*CommandLineOptions)(nil), // 5: envoy.admin.v3.CommandLineOptions + (*durationpb.Duration)(nil), // 6: google.protobuf.Duration + (*v3.Node)(nil), // 7: envoy.config.core.v3.Node +} +var file_envoy_admin_v3_server_info_proto_depIdxs = []int32{ + 0, // 0: envoy.admin.v3.ServerInfo.state:type_name -> envoy.admin.v3.ServerInfo.State + 6, // 1: envoy.admin.v3.ServerInfo.uptime_current_epoch:type_name -> google.protobuf.Duration + 6, // 2: envoy.admin.v3.ServerInfo.uptime_all_epochs:type_name -> google.protobuf.Duration + 5, // 3: envoy.admin.v3.ServerInfo.command_line_options:type_name -> envoy.admin.v3.CommandLineOptions + 7, // 4: envoy.admin.v3.ServerInfo.node:type_name -> envoy.config.core.v3.Node + 1, // 5: envoy.admin.v3.CommandLineOptions.local_address_ip_version:type_name -> envoy.admin.v3.CommandLineOptions.IpVersion + 6, // 6: envoy.admin.v3.CommandLineOptions.file_flush_interval:type_name -> google.protobuf.Duration + 6, // 7: envoy.admin.v3.CommandLineOptions.drain_time:type_name -> google.protobuf.Duration + 3, // 8: envoy.admin.v3.CommandLineOptions.drain_strategy:type_name -> envoy.admin.v3.CommandLineOptions.DrainStrategy + 6, // 9: envoy.admin.v3.CommandLineOptions.parent_shutdown_time:type_name -> google.protobuf.Duration + 2, // 10: envoy.admin.v3.CommandLineOptions.mode:type_name -> envoy.admin.v3.CommandLineOptions.Mode + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_envoy_admin_v3_server_info_proto_init() } +func file_envoy_admin_v3_server_info_proto_init() { + if File_envoy_admin_v3_server_info_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_admin_v3_server_info_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_admin_v3_server_info_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommandLineOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_admin_v3_server_info_proto_rawDesc, + NumEnums: 4, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_admin_v3_server_info_proto_goTypes, + DependencyIndexes: file_envoy_admin_v3_server_info_proto_depIdxs, + EnumInfos: file_envoy_admin_v3_server_info_proto_enumTypes, + MessageInfos: file_envoy_admin_v3_server_info_proto_msgTypes, + }.Build() + File_envoy_admin_v3_server_info_proto = out.File + file_envoy_admin_v3_server_info_proto_rawDesc = nil + file_envoy_admin_v3_server_info_proto_goTypes = nil + file_envoy_admin_v3_server_info_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/admin/v3/server_info.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/server_info.pb.validate.go new file mode 100644 index 0000000000000..4d8ef4622b6f0 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/server_info.pb.validate.go @@ -0,0 +1,502 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/admin/v3/server_info.proto + +package adminv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ServerInfo 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 *ServerInfo) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ServerInfo 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 ServerInfoMultiError, or +// nil if none found. +func (m *ServerInfo) ValidateAll() error { + return m.validate(true) +} + +func (m *ServerInfo) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Version + + // no validation rules for State + + if all { + switch v := interface{}(m.GetUptimeCurrentEpoch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ServerInfoValidationError{ + field: "UptimeCurrentEpoch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ServerInfoValidationError{ + field: "UptimeCurrentEpoch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUptimeCurrentEpoch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ServerInfoValidationError{ + field: "UptimeCurrentEpoch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetUptimeAllEpochs()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ServerInfoValidationError{ + field: "UptimeAllEpochs", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ServerInfoValidationError{ + field: "UptimeAllEpochs", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUptimeAllEpochs()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ServerInfoValidationError{ + field: "UptimeAllEpochs", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for HotRestartVersion + + if all { + switch v := interface{}(m.GetCommandLineOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ServerInfoValidationError{ + field: "CommandLineOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ServerInfoValidationError{ + field: "CommandLineOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommandLineOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ServerInfoValidationError{ + field: "CommandLineOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ServerInfoValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ServerInfoValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ServerInfoValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ServerInfoMultiError(errors) + } + return nil +} + +// ServerInfoMultiError is an error wrapping multiple validation errors +// returned by ServerInfo.ValidateAll() if the designated constraints aren't met. +type ServerInfoMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ServerInfoMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ServerInfoMultiError) AllErrors() []error { return m } + +// ServerInfoValidationError is the validation error returned by +// ServerInfo.Validate if the designated constraints aren't met. +type ServerInfoValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ServerInfoValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ServerInfoValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ServerInfoValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ServerInfoValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ServerInfoValidationError) ErrorName() string { return "ServerInfoValidationError" } + +// Error satisfies the builtin error interface +func (e ServerInfoValidationError) 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 %sServerInfo.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ServerInfoValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ServerInfoValidationError{} + +// Validate checks the field values on CommandLineOptions 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 *CommandLineOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CommandLineOptions 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 +// CommandLineOptionsMultiError, or nil if none found. +func (m *CommandLineOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *CommandLineOptions) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for BaseId + + // no validation rules for UseDynamicBaseId + + // no validation rules for BaseIdPath + + // no validation rules for Concurrency + + // no validation rules for ConfigPath + + // no validation rules for ConfigYaml + + // no validation rules for AllowUnknownStaticFields + + // no validation rules for RejectUnknownDynamicFields + + // no validation rules for IgnoreUnknownDynamicFields + + // no validation rules for AdminAddressPath + + // no validation rules for LocalAddressIpVersion + + // no validation rules for LogLevel + + // no validation rules for ComponentLogLevel + + // no validation rules for LogFormat + + // no validation rules for LogFormatEscaped + + // no validation rules for LogPath + + // no validation rules for ServiceCluster + + // no validation rules for ServiceNode + + // no validation rules for ServiceZone + + if all { + switch v := interface{}(m.GetFileFlushInterval()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommandLineOptionsValidationError{ + field: "FileFlushInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommandLineOptionsValidationError{ + field: "FileFlushInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFileFlushInterval()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommandLineOptionsValidationError{ + field: "FileFlushInterval", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetDrainTime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommandLineOptionsValidationError{ + field: "DrainTime", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommandLineOptionsValidationError{ + field: "DrainTime", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDrainTime()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommandLineOptionsValidationError{ + field: "DrainTime", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for DrainStrategy + + if all { + switch v := interface{}(m.GetParentShutdownTime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommandLineOptionsValidationError{ + field: "ParentShutdownTime", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommandLineOptionsValidationError{ + field: "ParentShutdownTime", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetParentShutdownTime()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommandLineOptionsValidationError{ + field: "ParentShutdownTime", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Mode + + // no validation rules for DisableHotRestart + + // no validation rules for EnableMutexTracing + + // no validation rules for RestartEpoch + + // no validation rules for CpusetThreads + + // no validation rules for EnableFineGrainLogging + + // no validation rules for SocketPath + + // no validation rules for SocketMode + + // no validation rules for EnableCoreDump + + if len(errors) > 0 { + return CommandLineOptionsMultiError(errors) + } + return nil +} + +// CommandLineOptionsMultiError is an error wrapping multiple validation errors +// returned by CommandLineOptions.ValidateAll() if the designated constraints +// aren't met. +type CommandLineOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CommandLineOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CommandLineOptionsMultiError) AllErrors() []error { return m } + +// CommandLineOptionsValidationError is the validation error returned by +// CommandLineOptions.Validate if the designated constraints aren't met. +type CommandLineOptionsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CommandLineOptionsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CommandLineOptionsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CommandLineOptionsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CommandLineOptionsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CommandLineOptionsValidationError) ErrorName() string { + return "CommandLineOptionsValidationError" +} + +// Error satisfies the builtin error interface +func (e CommandLineOptionsValidationError) 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 %sCommandLineOptions.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CommandLineOptionsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CommandLineOptionsValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/admin/v3/tap.pb.go b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/tap.pb.go new file mode 100644 index 0000000000000..e7b08db09ecb4 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/tap.pb.go @@ -0,0 +1,187 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/admin/v3/tap.proto + +package adminv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/tap/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// The /tap admin request body that is used to configure an active tap session. +type TapRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The opaque configuration ID used to match the configuration to a loaded extension. + // A tap extension configures a similar opaque ID that is used to match. + ConfigId string `protobuf:"bytes,1,opt,name=config_id,json=configId,proto3" json:"config_id,omitempty"` + // The tap configuration to load. + TapConfig *v3.TapConfig `protobuf:"bytes,2,opt,name=tap_config,json=tapConfig,proto3" json:"tap_config,omitempty"` +} + +func (x *TapRequest) Reset() { + *x = TapRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_admin_v3_tap_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TapRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TapRequest) ProtoMessage() {} + +func (x *TapRequest) ProtoReflect() protoreflect.Message { + mi := &file_envoy_admin_v3_tap_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TapRequest.ProtoReflect.Descriptor instead. +func (*TapRequest) Descriptor() ([]byte, []int) { + return file_envoy_admin_v3_tap_proto_rawDescGZIP(), []int{0} +} + +func (x *TapRequest) GetConfigId() string { + if x != nil { + return x.ConfigId + } + return "" +} + +func (x *TapRequest) GetTapConfig() *v3.TapConfig { + if x != nil { + return x.TapConfig + } + return nil +} + +var File_envoy_admin_v3_tap_proto protoreflect.FileDescriptor + +var file_envoy_admin_v3_tap_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, + 0x2f, 0x74, 0x61, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x33, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0xa2, 0x01, 0x0a, 0x0a, 0x54, 0x61, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x64, 0x12, 0x47, 0x0a, 0x0a, + 0x74, 0x61, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x61, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x74, 0x61, 0x70, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x54, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x71, 0x0a, 0x1c, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x54, 0x61, + 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x3b, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_admin_v3_tap_proto_rawDescOnce sync.Once + file_envoy_admin_v3_tap_proto_rawDescData = file_envoy_admin_v3_tap_proto_rawDesc +) + +func file_envoy_admin_v3_tap_proto_rawDescGZIP() []byte { + file_envoy_admin_v3_tap_proto_rawDescOnce.Do(func() { + file_envoy_admin_v3_tap_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_admin_v3_tap_proto_rawDescData) + }) + return file_envoy_admin_v3_tap_proto_rawDescData +} + +var file_envoy_admin_v3_tap_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_admin_v3_tap_proto_goTypes = []interface{}{ + (*TapRequest)(nil), // 0: envoy.admin.v3.TapRequest + (*v3.TapConfig)(nil), // 1: envoy.config.tap.v3.TapConfig +} +var file_envoy_admin_v3_tap_proto_depIdxs = []int32{ + 1, // 0: envoy.admin.v3.TapRequest.tap_config:type_name -> envoy.config.tap.v3.TapConfig + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_admin_v3_tap_proto_init() } +func file_envoy_admin_v3_tap_proto_init() { + if File_envoy_admin_v3_tap_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_admin_v3_tap_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TapRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_admin_v3_tap_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_admin_v3_tap_proto_goTypes, + DependencyIndexes: file_envoy_admin_v3_tap_proto_depIdxs, + MessageInfos: file_envoy_admin_v3_tap_proto_msgTypes, + }.Build() + File_envoy_admin_v3_tap_proto = out.File + file_envoy_admin_v3_tap_proto_rawDesc = nil + file_envoy_admin_v3_tap_proto_goTypes = nil + file_envoy_admin_v3_tap_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/admin/v3/tap.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/tap.pb.validate.go new file mode 100644 index 0000000000000..c6e734e9a31c0 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/admin/v3/tap.pb.validate.go @@ -0,0 +1,185 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/admin/v3/tap.proto + +package adminv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on TapRequest 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 *TapRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TapRequest 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 TapRequestMultiError, or +// nil if none found. +func (m *TapRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *TapRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetConfigId()) < 1 { + err := TapRequestValidationError{ + field: "ConfigId", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetTapConfig() == nil { + err := TapRequestValidationError{ + field: "TapConfig", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetTapConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TapRequestValidationError{ + field: "TapConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TapRequestValidationError{ + field: "TapConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTapConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TapRequestValidationError{ + field: "TapConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return TapRequestMultiError(errors) + } + return nil +} + +// TapRequestMultiError is an error wrapping multiple validation errors +// returned by TapRequest.ValidateAll() if the designated constraints aren't met. +type TapRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TapRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TapRequestMultiError) AllErrors() []error { return m } + +// TapRequestValidationError is the validation error returned by +// TapRequest.Validate if the designated constraints aren't met. +type TapRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TapRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TapRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TapRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TapRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TapRequestValidationError) ErrorName() string { return "TapRequestValidationError" } + +// Error satisfies the builtin error interface +func (e TapRequestValidationError) 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 %sTapRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TapRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TapRequestValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/cluster/redis/redis_cluster.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/cluster/redis/redis_cluster.pb.go new file mode 100644 index 0000000000000..41ae4588e5c40 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/config/cluster/redis/redis_cluster.pb.go @@ -0,0 +1,259 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/config/cluster/redis/redis_cluster.proto + +package redis + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// [#next-free-field: 7] +type RedisClusterConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Interval between successive topology refresh requests. If not set, this defaults to 5s. + ClusterRefreshRate *durationpb.Duration `protobuf:"bytes,1,opt,name=cluster_refresh_rate,json=clusterRefreshRate,proto3" json:"cluster_refresh_rate,omitempty"` + // Timeout for topology refresh request. If not set, this defaults to 3s. + ClusterRefreshTimeout *durationpb.Duration `protobuf:"bytes,2,opt,name=cluster_refresh_timeout,json=clusterRefreshTimeout,proto3" json:"cluster_refresh_timeout,omitempty"` + // The minimum interval that must pass after triggering a topology refresh request before a new + // request can possibly be triggered again. Any errors received during one of these + // time intervals are ignored. If not set, this defaults to 5s. + RedirectRefreshInterval *durationpb.Duration `protobuf:"bytes,3,opt,name=redirect_refresh_interval,json=redirectRefreshInterval,proto3" json:"redirect_refresh_interval,omitempty"` + // The number of redirection errors that must be received before + // triggering a topology refresh request. If not set, this defaults to 5. + // If this is set to 0, topology refresh after redirect is disabled. + RedirectRefreshThreshold *wrapperspb.UInt32Value `protobuf:"bytes,4,opt,name=redirect_refresh_threshold,json=redirectRefreshThreshold,proto3" json:"redirect_refresh_threshold,omitempty"` + // The number of failures that must be received before triggering a topology refresh request. + // If not set, this defaults to 0, which disables the topology refresh due to failure. + FailureRefreshThreshold uint32 `protobuf:"varint,5,opt,name=failure_refresh_threshold,json=failureRefreshThreshold,proto3" json:"failure_refresh_threshold,omitempty"` + // The number of hosts became degraded or unhealthy before triggering a topology refresh request. + // If not set, this defaults to 0, which disables the topology refresh due to degraded or + // unhealthy host. + HostDegradedRefreshThreshold uint32 `protobuf:"varint,6,opt,name=host_degraded_refresh_threshold,json=hostDegradedRefreshThreshold,proto3" json:"host_degraded_refresh_threshold,omitempty"` +} + +func (x *RedisClusterConfig) Reset() { + *x = RedisClusterConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_cluster_redis_redis_cluster_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RedisClusterConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RedisClusterConfig) ProtoMessage() {} + +func (x *RedisClusterConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_cluster_redis_redis_cluster_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RedisClusterConfig.ProtoReflect.Descriptor instead. +func (*RedisClusterConfig) Descriptor() ([]byte, []int) { + return file_envoy_config_cluster_redis_redis_cluster_proto_rawDescGZIP(), []int{0} +} + +func (x *RedisClusterConfig) GetClusterRefreshRate() *durationpb.Duration { + if x != nil { + return x.ClusterRefreshRate + } + return nil +} + +func (x *RedisClusterConfig) GetClusterRefreshTimeout() *durationpb.Duration { + if x != nil { + return x.ClusterRefreshTimeout + } + return nil +} + +func (x *RedisClusterConfig) GetRedirectRefreshInterval() *durationpb.Duration { + if x != nil { + return x.RedirectRefreshInterval + } + return nil +} + +func (x *RedisClusterConfig) GetRedirectRefreshThreshold() *wrapperspb.UInt32Value { + if x != nil { + return x.RedirectRefreshThreshold + } + return nil +} + +func (x *RedisClusterConfig) GetFailureRefreshThreshold() uint32 { + if x != nil { + return x.FailureRefreshThreshold + } + return 0 +} + +func (x *RedisClusterConfig) GetHostDegradedRefreshThreshold() uint32 { + if x != nil { + return x.HostDegradedRefreshThreshold + } + return 0 +} + +var File_envoy_config_cluster_redis_redis_cluster_proto protoreflect.FileDescriptor + +var file_envoy_config_cluster_redis_redis_cluster_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x64, 0x69, 0x73, 0x2f, 0x72, 0x65, 0x64, + 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x1a, 0x1e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, + 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xfe, 0x03, 0x0a, 0x12, 0x52, 0x65, 0x64, 0x69, 0x73, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x55, 0x0a, 0x14, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x72, + 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x12, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x52, 0x61, + 0x74, 0x65, 0x12, 0x5b, 0x0a, 0x17, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x72, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x15, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, + 0x55, 0x0a, 0x19, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x72, + 0x65, 0x73, 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x17, 0x72, + 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x5a, 0x0a, 0x1a, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, + 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x18, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, + 0x6c, 0x64, 0x12, 0x3a, 0x0a, 0x19, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x17, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x45, + 0x0a, 0x1f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x64, 0x65, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x5f, + 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, + 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x1c, 0x68, 0x6f, 0x73, 0x74, 0x44, 0x65, 0x67, + 0x72, 0x61, 0x64, 0x65, 0x64, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x68, 0x72, 0x65, + 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x42, 0x8a, 0x01, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x64, + 0x69, 0x73, 0x42, 0x11, 0x52, 0x65, 0x64, 0x69, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x64, 0x69, 0x73, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_config_cluster_redis_redis_cluster_proto_rawDescOnce sync.Once + file_envoy_config_cluster_redis_redis_cluster_proto_rawDescData = file_envoy_config_cluster_redis_redis_cluster_proto_rawDesc +) + +func file_envoy_config_cluster_redis_redis_cluster_proto_rawDescGZIP() []byte { + file_envoy_config_cluster_redis_redis_cluster_proto_rawDescOnce.Do(func() { + file_envoy_config_cluster_redis_redis_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_cluster_redis_redis_cluster_proto_rawDescData) + }) + return file_envoy_config_cluster_redis_redis_cluster_proto_rawDescData +} + +var file_envoy_config_cluster_redis_redis_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_config_cluster_redis_redis_cluster_proto_goTypes = []interface{}{ + (*RedisClusterConfig)(nil), // 0: envoy.config.cluster.redis.RedisClusterConfig + (*durationpb.Duration)(nil), // 1: google.protobuf.Duration + (*wrapperspb.UInt32Value)(nil), // 2: google.protobuf.UInt32Value +} +var file_envoy_config_cluster_redis_redis_cluster_proto_depIdxs = []int32{ + 1, // 0: envoy.config.cluster.redis.RedisClusterConfig.cluster_refresh_rate:type_name -> google.protobuf.Duration + 1, // 1: envoy.config.cluster.redis.RedisClusterConfig.cluster_refresh_timeout:type_name -> google.protobuf.Duration + 1, // 2: envoy.config.cluster.redis.RedisClusterConfig.redirect_refresh_interval:type_name -> google.protobuf.Duration + 2, // 3: envoy.config.cluster.redis.RedisClusterConfig.redirect_refresh_threshold:type_name -> google.protobuf.UInt32Value + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_envoy_config_cluster_redis_redis_cluster_proto_init() } +func file_envoy_config_cluster_redis_redis_cluster_proto_init() { + if File_envoy_config_cluster_redis_redis_cluster_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_config_cluster_redis_redis_cluster_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RedisClusterConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_config_cluster_redis_redis_cluster_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_config_cluster_redis_redis_cluster_proto_goTypes, + DependencyIndexes: file_envoy_config_cluster_redis_redis_cluster_proto_depIdxs, + MessageInfos: file_envoy_config_cluster_redis_redis_cluster_proto_msgTypes, + }.Build() + File_envoy_config_cluster_redis_redis_cluster_proto = out.File + file_envoy_config_cluster_redis_redis_cluster_proto_rawDesc = nil + file_envoy_config_cluster_redis_redis_cluster_proto_goTypes = nil + file_envoy_config_cluster_redis_redis_cluster_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/cluster/redis/redis_cluster.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/cluster/redis/redis_cluster.pb.validate.go new file mode 100644 index 0000000000000..2301733d19c5a --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/config/cluster/redis/redis_cluster.pb.validate.go @@ -0,0 +1,259 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/config/cluster/redis/redis_cluster.proto + +package redis + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RedisClusterConfig 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 *RedisClusterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RedisClusterConfig 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 +// RedisClusterConfigMultiError, or nil if none found. +func (m *RedisClusterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisClusterConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if d := m.GetClusterRefreshRate(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = RedisClusterConfigValidationError{ + field: "ClusterRefreshRate", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := RedisClusterConfigValidationError{ + field: "ClusterRefreshRate", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if d := m.GetClusterRefreshTimeout(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = RedisClusterConfigValidationError{ + field: "ClusterRefreshTimeout", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := RedisClusterConfigValidationError{ + field: "ClusterRefreshTimeout", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if all { + switch v := interface{}(m.GetRedirectRefreshInterval()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisClusterConfigValidationError{ + field: "RedirectRefreshInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisClusterConfigValidationError{ + field: "RedirectRefreshInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRedirectRefreshInterval()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RedisClusterConfigValidationError{ + field: "RedirectRefreshInterval", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetRedirectRefreshThreshold()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisClusterConfigValidationError{ + field: "RedirectRefreshThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisClusterConfigValidationError{ + field: "RedirectRefreshThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRedirectRefreshThreshold()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RedisClusterConfigValidationError{ + field: "RedirectRefreshThreshold", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for FailureRefreshThreshold + + // no validation rules for HostDegradedRefreshThreshold + + if len(errors) > 0 { + return RedisClusterConfigMultiError(errors) + } + return nil +} + +// RedisClusterConfigMultiError is an error wrapping multiple validation errors +// returned by RedisClusterConfig.ValidateAll() if the designated constraints +// aren't met. +type RedisClusterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisClusterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisClusterConfigMultiError) AllErrors() []error { return m } + +// RedisClusterConfigValidationError is the validation error returned by +// RedisClusterConfig.Validate if the designated constraints aren't met. +type RedisClusterConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RedisClusterConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RedisClusterConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RedisClusterConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RedisClusterConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RedisClusterConfigValidationError) ErrorName() string { + return "RedisClusterConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e RedisClusterConfigValidationError) 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 %sRedisClusterConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RedisClusterConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RedisClusterConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/common/matcher/v3/matcher.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/common/matcher/v3/matcher.pb.go new file mode 100644 index 0000000000000..e4a3f75e03c59 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/config/common/matcher/v3/matcher.pb.go @@ -0,0 +1,1783 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/config/common/matcher/v3/matcher.proto + +package matcherv3 + +import ( + v31 "github.com/cilium/proxy/go/envoy/config/core/v3" + v3 "github.com/cilium/proxy/go/envoy/config/route/v3" + v32 "github.com/cilium/proxy/go/envoy/type/matcher/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// A matcher, which may traverse a matching tree in order to result in a match action. +// During matching, the tree will be traversed until a match is found, or if no match +// is found the action specified by the most specific on_no_match will be evaluated. +// As an on_no_match might result in another matching tree being evaluated, this process +// might repeat several times until the final OnMatch (or no match) is decided. +type Matcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to MatcherType: + // + // *Matcher_MatcherList_ + // *Matcher_MatcherTree_ + MatcherType isMatcher_MatcherType `protobuf_oneof:"matcher_type"` + // Optional OnMatch to use if the matcher failed. + // If specified, the OnMatch is used, and the matcher is considered + // to have matched. + // If not specified, the matcher is considered not to have matched. + OnNoMatch *Matcher_OnMatch `protobuf:"bytes,3,opt,name=on_no_match,json=onNoMatch,proto3" json:"on_no_match,omitempty"` +} + +func (x *Matcher) Reset() { + *x = Matcher{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Matcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Matcher) ProtoMessage() {} + +func (x *Matcher) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Matcher.ProtoReflect.Descriptor instead. +func (*Matcher) Descriptor() ([]byte, []int) { + return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{0} +} + +func (m *Matcher) GetMatcherType() isMatcher_MatcherType { + if m != nil { + return m.MatcherType + } + return nil +} + +func (x *Matcher) GetMatcherList() *Matcher_MatcherList { + if x, ok := x.GetMatcherType().(*Matcher_MatcherList_); ok { + return x.MatcherList + } + return nil +} + +func (x *Matcher) GetMatcherTree() *Matcher_MatcherTree { + if x, ok := x.GetMatcherType().(*Matcher_MatcherTree_); ok { + return x.MatcherTree + } + return nil +} + +func (x *Matcher) GetOnNoMatch() *Matcher_OnMatch { + if x != nil { + return x.OnNoMatch + } + return nil +} + +type isMatcher_MatcherType interface { + isMatcher_MatcherType() +} + +type Matcher_MatcherList_ struct { + // A linear list of matchers to evaluate. + MatcherList *Matcher_MatcherList `protobuf:"bytes,1,opt,name=matcher_list,json=matcherList,proto3,oneof"` +} + +type Matcher_MatcherTree_ struct { + // A match tree to evaluate. + MatcherTree *Matcher_MatcherTree `protobuf:"bytes,2,opt,name=matcher_tree,json=matcherTree,proto3,oneof"` +} + +func (*Matcher_MatcherList_) isMatcher_MatcherType() {} + +func (*Matcher_MatcherTree_) isMatcher_MatcherType() {} + +// Match configuration. This is a recursive structure which allows complex nested match +// configurations to be built using various logical operators. +// [#next-free-field: 11] +type MatchPredicate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Rule: + // + // *MatchPredicate_OrMatch + // *MatchPredicate_AndMatch + // *MatchPredicate_NotMatch + // *MatchPredicate_AnyMatch + // *MatchPredicate_HttpRequestHeadersMatch + // *MatchPredicate_HttpRequestTrailersMatch + // *MatchPredicate_HttpResponseHeadersMatch + // *MatchPredicate_HttpResponseTrailersMatch + // *MatchPredicate_HttpRequestGenericBodyMatch + // *MatchPredicate_HttpResponseGenericBodyMatch + Rule isMatchPredicate_Rule `protobuf_oneof:"rule"` +} + +func (x *MatchPredicate) Reset() { + *x = MatchPredicate{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MatchPredicate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MatchPredicate) ProtoMessage() {} + +func (x *MatchPredicate) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MatchPredicate.ProtoReflect.Descriptor instead. +func (*MatchPredicate) Descriptor() ([]byte, []int) { + return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{1} +} + +func (m *MatchPredicate) GetRule() isMatchPredicate_Rule { + if m != nil { + return m.Rule + } + return nil +} + +func (x *MatchPredicate) GetOrMatch() *MatchPredicate_MatchSet { + if x, ok := x.GetRule().(*MatchPredicate_OrMatch); ok { + return x.OrMatch + } + return nil +} + +func (x *MatchPredicate) GetAndMatch() *MatchPredicate_MatchSet { + if x, ok := x.GetRule().(*MatchPredicate_AndMatch); ok { + return x.AndMatch + } + return nil +} + +func (x *MatchPredicate) GetNotMatch() *MatchPredicate { + if x, ok := x.GetRule().(*MatchPredicate_NotMatch); ok { + return x.NotMatch + } + return nil +} + +func (x *MatchPredicate) GetAnyMatch() bool { + if x, ok := x.GetRule().(*MatchPredicate_AnyMatch); ok { + return x.AnyMatch + } + return false +} + +func (x *MatchPredicate) GetHttpRequestHeadersMatch() *HttpHeadersMatch { + if x, ok := x.GetRule().(*MatchPredicate_HttpRequestHeadersMatch); ok { + return x.HttpRequestHeadersMatch + } + return nil +} + +func (x *MatchPredicate) GetHttpRequestTrailersMatch() *HttpHeadersMatch { + if x, ok := x.GetRule().(*MatchPredicate_HttpRequestTrailersMatch); ok { + return x.HttpRequestTrailersMatch + } + return nil +} + +func (x *MatchPredicate) GetHttpResponseHeadersMatch() *HttpHeadersMatch { + if x, ok := x.GetRule().(*MatchPredicate_HttpResponseHeadersMatch); ok { + return x.HttpResponseHeadersMatch + } + return nil +} + +func (x *MatchPredicate) GetHttpResponseTrailersMatch() *HttpHeadersMatch { + if x, ok := x.GetRule().(*MatchPredicate_HttpResponseTrailersMatch); ok { + return x.HttpResponseTrailersMatch + } + return nil +} + +func (x *MatchPredicate) GetHttpRequestGenericBodyMatch() *HttpGenericBodyMatch { + if x, ok := x.GetRule().(*MatchPredicate_HttpRequestGenericBodyMatch); ok { + return x.HttpRequestGenericBodyMatch + } + return nil +} + +func (x *MatchPredicate) GetHttpResponseGenericBodyMatch() *HttpGenericBodyMatch { + if x, ok := x.GetRule().(*MatchPredicate_HttpResponseGenericBodyMatch); ok { + return x.HttpResponseGenericBodyMatch + } + return nil +} + +type isMatchPredicate_Rule interface { + isMatchPredicate_Rule() +} + +type MatchPredicate_OrMatch struct { + // A set that describes a logical OR. If any member of the set matches, the match configuration + // matches. + OrMatch *MatchPredicate_MatchSet `protobuf:"bytes,1,opt,name=or_match,json=orMatch,proto3,oneof"` +} + +type MatchPredicate_AndMatch struct { + // A set that describes a logical AND. If all members of the set match, the match configuration + // matches. + AndMatch *MatchPredicate_MatchSet `protobuf:"bytes,2,opt,name=and_match,json=andMatch,proto3,oneof"` +} + +type MatchPredicate_NotMatch struct { + // A negation match. The match configuration will match if the negated match condition matches. + NotMatch *MatchPredicate `protobuf:"bytes,3,opt,name=not_match,json=notMatch,proto3,oneof"` +} + +type MatchPredicate_AnyMatch struct { + // The match configuration will always match. + AnyMatch bool `protobuf:"varint,4,opt,name=any_match,json=anyMatch,proto3,oneof"` +} + +type MatchPredicate_HttpRequestHeadersMatch struct { + // HTTP request headers match configuration. + HttpRequestHeadersMatch *HttpHeadersMatch `protobuf:"bytes,5,opt,name=http_request_headers_match,json=httpRequestHeadersMatch,proto3,oneof"` +} + +type MatchPredicate_HttpRequestTrailersMatch struct { + // HTTP request trailers match configuration. + HttpRequestTrailersMatch *HttpHeadersMatch `protobuf:"bytes,6,opt,name=http_request_trailers_match,json=httpRequestTrailersMatch,proto3,oneof"` +} + +type MatchPredicate_HttpResponseHeadersMatch struct { + // HTTP response headers match configuration. + HttpResponseHeadersMatch *HttpHeadersMatch `protobuf:"bytes,7,opt,name=http_response_headers_match,json=httpResponseHeadersMatch,proto3,oneof"` +} + +type MatchPredicate_HttpResponseTrailersMatch struct { + // HTTP response trailers match configuration. + HttpResponseTrailersMatch *HttpHeadersMatch `protobuf:"bytes,8,opt,name=http_response_trailers_match,json=httpResponseTrailersMatch,proto3,oneof"` +} + +type MatchPredicate_HttpRequestGenericBodyMatch struct { + // HTTP request generic body match configuration. + HttpRequestGenericBodyMatch *HttpGenericBodyMatch `protobuf:"bytes,9,opt,name=http_request_generic_body_match,json=httpRequestGenericBodyMatch,proto3,oneof"` +} + +type MatchPredicate_HttpResponseGenericBodyMatch struct { + // HTTP response generic body match configuration. + HttpResponseGenericBodyMatch *HttpGenericBodyMatch `protobuf:"bytes,10,opt,name=http_response_generic_body_match,json=httpResponseGenericBodyMatch,proto3,oneof"` +} + +func (*MatchPredicate_OrMatch) isMatchPredicate_Rule() {} + +func (*MatchPredicate_AndMatch) isMatchPredicate_Rule() {} + +func (*MatchPredicate_NotMatch) isMatchPredicate_Rule() {} + +func (*MatchPredicate_AnyMatch) isMatchPredicate_Rule() {} + +func (*MatchPredicate_HttpRequestHeadersMatch) isMatchPredicate_Rule() {} + +func (*MatchPredicate_HttpRequestTrailersMatch) isMatchPredicate_Rule() {} + +func (*MatchPredicate_HttpResponseHeadersMatch) isMatchPredicate_Rule() {} + +func (*MatchPredicate_HttpResponseTrailersMatch) isMatchPredicate_Rule() {} + +func (*MatchPredicate_HttpRequestGenericBodyMatch) isMatchPredicate_Rule() {} + +func (*MatchPredicate_HttpResponseGenericBodyMatch) isMatchPredicate_Rule() {} + +// HTTP headers match configuration. +type HttpHeadersMatch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // HTTP headers to match. + Headers []*v3.HeaderMatcher `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` +} + +func (x *HttpHeadersMatch) Reset() { + *x = HttpHeadersMatch{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpHeadersMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpHeadersMatch) ProtoMessage() {} + +func (x *HttpHeadersMatch) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpHeadersMatch.ProtoReflect.Descriptor instead. +func (*HttpHeadersMatch) Descriptor() ([]byte, []int) { + return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{2} +} + +func (x *HttpHeadersMatch) GetHeaders() []*v3.HeaderMatcher { + if x != nil { + return x.Headers + } + return nil +} + +// HTTP generic body match configuration. +// List of text strings and hex strings to be located in HTTP body. +// All specified strings must be found in the HTTP body for positive match. +// The search may be limited to specified number of bytes from the body start. +// +// .. attention:: +// +// Searching for patterns in HTTP body is potentially cpu intensive. For each specified pattern, http body is scanned byte by byte to find a match. +// If multiple patterns are specified, the process is repeated for each pattern. If location of a pattern is known, ``bytes_limit`` should be specified +// to scan only part of the http body. +type HttpGenericBodyMatch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Limits search to specified number of bytes - default zero (no limit - match entire captured buffer). + BytesLimit uint32 `protobuf:"varint,1,opt,name=bytes_limit,json=bytesLimit,proto3" json:"bytes_limit,omitempty"` + // List of patterns to match. + Patterns []*HttpGenericBodyMatch_GenericTextMatch `protobuf:"bytes,2,rep,name=patterns,proto3" json:"patterns,omitempty"` +} + +func (x *HttpGenericBodyMatch) Reset() { + *x = HttpGenericBodyMatch{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpGenericBodyMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpGenericBodyMatch) ProtoMessage() {} + +func (x *HttpGenericBodyMatch) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpGenericBodyMatch.ProtoReflect.Descriptor instead. +func (*HttpGenericBodyMatch) Descriptor() ([]byte, []int) { + return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{3} +} + +func (x *HttpGenericBodyMatch) GetBytesLimit() uint32 { + if x != nil { + return x.BytesLimit + } + return 0 +} + +func (x *HttpGenericBodyMatch) GetPatterns() []*HttpGenericBodyMatch_GenericTextMatch { + if x != nil { + return x.Patterns + } + return nil +} + +// What to do if a match is successful. +type Matcher_OnMatch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to OnMatch: + // + // *Matcher_OnMatch_Matcher + // *Matcher_OnMatch_Action + OnMatch isMatcher_OnMatch_OnMatch `protobuf_oneof:"on_match"` +} + +func (x *Matcher_OnMatch) Reset() { + *x = Matcher_OnMatch{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Matcher_OnMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Matcher_OnMatch) ProtoMessage() {} + +func (x *Matcher_OnMatch) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Matcher_OnMatch.ProtoReflect.Descriptor instead. +func (*Matcher_OnMatch) Descriptor() ([]byte, []int) { + return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 0} +} + +func (m *Matcher_OnMatch) GetOnMatch() isMatcher_OnMatch_OnMatch { + if m != nil { + return m.OnMatch + } + return nil +} + +func (x *Matcher_OnMatch) GetMatcher() *Matcher { + if x, ok := x.GetOnMatch().(*Matcher_OnMatch_Matcher); ok { + return x.Matcher + } + return nil +} + +func (x *Matcher_OnMatch) GetAction() *v31.TypedExtensionConfig { + if x, ok := x.GetOnMatch().(*Matcher_OnMatch_Action); ok { + return x.Action + } + return nil +} + +type isMatcher_OnMatch_OnMatch interface { + isMatcher_OnMatch_OnMatch() +} + +type Matcher_OnMatch_Matcher struct { + // Nested matcher to evaluate. + // If the nested matcher does not match and does not specify + // on_no_match, then this matcher is considered not to have + // matched, even if a predicate at this level or above returned + // true. + Matcher *Matcher `protobuf:"bytes,1,opt,name=matcher,proto3,oneof"` +} + +type Matcher_OnMatch_Action struct { + // Protocol-specific action to take. + Action *v31.TypedExtensionConfig `protobuf:"bytes,2,opt,name=action,proto3,oneof"` +} + +func (*Matcher_OnMatch_Matcher) isMatcher_OnMatch_OnMatch() {} + +func (*Matcher_OnMatch_Action) isMatcher_OnMatch_OnMatch() {} + +// A linear list of field matchers. +// The field matchers are evaluated in order, and the first match +// wins. +type Matcher_MatcherList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of matchers. First match wins. + Matchers []*Matcher_MatcherList_FieldMatcher `protobuf:"bytes,1,rep,name=matchers,proto3" json:"matchers,omitempty"` +} + +func (x *Matcher_MatcherList) Reset() { + *x = Matcher_MatcherList{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Matcher_MatcherList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Matcher_MatcherList) ProtoMessage() {} + +func (x *Matcher_MatcherList) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Matcher_MatcherList.ProtoReflect.Descriptor instead. +func (*Matcher_MatcherList) Descriptor() ([]byte, []int) { + return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *Matcher_MatcherList) GetMatchers() []*Matcher_MatcherList_FieldMatcher { + if x != nil { + return x.Matchers + } + return nil +} + +type Matcher_MatcherTree struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Protocol-specific specification of input field to match on. + Input *v31.TypedExtensionConfig `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` + // Exact or prefix match maps in which to look up the input value. + // If the lookup succeeds, the match is considered successful, and + // the corresponding OnMatch is used. + // + // Types that are assignable to TreeType: + // + // *Matcher_MatcherTree_ExactMatchMap + // *Matcher_MatcherTree_PrefixMatchMap + // *Matcher_MatcherTree_CustomMatch + TreeType isMatcher_MatcherTree_TreeType `protobuf_oneof:"tree_type"` +} + +func (x *Matcher_MatcherTree) Reset() { + *x = Matcher_MatcherTree{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Matcher_MatcherTree) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Matcher_MatcherTree) ProtoMessage() {} + +func (x *Matcher_MatcherTree) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Matcher_MatcherTree.ProtoReflect.Descriptor instead. +func (*Matcher_MatcherTree) Descriptor() ([]byte, []int) { + return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 2} +} + +func (x *Matcher_MatcherTree) GetInput() *v31.TypedExtensionConfig { + if x != nil { + return x.Input + } + return nil +} + +func (m *Matcher_MatcherTree) GetTreeType() isMatcher_MatcherTree_TreeType { + if m != nil { + return m.TreeType + } + return nil +} + +func (x *Matcher_MatcherTree) GetExactMatchMap() *Matcher_MatcherTree_MatchMap { + if x, ok := x.GetTreeType().(*Matcher_MatcherTree_ExactMatchMap); ok { + return x.ExactMatchMap + } + return nil +} + +func (x *Matcher_MatcherTree) GetPrefixMatchMap() *Matcher_MatcherTree_MatchMap { + if x, ok := x.GetTreeType().(*Matcher_MatcherTree_PrefixMatchMap); ok { + return x.PrefixMatchMap + } + return nil +} + +func (x *Matcher_MatcherTree) GetCustomMatch() *v31.TypedExtensionConfig { + if x, ok := x.GetTreeType().(*Matcher_MatcherTree_CustomMatch); ok { + return x.CustomMatch + } + return nil +} + +type isMatcher_MatcherTree_TreeType interface { + isMatcher_MatcherTree_TreeType() +} + +type Matcher_MatcherTree_ExactMatchMap struct { + ExactMatchMap *Matcher_MatcherTree_MatchMap `protobuf:"bytes,2,opt,name=exact_match_map,json=exactMatchMap,proto3,oneof"` +} + +type Matcher_MatcherTree_PrefixMatchMap struct { + // Longest matching prefix wins. + PrefixMatchMap *Matcher_MatcherTree_MatchMap `protobuf:"bytes,3,opt,name=prefix_match_map,json=prefixMatchMap,proto3,oneof"` +} + +type Matcher_MatcherTree_CustomMatch struct { + // Extension for custom matching logic. + CustomMatch *v31.TypedExtensionConfig `protobuf:"bytes,4,opt,name=custom_match,json=customMatch,proto3,oneof"` +} + +func (*Matcher_MatcherTree_ExactMatchMap) isMatcher_MatcherTree_TreeType() {} + +func (*Matcher_MatcherTree_PrefixMatchMap) isMatcher_MatcherTree_TreeType() {} + +func (*Matcher_MatcherTree_CustomMatch) isMatcher_MatcherTree_TreeType() {} + +// Predicate to determine if a match is successful. +type Matcher_MatcherList_Predicate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to MatchType: + // + // *Matcher_MatcherList_Predicate_SinglePredicate_ + // *Matcher_MatcherList_Predicate_OrMatcher + // *Matcher_MatcherList_Predicate_AndMatcher + // *Matcher_MatcherList_Predicate_NotMatcher + MatchType isMatcher_MatcherList_Predicate_MatchType `protobuf_oneof:"match_type"` +} + +func (x *Matcher_MatcherList_Predicate) Reset() { + *x = Matcher_MatcherList_Predicate{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Matcher_MatcherList_Predicate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Matcher_MatcherList_Predicate) ProtoMessage() {} + +func (x *Matcher_MatcherList_Predicate) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Matcher_MatcherList_Predicate.ProtoReflect.Descriptor instead. +func (*Matcher_MatcherList_Predicate) Descriptor() ([]byte, []int) { + return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1, 0} +} + +func (m *Matcher_MatcherList_Predicate) GetMatchType() isMatcher_MatcherList_Predicate_MatchType { + if m != nil { + return m.MatchType + } + return nil +} + +func (x *Matcher_MatcherList_Predicate) GetSinglePredicate() *Matcher_MatcherList_Predicate_SinglePredicate { + if x, ok := x.GetMatchType().(*Matcher_MatcherList_Predicate_SinglePredicate_); ok { + return x.SinglePredicate + } + return nil +} + +func (x *Matcher_MatcherList_Predicate) GetOrMatcher() *Matcher_MatcherList_Predicate_PredicateList { + if x, ok := x.GetMatchType().(*Matcher_MatcherList_Predicate_OrMatcher); ok { + return x.OrMatcher + } + return nil +} + +func (x *Matcher_MatcherList_Predicate) GetAndMatcher() *Matcher_MatcherList_Predicate_PredicateList { + if x, ok := x.GetMatchType().(*Matcher_MatcherList_Predicate_AndMatcher); ok { + return x.AndMatcher + } + return nil +} + +func (x *Matcher_MatcherList_Predicate) GetNotMatcher() *Matcher_MatcherList_Predicate { + if x, ok := x.GetMatchType().(*Matcher_MatcherList_Predicate_NotMatcher); ok { + return x.NotMatcher + } + return nil +} + +type isMatcher_MatcherList_Predicate_MatchType interface { + isMatcher_MatcherList_Predicate_MatchType() +} + +type Matcher_MatcherList_Predicate_SinglePredicate_ struct { + // A single predicate to evaluate. + SinglePredicate *Matcher_MatcherList_Predicate_SinglePredicate `protobuf:"bytes,1,opt,name=single_predicate,json=singlePredicate,proto3,oneof"` +} + +type Matcher_MatcherList_Predicate_OrMatcher struct { + // A list of predicates to be OR-ed together. + OrMatcher *Matcher_MatcherList_Predicate_PredicateList `protobuf:"bytes,2,opt,name=or_matcher,json=orMatcher,proto3,oneof"` +} + +type Matcher_MatcherList_Predicate_AndMatcher struct { + // A list of predicates to be AND-ed together. + AndMatcher *Matcher_MatcherList_Predicate_PredicateList `protobuf:"bytes,3,opt,name=and_matcher,json=andMatcher,proto3,oneof"` +} + +type Matcher_MatcherList_Predicate_NotMatcher struct { + // The invert of a predicate + NotMatcher *Matcher_MatcherList_Predicate `protobuf:"bytes,4,opt,name=not_matcher,json=notMatcher,proto3,oneof"` +} + +func (*Matcher_MatcherList_Predicate_SinglePredicate_) isMatcher_MatcherList_Predicate_MatchType() {} + +func (*Matcher_MatcherList_Predicate_OrMatcher) isMatcher_MatcherList_Predicate_MatchType() {} + +func (*Matcher_MatcherList_Predicate_AndMatcher) isMatcher_MatcherList_Predicate_MatchType() {} + +func (*Matcher_MatcherList_Predicate_NotMatcher) isMatcher_MatcherList_Predicate_MatchType() {} + +// An individual matcher. +type Matcher_MatcherList_FieldMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Determines if the match succeeds. + Predicate *Matcher_MatcherList_Predicate `protobuf:"bytes,1,opt,name=predicate,proto3" json:"predicate,omitempty"` + // What to do if the match succeeds. + OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` +} + +func (x *Matcher_MatcherList_FieldMatcher) Reset() { + *x = Matcher_MatcherList_FieldMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Matcher_MatcherList_FieldMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Matcher_MatcherList_FieldMatcher) ProtoMessage() {} + +func (x *Matcher_MatcherList_FieldMatcher) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Matcher_MatcherList_FieldMatcher.ProtoReflect.Descriptor instead. +func (*Matcher_MatcherList_FieldMatcher) Descriptor() ([]byte, []int) { + return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1, 1} +} + +func (x *Matcher_MatcherList_FieldMatcher) GetPredicate() *Matcher_MatcherList_Predicate { + if x != nil { + return x.Predicate + } + return nil +} + +func (x *Matcher_MatcherList_FieldMatcher) GetOnMatch() *Matcher_OnMatch { + if x != nil { + return x.OnMatch + } + return nil +} + +// Predicate for a single input field. +type Matcher_MatcherList_Predicate_SinglePredicate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Protocol-specific specification of input field to match on. + // [#extension-category: envoy.matching.common_inputs] + Input *v31.TypedExtensionConfig `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` + // Types that are assignable to Matcher: + // + // *Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch + // *Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch + Matcher isMatcher_MatcherList_Predicate_SinglePredicate_Matcher `protobuf_oneof:"matcher"` +} + +func (x *Matcher_MatcherList_Predicate_SinglePredicate) Reset() { + *x = Matcher_MatcherList_Predicate_SinglePredicate{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Matcher_MatcherList_Predicate_SinglePredicate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Matcher_MatcherList_Predicate_SinglePredicate) ProtoMessage() {} + +func (x *Matcher_MatcherList_Predicate_SinglePredicate) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Matcher_MatcherList_Predicate_SinglePredicate.ProtoReflect.Descriptor instead. +func (*Matcher_MatcherList_Predicate_SinglePredicate) Descriptor() ([]byte, []int) { + return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1, 0, 0} +} + +func (x *Matcher_MatcherList_Predicate_SinglePredicate) GetInput() *v31.TypedExtensionConfig { + if x != nil { + return x.Input + } + return nil +} + +func (m *Matcher_MatcherList_Predicate_SinglePredicate) GetMatcher() isMatcher_MatcherList_Predicate_SinglePredicate_Matcher { + if m != nil { + return m.Matcher + } + return nil +} + +func (x *Matcher_MatcherList_Predicate_SinglePredicate) GetValueMatch() *v32.StringMatcher { + if x, ok := x.GetMatcher().(*Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch); ok { + return x.ValueMatch + } + return nil +} + +func (x *Matcher_MatcherList_Predicate_SinglePredicate) GetCustomMatch() *v31.TypedExtensionConfig { + if x, ok := x.GetMatcher().(*Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch); ok { + return x.CustomMatch + } + return nil +} + +type isMatcher_MatcherList_Predicate_SinglePredicate_Matcher interface { + isMatcher_MatcherList_Predicate_SinglePredicate_Matcher() +} + +type Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch struct { + // Built-in string matcher. + ValueMatch *v32.StringMatcher `protobuf:"bytes,2,opt,name=value_match,json=valueMatch,proto3,oneof"` +} + +type Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch struct { + // Extension for custom matching logic. + // [#extension-category: envoy.matching.input_matchers] + CustomMatch *v31.TypedExtensionConfig `protobuf:"bytes,3,opt,name=custom_match,json=customMatch,proto3,oneof"` +} + +func (*Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch) isMatcher_MatcherList_Predicate_SinglePredicate_Matcher() { +} + +func (*Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch) isMatcher_MatcherList_Predicate_SinglePredicate_Matcher() { +} + +// A list of two or more matchers. Used to allow using a list within a oneof. +type Matcher_MatcherList_Predicate_PredicateList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Predicate []*Matcher_MatcherList_Predicate `protobuf:"bytes,1,rep,name=predicate,proto3" json:"predicate,omitempty"` +} + +func (x *Matcher_MatcherList_Predicate_PredicateList) Reset() { + *x = Matcher_MatcherList_Predicate_PredicateList{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Matcher_MatcherList_Predicate_PredicateList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Matcher_MatcherList_Predicate_PredicateList) ProtoMessage() {} + +func (x *Matcher_MatcherList_Predicate_PredicateList) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Matcher_MatcherList_Predicate_PredicateList.ProtoReflect.Descriptor instead. +func (*Matcher_MatcherList_Predicate_PredicateList) Descriptor() ([]byte, []int) { + return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1, 0, 1} +} + +func (x *Matcher_MatcherList_Predicate_PredicateList) GetPredicate() []*Matcher_MatcherList_Predicate { + if x != nil { + return x.Predicate + } + return nil +} + +// A map of configured matchers. Used to allow using a map within a oneof. +type Matcher_MatcherTree_MatchMap struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Map map[string]*Matcher_OnMatch `protobuf:"bytes,1,rep,name=map,proto3" json:"map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Matcher_MatcherTree_MatchMap) Reset() { + *x = Matcher_MatcherTree_MatchMap{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Matcher_MatcherTree_MatchMap) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Matcher_MatcherTree_MatchMap) ProtoMessage() {} + +func (x *Matcher_MatcherTree_MatchMap) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Matcher_MatcherTree_MatchMap.ProtoReflect.Descriptor instead. +func (*Matcher_MatcherTree_MatchMap) Descriptor() ([]byte, []int) { + return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 2, 0} +} + +func (x *Matcher_MatcherTree_MatchMap) GetMap() map[string]*Matcher_OnMatch { + if x != nil { + return x.Map + } + return nil +} + +// A set of match configurations used for logical operations. +type MatchPredicate_MatchSet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of rules that make up the set. + Rules []*MatchPredicate `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` +} + +func (x *MatchPredicate_MatchSet) Reset() { + *x = MatchPredicate_MatchSet{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MatchPredicate_MatchSet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MatchPredicate_MatchSet) ProtoMessage() {} + +func (x *MatchPredicate_MatchSet) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MatchPredicate_MatchSet.ProtoReflect.Descriptor instead. +func (*MatchPredicate_MatchSet) Descriptor() ([]byte, []int) { + return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *MatchPredicate_MatchSet) GetRules() []*MatchPredicate { + if x != nil { + return x.Rules + } + return nil +} + +type HttpGenericBodyMatch_GenericTextMatch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Rule: + // + // *HttpGenericBodyMatch_GenericTextMatch_StringMatch + // *HttpGenericBodyMatch_GenericTextMatch_BinaryMatch + Rule isHttpGenericBodyMatch_GenericTextMatch_Rule `protobuf_oneof:"rule"` +} + +func (x *HttpGenericBodyMatch_GenericTextMatch) Reset() { + *x = HttpGenericBodyMatch_GenericTextMatch{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpGenericBodyMatch_GenericTextMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpGenericBodyMatch_GenericTextMatch) ProtoMessage() {} + +func (x *HttpGenericBodyMatch_GenericTextMatch) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpGenericBodyMatch_GenericTextMatch.ProtoReflect.Descriptor instead. +func (*HttpGenericBodyMatch_GenericTextMatch) Descriptor() ([]byte, []int) { + return file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP(), []int{3, 0} +} + +func (m *HttpGenericBodyMatch_GenericTextMatch) GetRule() isHttpGenericBodyMatch_GenericTextMatch_Rule { + if m != nil { + return m.Rule + } + return nil +} + +func (x *HttpGenericBodyMatch_GenericTextMatch) GetStringMatch() string { + if x, ok := x.GetRule().(*HttpGenericBodyMatch_GenericTextMatch_StringMatch); ok { + return x.StringMatch + } + return "" +} + +func (x *HttpGenericBodyMatch_GenericTextMatch) GetBinaryMatch() []byte { + if x, ok := x.GetRule().(*HttpGenericBodyMatch_GenericTextMatch_BinaryMatch); ok { + return x.BinaryMatch + } + return nil +} + +type isHttpGenericBodyMatch_GenericTextMatch_Rule interface { + isHttpGenericBodyMatch_GenericTextMatch_Rule() +} + +type HttpGenericBodyMatch_GenericTextMatch_StringMatch struct { + // Text string to be located in HTTP body. + StringMatch string `protobuf:"bytes,1,opt,name=string_match,json=stringMatch,proto3,oneof"` +} + +type HttpGenericBodyMatch_GenericTextMatch_BinaryMatch struct { + // Sequence of bytes to be located in HTTP body. + BinaryMatch []byte `protobuf:"bytes,2,opt,name=binary_match,json=binaryMatch,proto3,oneof"` +} + +func (*HttpGenericBodyMatch_GenericTextMatch_StringMatch) isHttpGenericBodyMatch_GenericTextMatch_Rule() { +} + +func (*HttpGenericBodyMatch_GenericTextMatch_BinaryMatch) isHttpGenericBodyMatch_GenericTextMatch_Rule() { +} + +var File_envoy_config_common_matcher_v3_matcher_proto protoreflect.FileDescriptor + +var file_envoy_config_common_matcher_v3_matcher_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, + 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x24, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 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, + 0xe4, 0x11, 0x0a, 0x07, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x58, 0x0a, 0x0c, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x58, 0x0a, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, + 0x48, 0x00, 0x52, 0x0b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x12, + 0x4f, 0x0a, 0x0b, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x09, 0x6f, 0x6e, 0x4e, 0x6f, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x1a, 0xa5, 0x01, 0x0a, 0x07, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x43, 0x0a, 0x07, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x12, 0x44, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, + 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x0a, 0x08, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xa2, 0x09, 0x0a, 0x0b, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x66, 0x0a, 0x08, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, + 0x1a, 0xdc, 0x06, 0x0a, 0x09, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x7a, + 0x0a, 0x10, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, + 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x72, + 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x69, 0x6e, 0x67, 0x6c, + 0x65, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x6c, 0x0a, 0x0a, 0x6f, 0x72, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4b, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, + 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x72, + 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6f, + 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x6e, 0x0a, 0x0b, 0x61, 0x6e, 0x64, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4b, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, + 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x72, 0x65, + 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x6e, + 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x60, 0x0a, 0x0b, 0x6e, 0x6f, 0x74, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, + 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0a, + 0x6e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x1a, 0x87, 0x02, 0x0a, 0x0f, 0x53, + 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x4a, + 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, + 0x02, 0x10, 0x01, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x47, 0x0a, 0x0b, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x12, 0x4f, 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x42, 0x0e, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, + 0x03, 0xf8, 0x42, 0x01, 0x1a, 0x76, 0x0a, 0x0d, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x65, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, + 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, + 0x02, 0x52, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x11, 0x0a, 0x0a, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, + 0xcb, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x12, 0x65, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x70, 0x72, + 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x54, 0x0a, 0x08, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0xe7, 0x04, + 0x0a, 0x0b, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x12, 0x4a, 0x0a, + 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, + 0x10, 0x01, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x66, 0x0a, 0x0f, 0x65, 0x78, 0x61, + 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x70, + 0x48, 0x00, 0x52, 0x0d, 0x65, 0x78, 0x61, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, + 0x70, 0x12, 0x68, 0x0a, 0x10, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, + 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x70, 0x12, 0x4f, 0x0a, 0x0c, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, + 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0xd6, 0x01, 0x0a, + 0x08, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x70, 0x12, 0x61, 0x0a, 0x03, 0x6d, 0x61, 0x70, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x4d, 0x61, 0x70, 0x2e, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x9a, 0x01, 0x02, 0x08, 0x01, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x1a, 0x67, 0x0a, 0x08, + 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x10, 0x0a, 0x09, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x08, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, + 0x01, 0x42, 0x13, 0x0a, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xe8, 0x08, 0x0a, 0x0e, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x54, 0x0a, 0x08, 0x6f, 0x72, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x07, 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, + 0x56, 0x0a, 0x09, 0x61, 0x6e, 0x64, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x08, 0x61, + 0x6e, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x4d, 0x0a, 0x09, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x08, 0x6e, 0x6f, + 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x26, 0x0a, 0x09, 0x61, 0x6e, 0x79, 0x5f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, + 0x08, 0x01, 0x48, 0x00, 0x52, 0x08, 0x61, 0x6e, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x6f, + 0x0a, 0x1a, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x17, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, + 0x71, 0x0a, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x18, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x12, 0x71, 0x0a, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x18, 0x68, 0x74, 0x74, + 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x73, 0x0a, 0x1c, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, + 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, + 0x19, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, + 0x69, 0x6c, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x7c, 0x0a, 0x1f, 0x68, 0x74, + 0x74, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x69, 0x63, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, + 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x1b, 0x68, 0x74, 0x74, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, + 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x7e, 0x0a, 0x20, 0x68, 0x74, 0x74, 0x70, + 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, + 0x63, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, + 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x1c, 0x68, 0x74, 0x74, 0x70, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, + 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0x5a, 0x0a, 0x08, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x53, 0x65, 0x74, 0x12, 0x4e, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x02, 0x52, 0x05, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x42, 0x0b, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, + 0x01, 0x22, 0x52, 0x0a, 0x10, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x3e, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0xa1, 0x02, 0x0a, 0x14, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1f, + 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, + 0x6b, 0x0a, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x45, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, + 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x54, + 0x65, 0x78, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, + 0x08, 0x01, 0x52, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x1a, 0x7b, 0x0a, 0x10, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x54, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x12, 0x2c, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, + 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x2c, + 0x0a, 0x0c, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x7a, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, + 0x0b, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0b, 0x0a, 0x04, + 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x97, 0x01, 0x0a, 0x2c, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4f, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, + 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_config_common_matcher_v3_matcher_proto_rawDescOnce sync.Once + file_envoy_config_common_matcher_v3_matcher_proto_rawDescData = file_envoy_config_common_matcher_v3_matcher_proto_rawDesc +) + +func file_envoy_config_common_matcher_v3_matcher_proto_rawDescGZIP() []byte { + file_envoy_config_common_matcher_v3_matcher_proto_rawDescOnce.Do(func() { + file_envoy_config_common_matcher_v3_matcher_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_common_matcher_v3_matcher_proto_rawDescData) + }) + return file_envoy_config_common_matcher_v3_matcher_proto_rawDescData +} + +var file_envoy_config_common_matcher_v3_matcher_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_envoy_config_common_matcher_v3_matcher_proto_goTypes = []interface{}{ + (*Matcher)(nil), // 0: envoy.config.common.matcher.v3.Matcher + (*MatchPredicate)(nil), // 1: envoy.config.common.matcher.v3.MatchPredicate + (*HttpHeadersMatch)(nil), // 2: envoy.config.common.matcher.v3.HttpHeadersMatch + (*HttpGenericBodyMatch)(nil), // 3: envoy.config.common.matcher.v3.HttpGenericBodyMatch + (*Matcher_OnMatch)(nil), // 4: envoy.config.common.matcher.v3.Matcher.OnMatch + (*Matcher_MatcherList)(nil), // 5: envoy.config.common.matcher.v3.Matcher.MatcherList + (*Matcher_MatcherTree)(nil), // 6: envoy.config.common.matcher.v3.Matcher.MatcherTree + (*Matcher_MatcherList_Predicate)(nil), // 7: envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate + (*Matcher_MatcherList_FieldMatcher)(nil), // 8: envoy.config.common.matcher.v3.Matcher.MatcherList.FieldMatcher + (*Matcher_MatcherList_Predicate_SinglePredicate)(nil), // 9: envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate + (*Matcher_MatcherList_Predicate_PredicateList)(nil), // 10: envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.PredicateList + (*Matcher_MatcherTree_MatchMap)(nil), // 11: envoy.config.common.matcher.v3.Matcher.MatcherTree.MatchMap + nil, // 12: envoy.config.common.matcher.v3.Matcher.MatcherTree.MatchMap.MapEntry + (*MatchPredicate_MatchSet)(nil), // 13: envoy.config.common.matcher.v3.MatchPredicate.MatchSet + (*HttpGenericBodyMatch_GenericTextMatch)(nil), // 14: envoy.config.common.matcher.v3.HttpGenericBodyMatch.GenericTextMatch + (*v3.HeaderMatcher)(nil), // 15: envoy.config.route.v3.HeaderMatcher + (*v31.TypedExtensionConfig)(nil), // 16: envoy.config.core.v3.TypedExtensionConfig + (*v32.StringMatcher)(nil), // 17: envoy.type.matcher.v3.StringMatcher +} +var file_envoy_config_common_matcher_v3_matcher_proto_depIdxs = []int32{ + 5, // 0: envoy.config.common.matcher.v3.Matcher.matcher_list:type_name -> envoy.config.common.matcher.v3.Matcher.MatcherList + 6, // 1: envoy.config.common.matcher.v3.Matcher.matcher_tree:type_name -> envoy.config.common.matcher.v3.Matcher.MatcherTree + 4, // 2: envoy.config.common.matcher.v3.Matcher.on_no_match:type_name -> envoy.config.common.matcher.v3.Matcher.OnMatch + 13, // 3: envoy.config.common.matcher.v3.MatchPredicate.or_match:type_name -> envoy.config.common.matcher.v3.MatchPredicate.MatchSet + 13, // 4: envoy.config.common.matcher.v3.MatchPredicate.and_match:type_name -> envoy.config.common.matcher.v3.MatchPredicate.MatchSet + 1, // 5: envoy.config.common.matcher.v3.MatchPredicate.not_match:type_name -> envoy.config.common.matcher.v3.MatchPredicate + 2, // 6: envoy.config.common.matcher.v3.MatchPredicate.http_request_headers_match:type_name -> envoy.config.common.matcher.v3.HttpHeadersMatch + 2, // 7: envoy.config.common.matcher.v3.MatchPredicate.http_request_trailers_match:type_name -> envoy.config.common.matcher.v3.HttpHeadersMatch + 2, // 8: envoy.config.common.matcher.v3.MatchPredicate.http_response_headers_match:type_name -> envoy.config.common.matcher.v3.HttpHeadersMatch + 2, // 9: envoy.config.common.matcher.v3.MatchPredicate.http_response_trailers_match:type_name -> envoy.config.common.matcher.v3.HttpHeadersMatch + 3, // 10: envoy.config.common.matcher.v3.MatchPredicate.http_request_generic_body_match:type_name -> envoy.config.common.matcher.v3.HttpGenericBodyMatch + 3, // 11: envoy.config.common.matcher.v3.MatchPredicate.http_response_generic_body_match:type_name -> envoy.config.common.matcher.v3.HttpGenericBodyMatch + 15, // 12: envoy.config.common.matcher.v3.HttpHeadersMatch.headers:type_name -> envoy.config.route.v3.HeaderMatcher + 14, // 13: envoy.config.common.matcher.v3.HttpGenericBodyMatch.patterns:type_name -> envoy.config.common.matcher.v3.HttpGenericBodyMatch.GenericTextMatch + 0, // 14: envoy.config.common.matcher.v3.Matcher.OnMatch.matcher:type_name -> envoy.config.common.matcher.v3.Matcher + 16, // 15: envoy.config.common.matcher.v3.Matcher.OnMatch.action:type_name -> envoy.config.core.v3.TypedExtensionConfig + 8, // 16: envoy.config.common.matcher.v3.Matcher.MatcherList.matchers:type_name -> envoy.config.common.matcher.v3.Matcher.MatcherList.FieldMatcher + 16, // 17: envoy.config.common.matcher.v3.Matcher.MatcherTree.input:type_name -> envoy.config.core.v3.TypedExtensionConfig + 11, // 18: envoy.config.common.matcher.v3.Matcher.MatcherTree.exact_match_map:type_name -> envoy.config.common.matcher.v3.Matcher.MatcherTree.MatchMap + 11, // 19: envoy.config.common.matcher.v3.Matcher.MatcherTree.prefix_match_map:type_name -> envoy.config.common.matcher.v3.Matcher.MatcherTree.MatchMap + 16, // 20: envoy.config.common.matcher.v3.Matcher.MatcherTree.custom_match:type_name -> envoy.config.core.v3.TypedExtensionConfig + 9, // 21: envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.single_predicate:type_name -> envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate + 10, // 22: envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.or_matcher:type_name -> envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.PredicateList + 10, // 23: envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.and_matcher:type_name -> envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.PredicateList + 7, // 24: envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.not_matcher:type_name -> envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate + 7, // 25: envoy.config.common.matcher.v3.Matcher.MatcherList.FieldMatcher.predicate:type_name -> envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate + 4, // 26: envoy.config.common.matcher.v3.Matcher.MatcherList.FieldMatcher.on_match:type_name -> envoy.config.common.matcher.v3.Matcher.OnMatch + 16, // 27: envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate.input:type_name -> envoy.config.core.v3.TypedExtensionConfig + 17, // 28: envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate.value_match:type_name -> envoy.type.matcher.v3.StringMatcher + 16, // 29: envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate.custom_match:type_name -> envoy.config.core.v3.TypedExtensionConfig + 7, // 30: envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate.PredicateList.predicate:type_name -> envoy.config.common.matcher.v3.Matcher.MatcherList.Predicate + 12, // 31: envoy.config.common.matcher.v3.Matcher.MatcherTree.MatchMap.map:type_name -> envoy.config.common.matcher.v3.Matcher.MatcherTree.MatchMap.MapEntry + 4, // 32: envoy.config.common.matcher.v3.Matcher.MatcherTree.MatchMap.MapEntry.value:type_name -> envoy.config.common.matcher.v3.Matcher.OnMatch + 1, // 33: envoy.config.common.matcher.v3.MatchPredicate.MatchSet.rules:type_name -> envoy.config.common.matcher.v3.MatchPredicate + 34, // [34:34] is the sub-list for method output_type + 34, // [34:34] is the sub-list for method input_type + 34, // [34:34] is the sub-list for extension type_name + 34, // [34:34] is the sub-list for extension extendee + 0, // [0:34] is the sub-list for field type_name +} + +func init() { file_envoy_config_common_matcher_v3_matcher_proto_init() } +func file_envoy_config_common_matcher_v3_matcher_proto_init() { + if File_envoy_config_common_matcher_v3_matcher_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Matcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MatchPredicate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpHeadersMatch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpGenericBodyMatch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Matcher_OnMatch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Matcher_MatcherList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Matcher_MatcherTree); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Matcher_MatcherList_Predicate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Matcher_MatcherList_FieldMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Matcher_MatcherList_Predicate_SinglePredicate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Matcher_MatcherList_Predicate_PredicateList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Matcher_MatcherTree_MatchMap); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MatchPredicate_MatchSet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpGenericBodyMatch_GenericTextMatch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Matcher_MatcherList_)(nil), + (*Matcher_MatcherTree_)(nil), + } + file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*MatchPredicate_OrMatch)(nil), + (*MatchPredicate_AndMatch)(nil), + (*MatchPredicate_NotMatch)(nil), + (*MatchPredicate_AnyMatch)(nil), + (*MatchPredicate_HttpRequestHeadersMatch)(nil), + (*MatchPredicate_HttpRequestTrailersMatch)(nil), + (*MatchPredicate_HttpResponseHeadersMatch)(nil), + (*MatchPredicate_HttpResponseTrailersMatch)(nil), + (*MatchPredicate_HttpRequestGenericBodyMatch)(nil), + (*MatchPredicate_HttpResponseGenericBodyMatch)(nil), + } + file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*Matcher_OnMatch_Matcher)(nil), + (*Matcher_OnMatch_Action)(nil), + } + file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*Matcher_MatcherTree_ExactMatchMap)(nil), + (*Matcher_MatcherTree_PrefixMatchMap)(nil), + (*Matcher_MatcherTree_CustomMatch)(nil), + } + file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[7].OneofWrappers = []interface{}{ + (*Matcher_MatcherList_Predicate_SinglePredicate_)(nil), + (*Matcher_MatcherList_Predicate_OrMatcher)(nil), + (*Matcher_MatcherList_Predicate_AndMatcher)(nil), + (*Matcher_MatcherList_Predicate_NotMatcher)(nil), + } + file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[9].OneofWrappers = []interface{}{ + (*Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch)(nil), + (*Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch)(nil), + } + file_envoy_config_common_matcher_v3_matcher_proto_msgTypes[14].OneofWrappers = []interface{}{ + (*HttpGenericBodyMatch_GenericTextMatch_StringMatch)(nil), + (*HttpGenericBodyMatch_GenericTextMatch_BinaryMatch)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_config_common_matcher_v3_matcher_proto_rawDesc, + NumEnums: 0, + NumMessages: 15, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_config_common_matcher_v3_matcher_proto_goTypes, + DependencyIndexes: file_envoy_config_common_matcher_v3_matcher_proto_depIdxs, + MessageInfos: file_envoy_config_common_matcher_v3_matcher_proto_msgTypes, + }.Build() + File_envoy_config_common_matcher_v3_matcher_proto = out.File + file_envoy_config_common_matcher_v3_matcher_proto_rawDesc = nil + file_envoy_config_common_matcher_v3_matcher_proto_goTypes = nil + file_envoy_config_common_matcher_v3_matcher_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/common/matcher/v3/matcher.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/common/matcher/v3/matcher.pb.validate.go new file mode 100644 index 0000000000000..38df3cb92656f --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/config/common/matcher/v3/matcher.pb.validate.go @@ -0,0 +1,2740 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/config/common/matcher/v3/matcher.proto + +package matcherv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Matcher 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 *Matcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Matcher 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 MatcherMultiError, or nil if none found. +func (m *Matcher) ValidateAll() error { + return m.validate(true) +} + +func (m *Matcher) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetOnNoMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatcherValidationError{ + field: "OnNoMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatcherValidationError{ + field: "OnNoMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOnNoMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MatcherValidationError{ + field: "OnNoMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.MatcherType.(type) { + + case *Matcher_MatcherList_: + + if all { + switch v := interface{}(m.GetMatcherList()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatcherValidationError{ + field: "MatcherList", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatcherValidationError{ + field: "MatcherList", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatcherList()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MatcherValidationError{ + field: "MatcherList", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Matcher_MatcherTree_: + + if all { + switch v := interface{}(m.GetMatcherTree()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatcherValidationError{ + field: "MatcherTree", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatcherValidationError{ + field: "MatcherTree", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatcherTree()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MatcherValidationError{ + field: "MatcherTree", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := MatcherValidationError{ + field: "MatcherType", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return MatcherMultiError(errors) + } + return nil +} + +// MatcherMultiError is an error wrapping multiple validation errors returned +// by Matcher.ValidateAll() if the designated constraints aren't met. +type MatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MatcherMultiError) AllErrors() []error { return m } + +// MatcherValidationError is the validation error returned by Matcher.Validate +// if the designated constraints aren't met. +type MatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MatcherValidationError) ErrorName() string { return "MatcherValidationError" } + +// Error satisfies the builtin error interface +func (e MatcherValidationError) 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 %sMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MatcherValidationError{} + +// Validate checks the field values on MatchPredicate 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 *MatchPredicate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MatchPredicate 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 MatchPredicateMultiError, +// or nil if none found. +func (m *MatchPredicate) ValidateAll() error { + return m.validate(true) +} + +func (m *MatchPredicate) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.Rule.(type) { + + case *MatchPredicate_OrMatch: + + if all { + switch v := interface{}(m.GetOrMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "OrMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "OrMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOrMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MatchPredicateValidationError{ + field: "OrMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *MatchPredicate_AndMatch: + + if all { + switch v := interface{}(m.GetAndMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "AndMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "AndMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAndMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MatchPredicateValidationError{ + field: "AndMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *MatchPredicate_NotMatch: + + if all { + switch v := interface{}(m.GetNotMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "NotMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "NotMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNotMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MatchPredicateValidationError{ + field: "NotMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *MatchPredicate_AnyMatch: + + if m.GetAnyMatch() != true { + err := MatchPredicateValidationError{ + field: "AnyMatch", + reason: "value must equal true", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *MatchPredicate_HttpRequestHeadersMatch: + + if all { + switch v := interface{}(m.GetHttpRequestHeadersMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestHeadersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestHeadersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpRequestHeadersMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MatchPredicateValidationError{ + field: "HttpRequestHeadersMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *MatchPredicate_HttpRequestTrailersMatch: + + if all { + switch v := interface{}(m.GetHttpRequestTrailersMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestTrailersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestTrailersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpRequestTrailersMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MatchPredicateValidationError{ + field: "HttpRequestTrailersMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *MatchPredicate_HttpResponseHeadersMatch: + + if all { + switch v := interface{}(m.GetHttpResponseHeadersMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseHeadersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseHeadersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpResponseHeadersMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MatchPredicateValidationError{ + field: "HttpResponseHeadersMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *MatchPredicate_HttpResponseTrailersMatch: + + if all { + switch v := interface{}(m.GetHttpResponseTrailersMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseTrailersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseTrailersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpResponseTrailersMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MatchPredicateValidationError{ + field: "HttpResponseTrailersMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *MatchPredicate_HttpRequestGenericBodyMatch: + + if all { + switch v := interface{}(m.GetHttpRequestGenericBodyMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestGenericBodyMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestGenericBodyMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpRequestGenericBodyMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MatchPredicateValidationError{ + field: "HttpRequestGenericBodyMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *MatchPredicate_HttpResponseGenericBodyMatch: + + if all { + switch v := interface{}(m.GetHttpResponseGenericBodyMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseGenericBodyMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseGenericBodyMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpResponseGenericBodyMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MatchPredicateValidationError{ + field: "HttpResponseGenericBodyMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := MatchPredicateValidationError{ + field: "Rule", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return MatchPredicateMultiError(errors) + } + return nil +} + +// MatchPredicateMultiError is an error wrapping multiple validation errors +// returned by MatchPredicate.ValidateAll() if the designated constraints +// aren't met. +type MatchPredicateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MatchPredicateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MatchPredicateMultiError) AllErrors() []error { return m } + +// MatchPredicateValidationError is the validation error returned by +// MatchPredicate.Validate if the designated constraints aren't met. +type MatchPredicateValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MatchPredicateValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MatchPredicateValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MatchPredicateValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MatchPredicateValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MatchPredicateValidationError) ErrorName() string { return "MatchPredicateValidationError" } + +// Error satisfies the builtin error interface +func (e MatchPredicateValidationError) 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 %sMatchPredicate.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MatchPredicateValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MatchPredicateValidationError{} + +// Validate checks the field values on HttpHeadersMatch 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 *HttpHeadersMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpHeadersMatch 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 +// HttpHeadersMatchMultiError, or nil if none found. +func (m *HttpHeadersMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpHeadersMatch) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetHeaders() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpHeadersMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpHeadersMatchValidationError{ + field: fmt.Sprintf("Headers[%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 HttpHeadersMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return HttpHeadersMatchMultiError(errors) + } + return nil +} + +// HttpHeadersMatchMultiError is an error wrapping multiple validation errors +// returned by HttpHeadersMatch.ValidateAll() if the designated constraints +// aren't met. +type HttpHeadersMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpHeadersMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpHeadersMatchMultiError) AllErrors() []error { return m } + +// HttpHeadersMatchValidationError is the validation error returned by +// HttpHeadersMatch.Validate if the designated constraints aren't met. +type HttpHeadersMatchValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpHeadersMatchValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpHeadersMatchValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpHeadersMatchValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpHeadersMatchValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpHeadersMatchValidationError) ErrorName() string { return "HttpHeadersMatchValidationError" } + +// Error satisfies the builtin error interface +func (e HttpHeadersMatchValidationError) 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 %sHttpHeadersMatch.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpHeadersMatchValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpHeadersMatchValidationError{} + +// Validate checks the field values on HttpGenericBodyMatch 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 *HttpGenericBodyMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpGenericBodyMatch 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 +// HttpGenericBodyMatchMultiError, or nil if none found. +func (m *HttpGenericBodyMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpGenericBodyMatch) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for BytesLimit + + if len(m.GetPatterns()) < 1 { + err := HttpGenericBodyMatchValidationError{ + field: "Patterns", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetPatterns() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpGenericBodyMatchValidationError{ + field: fmt.Sprintf("Patterns[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpGenericBodyMatchValidationError{ + field: fmt.Sprintf("Patterns[%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 HttpGenericBodyMatchValidationError{ + field: fmt.Sprintf("Patterns[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return HttpGenericBodyMatchMultiError(errors) + } + return nil +} + +// HttpGenericBodyMatchMultiError is an error wrapping multiple validation +// errors returned by HttpGenericBodyMatch.ValidateAll() if the designated +// constraints aren't met. +type HttpGenericBodyMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpGenericBodyMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpGenericBodyMatchMultiError) AllErrors() []error { return m } + +// HttpGenericBodyMatchValidationError is the validation error returned by +// HttpGenericBodyMatch.Validate if the designated constraints aren't met. +type HttpGenericBodyMatchValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpGenericBodyMatchValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpGenericBodyMatchValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpGenericBodyMatchValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpGenericBodyMatchValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpGenericBodyMatchValidationError) ErrorName() string { + return "HttpGenericBodyMatchValidationError" +} + +// Error satisfies the builtin error interface +func (e HttpGenericBodyMatchValidationError) 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 %sHttpGenericBodyMatch.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpGenericBodyMatchValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpGenericBodyMatchValidationError{} + +// Validate checks the field values on Matcher_OnMatch 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 *Matcher_OnMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Matcher_OnMatch 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 +// Matcher_OnMatchMultiError, or nil if none found. +func (m *Matcher_OnMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *Matcher_OnMatch) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.OnMatch.(type) { + + case *Matcher_OnMatch_Matcher: + + if all { + switch v := interface{}(m.GetMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_OnMatchValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_OnMatchValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Matcher_OnMatchValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Matcher_OnMatch_Action: + + if all { + switch v := interface{}(m.GetAction()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_OnMatchValidationError{ + field: "Action", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_OnMatchValidationError{ + field: "Action", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAction()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Matcher_OnMatchValidationError{ + field: "Action", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := Matcher_OnMatchValidationError{ + field: "OnMatch", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return Matcher_OnMatchMultiError(errors) + } + return nil +} + +// Matcher_OnMatchMultiError is an error wrapping multiple validation errors +// returned by Matcher_OnMatch.ValidateAll() if the designated constraints +// aren't met. +type Matcher_OnMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Matcher_OnMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Matcher_OnMatchMultiError) AllErrors() []error { return m } + +// Matcher_OnMatchValidationError is the validation error returned by +// Matcher_OnMatch.Validate if the designated constraints aren't met. +type Matcher_OnMatchValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Matcher_OnMatchValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Matcher_OnMatchValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Matcher_OnMatchValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Matcher_OnMatchValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Matcher_OnMatchValidationError) ErrorName() string { return "Matcher_OnMatchValidationError" } + +// Error satisfies the builtin error interface +func (e Matcher_OnMatchValidationError) 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 %sMatcher_OnMatch.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Matcher_OnMatchValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Matcher_OnMatchValidationError{} + +// Validate checks the field values on Matcher_MatcherList 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 *Matcher_MatcherList) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Matcher_MatcherList 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 +// Matcher_MatcherListMultiError, or nil if none found. +func (m *Matcher_MatcherList) ValidateAll() error { + return m.validate(true) +} + +func (m *Matcher_MatcherList) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetMatchers()) < 1 { + err := Matcher_MatcherListValidationError{ + field: "Matchers", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetMatchers() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherListValidationError{ + field: fmt.Sprintf("Matchers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherListValidationError{ + field: fmt.Sprintf("Matchers[%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 Matcher_MatcherListValidationError{ + field: fmt.Sprintf("Matchers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return Matcher_MatcherListMultiError(errors) + } + return nil +} + +// Matcher_MatcherListMultiError is an error wrapping multiple validation +// errors returned by Matcher_MatcherList.ValidateAll() if the designated +// constraints aren't met. +type Matcher_MatcherListMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Matcher_MatcherListMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Matcher_MatcherListMultiError) AllErrors() []error { return m } + +// Matcher_MatcherListValidationError is the validation error returned by +// Matcher_MatcherList.Validate if the designated constraints aren't met. +type Matcher_MatcherListValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Matcher_MatcherListValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Matcher_MatcherListValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Matcher_MatcherListValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Matcher_MatcherListValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Matcher_MatcherListValidationError) ErrorName() string { + return "Matcher_MatcherListValidationError" +} + +// Error satisfies the builtin error interface +func (e Matcher_MatcherListValidationError) 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 %sMatcher_MatcherList.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Matcher_MatcherListValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Matcher_MatcherListValidationError{} + +// Validate checks the field values on Matcher_MatcherTree 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 *Matcher_MatcherTree) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Matcher_MatcherTree 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 +// Matcher_MatcherTreeMultiError, or nil if none found. +func (m *Matcher_MatcherTree) ValidateAll() error { + return m.validate(true) +} + +func (m *Matcher_MatcherTree) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetInput() == nil { + err := Matcher_MatcherTreeValidationError{ + field: "Input", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetInput()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherTreeValidationError{ + field: "Input", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherTreeValidationError{ + field: "Input", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInput()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Matcher_MatcherTreeValidationError{ + field: "Input", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.TreeType.(type) { + + case *Matcher_MatcherTree_ExactMatchMap: + + if all { + switch v := interface{}(m.GetExactMatchMap()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherTreeValidationError{ + field: "ExactMatchMap", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherTreeValidationError{ + field: "ExactMatchMap", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExactMatchMap()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Matcher_MatcherTreeValidationError{ + field: "ExactMatchMap", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Matcher_MatcherTree_PrefixMatchMap: + + if all { + switch v := interface{}(m.GetPrefixMatchMap()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherTreeValidationError{ + field: "PrefixMatchMap", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherTreeValidationError{ + field: "PrefixMatchMap", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPrefixMatchMap()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Matcher_MatcherTreeValidationError{ + field: "PrefixMatchMap", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Matcher_MatcherTree_CustomMatch: + + if all { + switch v := interface{}(m.GetCustomMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherTreeValidationError{ + field: "CustomMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherTreeValidationError{ + field: "CustomMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCustomMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Matcher_MatcherTreeValidationError{ + field: "CustomMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := Matcher_MatcherTreeValidationError{ + field: "TreeType", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return Matcher_MatcherTreeMultiError(errors) + } + return nil +} + +// Matcher_MatcherTreeMultiError is an error wrapping multiple validation +// errors returned by Matcher_MatcherTree.ValidateAll() if the designated +// constraints aren't met. +type Matcher_MatcherTreeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Matcher_MatcherTreeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Matcher_MatcherTreeMultiError) AllErrors() []error { return m } + +// Matcher_MatcherTreeValidationError is the validation error returned by +// Matcher_MatcherTree.Validate if the designated constraints aren't met. +type Matcher_MatcherTreeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Matcher_MatcherTreeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Matcher_MatcherTreeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Matcher_MatcherTreeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Matcher_MatcherTreeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Matcher_MatcherTreeValidationError) ErrorName() string { + return "Matcher_MatcherTreeValidationError" +} + +// Error satisfies the builtin error interface +func (e Matcher_MatcherTreeValidationError) 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 %sMatcher_MatcherTree.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Matcher_MatcherTreeValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Matcher_MatcherTreeValidationError{} + +// Validate checks the field values on Matcher_MatcherList_Predicate 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 *Matcher_MatcherList_Predicate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Matcher_MatcherList_Predicate 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 +// Matcher_MatcherList_PredicateMultiError, or nil if none found. +func (m *Matcher_MatcherList_Predicate) ValidateAll() error { + return m.validate(true) +} + +func (m *Matcher_MatcherList_Predicate) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.MatchType.(type) { + + case *Matcher_MatcherList_Predicate_SinglePredicate_: + + if all { + switch v := interface{}(m.GetSinglePredicate()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherList_PredicateValidationError{ + field: "SinglePredicate", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherList_PredicateValidationError{ + field: "SinglePredicate", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSinglePredicate()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Matcher_MatcherList_PredicateValidationError{ + field: "SinglePredicate", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Matcher_MatcherList_Predicate_OrMatcher: + + if all { + switch v := interface{}(m.GetOrMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherList_PredicateValidationError{ + field: "OrMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherList_PredicateValidationError{ + field: "OrMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOrMatcher()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Matcher_MatcherList_PredicateValidationError{ + field: "OrMatcher", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Matcher_MatcherList_Predicate_AndMatcher: + + if all { + switch v := interface{}(m.GetAndMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherList_PredicateValidationError{ + field: "AndMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherList_PredicateValidationError{ + field: "AndMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAndMatcher()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Matcher_MatcherList_PredicateValidationError{ + field: "AndMatcher", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Matcher_MatcherList_Predicate_NotMatcher: + + if all { + switch v := interface{}(m.GetNotMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherList_PredicateValidationError{ + field: "NotMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherList_PredicateValidationError{ + field: "NotMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNotMatcher()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Matcher_MatcherList_PredicateValidationError{ + field: "NotMatcher", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := Matcher_MatcherList_PredicateValidationError{ + field: "MatchType", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return Matcher_MatcherList_PredicateMultiError(errors) + } + return nil +} + +// Matcher_MatcherList_PredicateMultiError is an error wrapping multiple +// validation errors returned by Matcher_MatcherList_Predicate.ValidateAll() +// if the designated constraints aren't met. +type Matcher_MatcherList_PredicateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Matcher_MatcherList_PredicateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Matcher_MatcherList_PredicateMultiError) AllErrors() []error { return m } + +// Matcher_MatcherList_PredicateValidationError is the validation error +// returned by Matcher_MatcherList_Predicate.Validate if the designated +// constraints aren't met. +type Matcher_MatcherList_PredicateValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Matcher_MatcherList_PredicateValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Matcher_MatcherList_PredicateValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Matcher_MatcherList_PredicateValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Matcher_MatcherList_PredicateValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Matcher_MatcherList_PredicateValidationError) ErrorName() string { + return "Matcher_MatcherList_PredicateValidationError" +} + +// Error satisfies the builtin error interface +func (e Matcher_MatcherList_PredicateValidationError) 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 %sMatcher_MatcherList_Predicate.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Matcher_MatcherList_PredicateValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Matcher_MatcherList_PredicateValidationError{} + +// Validate checks the field values on Matcher_MatcherList_FieldMatcher 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 *Matcher_MatcherList_FieldMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Matcher_MatcherList_FieldMatcher 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 +// Matcher_MatcherList_FieldMatcherMultiError, or nil if none found. +func (m *Matcher_MatcherList_FieldMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *Matcher_MatcherList_FieldMatcher) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetPredicate() == nil { + err := Matcher_MatcherList_FieldMatcherValidationError{ + field: "Predicate", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetPredicate()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherList_FieldMatcherValidationError{ + field: "Predicate", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherList_FieldMatcherValidationError{ + field: "Predicate", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPredicate()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Matcher_MatcherList_FieldMatcherValidationError{ + field: "Predicate", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetOnMatch() == nil { + err := Matcher_MatcherList_FieldMatcherValidationError{ + field: "OnMatch", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetOnMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherList_FieldMatcherValidationError{ + field: "OnMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherList_FieldMatcherValidationError{ + field: "OnMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Matcher_MatcherList_FieldMatcherValidationError{ + field: "OnMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return Matcher_MatcherList_FieldMatcherMultiError(errors) + } + return nil +} + +// Matcher_MatcherList_FieldMatcherMultiError is an error wrapping multiple +// validation errors returned by +// Matcher_MatcherList_FieldMatcher.ValidateAll() if the designated +// constraints aren't met. +type Matcher_MatcherList_FieldMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Matcher_MatcherList_FieldMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Matcher_MatcherList_FieldMatcherMultiError) AllErrors() []error { return m } + +// Matcher_MatcherList_FieldMatcherValidationError is the validation error +// returned by Matcher_MatcherList_FieldMatcher.Validate if the designated +// constraints aren't met. +type Matcher_MatcherList_FieldMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Matcher_MatcherList_FieldMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Matcher_MatcherList_FieldMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Matcher_MatcherList_FieldMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Matcher_MatcherList_FieldMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Matcher_MatcherList_FieldMatcherValidationError) ErrorName() string { + return "Matcher_MatcherList_FieldMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e Matcher_MatcherList_FieldMatcherValidationError) 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 %sMatcher_MatcherList_FieldMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Matcher_MatcherList_FieldMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Matcher_MatcherList_FieldMatcherValidationError{} + +// Validate checks the field values on +// Matcher_MatcherList_Predicate_SinglePredicate 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 *Matcher_MatcherList_Predicate_SinglePredicate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// Matcher_MatcherList_Predicate_SinglePredicate 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 +// Matcher_MatcherList_Predicate_SinglePredicateMultiError, or nil if none found. +func (m *Matcher_MatcherList_Predicate_SinglePredicate) ValidateAll() error { + return m.validate(true) +} + +func (m *Matcher_MatcherList_Predicate_SinglePredicate) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetInput() == nil { + err := Matcher_MatcherList_Predicate_SinglePredicateValidationError{ + field: "Input", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetInput()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{ + field: "Input", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{ + field: "Input", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInput()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Matcher_MatcherList_Predicate_SinglePredicateValidationError{ + field: "Input", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.Matcher.(type) { + + case *Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch: + + if all { + switch v := interface{}(m.GetValueMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{ + field: "ValueMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{ + field: "ValueMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValueMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Matcher_MatcherList_Predicate_SinglePredicateValidationError{ + field: "ValueMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch: + + if all { + switch v := interface{}(m.GetCustomMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{ + field: "CustomMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{ + field: "CustomMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCustomMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Matcher_MatcherList_Predicate_SinglePredicateValidationError{ + field: "CustomMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := Matcher_MatcherList_Predicate_SinglePredicateValidationError{ + field: "Matcher", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return Matcher_MatcherList_Predicate_SinglePredicateMultiError(errors) + } + return nil +} + +// Matcher_MatcherList_Predicate_SinglePredicateMultiError is an error wrapping +// multiple validation errors returned by +// Matcher_MatcherList_Predicate_SinglePredicate.ValidateAll() if the +// designated constraints aren't met. +type Matcher_MatcherList_Predicate_SinglePredicateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Matcher_MatcherList_Predicate_SinglePredicateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Matcher_MatcherList_Predicate_SinglePredicateMultiError) AllErrors() []error { return m } + +// Matcher_MatcherList_Predicate_SinglePredicateValidationError is the +// validation error returned by +// Matcher_MatcherList_Predicate_SinglePredicate.Validate if the designated +// constraints aren't met. +type Matcher_MatcherList_Predicate_SinglePredicateValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) ErrorName() string { + return "Matcher_MatcherList_Predicate_SinglePredicateValidationError" +} + +// Error satisfies the builtin error interface +func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) 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 %sMatcher_MatcherList_Predicate_SinglePredicate.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Matcher_MatcherList_Predicate_SinglePredicateValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Matcher_MatcherList_Predicate_SinglePredicateValidationError{} + +// Validate checks the field values on +// Matcher_MatcherList_Predicate_PredicateList 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 *Matcher_MatcherList_Predicate_PredicateList) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// Matcher_MatcherList_Predicate_PredicateList 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 +// Matcher_MatcherList_Predicate_PredicateListMultiError, or nil if none found. +func (m *Matcher_MatcherList_Predicate_PredicateList) ValidateAll() error { + return m.validate(true) +} + +func (m *Matcher_MatcherList_Predicate_PredicateList) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetPredicate()) < 2 { + err := Matcher_MatcherList_Predicate_PredicateListValidationError{ + field: "Predicate", + reason: "value must contain at least 2 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetPredicate() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherList_Predicate_PredicateListValidationError{ + field: fmt.Sprintf("Predicate[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherList_Predicate_PredicateListValidationError{ + field: fmt.Sprintf("Predicate[%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 Matcher_MatcherList_Predicate_PredicateListValidationError{ + field: fmt.Sprintf("Predicate[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return Matcher_MatcherList_Predicate_PredicateListMultiError(errors) + } + return nil +} + +// Matcher_MatcherList_Predicate_PredicateListMultiError is an error wrapping +// multiple validation errors returned by +// Matcher_MatcherList_Predicate_PredicateList.ValidateAll() if the designated +// constraints aren't met. +type Matcher_MatcherList_Predicate_PredicateListMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Matcher_MatcherList_Predicate_PredicateListMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Matcher_MatcherList_Predicate_PredicateListMultiError) AllErrors() []error { return m } + +// Matcher_MatcherList_Predicate_PredicateListValidationError is the validation +// error returned by Matcher_MatcherList_Predicate_PredicateList.Validate if +// the designated constraints aren't met. +type Matcher_MatcherList_Predicate_PredicateListValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Matcher_MatcherList_Predicate_PredicateListValidationError) ErrorName() string { + return "Matcher_MatcherList_Predicate_PredicateListValidationError" +} + +// Error satisfies the builtin error interface +func (e Matcher_MatcherList_Predicate_PredicateListValidationError) 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 %sMatcher_MatcherList_Predicate_PredicateList.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Matcher_MatcherList_Predicate_PredicateListValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Matcher_MatcherList_Predicate_PredicateListValidationError{} + +// Validate checks the field values on Matcher_MatcherTree_MatchMap 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 *Matcher_MatcherTree_MatchMap) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Matcher_MatcherTree_MatchMap 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 +// Matcher_MatcherTree_MatchMapMultiError, or nil if none found. +func (m *Matcher_MatcherTree_MatchMap) ValidateAll() error { + return m.validate(true) +} + +func (m *Matcher_MatcherTree_MatchMap) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetMap()) < 1 { + err := Matcher_MatcherTree_MatchMapValidationError{ + field: "Map", + reason: "value must contain at least 1 pair(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + { + sorted_keys := make([]string, len(m.GetMap())) + i := 0 + for key := range m.GetMap() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetMap()[key] + _ = val + + // no validation rules for Map[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Matcher_MatcherTree_MatchMapValidationError{ + field: fmt.Sprintf("Map[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Matcher_MatcherTree_MatchMapValidationError{ + field: fmt.Sprintf("Map[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Matcher_MatcherTree_MatchMapValidationError{ + field: fmt.Sprintf("Map[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if len(errors) > 0 { + return Matcher_MatcherTree_MatchMapMultiError(errors) + } + return nil +} + +// Matcher_MatcherTree_MatchMapMultiError is an error wrapping multiple +// validation errors returned by Matcher_MatcherTree_MatchMap.ValidateAll() if +// the designated constraints aren't met. +type Matcher_MatcherTree_MatchMapMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Matcher_MatcherTree_MatchMapMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Matcher_MatcherTree_MatchMapMultiError) AllErrors() []error { return m } + +// Matcher_MatcherTree_MatchMapValidationError is the validation error returned +// by Matcher_MatcherTree_MatchMap.Validate if the designated constraints +// aren't met. +type Matcher_MatcherTree_MatchMapValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Matcher_MatcherTree_MatchMapValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Matcher_MatcherTree_MatchMapValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Matcher_MatcherTree_MatchMapValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Matcher_MatcherTree_MatchMapValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Matcher_MatcherTree_MatchMapValidationError) ErrorName() string { + return "Matcher_MatcherTree_MatchMapValidationError" +} + +// Error satisfies the builtin error interface +func (e Matcher_MatcherTree_MatchMapValidationError) 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 %sMatcher_MatcherTree_MatchMap.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Matcher_MatcherTree_MatchMapValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Matcher_MatcherTree_MatchMapValidationError{} + +// Validate checks the field values on MatchPredicate_MatchSet 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 *MatchPredicate_MatchSet) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MatchPredicate_MatchSet 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 +// MatchPredicate_MatchSetMultiError, or nil if none found. +func (m *MatchPredicate_MatchSet) ValidateAll() error { + return m.validate(true) +} + +func (m *MatchPredicate_MatchSet) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetRules()) < 2 { + err := MatchPredicate_MatchSetValidationError{ + field: "Rules", + reason: "value must contain at least 2 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetRules() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicate_MatchSetValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicate_MatchSetValidationError{ + field: fmt.Sprintf("Rules[%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 MatchPredicate_MatchSetValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return MatchPredicate_MatchSetMultiError(errors) + } + return nil +} + +// MatchPredicate_MatchSetMultiError is an error wrapping multiple validation +// errors returned by MatchPredicate_MatchSet.ValidateAll() if the designated +// constraints aren't met. +type MatchPredicate_MatchSetMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MatchPredicate_MatchSetMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MatchPredicate_MatchSetMultiError) AllErrors() []error { return m } + +// MatchPredicate_MatchSetValidationError is the validation error returned by +// MatchPredicate_MatchSet.Validate if the designated constraints aren't met. +type MatchPredicate_MatchSetValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MatchPredicate_MatchSetValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MatchPredicate_MatchSetValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MatchPredicate_MatchSetValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MatchPredicate_MatchSetValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MatchPredicate_MatchSetValidationError) ErrorName() string { + return "MatchPredicate_MatchSetValidationError" +} + +// Error satisfies the builtin error interface +func (e MatchPredicate_MatchSetValidationError) 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 %sMatchPredicate_MatchSet.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MatchPredicate_MatchSetValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MatchPredicate_MatchSetValidationError{} + +// Validate checks the field values on HttpGenericBodyMatch_GenericTextMatch +// 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 *HttpGenericBodyMatch_GenericTextMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpGenericBodyMatch_GenericTextMatch +// 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 +// HttpGenericBodyMatch_GenericTextMatchMultiError, or nil if none found. +func (m *HttpGenericBodyMatch_GenericTextMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpGenericBodyMatch_GenericTextMatch) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.Rule.(type) { + + case *HttpGenericBodyMatch_GenericTextMatch_StringMatch: + + if utf8.RuneCountInString(m.GetStringMatch()) < 1 { + err := HttpGenericBodyMatch_GenericTextMatchValidationError{ + field: "StringMatch", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *HttpGenericBodyMatch_GenericTextMatch_BinaryMatch: + + if len(m.GetBinaryMatch()) < 1 { + err := HttpGenericBodyMatch_GenericTextMatchValidationError{ + field: "BinaryMatch", + reason: "value length must be at least 1 bytes", + } + if !all { + return err + } + errors = append(errors, err) + } + + default: + err := HttpGenericBodyMatch_GenericTextMatchValidationError{ + field: "Rule", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return HttpGenericBodyMatch_GenericTextMatchMultiError(errors) + } + return nil +} + +// HttpGenericBodyMatch_GenericTextMatchMultiError is an error wrapping +// multiple validation errors returned by +// HttpGenericBodyMatch_GenericTextMatch.ValidateAll() if the designated +// constraints aren't met. +type HttpGenericBodyMatch_GenericTextMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpGenericBodyMatch_GenericTextMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpGenericBodyMatch_GenericTextMatchMultiError) AllErrors() []error { return m } + +// HttpGenericBodyMatch_GenericTextMatchValidationError is the validation error +// returned by HttpGenericBodyMatch_GenericTextMatch.Validate if the +// designated constraints aren't met. +type HttpGenericBodyMatch_GenericTextMatchValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpGenericBodyMatch_GenericTextMatchValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpGenericBodyMatch_GenericTextMatchValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpGenericBodyMatch_GenericTextMatchValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpGenericBodyMatch_GenericTextMatchValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpGenericBodyMatch_GenericTextMatchValidationError) ErrorName() string { + return "HttpGenericBodyMatch_GenericTextMatchValidationError" +} + +// Error satisfies the builtin error interface +func (e HttpGenericBodyMatch_GenericTextMatchValidationError) 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 %sHttpGenericBodyMatch_GenericTextMatch.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpGenericBodyMatch_GenericTextMatchValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpGenericBodyMatch_GenericTextMatchValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/common/mutation_rules/v3/mutation_rules.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/common/mutation_rules/v3/mutation_rules.pb.go new file mode 100644 index 0000000000000..32ffb83892970 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/config/common/mutation_rules/v3/mutation_rules.pb.go @@ -0,0 +1,312 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/config/common/mutation_rules/v3/mutation_rules.proto + +package mutation_rulesv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/type/matcher/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// The HeaderMutationRules structure specifies what headers may be +// manipulated by a processing filter. This set of rules makes it +// possible to control which modifications a filter may make. +// +// By default, an external processing server may add, modify, or remove +// any header except for an "Envoy internal" header (which is typically +// denoted by an x-envoy prefix) or specific headers that may affect +// further filter processing: +// +// * “host“ +// * “:authority“ +// * “:scheme“ +// * “:method“ +// +// Every attempt to add, change, append, or remove a header will be +// tested against the rules here. Disallowed header mutations will be +// ignored unless “disallow_is_error“ is set to true. +// +// Attempts to remove headers are further constrained -- regardless of the +// settings, system-defined headers (that start with “:“) and the “host“ +// header may never be removed. +// +// In addition, a counter will be incremented whenever a mutation is +// rejected. In the ext_proc filter, that counter is named +// “rejected_header_mutations“. +// [#next-free-field: 8] +type HeaderMutationRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // By default, certain headers that could affect processing of subsequent + // filters or request routing cannot be modified. These headers are + // “host“, “:authority“, “:scheme“, and “:method“. Setting this parameter + // to true allows these headers to be modified as well. + AllowAllRouting *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=allow_all_routing,json=allowAllRouting,proto3" json:"allow_all_routing,omitempty"` + // If true, allow modification of envoy internal headers. By default, these + // start with “x-envoy“ but this may be overridden in the “Bootstrap“ + // configuration using the + // :ref:`header_prefix ` + // field. Default is false. + AllowEnvoy *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=allow_envoy,json=allowEnvoy,proto3" json:"allow_envoy,omitempty"` + // If true, prevent modification of any system header, defined as a header + // that starts with a “:“ character, regardless of any other settings. + // A processing server may still override the “:status“ of an HTTP response + // using an “ImmediateResponse“ message. Default is false. + DisallowSystem *wrapperspb.BoolValue `protobuf:"bytes,3,opt,name=disallow_system,json=disallowSystem,proto3" json:"disallow_system,omitempty"` + // If true, prevent modifications of all header values, regardless of any + // other settings. A processing server may still override the “:status“ + // of an HTTP response using an “ImmediateResponse“ message. Default is false. + DisallowAll *wrapperspb.BoolValue `protobuf:"bytes,4,opt,name=disallow_all,json=disallowAll,proto3" json:"disallow_all,omitempty"` + // If set, specifically allow any header that matches this regular + // expression. This overrides all other settings except for + // “disallow_expression“. + AllowExpression *v3.RegexMatcher `protobuf:"bytes,5,opt,name=allow_expression,json=allowExpression,proto3" json:"allow_expression,omitempty"` + // If set, specifically disallow any header that matches this regular + // expression regardless of any other settings. + DisallowExpression *v3.RegexMatcher `protobuf:"bytes,6,opt,name=disallow_expression,json=disallowExpression,proto3" json:"disallow_expression,omitempty"` + // If true, and if the rules in this list cause a header mutation to be + // disallowed, then the filter using this configuration will terminate the + // request with a 500 error. In addition, regardless of the setting of this + // parameter, any attempt to set, add, or modify a disallowed header will + // cause the “rejected_header_mutations“ counter to be incremented. + // Default is false. + DisallowIsError *wrapperspb.BoolValue `protobuf:"bytes,7,opt,name=disallow_is_error,json=disallowIsError,proto3" json:"disallow_is_error,omitempty"` +} + +func (x *HeaderMutationRules) Reset() { + *x = HeaderMutationRules{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeaderMutationRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeaderMutationRules) ProtoMessage() {} + +func (x *HeaderMutationRules) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HeaderMutationRules.ProtoReflect.Descriptor instead. +func (*HeaderMutationRules) Descriptor() ([]byte, []int) { + return file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDescGZIP(), []int{0} +} + +func (x *HeaderMutationRules) GetAllowAllRouting() *wrapperspb.BoolValue { + if x != nil { + return x.AllowAllRouting + } + return nil +} + +func (x *HeaderMutationRules) GetAllowEnvoy() *wrapperspb.BoolValue { + if x != nil { + return x.AllowEnvoy + } + return nil +} + +func (x *HeaderMutationRules) GetDisallowSystem() *wrapperspb.BoolValue { + if x != nil { + return x.DisallowSystem + } + return nil +} + +func (x *HeaderMutationRules) GetDisallowAll() *wrapperspb.BoolValue { + if x != nil { + return x.DisallowAll + } + return nil +} + +func (x *HeaderMutationRules) GetAllowExpression() *v3.RegexMatcher { + if x != nil { + return x.AllowExpression + } + return nil +} + +func (x *HeaderMutationRules) GetDisallowExpression() *v3.RegexMatcher { + if x != nil { + return x.DisallowExpression + } + return nil +} + +func (x *HeaderMutationRules) GetDisallowIsError() *wrapperspb.BoolValue { + if x != nil { + return x.DisallowIsError + } + return nil +} + +var File_envoy_config_common_mutation_rules_v3_mutation_rules_proto protoreflect.FileDescriptor + +var file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDesc = []byte{ + 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x25, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x76, 0x33, 0x1a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8c, 0x04, 0x0a, 0x13, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x46, 0x0a, + 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, + 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x6c, 0x52, 0x6f, + 0x75, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x3b, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 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, 0x42, 0x6f, 0x6f, + 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x6e, 0x76, + 0x6f, 0x79, 0x12, 0x43, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, + 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x3d, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x6c, 0x12, 0x4e, 0x0a, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, + 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x54, 0x0a, 0x13, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, + 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x12, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x11, + 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x73, 0x5f, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x64, 0x69, 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x73, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x42, 0xb2, 0x01, 0x0a, 0x33, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x75, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x12, 0x4d, 0x75, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x5d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6d, + 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x33, + 0x3b, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDescOnce sync.Once + file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDescData = file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDesc +) + +func file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDescGZIP() []byte { + file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDescOnce.Do(func() { + file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDescData) + }) + return file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDescData +} + +var file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_goTypes = []interface{}{ + (*HeaderMutationRules)(nil), // 0: envoy.config.common.mutation_rules.v3.HeaderMutationRules + (*wrapperspb.BoolValue)(nil), // 1: google.protobuf.BoolValue + (*v3.RegexMatcher)(nil), // 2: envoy.type.matcher.v3.RegexMatcher +} +var file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_depIdxs = []int32{ + 1, // 0: envoy.config.common.mutation_rules.v3.HeaderMutationRules.allow_all_routing:type_name -> google.protobuf.BoolValue + 1, // 1: envoy.config.common.mutation_rules.v3.HeaderMutationRules.allow_envoy:type_name -> google.protobuf.BoolValue + 1, // 2: envoy.config.common.mutation_rules.v3.HeaderMutationRules.disallow_system:type_name -> google.protobuf.BoolValue + 1, // 3: envoy.config.common.mutation_rules.v3.HeaderMutationRules.disallow_all:type_name -> google.protobuf.BoolValue + 2, // 4: envoy.config.common.mutation_rules.v3.HeaderMutationRules.allow_expression:type_name -> envoy.type.matcher.v3.RegexMatcher + 2, // 5: envoy.config.common.mutation_rules.v3.HeaderMutationRules.disallow_expression:type_name -> envoy.type.matcher.v3.RegexMatcher + 1, // 6: envoy.config.common.mutation_rules.v3.HeaderMutationRules.disallow_is_error:type_name -> google.protobuf.BoolValue + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_init() } +func file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_init() { + if File_envoy_config_common_mutation_rules_v3_mutation_rules_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeaderMutationRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_goTypes, + DependencyIndexes: file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_depIdxs, + MessageInfos: file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_msgTypes, + }.Build() + File_envoy_config_common_mutation_rules_v3_mutation_rules_proto = out.File + file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_rawDesc = nil + file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_goTypes = nil + file_envoy_config_common_mutation_rules_v3_mutation_rules_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/common/mutation_rules/v3/mutation_rules.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/common/mutation_rules/v3/mutation_rules.pb.validate.go new file mode 100644 index 0000000000000..71cf9918c2a92 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/config/common/mutation_rules/v3/mutation_rules.pb.validate.go @@ -0,0 +1,340 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/config/common/mutation_rules/v3/mutation_rules.proto + +package mutation_rulesv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on HeaderMutationRules 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 *HeaderMutationRules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeaderMutationRules 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 +// HeaderMutationRulesMultiError, or nil if none found. +func (m *HeaderMutationRules) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderMutationRules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetAllowAllRouting()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "AllowAllRouting", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "AllowAllRouting", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowAllRouting()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderMutationRulesValidationError{ + field: "AllowAllRouting", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetAllowEnvoy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "AllowEnvoy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "AllowEnvoy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowEnvoy()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderMutationRulesValidationError{ + field: "AllowEnvoy", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetDisallowSystem()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "DisallowSystem", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "DisallowSystem", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDisallowSystem()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderMutationRulesValidationError{ + field: "DisallowSystem", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetDisallowAll()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "DisallowAll", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "DisallowAll", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDisallowAll()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderMutationRulesValidationError{ + field: "DisallowAll", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetAllowExpression()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "AllowExpression", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "AllowExpression", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowExpression()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderMutationRulesValidationError{ + field: "AllowExpression", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetDisallowExpression()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "DisallowExpression", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "DisallowExpression", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDisallowExpression()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderMutationRulesValidationError{ + field: "DisallowExpression", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetDisallowIsError()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "DisallowIsError", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderMutationRulesValidationError{ + field: "DisallowIsError", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDisallowIsError()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderMutationRulesValidationError{ + field: "DisallowIsError", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return HeaderMutationRulesMultiError(errors) + } + return nil +} + +// HeaderMutationRulesMultiError is an error wrapping multiple validation +// errors returned by HeaderMutationRules.ValidateAll() if the designated +// constraints aren't met. +type HeaderMutationRulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderMutationRulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderMutationRulesMultiError) AllErrors() []error { return m } + +// HeaderMutationRulesValidationError is the validation error returned by +// HeaderMutationRules.Validate if the designated constraints aren't met. +type HeaderMutationRulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HeaderMutationRulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HeaderMutationRulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HeaderMutationRulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HeaderMutationRulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HeaderMutationRulesValidationError) ErrorName() string { + return "HeaderMutationRulesValidationError" +} + +// Error satisfies the builtin error interface +func (e HeaderMutationRulesValidationError) 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 %sHeaderMutationRules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HeaderMutationRulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HeaderMutationRulesValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/grpc_credential/v3/aws_iam.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/grpc_credential/v3/aws_iam.pb.go new file mode 100644 index 0000000000000..24f0e6adacc5c --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/config/grpc_credential/v3/aws_iam.pb.go @@ -0,0 +1,192 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/config/grpc_credential/v3/aws_iam.proto + +package grpc_credentialv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type AwsIamConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The `service namespace + // `_ + // of the Grpc endpoint. + // + // Example: appmesh + ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` + // The `region `_ hosting the Grpc + // endpoint. If unspecified, the extension will use the value in the “AWS_REGION“ environment + // variable. + // + // Example: us-west-2 + Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` +} + +func (x *AwsIamConfig) Reset() { + *x = AwsIamConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_grpc_credential_v3_aws_iam_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AwsIamConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AwsIamConfig) ProtoMessage() {} + +func (x *AwsIamConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_grpc_credential_v3_aws_iam_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AwsIamConfig.ProtoReflect.Descriptor instead. +func (*AwsIamConfig) Descriptor() ([]byte, []int) { + return file_envoy_config_grpc_credential_v3_aws_iam_proto_rawDescGZIP(), []int{0} +} + +func (x *AwsIamConfig) GetServiceName() string { + if x != nil { + return x.ServiceName + } + return "" +} + +func (x *AwsIamConfig) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +var File_envoy_config_grpc_credential_v3_aws_iam_proto protoreflect.FileDescriptor + +var file_envoy_config_grpc_credential_v3_aws_iam_proto_rawDesc = []byte{ + 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, + 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2f, 0x76, + 0x33, 0x2f, 0x61, 0x77, 0x73, 0x5f, 0x69, 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2e, 0x76, 0x33, + 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0x8c, 0x01, 0x0a, 0x0c, + 0x41, 0x77, 0x73, 0x49, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, 0x0a, 0x0c, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, + 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x77, + 0x73, 0x49, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xa0, 0x01, 0x0a, 0x2d, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x41, 0x77, + 0x73, 0x49, 0x61, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, + 0x2f, 0x76, 0x33, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_config_grpc_credential_v3_aws_iam_proto_rawDescOnce sync.Once + file_envoy_config_grpc_credential_v3_aws_iam_proto_rawDescData = file_envoy_config_grpc_credential_v3_aws_iam_proto_rawDesc +) + +func file_envoy_config_grpc_credential_v3_aws_iam_proto_rawDescGZIP() []byte { + file_envoy_config_grpc_credential_v3_aws_iam_proto_rawDescOnce.Do(func() { + file_envoy_config_grpc_credential_v3_aws_iam_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_grpc_credential_v3_aws_iam_proto_rawDescData) + }) + return file_envoy_config_grpc_credential_v3_aws_iam_proto_rawDescData +} + +var file_envoy_config_grpc_credential_v3_aws_iam_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_config_grpc_credential_v3_aws_iam_proto_goTypes = []interface{}{ + (*AwsIamConfig)(nil), // 0: envoy.config.grpc_credential.v3.AwsIamConfig +} +var file_envoy_config_grpc_credential_v3_aws_iam_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_config_grpc_credential_v3_aws_iam_proto_init() } +func file_envoy_config_grpc_credential_v3_aws_iam_proto_init() { + if File_envoy_config_grpc_credential_v3_aws_iam_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_config_grpc_credential_v3_aws_iam_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AwsIamConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_config_grpc_credential_v3_aws_iam_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_config_grpc_credential_v3_aws_iam_proto_goTypes, + DependencyIndexes: file_envoy_config_grpc_credential_v3_aws_iam_proto_depIdxs, + MessageInfos: file_envoy_config_grpc_credential_v3_aws_iam_proto_msgTypes, + }.Build() + File_envoy_config_grpc_credential_v3_aws_iam_proto = out.File + file_envoy_config_grpc_credential_v3_aws_iam_proto_rawDesc = nil + file_envoy_config_grpc_credential_v3_aws_iam_proto_goTypes = nil + file_envoy_config_grpc_credential_v3_aws_iam_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/grpc_credential/v3/aws_iam.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/grpc_credential/v3/aws_iam.pb.validate.go new file mode 100644 index 0000000000000..f2faafbf9d600 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/config/grpc_credential/v3/aws_iam.pb.validate.go @@ -0,0 +1,147 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/config/grpc_credential/v3/aws_iam.proto + +package grpc_credentialv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on AwsIamConfig 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 *AwsIamConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AwsIamConfig 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 AwsIamConfigMultiError, or +// nil if none found. +func (m *AwsIamConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *AwsIamConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetServiceName()) < 1 { + err := AwsIamConfigValidationError{ + field: "ServiceName", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for Region + + if len(errors) > 0 { + return AwsIamConfigMultiError(errors) + } + return nil +} + +// AwsIamConfigMultiError is an error wrapping multiple validation errors +// returned by AwsIamConfig.ValidateAll() if the designated constraints aren't met. +type AwsIamConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AwsIamConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AwsIamConfigMultiError) AllErrors() []error { return m } + +// AwsIamConfigValidationError is the validation error returned by +// AwsIamConfig.Validate if the designated constraints aren't met. +type AwsIamConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AwsIamConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AwsIamConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AwsIamConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AwsIamConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AwsIamConfigValidationError) ErrorName() string { return "AwsIamConfigValidationError" } + +// Error satisfies the builtin error interface +func (e AwsIamConfigValidationError) 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 %sAwsIamConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AwsIamConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AwsIamConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/grpc_credential/v3/file_based_metadata.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/grpc_credential/v3/file_based_metadata.pb.go new file mode 100644 index 0000000000000..a37b350288ad6 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/config/grpc_credential/v3/file_based_metadata.pb.go @@ -0,0 +1,208 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/config/grpc_credential/v3/file_based_metadata.proto + +package grpc_credentialv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type FileBasedMetadataConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Location or inline data of secret to use for authentication of the Google gRPC connection + // this secret will be attached to a header of the gRPC connection + SecretData *v3.DataSource `protobuf:"bytes,1,opt,name=secret_data,json=secretData,proto3" json:"secret_data,omitempty"` + // Metadata header key to use for sending the secret data + // if no header key is set, "authorization" header will be used + HeaderKey string `protobuf:"bytes,2,opt,name=header_key,json=headerKey,proto3" json:"header_key,omitempty"` + // Prefix to prepend to the secret in the metadata header + // if no prefix is set, the default is to use no prefix + HeaderPrefix string `protobuf:"bytes,3,opt,name=header_prefix,json=headerPrefix,proto3" json:"header_prefix,omitempty"` +} + +func (x *FileBasedMetadataConfig) Reset() { + *x = FileBasedMetadataConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_grpc_credential_v3_file_based_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FileBasedMetadataConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FileBasedMetadataConfig) ProtoMessage() {} + +func (x *FileBasedMetadataConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_grpc_credential_v3_file_based_metadata_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FileBasedMetadataConfig.ProtoReflect.Descriptor instead. +func (*FileBasedMetadataConfig) Descriptor() ([]byte, []int) { + return file_envoy_config_grpc_credential_v3_file_based_metadata_proto_rawDescGZIP(), []int{0} +} + +func (x *FileBasedMetadataConfig) GetSecretData() *v3.DataSource { + if x != nil { + return x.SecretData + } + return nil +} + +func (x *FileBasedMetadataConfig) GetHeaderKey() string { + if x != nil { + return x.HeaderKey + } + return "" +} + +func (x *FileBasedMetadataConfig) GetHeaderPrefix() string { + if x != nil { + return x.HeaderPrefix + } + return "" +} + +var File_envoy_config_grpc_credential_v3_file_based_metadata_proto protoreflect.FileDescriptor + +var file_envoy_config_grpc_credential_v3_file_based_metadata_proto_rawDesc = []byte{ + 0x0a, 0x39, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x67, + 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2f, 0x76, + 0x33, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xed, 0x01, 0x0a, 0x17, 0x46, 0x69, 0x6c, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x49, 0x0a, + 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, 0x0a, 0x73, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x3a, 0x43, 0x9a, 0xc5, + 0x88, 0x1e, 0x3e, 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x42, 0x61, + 0x73, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x42, 0xab, 0x01, 0x0a, 0x2d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, + 0x2e, 0x76, 0x33, 0x42, 0x16, 0x46, 0x69, 0x6c, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x2f, 0x76, 0x33, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_config_grpc_credential_v3_file_based_metadata_proto_rawDescOnce sync.Once + file_envoy_config_grpc_credential_v3_file_based_metadata_proto_rawDescData = file_envoy_config_grpc_credential_v3_file_based_metadata_proto_rawDesc +) + +func file_envoy_config_grpc_credential_v3_file_based_metadata_proto_rawDescGZIP() []byte { + file_envoy_config_grpc_credential_v3_file_based_metadata_proto_rawDescOnce.Do(func() { + file_envoy_config_grpc_credential_v3_file_based_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_grpc_credential_v3_file_based_metadata_proto_rawDescData) + }) + return file_envoy_config_grpc_credential_v3_file_based_metadata_proto_rawDescData +} + +var file_envoy_config_grpc_credential_v3_file_based_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_config_grpc_credential_v3_file_based_metadata_proto_goTypes = []interface{}{ + (*FileBasedMetadataConfig)(nil), // 0: envoy.config.grpc_credential.v3.FileBasedMetadataConfig + (*v3.DataSource)(nil), // 1: envoy.config.core.v3.DataSource +} +var file_envoy_config_grpc_credential_v3_file_based_metadata_proto_depIdxs = []int32{ + 1, // 0: envoy.config.grpc_credential.v3.FileBasedMetadataConfig.secret_data:type_name -> envoy.config.core.v3.DataSource + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_config_grpc_credential_v3_file_based_metadata_proto_init() } +func file_envoy_config_grpc_credential_v3_file_based_metadata_proto_init() { + if File_envoy_config_grpc_credential_v3_file_based_metadata_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_config_grpc_credential_v3_file_based_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FileBasedMetadataConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_config_grpc_credential_v3_file_based_metadata_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_config_grpc_credential_v3_file_based_metadata_proto_goTypes, + DependencyIndexes: file_envoy_config_grpc_credential_v3_file_based_metadata_proto_depIdxs, + MessageInfos: file_envoy_config_grpc_credential_v3_file_based_metadata_proto_msgTypes, + }.Build() + File_envoy_config_grpc_credential_v3_file_based_metadata_proto = out.File + file_envoy_config_grpc_credential_v3_file_based_metadata_proto_rawDesc = nil + file_envoy_config_grpc_credential_v3_file_based_metadata_proto_goTypes = nil + file_envoy_config_grpc_credential_v3_file_based_metadata_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/grpc_credential/v3/file_based_metadata.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/grpc_credential/v3/file_based_metadata.pb.validate.go new file mode 100644 index 0000000000000..9ba140d764440 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/config/grpc_credential/v3/file_based_metadata.pb.validate.go @@ -0,0 +1,170 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/config/grpc_credential/v3/file_based_metadata.proto + +package grpc_credentialv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on FileBasedMetadataConfig 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 *FileBasedMetadataConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FileBasedMetadataConfig 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 +// FileBasedMetadataConfigMultiError, or nil if none found. +func (m *FileBasedMetadataConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *FileBasedMetadataConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetSecretData()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FileBasedMetadataConfigValidationError{ + field: "SecretData", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FileBasedMetadataConfigValidationError{ + field: "SecretData", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSecretData()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FileBasedMetadataConfigValidationError{ + field: "SecretData", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for HeaderKey + + // no validation rules for HeaderPrefix + + if len(errors) > 0 { + return FileBasedMetadataConfigMultiError(errors) + } + return nil +} + +// FileBasedMetadataConfigMultiError is an error wrapping multiple validation +// errors returned by FileBasedMetadataConfig.ValidateAll() if the designated +// constraints aren't met. +type FileBasedMetadataConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FileBasedMetadataConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FileBasedMetadataConfigMultiError) AllErrors() []error { return m } + +// FileBasedMetadataConfigValidationError is the validation error returned by +// FileBasedMetadataConfig.Validate if the designated constraints aren't met. +type FileBasedMetadataConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FileBasedMetadataConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FileBasedMetadataConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FileBasedMetadataConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FileBasedMetadataConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FileBasedMetadataConfigValidationError) ErrorName() string { + return "FileBasedMetadataConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e FileBasedMetadataConfigValidationError) 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 %sFileBasedMetadataConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FileBasedMetadataConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FileBasedMetadataConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/rbac/v3/rbac.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/rbac/v3/rbac.pb.go new file mode 100644 index 0000000000000..9e9fa2983a6f7 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/config/rbac/v3/rbac.pb.go @@ -0,0 +1,1483 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/config/rbac/v3/rbac.proto + +package rbacv3 + +import ( + _ "github.com/cilium/proxy/go/envoy/annotations" + v32 "github.com/cilium/proxy/go/envoy/config/core/v3" + v3 "github.com/cilium/proxy/go/envoy/config/route/v3" + v31 "github.com/cilium/proxy/go/envoy/type/matcher/v3" + v33 "github.com/cilium/proxy/go/envoy/type/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Should we do safe-list or block-list style access control? +type RBAC_Action int32 + +const ( + // The policies grant access to principals. The rest are denied. This is safe-list style + // access control. This is the default type. + RBAC_ALLOW RBAC_Action = 0 + // The policies deny access to principals. The rest are allowed. This is block-list style + // access control. + RBAC_DENY RBAC_Action = 1 + // The policies set the “access_log_hint“ dynamic metadata key based on if requests match. + // All requests are allowed. + RBAC_LOG RBAC_Action = 2 +) + +// Enum value maps for RBAC_Action. +var ( + RBAC_Action_name = map[int32]string{ + 0: "ALLOW", + 1: "DENY", + 2: "LOG", + } + RBAC_Action_value = map[string]int32{ + "ALLOW": 0, + "DENY": 1, + "LOG": 2, + } +) + +func (x RBAC_Action) Enum() *RBAC_Action { + p := new(RBAC_Action) + *p = x + return p +} + +func (x RBAC_Action) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RBAC_Action) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_config_rbac_v3_rbac_proto_enumTypes[0].Descriptor() +} + +func (RBAC_Action) Type() protoreflect.EnumType { + return &file_envoy_config_rbac_v3_rbac_proto_enumTypes[0] +} + +func (x RBAC_Action) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RBAC_Action.Descriptor instead. +func (RBAC_Action) EnumDescriptor() ([]byte, []int) { + return file_envoy_config_rbac_v3_rbac_proto_rawDescGZIP(), []int{0, 0} +} + +// Role Based Access Control (RBAC) provides service-level and method-level access control for a +// service. Requests are allowed or denied based on the “action“ and whether a matching policy is +// found. For instance, if the action is ALLOW and a matching policy is found the request should be +// allowed. +// +// RBAC can also be used to make access logging decisions by communicating with access loggers +// through dynamic metadata. When the action is LOG and at least one policy matches, the +// “access_log_hint“ value in the shared key namespace 'envoy.common' is set to “true“ indicating +// the request should be logged. +// +// Here is an example of RBAC configuration. It has two policies: +// +// - Service account “cluster.local/ns/default/sa/admin“ has full access to the service, and so +// does "cluster.local/ns/default/sa/superuser". +// +// - Any user can read (“GET“) the service at paths with prefix “/products“, so long as the +// destination port is either 80 or 443. +// +// .. code-block:: yaml +// +// action: ALLOW +// policies: +// "service-admin": +// permissions: +// +// - any: true +// principals: +// +// - authenticated: +// principal_name: +// exact: "cluster.local/ns/default/sa/admin" +// +// - authenticated: +// principal_name: +// exact: "cluster.local/ns/default/sa/superuser" +// "product-viewer": +// permissions: +// +// - and_rules: +// rules: +// +// - header: +// name: ":method" +// string_match: +// exact: "GET" +// +// - url_path: +// path: { prefix: "/products" } +// +// - or_rules: +// rules: +// +// - destination_port: 80 +// +// - destination_port: 443 +// principals: +// +// - any: true +type RBAC struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The action to take if a policy matches. Every action either allows or denies a request, + // and can also carry out action-specific operations. + // + // Actions: + // + // - “ALLOW“: Allows the request if and only if there is a policy that matches + // the request. + // - “DENY“: Allows the request if and only if there are no policies that + // match the request. + // - “LOG“: Allows all requests. If at least one policy matches, the dynamic + // metadata key “access_log_hint“ is set to the value “true“ under the shared + // key namespace “envoy.common“. If no policies match, it is set to “false“. + // Other actions do not modify this key. + Action RBAC_Action `protobuf:"varint,1,opt,name=action,proto3,enum=envoy.config.rbac.v3.RBAC_Action" json:"action,omitempty"` + // Maps from policy name to policy. A match occurs when at least one policy matches the request. + // The policies are evaluated in lexicographic order of the policy name. + Policies map[string]*Policy `protobuf:"bytes,2,rep,name=policies,proto3" json:"policies,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *RBAC) Reset() { + *x = RBAC{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_rbac_v3_rbac_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RBAC) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RBAC) ProtoMessage() {} + +func (x *RBAC) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_rbac_v3_rbac_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RBAC.ProtoReflect.Descriptor instead. +func (*RBAC) Descriptor() ([]byte, []int) { + return file_envoy_config_rbac_v3_rbac_proto_rawDescGZIP(), []int{0} +} + +func (x *RBAC) GetAction() RBAC_Action { + if x != nil { + return x.Action + } + return RBAC_ALLOW +} + +func (x *RBAC) GetPolicies() map[string]*Policy { + if x != nil { + return x.Policies + } + return nil +} + +// Policy specifies a role and the principals that are assigned/denied the role. +// A policy matches if and only if at least one of its permissions match the +// action taking place AND at least one of its principals match the downstream +// AND the condition is true if specified. +type Policy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The set of permissions that define a role. Each permission is + // matched with OR semantics. To match all actions for this policy, a single + // Permission with the “any“ field set to true should be used. + Permissions []*Permission `protobuf:"bytes,1,rep,name=permissions,proto3" json:"permissions,omitempty"` + // Required. The set of principals that are assigned/denied the role based on + // “action”. Each principal is matched with OR semantics. To match all + // downstreams for this policy, a single Principal with the “any“ field set to + // true should be used. + Principals []*Principal `protobuf:"bytes,2,rep,name=principals,proto3" json:"principals,omitempty"` + // An optional symbolic expression specifying an access control + // :ref:`condition `. The condition is combined + // with the permissions and the principals as a clause with AND semantics. + // Only be used when checked_condition is not used. + Condition *v1alpha1.Expr `protobuf:"bytes,3,opt,name=condition,proto3" json:"condition,omitempty"` + // [#not-implemented-hide:] + // An optional symbolic expression that has been successfully type checked. + // Only be used when condition is not used. + CheckedCondition *v1alpha1.CheckedExpr `protobuf:"bytes,4,opt,name=checked_condition,json=checkedCondition,proto3" json:"checked_condition,omitempty"` +} + +func (x *Policy) Reset() { + *x = Policy{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_rbac_v3_rbac_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Policy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Policy) ProtoMessage() {} + +func (x *Policy) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_rbac_v3_rbac_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Policy.ProtoReflect.Descriptor instead. +func (*Policy) Descriptor() ([]byte, []int) { + return file_envoy_config_rbac_v3_rbac_proto_rawDescGZIP(), []int{1} +} + +func (x *Policy) GetPermissions() []*Permission { + if x != nil { + return x.Permissions + } + return nil +} + +func (x *Policy) GetPrincipals() []*Principal { + if x != nil { + return x.Principals + } + return nil +} + +func (x *Policy) GetCondition() *v1alpha1.Expr { + if x != nil { + return x.Condition + } + return nil +} + +func (x *Policy) GetCheckedCondition() *v1alpha1.CheckedExpr { + if x != nil { + return x.CheckedCondition + } + return nil +} + +// Permission defines an action (or actions) that a principal can take. +// [#next-free-field: 13] +type Permission struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Rule: + // + // *Permission_AndRules + // *Permission_OrRules + // *Permission_Any + // *Permission_Header + // *Permission_UrlPath + // *Permission_DestinationIp + // *Permission_DestinationPort + // *Permission_DestinationPortRange + // *Permission_Metadata + // *Permission_NotRule + // *Permission_RequestedServerName + // *Permission_Matcher + Rule isPermission_Rule `protobuf_oneof:"rule"` +} + +func (x *Permission) Reset() { + *x = Permission{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_rbac_v3_rbac_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Permission) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Permission) ProtoMessage() {} + +func (x *Permission) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_rbac_v3_rbac_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Permission.ProtoReflect.Descriptor instead. +func (*Permission) Descriptor() ([]byte, []int) { + return file_envoy_config_rbac_v3_rbac_proto_rawDescGZIP(), []int{2} +} + +func (m *Permission) GetRule() isPermission_Rule { + if m != nil { + return m.Rule + } + return nil +} + +func (x *Permission) GetAndRules() *Permission_Set { + if x, ok := x.GetRule().(*Permission_AndRules); ok { + return x.AndRules + } + return nil +} + +func (x *Permission) GetOrRules() *Permission_Set { + if x, ok := x.GetRule().(*Permission_OrRules); ok { + return x.OrRules + } + return nil +} + +func (x *Permission) GetAny() bool { + if x, ok := x.GetRule().(*Permission_Any); ok { + return x.Any + } + return false +} + +func (x *Permission) GetHeader() *v3.HeaderMatcher { + if x, ok := x.GetRule().(*Permission_Header); ok { + return x.Header + } + return nil +} + +func (x *Permission) GetUrlPath() *v31.PathMatcher { + if x, ok := x.GetRule().(*Permission_UrlPath); ok { + return x.UrlPath + } + return nil +} + +func (x *Permission) GetDestinationIp() *v32.CidrRange { + if x, ok := x.GetRule().(*Permission_DestinationIp); ok { + return x.DestinationIp + } + return nil +} + +func (x *Permission) GetDestinationPort() uint32 { + if x, ok := x.GetRule().(*Permission_DestinationPort); ok { + return x.DestinationPort + } + return 0 +} + +func (x *Permission) GetDestinationPortRange() *v33.Int32Range { + if x, ok := x.GetRule().(*Permission_DestinationPortRange); ok { + return x.DestinationPortRange + } + return nil +} + +func (x *Permission) GetMetadata() *v31.MetadataMatcher { + if x, ok := x.GetRule().(*Permission_Metadata); ok { + return x.Metadata + } + return nil +} + +func (x *Permission) GetNotRule() *Permission { + if x, ok := x.GetRule().(*Permission_NotRule); ok { + return x.NotRule + } + return nil +} + +func (x *Permission) GetRequestedServerName() *v31.StringMatcher { + if x, ok := x.GetRule().(*Permission_RequestedServerName); ok { + return x.RequestedServerName + } + return nil +} + +func (x *Permission) GetMatcher() *v32.TypedExtensionConfig { + if x, ok := x.GetRule().(*Permission_Matcher); ok { + return x.Matcher + } + return nil +} + +type isPermission_Rule interface { + isPermission_Rule() +} + +type Permission_AndRules struct { + // A set of rules that all must match in order to define the action. + AndRules *Permission_Set `protobuf:"bytes,1,opt,name=and_rules,json=andRules,proto3,oneof"` +} + +type Permission_OrRules struct { + // A set of rules where at least one must match in order to define the action. + OrRules *Permission_Set `protobuf:"bytes,2,opt,name=or_rules,json=orRules,proto3,oneof"` +} + +type Permission_Any struct { + // When any is set, it matches any action. + Any bool `protobuf:"varint,3,opt,name=any,proto3,oneof"` +} + +type Permission_Header struct { + // A header (or pseudo-header such as :path or :method) on the incoming HTTP request. Only + // available for HTTP request. + // Note: the pseudo-header :path includes the query and fragment string. Use the “url_path“ + // field if you want to match the URL path without the query and fragment string. + Header *v3.HeaderMatcher `protobuf:"bytes,4,opt,name=header,proto3,oneof"` +} + +type Permission_UrlPath struct { + // A URL path on the incoming HTTP request. Only available for HTTP. + UrlPath *v31.PathMatcher `protobuf:"bytes,10,opt,name=url_path,json=urlPath,proto3,oneof"` +} + +type Permission_DestinationIp struct { + // A CIDR block that describes the destination IP. + DestinationIp *v32.CidrRange `protobuf:"bytes,5,opt,name=destination_ip,json=destinationIp,proto3,oneof"` +} + +type Permission_DestinationPort struct { + // A port number that describes the destination port connecting to. + DestinationPort uint32 `protobuf:"varint,6,opt,name=destination_port,json=destinationPort,proto3,oneof"` +} + +type Permission_DestinationPortRange struct { + // A port number range that describes a range of destination ports connecting to. + DestinationPortRange *v33.Int32Range `protobuf:"bytes,11,opt,name=destination_port_range,json=destinationPortRange,proto3,oneof"` +} + +type Permission_Metadata struct { + // Metadata that describes additional information about the action. + Metadata *v31.MetadataMatcher `protobuf:"bytes,7,opt,name=metadata,proto3,oneof"` +} + +type Permission_NotRule struct { + // Negates matching the provided permission. For instance, if the value of + // “not_rule“ would match, this permission would not match. Conversely, if + // the value of “not_rule“ would not match, this permission would match. + NotRule *Permission `protobuf:"bytes,8,opt,name=not_rule,json=notRule,proto3,oneof"` +} + +type Permission_RequestedServerName struct { + // The request server from the client's connection request. This is + // typically TLS SNI. + // + // .. attention:: + // + // The behavior of this field may be affected by how Envoy is configured + // as explained below. + // + // * If the :ref:`TLS Inspector ` + // filter is not added, and if a ``FilterChainMatch`` is not defined for + // the :ref:`server name + // `, + // a TLS connection's requested SNI server name will be treated as if it + // wasn't present. + // + // * A :ref:`listener filter ` may + // overwrite a connection's requested server name within Envoy. + // + // Please refer to :ref:`this FAQ entry ` to learn to + // setup SNI. + RequestedServerName *v31.StringMatcher `protobuf:"bytes,9,opt,name=requested_server_name,json=requestedServerName,proto3,oneof"` +} + +type Permission_Matcher struct { + // Extension for configuring custom matchers for RBAC. + // [#extension-category: envoy.rbac.matchers] + Matcher *v32.TypedExtensionConfig `protobuf:"bytes,12,opt,name=matcher,proto3,oneof"` +} + +func (*Permission_AndRules) isPermission_Rule() {} + +func (*Permission_OrRules) isPermission_Rule() {} + +func (*Permission_Any) isPermission_Rule() {} + +func (*Permission_Header) isPermission_Rule() {} + +func (*Permission_UrlPath) isPermission_Rule() {} + +func (*Permission_DestinationIp) isPermission_Rule() {} + +func (*Permission_DestinationPort) isPermission_Rule() {} + +func (*Permission_DestinationPortRange) isPermission_Rule() {} + +func (*Permission_Metadata) isPermission_Rule() {} + +func (*Permission_NotRule) isPermission_Rule() {} + +func (*Permission_RequestedServerName) isPermission_Rule() {} + +func (*Permission_Matcher) isPermission_Rule() {} + +// Principal defines an identity or a group of identities for a downstream +// subject. +// [#next-free-field: 12] +type Principal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Identifier: + // + // *Principal_AndIds + // *Principal_OrIds + // *Principal_Any + // *Principal_Authenticated_ + // *Principal_SourceIp + // *Principal_DirectRemoteIp + // *Principal_RemoteIp + // *Principal_Header + // *Principal_UrlPath + // *Principal_Metadata + // *Principal_NotId + Identifier isPrincipal_Identifier `protobuf_oneof:"identifier"` +} + +func (x *Principal) Reset() { + *x = Principal{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_rbac_v3_rbac_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Principal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Principal) ProtoMessage() {} + +func (x *Principal) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_rbac_v3_rbac_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Principal.ProtoReflect.Descriptor instead. +func (*Principal) Descriptor() ([]byte, []int) { + return file_envoy_config_rbac_v3_rbac_proto_rawDescGZIP(), []int{3} +} + +func (m *Principal) GetIdentifier() isPrincipal_Identifier { + if m != nil { + return m.Identifier + } + return nil +} + +func (x *Principal) GetAndIds() *Principal_Set { + if x, ok := x.GetIdentifier().(*Principal_AndIds); ok { + return x.AndIds + } + return nil +} + +func (x *Principal) GetOrIds() *Principal_Set { + if x, ok := x.GetIdentifier().(*Principal_OrIds); ok { + return x.OrIds + } + return nil +} + +func (x *Principal) GetAny() bool { + if x, ok := x.GetIdentifier().(*Principal_Any); ok { + return x.Any + } + return false +} + +func (x *Principal) GetAuthenticated() *Principal_Authenticated { + if x, ok := x.GetIdentifier().(*Principal_Authenticated_); ok { + return x.Authenticated + } + return nil +} + +// Deprecated: Do not use. +func (x *Principal) GetSourceIp() *v32.CidrRange { + if x, ok := x.GetIdentifier().(*Principal_SourceIp); ok { + return x.SourceIp + } + return nil +} + +func (x *Principal) GetDirectRemoteIp() *v32.CidrRange { + if x, ok := x.GetIdentifier().(*Principal_DirectRemoteIp); ok { + return x.DirectRemoteIp + } + return nil +} + +func (x *Principal) GetRemoteIp() *v32.CidrRange { + if x, ok := x.GetIdentifier().(*Principal_RemoteIp); ok { + return x.RemoteIp + } + return nil +} + +func (x *Principal) GetHeader() *v3.HeaderMatcher { + if x, ok := x.GetIdentifier().(*Principal_Header); ok { + return x.Header + } + return nil +} + +func (x *Principal) GetUrlPath() *v31.PathMatcher { + if x, ok := x.GetIdentifier().(*Principal_UrlPath); ok { + return x.UrlPath + } + return nil +} + +func (x *Principal) GetMetadata() *v31.MetadataMatcher { + if x, ok := x.GetIdentifier().(*Principal_Metadata); ok { + return x.Metadata + } + return nil +} + +func (x *Principal) GetNotId() *Principal { + if x, ok := x.GetIdentifier().(*Principal_NotId); ok { + return x.NotId + } + return nil +} + +type isPrincipal_Identifier interface { + isPrincipal_Identifier() +} + +type Principal_AndIds struct { + // A set of identifiers that all must match in order to define the + // downstream. + AndIds *Principal_Set `protobuf:"bytes,1,opt,name=and_ids,json=andIds,proto3,oneof"` +} + +type Principal_OrIds struct { + // A set of identifiers at least one must match in order to define the + // downstream. + OrIds *Principal_Set `protobuf:"bytes,2,opt,name=or_ids,json=orIds,proto3,oneof"` +} + +type Principal_Any struct { + // When any is set, it matches any downstream. + Any bool `protobuf:"varint,3,opt,name=any,proto3,oneof"` +} + +type Principal_Authenticated_ struct { + // Authenticated attributes that identify the downstream. + Authenticated *Principal_Authenticated `protobuf:"bytes,4,opt,name=authenticated,proto3,oneof"` +} + +type Principal_SourceIp struct { + // A CIDR block that describes the downstream IP. + // This address will honor proxy protocol, but will not honor XFF. + // + // Deprecated: Do not use. + SourceIp *v32.CidrRange `protobuf:"bytes,5,opt,name=source_ip,json=sourceIp,proto3,oneof"` +} + +type Principal_DirectRemoteIp struct { + // A CIDR block that describes the downstream remote/origin address. + // Note: This is always the physical peer even if the + // :ref:`remote_ip ` is + // inferred from for example the x-forwarder-for header, proxy protocol, + // etc. + DirectRemoteIp *v32.CidrRange `protobuf:"bytes,10,opt,name=direct_remote_ip,json=directRemoteIp,proto3,oneof"` +} + +type Principal_RemoteIp struct { + // A CIDR block that describes the downstream remote/origin address. + // Note: This may not be the physical peer and could be different from the + // :ref:`direct_remote_ip + // `. E.g, if the + // remote ip is inferred from for example the x-forwarder-for header, proxy + // protocol, etc. + RemoteIp *v32.CidrRange `protobuf:"bytes,11,opt,name=remote_ip,json=remoteIp,proto3,oneof"` +} + +type Principal_Header struct { + // A header (or pseudo-header such as :path or :method) on the incoming HTTP + // request. Only available for HTTP request. Note: the pseudo-header :path + // includes the query and fragment string. Use the “url_path“ field if you + // want to match the URL path without the query and fragment string. + Header *v3.HeaderMatcher `protobuf:"bytes,6,opt,name=header,proto3,oneof"` +} + +type Principal_UrlPath struct { + // A URL path on the incoming HTTP request. Only available for HTTP. + UrlPath *v31.PathMatcher `protobuf:"bytes,9,opt,name=url_path,json=urlPath,proto3,oneof"` +} + +type Principal_Metadata struct { + // Metadata that describes additional information about the principal. + Metadata *v31.MetadataMatcher `protobuf:"bytes,7,opt,name=metadata,proto3,oneof"` +} + +type Principal_NotId struct { + // Negates matching the provided principal. For instance, if the value of + // “not_id“ would match, this principal would not match. Conversely, if the + // value of “not_id“ would not match, this principal would match. + NotId *Principal `protobuf:"bytes,8,opt,name=not_id,json=notId,proto3,oneof"` +} + +func (*Principal_AndIds) isPrincipal_Identifier() {} + +func (*Principal_OrIds) isPrincipal_Identifier() {} + +func (*Principal_Any) isPrincipal_Identifier() {} + +func (*Principal_Authenticated_) isPrincipal_Identifier() {} + +func (*Principal_SourceIp) isPrincipal_Identifier() {} + +func (*Principal_DirectRemoteIp) isPrincipal_Identifier() {} + +func (*Principal_RemoteIp) isPrincipal_Identifier() {} + +func (*Principal_Header) isPrincipal_Identifier() {} + +func (*Principal_UrlPath) isPrincipal_Identifier() {} + +func (*Principal_Metadata) isPrincipal_Identifier() {} + +func (*Principal_NotId) isPrincipal_Identifier() {} + +// Action defines the result of allowance or denial when a request matches the matcher. +type Action struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name indicates the policy name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The action to take if the matcher matches. Every action either allows or denies a request, + // and can also carry out action-specific operations. + // + // Actions: + // + // - “ALLOW“: If the request gets matched on ALLOW, it is permitted. + // - “DENY“: If the request gets matched on DENY, it is not permitted. + // - “LOG“: If the request gets matched on LOG, it is permitted. Besides, the + // dynamic metadata key “access_log_hint“ under the shared key namespace + // “envoy.common“ will be set to the value “true“. + // - If the request cannot get matched, it will fallback to “DENY“. + // + // Log behavior: + // + // If the RBAC matcher contains at least one LOG action, the dynamic + // metadata key ``access_log_hint`` will be set based on if the request + // get matched on the LOG action. + Action RBAC_Action `protobuf:"varint,2,opt,name=action,proto3,enum=envoy.config.rbac.v3.RBAC_Action" json:"action,omitempty"` +} + +func (x *Action) Reset() { + *x = Action{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_rbac_v3_rbac_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Action) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Action) ProtoMessage() {} + +func (x *Action) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_rbac_v3_rbac_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Action.ProtoReflect.Descriptor instead. +func (*Action) Descriptor() ([]byte, []int) { + return file_envoy_config_rbac_v3_rbac_proto_rawDescGZIP(), []int{4} +} + +func (x *Action) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Action) GetAction() RBAC_Action { + if x != nil { + return x.Action + } + return RBAC_ALLOW +} + +// Used in the “and_rules“ and “or_rules“ fields in the “rule“ oneof. Depending on the context, +// each are applied with the associated behavior. +type Permission_Set struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Rules []*Permission `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` +} + +func (x *Permission_Set) Reset() { + *x = Permission_Set{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_rbac_v3_rbac_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Permission_Set) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Permission_Set) ProtoMessage() {} + +func (x *Permission_Set) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_rbac_v3_rbac_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Permission_Set.ProtoReflect.Descriptor instead. +func (*Permission_Set) Descriptor() ([]byte, []int) { + return file_envoy_config_rbac_v3_rbac_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *Permission_Set) GetRules() []*Permission { + if x != nil { + return x.Rules + } + return nil +} + +// Used in the “and_ids“ and “or_ids“ fields in the “identifier“ oneof. +// Depending on the context, each are applied with the associated behavior. +type Principal_Set struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ids []*Principal `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` +} + +func (x *Principal_Set) Reset() { + *x = Principal_Set{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_rbac_v3_rbac_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Principal_Set) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Principal_Set) ProtoMessage() {} + +func (x *Principal_Set) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_rbac_v3_rbac_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Principal_Set.ProtoReflect.Descriptor instead. +func (*Principal_Set) Descriptor() ([]byte, []int) { + return file_envoy_config_rbac_v3_rbac_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *Principal_Set) GetIds() []*Principal { + if x != nil { + return x.Ids + } + return nil +} + +// Authentication attributes for a downstream. +type Principal_Authenticated struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the principal. If set, The URI SAN or DNS SAN in that order + // is used from the certificate, otherwise the subject field is used. If + // unset, it applies to any user that is authenticated. + PrincipalName *v31.StringMatcher `protobuf:"bytes,2,opt,name=principal_name,json=principalName,proto3" json:"principal_name,omitempty"` +} + +func (x *Principal_Authenticated) Reset() { + *x = Principal_Authenticated{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_rbac_v3_rbac_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Principal_Authenticated) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Principal_Authenticated) ProtoMessage() {} + +func (x *Principal_Authenticated) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_rbac_v3_rbac_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Principal_Authenticated.ProtoReflect.Descriptor instead. +func (*Principal_Authenticated) Descriptor() ([]byte, []int) { + return file_envoy_config_rbac_v3_rbac_proto_rawDescGZIP(), []int{3, 1} +} + +func (x *Principal_Authenticated) GetPrincipalName() *v31.StringMatcher { + if x != nil { + return x.PrincipalName + } + return nil +} + +var File_envoy_config_rbac_v3_rbac_proto protoreflect.FileDescriptor + +var file_envoy_config_rbac_v3_rbac_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, + 0x62, 0x61, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, + 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x74, + 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, + 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0xb6, 0x02, 0x0a, 0x04, 0x52, 0x42, 0x41, 0x43, 0x12, 0x43, + 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, + 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x42, 0x41, + 0x43, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x1a, 0x59, 0x0a, 0x0d, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, + 0x76, 0x33, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x26, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x09, + 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x45, 0x4e, + 0x59, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x4c, 0x4f, 0x47, 0x10, 0x02, 0x3a, 0x20, 0x9a, 0xc5, + 0x88, 0x1e, 0x1b, 0x0a, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x22, 0x93, + 0x03, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4c, 0x0a, 0x0b, 0x70, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, + 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x6e, 0x63, + 0x69, 0x70, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, + 0x76, 0x33, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, + 0x6c, 0x73, 0x12, 0x5a, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x45, 0x78, 0x70, 0x72, 0x42, 0x1c, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x16, 0x12, 0x14, 0x65, + 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x70, + 0x0a, 0x11, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, + 0x42, 0x1c, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x16, 0x12, 0x14, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x10, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x3a, 0x22, 0x9a, 0xc5, 0x88, 0x1e, 0x1d, 0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x22, 0xda, 0x07, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x09, 0x61, 0x6e, 0x64, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x08, + 0x61, 0x6e, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x08, 0x6f, 0x72, 0x5f, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, + 0x33, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, + 0x48, 0x00, 0x52, 0x07, 0x6f, 0x72, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x03, 0x61, + 0x6e, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, + 0x01, 0x48, 0x00, 0x52, 0x03, 0x61, 0x6e, 0x79, 0x12, 0x3e, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, + 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x08, 0x75, 0x72, 0x6c, 0x5f, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, + 0x52, 0x07, 0x75, 0x72, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x12, 0x48, 0x0a, 0x0e, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, + 0x67, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x70, 0x12, 0x36, 0x0a, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, + 0x42, 0x06, 0x2a, 0x04, 0x18, 0xff, 0xff, 0x03, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x51, 0x0a, 0x16, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, + 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x33, + 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, 0x52, 0x14, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x44, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x3d, 0x0a, 0x08, 0x6e, 0x6f, 0x74, 0x5f, 0x72, 0x75, 0x6c, 0x65, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x07, 0x6e, 0x6f, 0x74, 0x52, + 0x75, 0x6c, 0x65, 0x12, 0x5a, 0x0a, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, + 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x46, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x07, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x1a, 0x73, 0x0a, 0x03, 0x53, 0x65, 0x74, 0x12, 0x40, + 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, + 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x3a, 0x26, 0x9a, 0xc5, + 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, + 0x01, 0x22, 0x9b, 0x08, 0x0a, 0x09, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, + 0x3e, 0x0a, 0x07, 0x61, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, + 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x06, 0x61, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x12, + 0x3c, 0x0a, 0x06, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, + 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, + 0x2e, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x05, 0x6f, 0x72, 0x49, 0x64, 0x73, 0x12, 0x1b, 0x0a, + 0x03, 0x61, 0x6e, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, + 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x03, 0x61, 0x6e, 0x79, 0x12, 0x55, 0x0a, 0x0d, 0x61, 0x75, + 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, + 0x61, 0x6c, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x48, 0x00, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x4b, 0x0a, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x64, 0x72, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, + 0x2e, 0x30, 0x48, 0x00, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x12, 0x4b, + 0x0a, 0x10, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, + 0x69, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x64, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x70, 0x12, 0x3e, 0x0a, 0x09, 0x72, + 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, + 0x00, 0x52, 0x08, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x70, 0x12, 0x3e, 0x0a, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x48, 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x08, 0x75, + 0x72, 0x6c, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x48, 0x00, 0x52, 0x07, 0x75, 0x72, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x12, 0x44, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x38, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, + 0x70, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x64, 0x1a, 0x6d, 0x0a, 0x03, + 0x53, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, + 0x6c, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x03, 0x69, 0x64, 0x73, + 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, + 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x2e, 0x53, 0x65, 0x74, 0x1a, 0x97, 0x01, 0x0a, 0x0d, + 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x4b, 0x0a, + 0x0e, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d, 0x70, 0x72, 0x69, + 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, + 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, + 0x6c, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4a, + 0x04, 0x08, 0x01, 0x10, 0x02, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, + 0x76, 0x32, 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x42, 0x11, 0x0a, 0x0a, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, + 0x60, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x42, + 0x41, 0x43, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x7d, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x52, 0x62, 0x61, 0x63, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2f, 0x76, + 0x33, 0x3b, 0x72, 0x62, 0x61, 0x63, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_config_rbac_v3_rbac_proto_rawDescOnce sync.Once + file_envoy_config_rbac_v3_rbac_proto_rawDescData = file_envoy_config_rbac_v3_rbac_proto_rawDesc +) + +func file_envoy_config_rbac_v3_rbac_proto_rawDescGZIP() []byte { + file_envoy_config_rbac_v3_rbac_proto_rawDescOnce.Do(func() { + file_envoy_config_rbac_v3_rbac_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_rbac_v3_rbac_proto_rawDescData) + }) + return file_envoy_config_rbac_v3_rbac_proto_rawDescData +} + +var file_envoy_config_rbac_v3_rbac_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_config_rbac_v3_rbac_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_envoy_config_rbac_v3_rbac_proto_goTypes = []interface{}{ + (RBAC_Action)(0), // 0: envoy.config.rbac.v3.RBAC.Action + (*RBAC)(nil), // 1: envoy.config.rbac.v3.RBAC + (*Policy)(nil), // 2: envoy.config.rbac.v3.Policy + (*Permission)(nil), // 3: envoy.config.rbac.v3.Permission + (*Principal)(nil), // 4: envoy.config.rbac.v3.Principal + (*Action)(nil), // 5: envoy.config.rbac.v3.Action + nil, // 6: envoy.config.rbac.v3.RBAC.PoliciesEntry + (*Permission_Set)(nil), // 7: envoy.config.rbac.v3.Permission.Set + (*Principal_Set)(nil), // 8: envoy.config.rbac.v3.Principal.Set + (*Principal_Authenticated)(nil), // 9: envoy.config.rbac.v3.Principal.Authenticated + (*v1alpha1.Expr)(nil), // 10: google.api.expr.v1alpha1.Expr + (*v1alpha1.CheckedExpr)(nil), // 11: google.api.expr.v1alpha1.CheckedExpr + (*v3.HeaderMatcher)(nil), // 12: envoy.config.route.v3.HeaderMatcher + (*v31.PathMatcher)(nil), // 13: envoy.type.matcher.v3.PathMatcher + (*v32.CidrRange)(nil), // 14: envoy.config.core.v3.CidrRange + (*v33.Int32Range)(nil), // 15: envoy.type.v3.Int32Range + (*v31.MetadataMatcher)(nil), // 16: envoy.type.matcher.v3.MetadataMatcher + (*v31.StringMatcher)(nil), // 17: envoy.type.matcher.v3.StringMatcher + (*v32.TypedExtensionConfig)(nil), // 18: envoy.config.core.v3.TypedExtensionConfig +} +var file_envoy_config_rbac_v3_rbac_proto_depIdxs = []int32{ + 0, // 0: envoy.config.rbac.v3.RBAC.action:type_name -> envoy.config.rbac.v3.RBAC.Action + 6, // 1: envoy.config.rbac.v3.RBAC.policies:type_name -> envoy.config.rbac.v3.RBAC.PoliciesEntry + 3, // 2: envoy.config.rbac.v3.Policy.permissions:type_name -> envoy.config.rbac.v3.Permission + 4, // 3: envoy.config.rbac.v3.Policy.principals:type_name -> envoy.config.rbac.v3.Principal + 10, // 4: envoy.config.rbac.v3.Policy.condition:type_name -> google.api.expr.v1alpha1.Expr + 11, // 5: envoy.config.rbac.v3.Policy.checked_condition:type_name -> google.api.expr.v1alpha1.CheckedExpr + 7, // 6: envoy.config.rbac.v3.Permission.and_rules:type_name -> envoy.config.rbac.v3.Permission.Set + 7, // 7: envoy.config.rbac.v3.Permission.or_rules:type_name -> envoy.config.rbac.v3.Permission.Set + 12, // 8: envoy.config.rbac.v3.Permission.header:type_name -> envoy.config.route.v3.HeaderMatcher + 13, // 9: envoy.config.rbac.v3.Permission.url_path:type_name -> envoy.type.matcher.v3.PathMatcher + 14, // 10: envoy.config.rbac.v3.Permission.destination_ip:type_name -> envoy.config.core.v3.CidrRange + 15, // 11: envoy.config.rbac.v3.Permission.destination_port_range:type_name -> envoy.type.v3.Int32Range + 16, // 12: envoy.config.rbac.v3.Permission.metadata:type_name -> envoy.type.matcher.v3.MetadataMatcher + 3, // 13: envoy.config.rbac.v3.Permission.not_rule:type_name -> envoy.config.rbac.v3.Permission + 17, // 14: envoy.config.rbac.v3.Permission.requested_server_name:type_name -> envoy.type.matcher.v3.StringMatcher + 18, // 15: envoy.config.rbac.v3.Permission.matcher:type_name -> envoy.config.core.v3.TypedExtensionConfig + 8, // 16: envoy.config.rbac.v3.Principal.and_ids:type_name -> envoy.config.rbac.v3.Principal.Set + 8, // 17: envoy.config.rbac.v3.Principal.or_ids:type_name -> envoy.config.rbac.v3.Principal.Set + 9, // 18: envoy.config.rbac.v3.Principal.authenticated:type_name -> envoy.config.rbac.v3.Principal.Authenticated + 14, // 19: envoy.config.rbac.v3.Principal.source_ip:type_name -> envoy.config.core.v3.CidrRange + 14, // 20: envoy.config.rbac.v3.Principal.direct_remote_ip:type_name -> envoy.config.core.v3.CidrRange + 14, // 21: envoy.config.rbac.v3.Principal.remote_ip:type_name -> envoy.config.core.v3.CidrRange + 12, // 22: envoy.config.rbac.v3.Principal.header:type_name -> envoy.config.route.v3.HeaderMatcher + 13, // 23: envoy.config.rbac.v3.Principal.url_path:type_name -> envoy.type.matcher.v3.PathMatcher + 16, // 24: envoy.config.rbac.v3.Principal.metadata:type_name -> envoy.type.matcher.v3.MetadataMatcher + 4, // 25: envoy.config.rbac.v3.Principal.not_id:type_name -> envoy.config.rbac.v3.Principal + 0, // 26: envoy.config.rbac.v3.Action.action:type_name -> envoy.config.rbac.v3.RBAC.Action + 2, // 27: envoy.config.rbac.v3.RBAC.PoliciesEntry.value:type_name -> envoy.config.rbac.v3.Policy + 3, // 28: envoy.config.rbac.v3.Permission.Set.rules:type_name -> envoy.config.rbac.v3.Permission + 4, // 29: envoy.config.rbac.v3.Principal.Set.ids:type_name -> envoy.config.rbac.v3.Principal + 17, // 30: envoy.config.rbac.v3.Principal.Authenticated.principal_name:type_name -> envoy.type.matcher.v3.StringMatcher + 31, // [31:31] is the sub-list for method output_type + 31, // [31:31] is the sub-list for method input_type + 31, // [31:31] is the sub-list for extension type_name + 31, // [31:31] is the sub-list for extension extendee + 0, // [0:31] is the sub-list for field type_name +} + +func init() { file_envoy_config_rbac_v3_rbac_proto_init() } +func file_envoy_config_rbac_v3_rbac_proto_init() { + if File_envoy_config_rbac_v3_rbac_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_config_rbac_v3_rbac_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RBAC); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_rbac_v3_rbac_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Policy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_rbac_v3_rbac_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Permission); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_rbac_v3_rbac_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Principal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_rbac_v3_rbac_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Action); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_rbac_v3_rbac_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Permission_Set); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_rbac_v3_rbac_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Principal_Set); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_rbac_v3_rbac_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Principal_Authenticated); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_config_rbac_v3_rbac_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*Permission_AndRules)(nil), + (*Permission_OrRules)(nil), + (*Permission_Any)(nil), + (*Permission_Header)(nil), + (*Permission_UrlPath)(nil), + (*Permission_DestinationIp)(nil), + (*Permission_DestinationPort)(nil), + (*Permission_DestinationPortRange)(nil), + (*Permission_Metadata)(nil), + (*Permission_NotRule)(nil), + (*Permission_RequestedServerName)(nil), + (*Permission_Matcher)(nil), + } + file_envoy_config_rbac_v3_rbac_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*Principal_AndIds)(nil), + (*Principal_OrIds)(nil), + (*Principal_Any)(nil), + (*Principal_Authenticated_)(nil), + (*Principal_SourceIp)(nil), + (*Principal_DirectRemoteIp)(nil), + (*Principal_RemoteIp)(nil), + (*Principal_Header)(nil), + (*Principal_UrlPath)(nil), + (*Principal_Metadata)(nil), + (*Principal_NotId)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_config_rbac_v3_rbac_proto_rawDesc, + NumEnums: 1, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_config_rbac_v3_rbac_proto_goTypes, + DependencyIndexes: file_envoy_config_rbac_v3_rbac_proto_depIdxs, + EnumInfos: file_envoy_config_rbac_v3_rbac_proto_enumTypes, + MessageInfos: file_envoy_config_rbac_v3_rbac_proto_msgTypes, + }.Build() + File_envoy_config_rbac_v3_rbac_proto = out.File + file_envoy_config_rbac_v3_rbac_proto_rawDesc = nil + file_envoy_config_rbac_v3_rbac_proto_goTypes = nil + file_envoy_config_rbac_v3_rbac_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/rbac/v3/rbac.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/rbac/v3/rbac.pb.validate.go new file mode 100644 index 0000000000000..ec837866949aa --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/config/rbac/v3/rbac.pb.validate.go @@ -0,0 +1,1846 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/config/rbac/v3/rbac.proto + +package rbacv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RBAC 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 *RBAC) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RBAC 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 RBACMultiError, or nil if none found. +func (m *RBAC) ValidateAll() error { + return m.validate(true) +} + +func (m *RBAC) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if _, ok := RBAC_Action_name[int32(m.GetAction())]; !ok { + err := RBACValidationError{ + field: "Action", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + { + sorted_keys := make([]string, len(m.GetPolicies())) + i := 0 + for key := range m.GetPolicies() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetPolicies()[key] + _ = val + + // no validation rules for Policies[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RBACValidationError{ + field: fmt.Sprintf("Policies[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RBACValidationError{ + field: fmt.Sprintf("Policies[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RBACValidationError{ + field: fmt.Sprintf("Policies[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if len(errors) > 0 { + return RBACMultiError(errors) + } + return nil +} + +// RBACMultiError is an error wrapping multiple validation errors returned by +// RBAC.ValidateAll() if the designated constraints aren't met. +type RBACMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RBACMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RBACMultiError) AllErrors() []error { return m } + +// RBACValidationError is the validation error returned by RBAC.Validate if the +// designated constraints aren't met. +type RBACValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RBACValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RBACValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RBACValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RBACValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RBACValidationError) ErrorName() string { return "RBACValidationError" } + +// Error satisfies the builtin error interface +func (e RBACValidationError) 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 %sRBAC.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RBACValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RBACValidationError{} + +// Validate checks the field values on Policy 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 *Policy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Policy 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 PolicyMultiError, or nil if none found. +func (m *Policy) ValidateAll() error { + return m.validate(true) +} + +func (m *Policy) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetPermissions()) < 1 { + err := PolicyValidationError{ + field: "Permissions", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetPermissions() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PolicyValidationError{ + field: fmt.Sprintf("Permissions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PolicyValidationError{ + field: fmt.Sprintf("Permissions[%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 PolicyValidationError{ + field: fmt.Sprintf("Permissions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(m.GetPrincipals()) < 1 { + err := PolicyValidationError{ + field: "Principals", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetPrincipals() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PolicyValidationError{ + field: fmt.Sprintf("Principals[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PolicyValidationError{ + field: fmt.Sprintf("Principals[%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 PolicyValidationError{ + field: fmt.Sprintf("Principals[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetCondition()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PolicyValidationError{ + field: "Condition", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PolicyValidationError{ + field: "Condition", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCondition()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PolicyValidationError{ + field: "Condition", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetCheckedCondition()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PolicyValidationError{ + field: "CheckedCondition", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PolicyValidationError{ + field: "CheckedCondition", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCheckedCondition()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PolicyValidationError{ + field: "CheckedCondition", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return PolicyMultiError(errors) + } + return nil +} + +// PolicyMultiError is an error wrapping multiple validation errors returned by +// Policy.ValidateAll() if the designated constraints aren't met. +type PolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PolicyMultiError) AllErrors() []error { return m } + +// PolicyValidationError is the validation error returned by Policy.Validate if +// the designated constraints aren't met. +type PolicyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PolicyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PolicyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PolicyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PolicyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PolicyValidationError) ErrorName() string { return "PolicyValidationError" } + +// Error satisfies the builtin error interface +func (e PolicyValidationError) 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 %sPolicy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PolicyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PolicyValidationError{} + +// Validate checks the field values on Permission 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 *Permission) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Permission 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 PermissionMultiError, or +// nil if none found. +func (m *Permission) ValidateAll() error { + return m.validate(true) +} + +func (m *Permission) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.Rule.(type) { + + case *Permission_AndRules: + + if all { + switch v := interface{}(m.GetAndRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "AndRules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "AndRules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAndRules()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PermissionValidationError{ + field: "AndRules", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Permission_OrRules: + + if all { + switch v := interface{}(m.GetOrRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "OrRules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "OrRules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOrRules()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PermissionValidationError{ + field: "OrRules", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Permission_Any: + + if m.GetAny() != true { + err := PermissionValidationError{ + field: "Any", + reason: "value must equal true", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *Permission_Header: + + if all { + switch v := interface{}(m.GetHeader()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PermissionValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Permission_UrlPath: + + if all { + switch v := interface{}(m.GetUrlPath()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "UrlPath", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "UrlPath", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUrlPath()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PermissionValidationError{ + field: "UrlPath", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Permission_DestinationIp: + + if all { + switch v := interface{}(m.GetDestinationIp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "DestinationIp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "DestinationIp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDestinationIp()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PermissionValidationError{ + field: "DestinationIp", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Permission_DestinationPort: + + if m.GetDestinationPort() > 65535 { + err := PermissionValidationError{ + field: "DestinationPort", + reason: "value must be less than or equal to 65535", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *Permission_DestinationPortRange: + + if all { + switch v := interface{}(m.GetDestinationPortRange()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "DestinationPortRange", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "DestinationPortRange", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDestinationPortRange()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PermissionValidationError{ + field: "DestinationPortRange", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Permission_Metadata: + + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PermissionValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Permission_NotRule: + + if all { + switch v := interface{}(m.GetNotRule()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "NotRule", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "NotRule", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNotRule()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PermissionValidationError{ + field: "NotRule", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Permission_RequestedServerName: + + if all { + switch v := interface{}(m.GetRequestedServerName()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "RequestedServerName", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "RequestedServerName", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestedServerName()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PermissionValidationError{ + field: "RequestedServerName", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Permission_Matcher: + + if all { + switch v := interface{}(m.GetMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PermissionValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PermissionValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := PermissionValidationError{ + field: "Rule", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return PermissionMultiError(errors) + } + return nil +} + +// PermissionMultiError is an error wrapping multiple validation errors +// returned by Permission.ValidateAll() if the designated constraints aren't met. +type PermissionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PermissionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PermissionMultiError) AllErrors() []error { return m } + +// PermissionValidationError is the validation error returned by +// Permission.Validate if the designated constraints aren't met. +type PermissionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PermissionValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PermissionValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PermissionValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PermissionValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PermissionValidationError) ErrorName() string { return "PermissionValidationError" } + +// Error satisfies the builtin error interface +func (e PermissionValidationError) 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 %sPermission.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PermissionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PermissionValidationError{} + +// Validate checks the field values on Principal 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 *Principal) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Principal 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 PrincipalMultiError, or nil +// if none found. +func (m *Principal) ValidateAll() error { + return m.validate(true) +} + +func (m *Principal) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.Identifier.(type) { + + case *Principal_AndIds: + + if all { + switch v := interface{}(m.GetAndIds()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "AndIds", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "AndIds", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAndIds()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PrincipalValidationError{ + field: "AndIds", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Principal_OrIds: + + if all { + switch v := interface{}(m.GetOrIds()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "OrIds", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "OrIds", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOrIds()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PrincipalValidationError{ + field: "OrIds", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Principal_Any: + + if m.GetAny() != true { + err := PrincipalValidationError{ + field: "Any", + reason: "value must equal true", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *Principal_Authenticated_: + + if all { + switch v := interface{}(m.GetAuthenticated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "Authenticated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "Authenticated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAuthenticated()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PrincipalValidationError{ + field: "Authenticated", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Principal_SourceIp: + + if all { + switch v := interface{}(m.GetSourceIp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "SourceIp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "SourceIp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSourceIp()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PrincipalValidationError{ + field: "SourceIp", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Principal_DirectRemoteIp: + + if all { + switch v := interface{}(m.GetDirectRemoteIp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "DirectRemoteIp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "DirectRemoteIp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDirectRemoteIp()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PrincipalValidationError{ + field: "DirectRemoteIp", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Principal_RemoteIp: + + if all { + switch v := interface{}(m.GetRemoteIp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "RemoteIp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "RemoteIp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRemoteIp()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PrincipalValidationError{ + field: "RemoteIp", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Principal_Header: + + if all { + switch v := interface{}(m.GetHeader()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeader()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PrincipalValidationError{ + field: "Header", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Principal_UrlPath: + + if all { + switch v := interface{}(m.GetUrlPath()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "UrlPath", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "UrlPath", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUrlPath()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PrincipalValidationError{ + field: "UrlPath", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Principal_Metadata: + + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PrincipalValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Principal_NotId: + + if all { + switch v := interface{}(m.GetNotId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "NotId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PrincipalValidationError{ + field: "NotId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNotId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PrincipalValidationError{ + field: "NotId", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := PrincipalValidationError{ + field: "Identifier", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return PrincipalMultiError(errors) + } + return nil +} + +// PrincipalMultiError is an error wrapping multiple validation errors returned +// by Principal.ValidateAll() if the designated constraints aren't met. +type PrincipalMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PrincipalMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PrincipalMultiError) AllErrors() []error { return m } + +// PrincipalValidationError is the validation error returned by +// Principal.Validate if the designated constraints aren't met. +type PrincipalValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PrincipalValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PrincipalValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PrincipalValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PrincipalValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PrincipalValidationError) ErrorName() string { return "PrincipalValidationError" } + +// Error satisfies the builtin error interface +func (e PrincipalValidationError) 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 %sPrincipal.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PrincipalValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PrincipalValidationError{} + +// Validate checks the field values on Action 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 *Action) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Action 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 ActionMultiError, or nil if none found. +func (m *Action) ValidateAll() error { + return m.validate(true) +} + +func (m *Action) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetName()) < 1 { + err := ActionValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for Action + + if len(errors) > 0 { + return ActionMultiError(errors) + } + return nil +} + +// ActionMultiError is an error wrapping multiple validation errors returned by +// Action.ValidateAll() if the designated constraints aren't met. +type ActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ActionMultiError) AllErrors() []error { return m } + +// ActionValidationError is the validation error returned by Action.Validate if +// the designated constraints aren't met. +type ActionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ActionValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ActionValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ActionValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ActionValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ActionValidationError) ErrorName() string { return "ActionValidationError" } + +// Error satisfies the builtin error interface +func (e ActionValidationError) 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 %sAction.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ActionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ActionValidationError{} + +// Validate checks the field values on Permission_Set 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 *Permission_Set) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Permission_Set 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 Permission_SetMultiError, +// or nil if none found. +func (m *Permission_Set) ValidateAll() error { + return m.validate(true) +} + +func (m *Permission_Set) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetRules()) < 1 { + err := Permission_SetValidationError{ + field: "Rules", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetRules() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Permission_SetValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Permission_SetValidationError{ + field: fmt.Sprintf("Rules[%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 Permission_SetValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return Permission_SetMultiError(errors) + } + return nil +} + +// Permission_SetMultiError is an error wrapping multiple validation errors +// returned by Permission_Set.ValidateAll() if the designated constraints +// aren't met. +type Permission_SetMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Permission_SetMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Permission_SetMultiError) AllErrors() []error { return m } + +// Permission_SetValidationError is the validation error returned by +// Permission_Set.Validate if the designated constraints aren't met. +type Permission_SetValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Permission_SetValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Permission_SetValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Permission_SetValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Permission_SetValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Permission_SetValidationError) ErrorName() string { return "Permission_SetValidationError" } + +// Error satisfies the builtin error interface +func (e Permission_SetValidationError) 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 %sPermission_Set.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Permission_SetValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Permission_SetValidationError{} + +// Validate checks the field values on Principal_Set 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 *Principal_Set) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Principal_Set 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 Principal_SetMultiError, or +// nil if none found. +func (m *Principal_Set) ValidateAll() error { + return m.validate(true) +} + +func (m *Principal_Set) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetIds()) < 1 { + err := Principal_SetValidationError{ + field: "Ids", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetIds() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Principal_SetValidationError{ + field: fmt.Sprintf("Ids[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Principal_SetValidationError{ + field: fmt.Sprintf("Ids[%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 Principal_SetValidationError{ + field: fmt.Sprintf("Ids[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return Principal_SetMultiError(errors) + } + return nil +} + +// Principal_SetMultiError is an error wrapping multiple validation errors +// returned by Principal_Set.ValidateAll() if the designated constraints +// aren't met. +type Principal_SetMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Principal_SetMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Principal_SetMultiError) AllErrors() []error { return m } + +// Principal_SetValidationError is the validation error returned by +// Principal_Set.Validate if the designated constraints aren't met. +type Principal_SetValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Principal_SetValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Principal_SetValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Principal_SetValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Principal_SetValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Principal_SetValidationError) ErrorName() string { return "Principal_SetValidationError" } + +// Error satisfies the builtin error interface +func (e Principal_SetValidationError) 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 %sPrincipal_Set.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Principal_SetValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Principal_SetValidationError{} + +// Validate checks the field values on Principal_Authenticated 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 *Principal_Authenticated) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Principal_Authenticated 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 +// Principal_AuthenticatedMultiError, or nil if none found. +func (m *Principal_Authenticated) ValidateAll() error { + return m.validate(true) +} + +func (m *Principal_Authenticated) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetPrincipalName()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Principal_AuthenticatedValidationError{ + field: "PrincipalName", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Principal_AuthenticatedValidationError{ + field: "PrincipalName", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPrincipalName()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Principal_AuthenticatedValidationError{ + field: "PrincipalName", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return Principal_AuthenticatedMultiError(errors) + } + return nil +} + +// Principal_AuthenticatedMultiError is an error wrapping multiple validation +// errors returned by Principal_Authenticated.ValidateAll() if the designated +// constraints aren't met. +type Principal_AuthenticatedMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Principal_AuthenticatedMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Principal_AuthenticatedMultiError) AllErrors() []error { return m } + +// Principal_AuthenticatedValidationError is the validation error returned by +// Principal_Authenticated.Validate if the designated constraints aren't met. +type Principal_AuthenticatedValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Principal_AuthenticatedValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Principal_AuthenticatedValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Principal_AuthenticatedValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Principal_AuthenticatedValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Principal_AuthenticatedValidationError) ErrorName() string { + return "Principal_AuthenticatedValidationError" +} + +// Error satisfies the builtin error interface +func (e Principal_AuthenticatedValidationError) 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 %sPrincipal_Authenticated.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Principal_AuthenticatedValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Principal_AuthenticatedValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/retry/previous_priorities/previous_priorities_config.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/retry/previous_priorities/previous_priorities_config.pb.go new file mode 100644 index 0000000000000..5b467f545e0ee --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/config/retry/previous_priorities/previous_priorities_config.pb.go @@ -0,0 +1,212 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/config/retry/previous_priorities/previous_priorities_config.proto + +package previous_priorities + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// A retry host selector that attempts to spread retries between priorities, even if certain +// priorities would not normally be attempted due to higher priorities being available. +// +// As priorities get excluded, load will be distributed amongst the remaining healthy priorities +// based on the relative health of the priorities, matching how load is distributed during regular +// host selection. For example, given priority healths of {100, 50, 50}, the original load will be +// {100, 0, 0} (since P0 has capacity to handle 100% of the traffic). If P0 is excluded, the load +// changes to {0, 50, 50}, because P1 is only able to handle 50% of the traffic, causing the +// remaining to spill over to P2. +// +// Each priority attempted will be excluded until there are no healthy priorities left, at which +// point the list of attempted priorities will be reset, essentially starting from the beginning. +// For example, given three priorities P0, P1, P2 with healthy % of 100, 0 and 50 respectively, the +// following sequence of priorities would be selected (assuming update_frequency = 1): +// Attempt 1: P0 (P0 is 100% healthy) +// Attempt 2: P2 (P0 already attempted, P2 only healthy priority) +// Attempt 3: P0 (no healthy priorities, reset) +// Attempt 4: P2 +// +// In the case of all upstream hosts being unhealthy, no adjustments will be made to the original +// priority load, so behavior should be identical to not using this plugin. +// +// Using this PriorityFilter requires rebuilding the priority load, which runs in O(# of +// priorities), which might incur significant overhead for clusters with many priorities. +// [#extension: envoy.retry_priorities.previous_priorities] +type PreviousPrioritiesConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // How often the priority load should be updated based on previously attempted priorities. Useful + // to allow each priorities to receive more than one request before being excluded or to reduce + // the number of times that the priority load has to be recomputed. + // + // For example, by setting this to 2, then the first two attempts (initial attempt and first + // retry) will use the unmodified priority load. The third and fourth attempt will use priority + // load which excludes the priorities routed to with the first two attempts, and the fifth and + // sixth attempt will use the priority load excluding the priorities used for the first four + // attempts. + // + // Must be greater than 0. + UpdateFrequency int32 `protobuf:"varint,1,opt,name=update_frequency,json=updateFrequency,proto3" json:"update_frequency,omitempty"` +} + +func (x *PreviousPrioritiesConfig) Reset() { + *x = PreviousPrioritiesConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PreviousPrioritiesConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreviousPrioritiesConfig) ProtoMessage() {} + +func (x *PreviousPrioritiesConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreviousPrioritiesConfig.ProtoReflect.Descriptor instead. +func (*PreviousPrioritiesConfig) Descriptor() ([]byte, []int) { + return file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDescGZIP(), []int{0} +} + +func (x *PreviousPrioritiesConfig) GetUpdateFrequency() int32 { + if x != nil { + return x.UpdateFrequency + } + return 0 +} + +var File_envoy_config_retry_previous_priorities_previous_priorities_config_proto protoreflect.FileDescriptor + +var file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDesc = []byte{ + 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, + 0x65, 0x74, 0x72, 0x79, 0x2f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, + 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, + 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, + 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x4e, 0x0a, 0x18, 0x50, 0x72, 0x65, + 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x32, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x1a, 0x02, 0x20, 0x00, 0x52, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x42, 0xec, 0x01, 0x0a, 0x34, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, + 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, + 0x65, 0x73, 0x42, 0x1d, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x72, 0x69, 0x6f, + 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2f, 0x70, + 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, + 0x65, 0x73, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x38, 0x12, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, + 0x2e, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, + 0x75, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDescOnce sync.Once + file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDescData = file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDesc +) + +func file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDescGZIP() []byte { + file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDescOnce.Do(func() { + file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDescData) + }) + return file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDescData +} + +var file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_goTypes = []interface{}{ + (*PreviousPrioritiesConfig)(nil), // 0: envoy.config.retry.previous_priorities.PreviousPrioritiesConfig +} +var file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_init() } +func file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_init() { + if File_envoy_config_retry_previous_priorities_previous_priorities_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PreviousPrioritiesConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_goTypes, + DependencyIndexes: file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_depIdxs, + MessageInfos: file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_msgTypes, + }.Build() + File_envoy_config_retry_previous_priorities_previous_priorities_config_proto = out.File + file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_rawDesc = nil + file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_goTypes = nil + file_envoy_config_retry_previous_priorities_previous_priorities_config_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/retry/previous_priorities/previous_priorities_config.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/retry/previous_priorities/previous_priorities_config.pb.validate.go new file mode 100644 index 0000000000000..2f599e25e9088 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/config/retry/previous_priorities/previous_priorities_config.pb.validate.go @@ -0,0 +1,148 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/config/retry/previous_priorities/previous_priorities_config.proto + +package previous_priorities + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on PreviousPrioritiesConfig 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 *PreviousPrioritiesConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PreviousPrioritiesConfig 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 +// PreviousPrioritiesConfigMultiError, or nil if none found. +func (m *PreviousPrioritiesConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *PreviousPrioritiesConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetUpdateFrequency() <= 0 { + err := PreviousPrioritiesConfigValidationError{ + field: "UpdateFrequency", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return PreviousPrioritiesConfigMultiError(errors) + } + return nil +} + +// PreviousPrioritiesConfigMultiError is an error wrapping multiple validation +// errors returned by PreviousPrioritiesConfig.ValidateAll() if the designated +// constraints aren't met. +type PreviousPrioritiesConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PreviousPrioritiesConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PreviousPrioritiesConfigMultiError) AllErrors() []error { return m } + +// PreviousPrioritiesConfigValidationError is the validation error returned by +// PreviousPrioritiesConfig.Validate if the designated constraints aren't met. +type PreviousPrioritiesConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PreviousPrioritiesConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PreviousPrioritiesConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PreviousPrioritiesConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PreviousPrioritiesConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PreviousPrioritiesConfigValidationError) ErrorName() string { + return "PreviousPrioritiesConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e PreviousPrioritiesConfigValidationError) 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 %sPreviousPrioritiesConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PreviousPrioritiesConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PreviousPrioritiesConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/tap/v3/common.pb.go b/vendor/github.com/cilium/proxy/go/envoy/config/tap/v3/common.pb.go new file mode 100644 index 0000000000000..5968ec5be216a --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/config/tap/v3/common.pb.go @@ -0,0 +1,1622 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/config/tap/v3/common.proto + +package tapv3 + +import ( + _ "github.com/cilium/proxy/go/envoy/annotations" + v3 "github.com/cilium/proxy/go/envoy/config/common/matcher/v3" + v31 "github.com/cilium/proxy/go/envoy/config/core/v3" + v32 "github.com/cilium/proxy/go/envoy/config/route/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Output format. All output is in the form of one or more :ref:`TraceWrapper +// ` messages. This enumeration indicates +// how those messages are written. Note that not all sinks support all output formats. See +// individual sink documentation for more information. +type OutputSink_Format int32 + +const ( + // Each message will be written as JSON. Any :ref:`body ` + // data will be present in the :ref:`as_bytes + // ` field. This means that body data will be + // base64 encoded as per the `proto3 JSON mappings + // `_. + OutputSink_JSON_BODY_AS_BYTES OutputSink_Format = 0 + // Each message will be written as JSON. Any :ref:`body ` + // data will be present in the :ref:`as_string + // ` field. This means that body data will be + // string encoded as per the `proto3 JSON mappings + // `_. This format type is + // useful when it is known that that body is human readable (e.g., JSON over HTTP) and the + // user wishes to view it directly without being forced to base64 decode the body. + OutputSink_JSON_BODY_AS_STRING OutputSink_Format = 1 + // Binary proto format. Note that binary proto is not self-delimiting. If a sink writes + // multiple binary messages without any length information the data stream will not be + // useful. However, for certain sinks that are self-delimiting (e.g., one message per file) + // this output format makes consumption simpler. + OutputSink_PROTO_BINARY OutputSink_Format = 2 + // Messages are written as a sequence tuples, where each tuple is the message length encoded + // as a `protobuf 32-bit varint + // `_ + // followed by the binary message. The messages can be read back using the language specific + // protobuf coded stream implementation to obtain the message length and the message. + OutputSink_PROTO_BINARY_LENGTH_DELIMITED OutputSink_Format = 3 + // Text proto format. + OutputSink_PROTO_TEXT OutputSink_Format = 4 +) + +// Enum value maps for OutputSink_Format. +var ( + OutputSink_Format_name = map[int32]string{ + 0: "JSON_BODY_AS_BYTES", + 1: "JSON_BODY_AS_STRING", + 2: "PROTO_BINARY", + 3: "PROTO_BINARY_LENGTH_DELIMITED", + 4: "PROTO_TEXT", + } + OutputSink_Format_value = map[string]int32{ + "JSON_BODY_AS_BYTES": 0, + "JSON_BODY_AS_STRING": 1, + "PROTO_BINARY": 2, + "PROTO_BINARY_LENGTH_DELIMITED": 3, + "PROTO_TEXT": 4, + } +) + +func (x OutputSink_Format) Enum() *OutputSink_Format { + p := new(OutputSink_Format) + *p = x + return p +} + +func (x OutputSink_Format) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OutputSink_Format) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_config_tap_v3_common_proto_enumTypes[0].Descriptor() +} + +func (OutputSink_Format) Type() protoreflect.EnumType { + return &file_envoy_config_tap_v3_common_proto_enumTypes[0] +} + +func (x OutputSink_Format) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use OutputSink_Format.Descriptor instead. +func (OutputSink_Format) EnumDescriptor() ([]byte, []int) { + return file_envoy_config_tap_v3_common_proto_rawDescGZIP(), []int{5, 0} +} + +// Tap configuration. +type TapConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The match configuration. If the configuration matches the data source being tapped, a tap will + // occur, with the result written to the configured output. + // Exactly one of :ref:`match ` and + // :ref:`match_config ` must be set. If both + // are set, the :ref:`match ` will be used. + // + // Deprecated: Do not use. + MatchConfig *MatchPredicate `protobuf:"bytes,1,opt,name=match_config,json=matchConfig,proto3" json:"match_config,omitempty"` + // The match configuration. If the configuration matches the data source being tapped, a tap will + // occur, with the result written to the configured output. + // Exactly one of :ref:`match ` and + // :ref:`match_config ` must be set. If both + // are set, the :ref:`match ` will be used. + Match *v3.MatchPredicate `protobuf:"bytes,4,opt,name=match,proto3" json:"match,omitempty"` + // The tap output configuration. If a match configuration matches a data source being tapped, + // a tap will occur and the data will be written to the configured output. + OutputConfig *OutputConfig `protobuf:"bytes,2,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"` + // [#not-implemented-hide:] Specify if Tap matching is enabled. The % of requests\connections for + // which the tap matching is enabled. When not enabled, the request\connection will not be + // recorded. + // + // .. note:: + // + // This field defaults to 100/:ref:`HUNDRED + // `. + TapEnabled *v31.RuntimeFractionalPercent `protobuf:"bytes,3,opt,name=tap_enabled,json=tapEnabled,proto3" json:"tap_enabled,omitempty"` +} + +func (x *TapConfig) Reset() { + *x = TapConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TapConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TapConfig) ProtoMessage() {} + +func (x *TapConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TapConfig.ProtoReflect.Descriptor instead. +func (*TapConfig) Descriptor() ([]byte, []int) { + return file_envoy_config_tap_v3_common_proto_rawDescGZIP(), []int{0} +} + +// Deprecated: Do not use. +func (x *TapConfig) GetMatchConfig() *MatchPredicate { + if x != nil { + return x.MatchConfig + } + return nil +} + +func (x *TapConfig) GetMatch() *v3.MatchPredicate { + if x != nil { + return x.Match + } + return nil +} + +func (x *TapConfig) GetOutputConfig() *OutputConfig { + if x != nil { + return x.OutputConfig + } + return nil +} + +func (x *TapConfig) GetTapEnabled() *v31.RuntimeFractionalPercent { + if x != nil { + return x.TapEnabled + } + return nil +} + +// Tap match configuration. This is a recursive structure which allows complex nested match +// configurations to be built using various logical operators. +// [#next-free-field: 11] +type MatchPredicate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Rule: + // + // *MatchPredicate_OrMatch + // *MatchPredicate_AndMatch + // *MatchPredicate_NotMatch + // *MatchPredicate_AnyMatch + // *MatchPredicate_HttpRequestHeadersMatch + // *MatchPredicate_HttpRequestTrailersMatch + // *MatchPredicate_HttpResponseHeadersMatch + // *MatchPredicate_HttpResponseTrailersMatch + // *MatchPredicate_HttpRequestGenericBodyMatch + // *MatchPredicate_HttpResponseGenericBodyMatch + Rule isMatchPredicate_Rule `protobuf_oneof:"rule"` +} + +func (x *MatchPredicate) Reset() { + *x = MatchPredicate{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MatchPredicate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MatchPredicate) ProtoMessage() {} + +func (x *MatchPredicate) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MatchPredicate.ProtoReflect.Descriptor instead. +func (*MatchPredicate) Descriptor() ([]byte, []int) { + return file_envoy_config_tap_v3_common_proto_rawDescGZIP(), []int{1} +} + +func (m *MatchPredicate) GetRule() isMatchPredicate_Rule { + if m != nil { + return m.Rule + } + return nil +} + +func (x *MatchPredicate) GetOrMatch() *MatchPredicate_MatchSet { + if x, ok := x.GetRule().(*MatchPredicate_OrMatch); ok { + return x.OrMatch + } + return nil +} + +func (x *MatchPredicate) GetAndMatch() *MatchPredicate_MatchSet { + if x, ok := x.GetRule().(*MatchPredicate_AndMatch); ok { + return x.AndMatch + } + return nil +} + +func (x *MatchPredicate) GetNotMatch() *MatchPredicate { + if x, ok := x.GetRule().(*MatchPredicate_NotMatch); ok { + return x.NotMatch + } + return nil +} + +func (x *MatchPredicate) GetAnyMatch() bool { + if x, ok := x.GetRule().(*MatchPredicate_AnyMatch); ok { + return x.AnyMatch + } + return false +} + +func (x *MatchPredicate) GetHttpRequestHeadersMatch() *HttpHeadersMatch { + if x, ok := x.GetRule().(*MatchPredicate_HttpRequestHeadersMatch); ok { + return x.HttpRequestHeadersMatch + } + return nil +} + +func (x *MatchPredicate) GetHttpRequestTrailersMatch() *HttpHeadersMatch { + if x, ok := x.GetRule().(*MatchPredicate_HttpRequestTrailersMatch); ok { + return x.HttpRequestTrailersMatch + } + return nil +} + +func (x *MatchPredicate) GetHttpResponseHeadersMatch() *HttpHeadersMatch { + if x, ok := x.GetRule().(*MatchPredicate_HttpResponseHeadersMatch); ok { + return x.HttpResponseHeadersMatch + } + return nil +} + +func (x *MatchPredicate) GetHttpResponseTrailersMatch() *HttpHeadersMatch { + if x, ok := x.GetRule().(*MatchPredicate_HttpResponseTrailersMatch); ok { + return x.HttpResponseTrailersMatch + } + return nil +} + +func (x *MatchPredicate) GetHttpRequestGenericBodyMatch() *HttpGenericBodyMatch { + if x, ok := x.GetRule().(*MatchPredicate_HttpRequestGenericBodyMatch); ok { + return x.HttpRequestGenericBodyMatch + } + return nil +} + +func (x *MatchPredicate) GetHttpResponseGenericBodyMatch() *HttpGenericBodyMatch { + if x, ok := x.GetRule().(*MatchPredicate_HttpResponseGenericBodyMatch); ok { + return x.HttpResponseGenericBodyMatch + } + return nil +} + +type isMatchPredicate_Rule interface { + isMatchPredicate_Rule() +} + +type MatchPredicate_OrMatch struct { + // A set that describes a logical OR. If any member of the set matches, the match configuration + // matches. + OrMatch *MatchPredicate_MatchSet `protobuf:"bytes,1,opt,name=or_match,json=orMatch,proto3,oneof"` +} + +type MatchPredicate_AndMatch struct { + // A set that describes a logical AND. If all members of the set match, the match configuration + // matches. + AndMatch *MatchPredicate_MatchSet `protobuf:"bytes,2,opt,name=and_match,json=andMatch,proto3,oneof"` +} + +type MatchPredicate_NotMatch struct { + // A negation match. The match configuration will match if the negated match condition matches. + NotMatch *MatchPredicate `protobuf:"bytes,3,opt,name=not_match,json=notMatch,proto3,oneof"` +} + +type MatchPredicate_AnyMatch struct { + // The match configuration will always match. + AnyMatch bool `protobuf:"varint,4,opt,name=any_match,json=anyMatch,proto3,oneof"` +} + +type MatchPredicate_HttpRequestHeadersMatch struct { + // HTTP request headers match configuration. + HttpRequestHeadersMatch *HttpHeadersMatch `protobuf:"bytes,5,opt,name=http_request_headers_match,json=httpRequestHeadersMatch,proto3,oneof"` +} + +type MatchPredicate_HttpRequestTrailersMatch struct { + // HTTP request trailers match configuration. + HttpRequestTrailersMatch *HttpHeadersMatch `protobuf:"bytes,6,opt,name=http_request_trailers_match,json=httpRequestTrailersMatch,proto3,oneof"` +} + +type MatchPredicate_HttpResponseHeadersMatch struct { + // HTTP response headers match configuration. + HttpResponseHeadersMatch *HttpHeadersMatch `protobuf:"bytes,7,opt,name=http_response_headers_match,json=httpResponseHeadersMatch,proto3,oneof"` +} + +type MatchPredicate_HttpResponseTrailersMatch struct { + // HTTP response trailers match configuration. + HttpResponseTrailersMatch *HttpHeadersMatch `protobuf:"bytes,8,opt,name=http_response_trailers_match,json=httpResponseTrailersMatch,proto3,oneof"` +} + +type MatchPredicate_HttpRequestGenericBodyMatch struct { + // HTTP request generic body match configuration. + HttpRequestGenericBodyMatch *HttpGenericBodyMatch `protobuf:"bytes,9,opt,name=http_request_generic_body_match,json=httpRequestGenericBodyMatch,proto3,oneof"` +} + +type MatchPredicate_HttpResponseGenericBodyMatch struct { + // HTTP response generic body match configuration. + HttpResponseGenericBodyMatch *HttpGenericBodyMatch `protobuf:"bytes,10,opt,name=http_response_generic_body_match,json=httpResponseGenericBodyMatch,proto3,oneof"` +} + +func (*MatchPredicate_OrMatch) isMatchPredicate_Rule() {} + +func (*MatchPredicate_AndMatch) isMatchPredicate_Rule() {} + +func (*MatchPredicate_NotMatch) isMatchPredicate_Rule() {} + +func (*MatchPredicate_AnyMatch) isMatchPredicate_Rule() {} + +func (*MatchPredicate_HttpRequestHeadersMatch) isMatchPredicate_Rule() {} + +func (*MatchPredicate_HttpRequestTrailersMatch) isMatchPredicate_Rule() {} + +func (*MatchPredicate_HttpResponseHeadersMatch) isMatchPredicate_Rule() {} + +func (*MatchPredicate_HttpResponseTrailersMatch) isMatchPredicate_Rule() {} + +func (*MatchPredicate_HttpRequestGenericBodyMatch) isMatchPredicate_Rule() {} + +func (*MatchPredicate_HttpResponseGenericBodyMatch) isMatchPredicate_Rule() {} + +// HTTP headers match configuration. +type HttpHeadersMatch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // HTTP headers to match. + Headers []*v32.HeaderMatcher `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` +} + +func (x *HttpHeadersMatch) Reset() { + *x = HttpHeadersMatch{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpHeadersMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpHeadersMatch) ProtoMessage() {} + +func (x *HttpHeadersMatch) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpHeadersMatch.ProtoReflect.Descriptor instead. +func (*HttpHeadersMatch) Descriptor() ([]byte, []int) { + return file_envoy_config_tap_v3_common_proto_rawDescGZIP(), []int{2} +} + +func (x *HttpHeadersMatch) GetHeaders() []*v32.HeaderMatcher { + if x != nil { + return x.Headers + } + return nil +} + +// HTTP generic body match configuration. +// List of text strings and hex strings to be located in HTTP body. +// All specified strings must be found in the HTTP body for positive match. +// The search may be limited to specified number of bytes from the body start. +// +// .. attention:: +// +// Searching for patterns in HTTP body is potentially cpu intensive. For each specified pattern, http body is scanned byte by byte to find a match. +// If multiple patterns are specified, the process is repeated for each pattern. If location of a pattern is known, ``bytes_limit`` should be specified +// to scan only part of the http body. +type HttpGenericBodyMatch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Limits search to specified number of bytes - default zero (no limit - match entire captured buffer). + BytesLimit uint32 `protobuf:"varint,1,opt,name=bytes_limit,json=bytesLimit,proto3" json:"bytes_limit,omitempty"` + // List of patterns to match. + Patterns []*HttpGenericBodyMatch_GenericTextMatch `protobuf:"bytes,2,rep,name=patterns,proto3" json:"patterns,omitempty"` +} + +func (x *HttpGenericBodyMatch) Reset() { + *x = HttpGenericBodyMatch{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpGenericBodyMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpGenericBodyMatch) ProtoMessage() {} + +func (x *HttpGenericBodyMatch) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpGenericBodyMatch.ProtoReflect.Descriptor instead. +func (*HttpGenericBodyMatch) Descriptor() ([]byte, []int) { + return file_envoy_config_tap_v3_common_proto_rawDescGZIP(), []int{3} +} + +func (x *HttpGenericBodyMatch) GetBytesLimit() uint32 { + if x != nil { + return x.BytesLimit + } + return 0 +} + +func (x *HttpGenericBodyMatch) GetPatterns() []*HttpGenericBodyMatch_GenericTextMatch { + if x != nil { + return x.Patterns + } + return nil +} + +// Tap output configuration. +type OutputConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output sinks for tap data. Currently a single sink is allowed in the list. Once multiple + // sink types are supported this constraint will be relaxed. + Sinks []*OutputSink `protobuf:"bytes,1,rep,name=sinks,proto3" json:"sinks,omitempty"` + // For buffered tapping, the maximum amount of received body that will be buffered prior to + // truncation. If truncation occurs, the :ref:`truncated + // ` field will be set. If not specified, the + // default is 1KiB. + MaxBufferedRxBytes *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=max_buffered_rx_bytes,json=maxBufferedRxBytes,proto3" json:"max_buffered_rx_bytes,omitempty"` + // For buffered tapping, the maximum amount of transmitted body that will be buffered prior to + // truncation. If truncation occurs, the :ref:`truncated + // ` field will be set. If not specified, the + // default is 1KiB. + MaxBufferedTxBytes *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=max_buffered_tx_bytes,json=maxBufferedTxBytes,proto3" json:"max_buffered_tx_bytes,omitempty"` + // Indicates whether taps produce a single buffered message per tap, or multiple streamed + // messages per tap in the emitted :ref:`TraceWrapper + // ` messages. Note that streamed tapping does not + // mean that no buffering takes place. Buffering may be required if data is processed before a + // match can be determined. See the HTTP tap filter :ref:`streaming + // ` documentation for more information. + Streaming bool `protobuf:"varint,4,opt,name=streaming,proto3" json:"streaming,omitempty"` +} + +func (x *OutputConfig) Reset() { + *x = OutputConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OutputConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutputConfig) ProtoMessage() {} + +func (x *OutputConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutputConfig.ProtoReflect.Descriptor instead. +func (*OutputConfig) Descriptor() ([]byte, []int) { + return file_envoy_config_tap_v3_common_proto_rawDescGZIP(), []int{4} +} + +func (x *OutputConfig) GetSinks() []*OutputSink { + if x != nil { + return x.Sinks + } + return nil +} + +func (x *OutputConfig) GetMaxBufferedRxBytes() *wrapperspb.UInt32Value { + if x != nil { + return x.MaxBufferedRxBytes + } + return nil +} + +func (x *OutputConfig) GetMaxBufferedTxBytes() *wrapperspb.UInt32Value { + if x != nil { + return x.MaxBufferedTxBytes + } + return nil +} + +func (x *OutputConfig) GetStreaming() bool { + if x != nil { + return x.Streaming + } + return false +} + +// Tap output sink configuration. +// [#next-free-field: 6] +type OutputSink struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Sink output format. + Format OutputSink_Format `protobuf:"varint,1,opt,name=format,proto3,enum=envoy.config.tap.v3.OutputSink_Format" json:"format,omitempty"` + // Types that are assignable to OutputSinkType: + // + // *OutputSink_StreamingAdmin + // *OutputSink_FilePerTap + // *OutputSink_StreamingGrpc + // *OutputSink_BufferedAdmin + OutputSinkType isOutputSink_OutputSinkType `protobuf_oneof:"output_sink_type"` +} + +func (x *OutputSink) Reset() { + *x = OutputSink{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OutputSink) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutputSink) ProtoMessage() {} + +func (x *OutputSink) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutputSink.ProtoReflect.Descriptor instead. +func (*OutputSink) Descriptor() ([]byte, []int) { + return file_envoy_config_tap_v3_common_proto_rawDescGZIP(), []int{5} +} + +func (x *OutputSink) GetFormat() OutputSink_Format { + if x != nil { + return x.Format + } + return OutputSink_JSON_BODY_AS_BYTES +} + +func (m *OutputSink) GetOutputSinkType() isOutputSink_OutputSinkType { + if m != nil { + return m.OutputSinkType + } + return nil +} + +func (x *OutputSink) GetStreamingAdmin() *StreamingAdminSink { + if x, ok := x.GetOutputSinkType().(*OutputSink_StreamingAdmin); ok { + return x.StreamingAdmin + } + return nil +} + +func (x *OutputSink) GetFilePerTap() *FilePerTapSink { + if x, ok := x.GetOutputSinkType().(*OutputSink_FilePerTap); ok { + return x.FilePerTap + } + return nil +} + +func (x *OutputSink) GetStreamingGrpc() *StreamingGrpcSink { + if x, ok := x.GetOutputSinkType().(*OutputSink_StreamingGrpc); ok { + return x.StreamingGrpc + } + return nil +} + +func (x *OutputSink) GetBufferedAdmin() *BufferedAdminSink { + if x, ok := x.GetOutputSinkType().(*OutputSink_BufferedAdmin); ok { + return x.BufferedAdmin + } + return nil +} + +type isOutputSink_OutputSinkType interface { + isOutputSink_OutputSinkType() +} + +type OutputSink_StreamingAdmin struct { + // Tap output will be streamed out the :http:post:`/tap` admin endpoint. + // + // .. attention:: + // + // It is only allowed to specify the streaming admin output sink if the tap is being + // configured from the :http:post:`/tap` admin endpoint. Thus, if an extension has + // been configured to receive tap configuration from some other source (e.g., static + // file, XDS, etc.) configuring the streaming admin output type will fail. + StreamingAdmin *StreamingAdminSink `protobuf:"bytes,2,opt,name=streaming_admin,json=streamingAdmin,proto3,oneof"` +} + +type OutputSink_FilePerTap struct { + // Tap output will be written to a file per tap sink. + FilePerTap *FilePerTapSink `protobuf:"bytes,3,opt,name=file_per_tap,json=filePerTap,proto3,oneof"` +} + +type OutputSink_StreamingGrpc struct { + // [#not-implemented-hide:] + // GrpcService to stream data to. The format argument must be PROTO_BINARY. + // [#comment: TODO(samflattery): remove cleanup in uber_per_filter.cc once implemented] + StreamingGrpc *StreamingGrpcSink `protobuf:"bytes,4,opt,name=streaming_grpc,json=streamingGrpc,proto3,oneof"` +} + +type OutputSink_BufferedAdmin struct { + // Tap output will be buffered in a single block before flushing to the :http:post:`/tap` admin endpoint + // + // .. attention:: + // + // It is only allowed to specify the buffered admin output sink if the tap is being + // configured from the :http:post:`/tap` admin endpoint. Thus, if an extension has + // been configured to receive tap configuration from some other source (e.g., static + // file, XDS, etc.) configuring the buffered admin output type will fail. + BufferedAdmin *BufferedAdminSink `protobuf:"bytes,5,opt,name=buffered_admin,json=bufferedAdmin,proto3,oneof"` +} + +func (*OutputSink_StreamingAdmin) isOutputSink_OutputSinkType() {} + +func (*OutputSink_FilePerTap) isOutputSink_OutputSinkType() {} + +func (*OutputSink_StreamingGrpc) isOutputSink_OutputSinkType() {} + +func (*OutputSink_BufferedAdmin) isOutputSink_OutputSinkType() {} + +// Streaming admin sink configuration. +type StreamingAdminSink struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StreamingAdminSink) Reset() { + *x = StreamingAdminSink{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamingAdminSink) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamingAdminSink) ProtoMessage() {} + +func (x *StreamingAdminSink) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamingAdminSink.ProtoReflect.Descriptor instead. +func (*StreamingAdminSink) Descriptor() ([]byte, []int) { + return file_envoy_config_tap_v3_common_proto_rawDescGZIP(), []int{6} +} + +// BufferedAdminSink configures a tap output to collect traces without returning them until +// one of multiple criteria are satisfied. +// Similar to StreamingAdminSink, it is only allowed to specify the buffered admin output +// sink if the tap is being configured from the “/tap“ admin endpoint. +type BufferedAdminSink struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Stop collecting traces when the specified number are collected. + // If other criteria for ending collection are reached first, this value will not be used. + MaxTraces uint64 `protobuf:"varint,1,opt,name=max_traces,json=maxTraces,proto3" json:"max_traces,omitempty"` + // Acts as a fallback to prevent the client from waiting for long periods of time. + // After timeout has occurred, a buffer flush will be triggered, returning the traces buffered so far. + // This may result in returning fewer traces than were requested, and in the case that no traces are + // buffered during this time, no traces will be returned. + // Specifying 0 for the timeout value (or not specifying a value at all) indicates an infinite timeout. + Timeout *durationpb.Duration `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"` +} + +func (x *BufferedAdminSink) Reset() { + *x = BufferedAdminSink{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BufferedAdminSink) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BufferedAdminSink) ProtoMessage() {} + +func (x *BufferedAdminSink) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BufferedAdminSink.ProtoReflect.Descriptor instead. +func (*BufferedAdminSink) Descriptor() ([]byte, []int) { + return file_envoy_config_tap_v3_common_proto_rawDescGZIP(), []int{7} +} + +func (x *BufferedAdminSink) GetMaxTraces() uint64 { + if x != nil { + return x.MaxTraces + } + return 0 +} + +func (x *BufferedAdminSink) GetTimeout() *durationpb.Duration { + if x != nil { + return x.Timeout + } + return nil +} + +// The file per tap sink outputs a discrete file for every tapped stream. +type FilePerTapSink struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Path prefix. The output file will be of the form _.pb, where is an + // identifier distinguishing the recorded trace for stream instances (the Envoy + // connection ID, HTTP stream ID, etc.). + PathPrefix string `protobuf:"bytes,1,opt,name=path_prefix,json=pathPrefix,proto3" json:"path_prefix,omitempty"` +} + +func (x *FilePerTapSink) Reset() { + *x = FilePerTapSink{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilePerTapSink) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilePerTapSink) ProtoMessage() {} + +func (x *FilePerTapSink) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FilePerTapSink.ProtoReflect.Descriptor instead. +func (*FilePerTapSink) Descriptor() ([]byte, []int) { + return file_envoy_config_tap_v3_common_proto_rawDescGZIP(), []int{8} +} + +func (x *FilePerTapSink) GetPathPrefix() string { + if x != nil { + return x.PathPrefix + } + return "" +} + +// [#not-implemented-hide:] Streaming gRPC sink configuration sends the taps to an external gRPC +// server. +type StreamingGrpcSink struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Opaque identifier, that will be sent back to the streaming grpc server. + TapId string `protobuf:"bytes,1,opt,name=tap_id,json=tapId,proto3" json:"tap_id,omitempty"` + // The gRPC server that hosts the Tap Sink Service. + GrpcService *v31.GrpcService `protobuf:"bytes,2,opt,name=grpc_service,json=grpcService,proto3" json:"grpc_service,omitempty"` +} + +func (x *StreamingGrpcSink) Reset() { + *x = StreamingGrpcSink{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamingGrpcSink) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamingGrpcSink) ProtoMessage() {} + +func (x *StreamingGrpcSink) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamingGrpcSink.ProtoReflect.Descriptor instead. +func (*StreamingGrpcSink) Descriptor() ([]byte, []int) { + return file_envoy_config_tap_v3_common_proto_rawDescGZIP(), []int{9} +} + +func (x *StreamingGrpcSink) GetTapId() string { + if x != nil { + return x.TapId + } + return "" +} + +func (x *StreamingGrpcSink) GetGrpcService() *v31.GrpcService { + if x != nil { + return x.GrpcService + } + return nil +} + +// A set of match configurations used for logical operations. +type MatchPredicate_MatchSet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of rules that make up the set. + Rules []*MatchPredicate `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` +} + +func (x *MatchPredicate_MatchSet) Reset() { + *x = MatchPredicate_MatchSet{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MatchPredicate_MatchSet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MatchPredicate_MatchSet) ProtoMessage() {} + +func (x *MatchPredicate_MatchSet) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MatchPredicate_MatchSet.ProtoReflect.Descriptor instead. +func (*MatchPredicate_MatchSet) Descriptor() ([]byte, []int) { + return file_envoy_config_tap_v3_common_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *MatchPredicate_MatchSet) GetRules() []*MatchPredicate { + if x != nil { + return x.Rules + } + return nil +} + +type HttpGenericBodyMatch_GenericTextMatch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Rule: + // + // *HttpGenericBodyMatch_GenericTextMatch_StringMatch + // *HttpGenericBodyMatch_GenericTextMatch_BinaryMatch + Rule isHttpGenericBodyMatch_GenericTextMatch_Rule `protobuf_oneof:"rule"` +} + +func (x *HttpGenericBodyMatch_GenericTextMatch) Reset() { + *x = HttpGenericBodyMatch_GenericTextMatch{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpGenericBodyMatch_GenericTextMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpGenericBodyMatch_GenericTextMatch) ProtoMessage() {} + +func (x *HttpGenericBodyMatch_GenericTextMatch) ProtoReflect() protoreflect.Message { + mi := &file_envoy_config_tap_v3_common_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpGenericBodyMatch_GenericTextMatch.ProtoReflect.Descriptor instead. +func (*HttpGenericBodyMatch_GenericTextMatch) Descriptor() ([]byte, []int) { + return file_envoy_config_tap_v3_common_proto_rawDescGZIP(), []int{3, 0} +} + +func (m *HttpGenericBodyMatch_GenericTextMatch) GetRule() isHttpGenericBodyMatch_GenericTextMatch_Rule { + if m != nil { + return m.Rule + } + return nil +} + +func (x *HttpGenericBodyMatch_GenericTextMatch) GetStringMatch() string { + if x, ok := x.GetRule().(*HttpGenericBodyMatch_GenericTextMatch_StringMatch); ok { + return x.StringMatch + } + return "" +} + +func (x *HttpGenericBodyMatch_GenericTextMatch) GetBinaryMatch() []byte { + if x, ok := x.GetRule().(*HttpGenericBodyMatch_GenericTextMatch_BinaryMatch); ok { + return x.BinaryMatch + } + return nil +} + +type isHttpGenericBodyMatch_GenericTextMatch_Rule interface { + isHttpGenericBodyMatch_GenericTextMatch_Rule() +} + +type HttpGenericBodyMatch_GenericTextMatch_StringMatch struct { + // Text string to be located in HTTP body. + StringMatch string `protobuf:"bytes,1,opt,name=string_match,json=stringMatch,proto3,oneof"` +} + +type HttpGenericBodyMatch_GenericTextMatch_BinaryMatch struct { + // Sequence of bytes to be located in HTTP body. + BinaryMatch []byte `protobuf:"bytes,2,opt,name=binary_match,json=binaryMatch,proto3,oneof"` +} + +func (*HttpGenericBodyMatch_GenericTextMatch_StringMatch) isHttpGenericBodyMatch_GenericTextMatch_Rule() { +} + +func (*HttpGenericBodyMatch_GenericTextMatch_BinaryMatch) isHttpGenericBodyMatch_GenericTextMatch_Rule() { +} + +var File_envoy_config_tap_v3_common_proto protoreflect.FileDescriptor + +var file_envoy_config_tap_v3_common_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, + 0x61, 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x13, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x70, + 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, + 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0xf5, 0x02, + 0x0a, 0x09, 0x54, 0x61, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x53, 0x0a, 0x0c, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, + 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, + 0x33, 0x2e, 0x30, 0x52, 0x0b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x44, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, + 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x50, 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, + 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x6f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4f, 0x0a, 0x0b, 0x74, 0x61, 0x70, 0x5f, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x74, + 0x61, 0x70, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, + 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x61, 0x70, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xe6, 0x08, 0x0a, 0x0e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, + 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x49, 0x0a, 0x08, 0x6f, 0x72, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, + 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x07, 0x6f, 0x72, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x12, 0x4b, 0x0a, 0x09, 0x61, 0x6e, 0x64, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x08, 0x61, 0x6e, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x12, 0x42, 0x0a, 0x09, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, + 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x08, 0x6e, 0x6f, 0x74, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x12, 0x26, 0x0a, 0x09, 0x61, 0x6e, 0x79, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, + 0x48, 0x00, 0x52, 0x08, 0x61, 0x6e, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x64, 0x0a, 0x1a, + 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x17, 0x68, 0x74, 0x74, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x12, 0x66, 0x0a, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, + 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, + 0x52, 0x18, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x72, 0x61, + 0x69, 0x6c, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x66, 0x0a, 0x1b, 0x68, 0x74, + 0x74, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, + 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x18, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x12, 0x68, 0x0a, 0x1c, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x5f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x48, + 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, + 0x00, 0x52, 0x19, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, + 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x71, 0x0a, 0x1f, + 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x69, 0x63, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x48, 0x00, 0x52, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, + 0x73, 0x0a, 0x20, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, + 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x1c, 0x68, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x1a, 0x89, 0x01, 0x0a, 0x08, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, + 0x74, 0x12, 0x43, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x02, 0x52, + 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, + 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, + 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x42, 0x0b, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x85, + 0x01, 0x0a, 0x10, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x12, 0x3e, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0x96, 0x02, 0x0a, 0x14, 0x48, 0x74, 0x74, 0x70, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, + 0x1f, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x12, 0x60, 0x0a, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x69, 0x63, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x69, 0x63, 0x54, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x73, 0x1a, 0x7b, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x54, 0x65, 0x78, + 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x12, 0x2c, 0x0a, 0x0c, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x7a, + 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x42, 0x0b, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, + 0xc0, 0x02, 0x0a, 0x0c, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x41, 0x0a, 0x05, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, + 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x53, 0x69, 0x6e, 0x6b, + 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x08, 0x01, 0x10, 0x01, 0x52, 0x05, 0x73, 0x69, + 0x6e, 0x6b, 0x73, 0x12, 0x4f, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, + 0x72, 0x65, 0x64, 0x5f, 0x72, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x12, 0x6d, 0x61, 0x78, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, 0x52, 0x78, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x75, 0x66, 0x66, + 0x65, 0x72, 0x65, 0x64, 0x5f, 0x74, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, 0x54, 0x78, + 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, + 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x69, 0x6e, 0x67, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x22, 0xdb, 0x04, 0x0a, 0x0a, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x53, 0x69, 0x6e, + 0x6b, 0x12, 0x48, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x53, 0x69, + 0x6e, 0x6b, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, + 0x02, 0x10, 0x01, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x52, 0x0a, 0x0f, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x69, 0x6e, 0x6b, 0x48, 0x00, 0x52, + 0x0e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, + 0x47, 0x0a, 0x0c, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x70, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x65, + 0x50, 0x65, 0x72, 0x54, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x6b, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x69, + 0x6c, 0x65, 0x50, 0x65, 0x72, 0x54, 0x61, 0x70, 0x12, 0x4f, 0x0a, 0x0e, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, + 0x47, 0x72, 0x70, 0x63, 0x53, 0x69, 0x6e, 0x6b, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x70, 0x63, 0x12, 0x4f, 0x0a, 0x0e, 0x62, 0x75, 0x66, + 0x66, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, + 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x69, 0x6e, 0x6b, 0x48, 0x00, 0x52, 0x0d, 0x62, 0x75, 0x66, + 0x66, 0x65, 0x72, 0x65, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x7e, 0x0a, 0x06, 0x46, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x12, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x4f, 0x44, + 0x59, 0x5f, 0x41, 0x53, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, + 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x4f, 0x44, 0x59, 0x5f, 0x41, 0x53, 0x5f, 0x53, 0x54, 0x52, + 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x5f, 0x42, + 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x54, 0x4f, + 0x5f, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x5f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x44, + 0x45, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x50, 0x52, + 0x4f, 0x54, 0x4f, 0x5f, 0x54, 0x45, 0x58, 0x54, 0x10, 0x04, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, + 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x53, 0x69, 0x6e, 0x6b, 0x42, 0x17, 0x0a, 0x10, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, + 0x22, 0x49, 0x0a, 0x12, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x6d, + 0x69, 0x6e, 0x53, 0x69, 0x6e, 0x6b, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, + 0x6e, 0x67, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x69, 0x6e, 0x6b, 0x22, 0x70, 0x0a, 0x11, 0x42, + 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x69, 0x6e, 0x6b, + 0x12, 0x26, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x20, 0x00, 0x52, 0x09, 0x6d, + 0x61, 0x78, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x6b, 0x0a, + 0x0e, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x54, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x6b, 0x12, + 0x28, 0x0a, 0x0b, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x70, + 0x61, 0x74, 0x68, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, + 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x65, + 0x50, 0x65, 0x72, 0x54, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x6b, 0x22, 0xae, 0x01, 0x0a, 0x11, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x70, 0x63, 0x53, 0x69, 0x6e, 0x6b, + 0x12, 0x15, 0x0a, 0x06, 0x74, 0x61, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x74, 0x61, 0x70, 0x49, 0x64, 0x12, 0x4e, 0x0a, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x5f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, + 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x69, 0x6e, 0x67, 0x47, 0x72, 0x70, 0x63, 0x53, 0x69, 0x6e, 0x6b, 0x42, 0x7c, 0x0a, 0x21, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, + 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x61, 0x70, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_config_tap_v3_common_proto_rawDescOnce sync.Once + file_envoy_config_tap_v3_common_proto_rawDescData = file_envoy_config_tap_v3_common_proto_rawDesc +) + +func file_envoy_config_tap_v3_common_proto_rawDescGZIP() []byte { + file_envoy_config_tap_v3_common_proto_rawDescOnce.Do(func() { + file_envoy_config_tap_v3_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_config_tap_v3_common_proto_rawDescData) + }) + return file_envoy_config_tap_v3_common_proto_rawDescData +} + +var file_envoy_config_tap_v3_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_config_tap_v3_common_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_envoy_config_tap_v3_common_proto_goTypes = []interface{}{ + (OutputSink_Format)(0), // 0: envoy.config.tap.v3.OutputSink.Format + (*TapConfig)(nil), // 1: envoy.config.tap.v3.TapConfig + (*MatchPredicate)(nil), // 2: envoy.config.tap.v3.MatchPredicate + (*HttpHeadersMatch)(nil), // 3: envoy.config.tap.v3.HttpHeadersMatch + (*HttpGenericBodyMatch)(nil), // 4: envoy.config.tap.v3.HttpGenericBodyMatch + (*OutputConfig)(nil), // 5: envoy.config.tap.v3.OutputConfig + (*OutputSink)(nil), // 6: envoy.config.tap.v3.OutputSink + (*StreamingAdminSink)(nil), // 7: envoy.config.tap.v3.StreamingAdminSink + (*BufferedAdminSink)(nil), // 8: envoy.config.tap.v3.BufferedAdminSink + (*FilePerTapSink)(nil), // 9: envoy.config.tap.v3.FilePerTapSink + (*StreamingGrpcSink)(nil), // 10: envoy.config.tap.v3.StreamingGrpcSink + (*MatchPredicate_MatchSet)(nil), // 11: envoy.config.tap.v3.MatchPredicate.MatchSet + (*HttpGenericBodyMatch_GenericTextMatch)(nil), // 12: envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch + (*v3.MatchPredicate)(nil), // 13: envoy.config.common.matcher.v3.MatchPredicate + (*v31.RuntimeFractionalPercent)(nil), // 14: envoy.config.core.v3.RuntimeFractionalPercent + (*v32.HeaderMatcher)(nil), // 15: envoy.config.route.v3.HeaderMatcher + (*wrapperspb.UInt32Value)(nil), // 16: google.protobuf.UInt32Value + (*durationpb.Duration)(nil), // 17: google.protobuf.Duration + (*v31.GrpcService)(nil), // 18: envoy.config.core.v3.GrpcService +} +var file_envoy_config_tap_v3_common_proto_depIdxs = []int32{ + 2, // 0: envoy.config.tap.v3.TapConfig.match_config:type_name -> envoy.config.tap.v3.MatchPredicate + 13, // 1: envoy.config.tap.v3.TapConfig.match:type_name -> envoy.config.common.matcher.v3.MatchPredicate + 5, // 2: envoy.config.tap.v3.TapConfig.output_config:type_name -> envoy.config.tap.v3.OutputConfig + 14, // 3: envoy.config.tap.v3.TapConfig.tap_enabled:type_name -> envoy.config.core.v3.RuntimeFractionalPercent + 11, // 4: envoy.config.tap.v3.MatchPredicate.or_match:type_name -> envoy.config.tap.v3.MatchPredicate.MatchSet + 11, // 5: envoy.config.tap.v3.MatchPredicate.and_match:type_name -> envoy.config.tap.v3.MatchPredicate.MatchSet + 2, // 6: envoy.config.tap.v3.MatchPredicate.not_match:type_name -> envoy.config.tap.v3.MatchPredicate + 3, // 7: envoy.config.tap.v3.MatchPredicate.http_request_headers_match:type_name -> envoy.config.tap.v3.HttpHeadersMatch + 3, // 8: envoy.config.tap.v3.MatchPredicate.http_request_trailers_match:type_name -> envoy.config.tap.v3.HttpHeadersMatch + 3, // 9: envoy.config.tap.v3.MatchPredicate.http_response_headers_match:type_name -> envoy.config.tap.v3.HttpHeadersMatch + 3, // 10: envoy.config.tap.v3.MatchPredicate.http_response_trailers_match:type_name -> envoy.config.tap.v3.HttpHeadersMatch + 4, // 11: envoy.config.tap.v3.MatchPredicate.http_request_generic_body_match:type_name -> envoy.config.tap.v3.HttpGenericBodyMatch + 4, // 12: envoy.config.tap.v3.MatchPredicate.http_response_generic_body_match:type_name -> envoy.config.tap.v3.HttpGenericBodyMatch + 15, // 13: envoy.config.tap.v3.HttpHeadersMatch.headers:type_name -> envoy.config.route.v3.HeaderMatcher + 12, // 14: envoy.config.tap.v3.HttpGenericBodyMatch.patterns:type_name -> envoy.config.tap.v3.HttpGenericBodyMatch.GenericTextMatch + 6, // 15: envoy.config.tap.v3.OutputConfig.sinks:type_name -> envoy.config.tap.v3.OutputSink + 16, // 16: envoy.config.tap.v3.OutputConfig.max_buffered_rx_bytes:type_name -> google.protobuf.UInt32Value + 16, // 17: envoy.config.tap.v3.OutputConfig.max_buffered_tx_bytes:type_name -> google.protobuf.UInt32Value + 0, // 18: envoy.config.tap.v3.OutputSink.format:type_name -> envoy.config.tap.v3.OutputSink.Format + 7, // 19: envoy.config.tap.v3.OutputSink.streaming_admin:type_name -> envoy.config.tap.v3.StreamingAdminSink + 9, // 20: envoy.config.tap.v3.OutputSink.file_per_tap:type_name -> envoy.config.tap.v3.FilePerTapSink + 10, // 21: envoy.config.tap.v3.OutputSink.streaming_grpc:type_name -> envoy.config.tap.v3.StreamingGrpcSink + 8, // 22: envoy.config.tap.v3.OutputSink.buffered_admin:type_name -> envoy.config.tap.v3.BufferedAdminSink + 17, // 23: envoy.config.tap.v3.BufferedAdminSink.timeout:type_name -> google.protobuf.Duration + 18, // 24: envoy.config.tap.v3.StreamingGrpcSink.grpc_service:type_name -> envoy.config.core.v3.GrpcService + 2, // 25: envoy.config.tap.v3.MatchPredicate.MatchSet.rules:type_name -> envoy.config.tap.v3.MatchPredicate + 26, // [26:26] is the sub-list for method output_type + 26, // [26:26] is the sub-list for method input_type + 26, // [26:26] is the sub-list for extension type_name + 26, // [26:26] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name +} + +func init() { file_envoy_config_tap_v3_common_proto_init() } +func file_envoy_config_tap_v3_common_proto_init() { + if File_envoy_config_tap_v3_common_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_config_tap_v3_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TapConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_tap_v3_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MatchPredicate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_tap_v3_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpHeadersMatch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_tap_v3_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpGenericBodyMatch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_tap_v3_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OutputConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_tap_v3_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OutputSink); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_tap_v3_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamingAdminSink); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_tap_v3_common_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BufferedAdminSink); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_tap_v3_common_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FilePerTapSink); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_tap_v3_common_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamingGrpcSink); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_tap_v3_common_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MatchPredicate_MatchSet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_config_tap_v3_common_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpGenericBodyMatch_GenericTextMatch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_config_tap_v3_common_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*MatchPredicate_OrMatch)(nil), + (*MatchPredicate_AndMatch)(nil), + (*MatchPredicate_NotMatch)(nil), + (*MatchPredicate_AnyMatch)(nil), + (*MatchPredicate_HttpRequestHeadersMatch)(nil), + (*MatchPredicate_HttpRequestTrailersMatch)(nil), + (*MatchPredicate_HttpResponseHeadersMatch)(nil), + (*MatchPredicate_HttpResponseTrailersMatch)(nil), + (*MatchPredicate_HttpRequestGenericBodyMatch)(nil), + (*MatchPredicate_HttpResponseGenericBodyMatch)(nil), + } + file_envoy_config_tap_v3_common_proto_msgTypes[5].OneofWrappers = []interface{}{ + (*OutputSink_StreamingAdmin)(nil), + (*OutputSink_FilePerTap)(nil), + (*OutputSink_StreamingGrpc)(nil), + (*OutputSink_BufferedAdmin)(nil), + } + file_envoy_config_tap_v3_common_proto_msgTypes[11].OneofWrappers = []interface{}{ + (*HttpGenericBodyMatch_GenericTextMatch_StringMatch)(nil), + (*HttpGenericBodyMatch_GenericTextMatch_BinaryMatch)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_config_tap_v3_common_proto_rawDesc, + NumEnums: 1, + NumMessages: 12, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_config_tap_v3_common_proto_goTypes, + DependencyIndexes: file_envoy_config_tap_v3_common_proto_depIdxs, + EnumInfos: file_envoy_config_tap_v3_common_proto_enumTypes, + MessageInfos: file_envoy_config_tap_v3_common_proto_msgTypes, + }.Build() + File_envoy_config_tap_v3_common_proto = out.File + file_envoy_config_tap_v3_common_proto_rawDesc = nil + file_envoy_config_tap_v3_common_proto_goTypes = nil + file_envoy_config_tap_v3_common_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/config/tap/v3/common.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/config/tap/v3/common.pb.validate.go new file mode 100644 index 0000000000000..59cb811c94a16 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/config/tap/v3/common.pb.validate.go @@ -0,0 +1,2182 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/config/tap/v3/common.proto + +package tapv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on TapConfig 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 *TapConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TapConfig 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 TapConfigMultiError, or nil +// if none found. +func (m *TapConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *TapConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetMatchConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TapConfigValidationError{ + field: "MatchConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TapConfigValidationError{ + field: "MatchConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatchConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TapConfigValidationError{ + field: "MatchConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TapConfigValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TapConfigValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TapConfigValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetOutputConfig() == nil { + err := TapConfigValidationError{ + field: "OutputConfig", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetOutputConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TapConfigValidationError{ + field: "OutputConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TapConfigValidationError{ + field: "OutputConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOutputConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TapConfigValidationError{ + field: "OutputConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetTapEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TapConfigValidationError{ + field: "TapEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TapConfigValidationError{ + field: "TapEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTapEnabled()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TapConfigValidationError{ + field: "TapEnabled", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return TapConfigMultiError(errors) + } + return nil +} + +// TapConfigMultiError is an error wrapping multiple validation errors returned +// by TapConfig.ValidateAll() if the designated constraints aren't met. +type TapConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TapConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TapConfigMultiError) AllErrors() []error { return m } + +// TapConfigValidationError is the validation error returned by +// TapConfig.Validate if the designated constraints aren't met. +type TapConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TapConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TapConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TapConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TapConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TapConfigValidationError) ErrorName() string { return "TapConfigValidationError" } + +// Error satisfies the builtin error interface +func (e TapConfigValidationError) 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 %sTapConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TapConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TapConfigValidationError{} + +// Validate checks the field values on MatchPredicate 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 *MatchPredicate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MatchPredicate 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 MatchPredicateMultiError, +// or nil if none found. +func (m *MatchPredicate) ValidateAll() error { + return m.validate(true) +} + +func (m *MatchPredicate) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.Rule.(type) { + + case *MatchPredicate_OrMatch: + + if all { + switch v := interface{}(m.GetOrMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "OrMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "OrMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOrMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MatchPredicateValidationError{ + field: "OrMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *MatchPredicate_AndMatch: + + if all { + switch v := interface{}(m.GetAndMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "AndMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "AndMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAndMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MatchPredicateValidationError{ + field: "AndMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *MatchPredicate_NotMatch: + + if all { + switch v := interface{}(m.GetNotMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "NotMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "NotMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNotMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MatchPredicateValidationError{ + field: "NotMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *MatchPredicate_AnyMatch: + + if m.GetAnyMatch() != true { + err := MatchPredicateValidationError{ + field: "AnyMatch", + reason: "value must equal true", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *MatchPredicate_HttpRequestHeadersMatch: + + if all { + switch v := interface{}(m.GetHttpRequestHeadersMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestHeadersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestHeadersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpRequestHeadersMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MatchPredicateValidationError{ + field: "HttpRequestHeadersMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *MatchPredicate_HttpRequestTrailersMatch: + + if all { + switch v := interface{}(m.GetHttpRequestTrailersMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestTrailersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestTrailersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpRequestTrailersMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MatchPredicateValidationError{ + field: "HttpRequestTrailersMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *MatchPredicate_HttpResponseHeadersMatch: + + if all { + switch v := interface{}(m.GetHttpResponseHeadersMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseHeadersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseHeadersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpResponseHeadersMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MatchPredicateValidationError{ + field: "HttpResponseHeadersMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *MatchPredicate_HttpResponseTrailersMatch: + + if all { + switch v := interface{}(m.GetHttpResponseTrailersMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseTrailersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseTrailersMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpResponseTrailersMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MatchPredicateValidationError{ + field: "HttpResponseTrailersMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *MatchPredicate_HttpRequestGenericBodyMatch: + + if all { + switch v := interface{}(m.GetHttpRequestGenericBodyMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestGenericBodyMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpRequestGenericBodyMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpRequestGenericBodyMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MatchPredicateValidationError{ + field: "HttpRequestGenericBodyMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *MatchPredicate_HttpResponseGenericBodyMatch: + + if all { + switch v := interface{}(m.GetHttpResponseGenericBodyMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseGenericBodyMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicateValidationError{ + field: "HttpResponseGenericBodyMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpResponseGenericBodyMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MatchPredicateValidationError{ + field: "HttpResponseGenericBodyMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := MatchPredicateValidationError{ + field: "Rule", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return MatchPredicateMultiError(errors) + } + return nil +} + +// MatchPredicateMultiError is an error wrapping multiple validation errors +// returned by MatchPredicate.ValidateAll() if the designated constraints +// aren't met. +type MatchPredicateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MatchPredicateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MatchPredicateMultiError) AllErrors() []error { return m } + +// MatchPredicateValidationError is the validation error returned by +// MatchPredicate.Validate if the designated constraints aren't met. +type MatchPredicateValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MatchPredicateValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MatchPredicateValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MatchPredicateValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MatchPredicateValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MatchPredicateValidationError) ErrorName() string { return "MatchPredicateValidationError" } + +// Error satisfies the builtin error interface +func (e MatchPredicateValidationError) 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 %sMatchPredicate.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MatchPredicateValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MatchPredicateValidationError{} + +// Validate checks the field values on HttpHeadersMatch 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 *HttpHeadersMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpHeadersMatch 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 +// HttpHeadersMatchMultiError, or nil if none found. +func (m *HttpHeadersMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpHeadersMatch) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetHeaders() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpHeadersMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpHeadersMatchValidationError{ + field: fmt.Sprintf("Headers[%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 HttpHeadersMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return HttpHeadersMatchMultiError(errors) + } + return nil +} + +// HttpHeadersMatchMultiError is an error wrapping multiple validation errors +// returned by HttpHeadersMatch.ValidateAll() if the designated constraints +// aren't met. +type HttpHeadersMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpHeadersMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpHeadersMatchMultiError) AllErrors() []error { return m } + +// HttpHeadersMatchValidationError is the validation error returned by +// HttpHeadersMatch.Validate if the designated constraints aren't met. +type HttpHeadersMatchValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpHeadersMatchValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpHeadersMatchValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpHeadersMatchValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpHeadersMatchValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpHeadersMatchValidationError) ErrorName() string { return "HttpHeadersMatchValidationError" } + +// Error satisfies the builtin error interface +func (e HttpHeadersMatchValidationError) 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 %sHttpHeadersMatch.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpHeadersMatchValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpHeadersMatchValidationError{} + +// Validate checks the field values on HttpGenericBodyMatch 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 *HttpGenericBodyMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpGenericBodyMatch 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 +// HttpGenericBodyMatchMultiError, or nil if none found. +func (m *HttpGenericBodyMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpGenericBodyMatch) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for BytesLimit + + if len(m.GetPatterns()) < 1 { + err := HttpGenericBodyMatchValidationError{ + field: "Patterns", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetPatterns() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpGenericBodyMatchValidationError{ + field: fmt.Sprintf("Patterns[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpGenericBodyMatchValidationError{ + field: fmt.Sprintf("Patterns[%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 HttpGenericBodyMatchValidationError{ + field: fmt.Sprintf("Patterns[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return HttpGenericBodyMatchMultiError(errors) + } + return nil +} + +// HttpGenericBodyMatchMultiError is an error wrapping multiple validation +// errors returned by HttpGenericBodyMatch.ValidateAll() if the designated +// constraints aren't met. +type HttpGenericBodyMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpGenericBodyMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpGenericBodyMatchMultiError) AllErrors() []error { return m } + +// HttpGenericBodyMatchValidationError is the validation error returned by +// HttpGenericBodyMatch.Validate if the designated constraints aren't met. +type HttpGenericBodyMatchValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpGenericBodyMatchValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpGenericBodyMatchValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpGenericBodyMatchValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpGenericBodyMatchValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpGenericBodyMatchValidationError) ErrorName() string { + return "HttpGenericBodyMatchValidationError" +} + +// Error satisfies the builtin error interface +func (e HttpGenericBodyMatchValidationError) 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 %sHttpGenericBodyMatch.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpGenericBodyMatchValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpGenericBodyMatchValidationError{} + +// Validate checks the field values on OutputConfig 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 *OutputConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OutputConfig 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 OutputConfigMultiError, or +// nil if none found. +func (m *OutputConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *OutputConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetSinks()) != 1 { + err := OutputConfigValidationError{ + field: "Sinks", + reason: "value must contain exactly 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetSinks() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutputConfigValidationError{ + field: fmt.Sprintf("Sinks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutputConfigValidationError{ + field: fmt.Sprintf("Sinks[%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 OutputConfigValidationError{ + field: fmt.Sprintf("Sinks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetMaxBufferedRxBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutputConfigValidationError{ + field: "MaxBufferedRxBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutputConfigValidationError{ + field: "MaxBufferedRxBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxBufferedRxBytes()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OutputConfigValidationError{ + field: "MaxBufferedRxBytes", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetMaxBufferedTxBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutputConfigValidationError{ + field: "MaxBufferedTxBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutputConfigValidationError{ + field: "MaxBufferedTxBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxBufferedTxBytes()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OutputConfigValidationError{ + field: "MaxBufferedTxBytes", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Streaming + + if len(errors) > 0 { + return OutputConfigMultiError(errors) + } + return nil +} + +// OutputConfigMultiError is an error wrapping multiple validation errors +// returned by OutputConfig.ValidateAll() if the designated constraints aren't met. +type OutputConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OutputConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OutputConfigMultiError) AllErrors() []error { return m } + +// OutputConfigValidationError is the validation error returned by +// OutputConfig.Validate if the designated constraints aren't met. +type OutputConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OutputConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OutputConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OutputConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OutputConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OutputConfigValidationError) ErrorName() string { return "OutputConfigValidationError" } + +// Error satisfies the builtin error interface +func (e OutputConfigValidationError) 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 %sOutputConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OutputConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OutputConfigValidationError{} + +// Validate checks the field values on OutputSink 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 *OutputSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OutputSink 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 OutputSinkMultiError, or +// nil if none found. +func (m *OutputSink) ValidateAll() error { + return m.validate(true) +} + +func (m *OutputSink) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if _, ok := OutputSink_Format_name[int32(m.GetFormat())]; !ok { + err := OutputSinkValidationError{ + field: "Format", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + switch m.OutputSinkType.(type) { + + case *OutputSink_StreamingAdmin: + + if all { + switch v := interface{}(m.GetStreamingAdmin()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutputSinkValidationError{ + field: "StreamingAdmin", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutputSinkValidationError{ + field: "StreamingAdmin", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStreamingAdmin()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OutputSinkValidationError{ + field: "StreamingAdmin", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *OutputSink_FilePerTap: + + if all { + switch v := interface{}(m.GetFilePerTap()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutputSinkValidationError{ + field: "FilePerTap", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutputSinkValidationError{ + field: "FilePerTap", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilePerTap()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OutputSinkValidationError{ + field: "FilePerTap", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *OutputSink_StreamingGrpc: + + if all { + switch v := interface{}(m.GetStreamingGrpc()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutputSinkValidationError{ + field: "StreamingGrpc", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutputSinkValidationError{ + field: "StreamingGrpc", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStreamingGrpc()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OutputSinkValidationError{ + field: "StreamingGrpc", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *OutputSink_BufferedAdmin: + + if all { + switch v := interface{}(m.GetBufferedAdmin()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutputSinkValidationError{ + field: "BufferedAdmin", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutputSinkValidationError{ + field: "BufferedAdmin", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBufferedAdmin()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OutputSinkValidationError{ + field: "BufferedAdmin", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := OutputSinkValidationError{ + field: "OutputSinkType", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return OutputSinkMultiError(errors) + } + return nil +} + +// OutputSinkMultiError is an error wrapping multiple validation errors +// returned by OutputSink.ValidateAll() if the designated constraints aren't met. +type OutputSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OutputSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OutputSinkMultiError) AllErrors() []error { return m } + +// OutputSinkValidationError is the validation error returned by +// OutputSink.Validate if the designated constraints aren't met. +type OutputSinkValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OutputSinkValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OutputSinkValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OutputSinkValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OutputSinkValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OutputSinkValidationError) ErrorName() string { return "OutputSinkValidationError" } + +// Error satisfies the builtin error interface +func (e OutputSinkValidationError) 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 %sOutputSink.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OutputSinkValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OutputSinkValidationError{} + +// Validate checks the field values on StreamingAdminSink 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 *StreamingAdminSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamingAdminSink 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 +// StreamingAdminSinkMultiError, or nil if none found. +func (m *StreamingAdminSink) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamingAdminSink) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return StreamingAdminSinkMultiError(errors) + } + return nil +} + +// StreamingAdminSinkMultiError is an error wrapping multiple validation errors +// returned by StreamingAdminSink.ValidateAll() if the designated constraints +// aren't met. +type StreamingAdminSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamingAdminSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamingAdminSinkMultiError) AllErrors() []error { return m } + +// StreamingAdminSinkValidationError is the validation error returned by +// StreamingAdminSink.Validate if the designated constraints aren't met. +type StreamingAdminSinkValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StreamingAdminSinkValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StreamingAdminSinkValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StreamingAdminSinkValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StreamingAdminSinkValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StreamingAdminSinkValidationError) ErrorName() string { + return "StreamingAdminSinkValidationError" +} + +// Error satisfies the builtin error interface +func (e StreamingAdminSinkValidationError) 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 %sStreamingAdminSink.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StreamingAdminSinkValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StreamingAdminSinkValidationError{} + +// Validate checks the field values on BufferedAdminSink 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 *BufferedAdminSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BufferedAdminSink 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 +// BufferedAdminSinkMultiError, or nil if none found. +func (m *BufferedAdminSink) ValidateAll() error { + return m.validate(true) +} + +func (m *BufferedAdminSink) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetMaxTraces() <= 0 { + err := BufferedAdminSinkValidationError{ + field: "MaxTraces", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BufferedAdminSinkValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BufferedAdminSinkValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BufferedAdminSinkValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return BufferedAdminSinkMultiError(errors) + } + return nil +} + +// BufferedAdminSinkMultiError is an error wrapping multiple validation errors +// returned by BufferedAdminSink.ValidateAll() if the designated constraints +// aren't met. +type BufferedAdminSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BufferedAdminSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BufferedAdminSinkMultiError) AllErrors() []error { return m } + +// BufferedAdminSinkValidationError is the validation error returned by +// BufferedAdminSink.Validate if the designated constraints aren't met. +type BufferedAdminSinkValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BufferedAdminSinkValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BufferedAdminSinkValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BufferedAdminSinkValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BufferedAdminSinkValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BufferedAdminSinkValidationError) ErrorName() string { + return "BufferedAdminSinkValidationError" +} + +// Error satisfies the builtin error interface +func (e BufferedAdminSinkValidationError) 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 %sBufferedAdminSink.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BufferedAdminSinkValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BufferedAdminSinkValidationError{} + +// Validate checks the field values on FilePerTapSink 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 *FilePerTapSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilePerTapSink 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 FilePerTapSinkMultiError, +// or nil if none found. +func (m *FilePerTapSink) ValidateAll() error { + return m.validate(true) +} + +func (m *FilePerTapSink) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetPathPrefix()) < 1 { + err := FilePerTapSinkValidationError{ + field: "PathPrefix", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return FilePerTapSinkMultiError(errors) + } + return nil +} + +// FilePerTapSinkMultiError is an error wrapping multiple validation errors +// returned by FilePerTapSink.ValidateAll() if the designated constraints +// aren't met. +type FilePerTapSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilePerTapSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilePerTapSinkMultiError) AllErrors() []error { return m } + +// FilePerTapSinkValidationError is the validation error returned by +// FilePerTapSink.Validate if the designated constraints aren't met. +type FilePerTapSinkValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FilePerTapSinkValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FilePerTapSinkValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FilePerTapSinkValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FilePerTapSinkValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FilePerTapSinkValidationError) ErrorName() string { return "FilePerTapSinkValidationError" } + +// Error satisfies the builtin error interface +func (e FilePerTapSinkValidationError) 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 %sFilePerTapSink.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FilePerTapSinkValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FilePerTapSinkValidationError{} + +// Validate checks the field values on StreamingGrpcSink 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 *StreamingGrpcSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamingGrpcSink 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 +// StreamingGrpcSinkMultiError, or nil if none found. +func (m *StreamingGrpcSink) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamingGrpcSink) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for TapId + + if m.GetGrpcService() == nil { + err := StreamingGrpcSinkValidationError{ + field: "GrpcService", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamingGrpcSinkValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamingGrpcSinkValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StreamingGrpcSinkValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return StreamingGrpcSinkMultiError(errors) + } + return nil +} + +// StreamingGrpcSinkMultiError is an error wrapping multiple validation errors +// returned by StreamingGrpcSink.ValidateAll() if the designated constraints +// aren't met. +type StreamingGrpcSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamingGrpcSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamingGrpcSinkMultiError) AllErrors() []error { return m } + +// StreamingGrpcSinkValidationError is the validation error returned by +// StreamingGrpcSink.Validate if the designated constraints aren't met. +type StreamingGrpcSinkValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StreamingGrpcSinkValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StreamingGrpcSinkValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StreamingGrpcSinkValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StreamingGrpcSinkValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StreamingGrpcSinkValidationError) ErrorName() string { + return "StreamingGrpcSinkValidationError" +} + +// Error satisfies the builtin error interface +func (e StreamingGrpcSinkValidationError) 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 %sStreamingGrpcSink.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StreamingGrpcSinkValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StreamingGrpcSinkValidationError{} + +// Validate checks the field values on MatchPredicate_MatchSet 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 *MatchPredicate_MatchSet) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MatchPredicate_MatchSet 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 +// MatchPredicate_MatchSetMultiError, or nil if none found. +func (m *MatchPredicate_MatchSet) ValidateAll() error { + return m.validate(true) +} + +func (m *MatchPredicate_MatchSet) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetRules()) < 2 { + err := MatchPredicate_MatchSetValidationError{ + field: "Rules", + reason: "value must contain at least 2 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetRules() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchPredicate_MatchSetValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchPredicate_MatchSetValidationError{ + field: fmt.Sprintf("Rules[%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 MatchPredicate_MatchSetValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return MatchPredicate_MatchSetMultiError(errors) + } + return nil +} + +// MatchPredicate_MatchSetMultiError is an error wrapping multiple validation +// errors returned by MatchPredicate_MatchSet.ValidateAll() if the designated +// constraints aren't met. +type MatchPredicate_MatchSetMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MatchPredicate_MatchSetMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MatchPredicate_MatchSetMultiError) AllErrors() []error { return m } + +// MatchPredicate_MatchSetValidationError is the validation error returned by +// MatchPredicate_MatchSet.Validate if the designated constraints aren't met. +type MatchPredicate_MatchSetValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MatchPredicate_MatchSetValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MatchPredicate_MatchSetValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MatchPredicate_MatchSetValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MatchPredicate_MatchSetValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MatchPredicate_MatchSetValidationError) ErrorName() string { + return "MatchPredicate_MatchSetValidationError" +} + +// Error satisfies the builtin error interface +func (e MatchPredicate_MatchSetValidationError) 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 %sMatchPredicate_MatchSet.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MatchPredicate_MatchSetValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MatchPredicate_MatchSetValidationError{} + +// Validate checks the field values on HttpGenericBodyMatch_GenericTextMatch +// 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 *HttpGenericBodyMatch_GenericTextMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpGenericBodyMatch_GenericTextMatch +// 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 +// HttpGenericBodyMatch_GenericTextMatchMultiError, or nil if none found. +func (m *HttpGenericBodyMatch_GenericTextMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpGenericBodyMatch_GenericTextMatch) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.Rule.(type) { + + case *HttpGenericBodyMatch_GenericTextMatch_StringMatch: + + if utf8.RuneCountInString(m.GetStringMatch()) < 1 { + err := HttpGenericBodyMatch_GenericTextMatchValidationError{ + field: "StringMatch", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *HttpGenericBodyMatch_GenericTextMatch_BinaryMatch: + + if len(m.GetBinaryMatch()) < 1 { + err := HttpGenericBodyMatch_GenericTextMatchValidationError{ + field: "BinaryMatch", + reason: "value length must be at least 1 bytes", + } + if !all { + return err + } + errors = append(errors, err) + } + + default: + err := HttpGenericBodyMatch_GenericTextMatchValidationError{ + field: "Rule", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return HttpGenericBodyMatch_GenericTextMatchMultiError(errors) + } + return nil +} + +// HttpGenericBodyMatch_GenericTextMatchMultiError is an error wrapping +// multiple validation errors returned by +// HttpGenericBodyMatch_GenericTextMatch.ValidateAll() if the designated +// constraints aren't met. +type HttpGenericBodyMatch_GenericTextMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpGenericBodyMatch_GenericTextMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpGenericBodyMatch_GenericTextMatchMultiError) AllErrors() []error { return m } + +// HttpGenericBodyMatch_GenericTextMatchValidationError is the validation error +// returned by HttpGenericBodyMatch_GenericTextMatch.Validate if the +// designated constraints aren't met. +type HttpGenericBodyMatch_GenericTextMatchValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpGenericBodyMatch_GenericTextMatchValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpGenericBodyMatch_GenericTextMatchValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpGenericBodyMatch_GenericTextMatchValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpGenericBodyMatch_GenericTextMatchValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpGenericBodyMatch_GenericTextMatchValidationError) ErrorName() string { + return "HttpGenericBodyMatch_GenericTextMatchValidationError" +} + +// Error satisfies the builtin error interface +func (e HttpGenericBodyMatch_GenericTextMatchValidationError) 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 %sHttpGenericBodyMatch_GenericTextMatch.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpGenericBodyMatch_GenericTextMatchValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpGenericBodyMatch_GenericTextMatchValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/data/accesslog/v3/accesslog.pb.go b/vendor/github.com/cilium/proxy/go/envoy/data/accesslog/v3/accesslog.pb.go new file mode 100644 index 0000000000000..97132fe4787e6 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/data/accesslog/v3/accesslog.pb.go @@ -0,0 +1,2233 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/data/accesslog/v3/accesslog.proto + +package accesslogv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// HTTP version +type HTTPAccessLogEntry_HTTPVersion int32 + +const ( + HTTPAccessLogEntry_PROTOCOL_UNSPECIFIED HTTPAccessLogEntry_HTTPVersion = 0 + HTTPAccessLogEntry_HTTP10 HTTPAccessLogEntry_HTTPVersion = 1 + HTTPAccessLogEntry_HTTP11 HTTPAccessLogEntry_HTTPVersion = 2 + HTTPAccessLogEntry_HTTP2 HTTPAccessLogEntry_HTTPVersion = 3 + HTTPAccessLogEntry_HTTP3 HTTPAccessLogEntry_HTTPVersion = 4 +) + +// Enum value maps for HTTPAccessLogEntry_HTTPVersion. +var ( + HTTPAccessLogEntry_HTTPVersion_name = map[int32]string{ + 0: "PROTOCOL_UNSPECIFIED", + 1: "HTTP10", + 2: "HTTP11", + 3: "HTTP2", + 4: "HTTP3", + } + HTTPAccessLogEntry_HTTPVersion_value = map[string]int32{ + "PROTOCOL_UNSPECIFIED": 0, + "HTTP10": 1, + "HTTP11": 2, + "HTTP2": 3, + "HTTP3": 4, + } +) + +func (x HTTPAccessLogEntry_HTTPVersion) Enum() *HTTPAccessLogEntry_HTTPVersion { + p := new(HTTPAccessLogEntry_HTTPVersion) + *p = x + return p +} + +func (x HTTPAccessLogEntry_HTTPVersion) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HTTPAccessLogEntry_HTTPVersion) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_data_accesslog_v3_accesslog_proto_enumTypes[0].Descriptor() +} + +func (HTTPAccessLogEntry_HTTPVersion) Type() protoreflect.EnumType { + return &file_envoy_data_accesslog_v3_accesslog_proto_enumTypes[0] +} + +func (x HTTPAccessLogEntry_HTTPVersion) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HTTPAccessLogEntry_HTTPVersion.Descriptor instead. +func (HTTPAccessLogEntry_HTTPVersion) EnumDescriptor() ([]byte, []int) { + return file_envoy_data_accesslog_v3_accesslog_proto_rawDescGZIP(), []int{1, 0} +} + +// Reasons why the request was unauthorized +type ResponseFlags_Unauthorized_Reason int32 + +const ( + ResponseFlags_Unauthorized_REASON_UNSPECIFIED ResponseFlags_Unauthorized_Reason = 0 + // The request was denied by the external authorization service. + ResponseFlags_Unauthorized_EXTERNAL_SERVICE ResponseFlags_Unauthorized_Reason = 1 +) + +// Enum value maps for ResponseFlags_Unauthorized_Reason. +var ( + ResponseFlags_Unauthorized_Reason_name = map[int32]string{ + 0: "REASON_UNSPECIFIED", + 1: "EXTERNAL_SERVICE", + } + ResponseFlags_Unauthorized_Reason_value = map[string]int32{ + "REASON_UNSPECIFIED": 0, + "EXTERNAL_SERVICE": 1, + } +) + +func (x ResponseFlags_Unauthorized_Reason) Enum() *ResponseFlags_Unauthorized_Reason { + p := new(ResponseFlags_Unauthorized_Reason) + *p = x + return p +} + +func (x ResponseFlags_Unauthorized_Reason) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ResponseFlags_Unauthorized_Reason) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_data_accesslog_v3_accesslog_proto_enumTypes[1].Descriptor() +} + +func (ResponseFlags_Unauthorized_Reason) Type() protoreflect.EnumType { + return &file_envoy_data_accesslog_v3_accesslog_proto_enumTypes[1] +} + +func (x ResponseFlags_Unauthorized_Reason) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ResponseFlags_Unauthorized_Reason.Descriptor instead. +func (ResponseFlags_Unauthorized_Reason) EnumDescriptor() ([]byte, []int) { + return file_envoy_data_accesslog_v3_accesslog_proto_rawDescGZIP(), []int{4, 0, 0} +} + +type TLSProperties_TLSVersion int32 + +const ( + TLSProperties_VERSION_UNSPECIFIED TLSProperties_TLSVersion = 0 + TLSProperties_TLSv1 TLSProperties_TLSVersion = 1 + TLSProperties_TLSv1_1 TLSProperties_TLSVersion = 2 + TLSProperties_TLSv1_2 TLSProperties_TLSVersion = 3 + TLSProperties_TLSv1_3 TLSProperties_TLSVersion = 4 +) + +// Enum value maps for TLSProperties_TLSVersion. +var ( + TLSProperties_TLSVersion_name = map[int32]string{ + 0: "VERSION_UNSPECIFIED", + 1: "TLSv1", + 2: "TLSv1_1", + 3: "TLSv1_2", + 4: "TLSv1_3", + } + TLSProperties_TLSVersion_value = map[string]int32{ + "VERSION_UNSPECIFIED": 0, + "TLSv1": 1, + "TLSv1_1": 2, + "TLSv1_2": 3, + "TLSv1_3": 4, + } +) + +func (x TLSProperties_TLSVersion) Enum() *TLSProperties_TLSVersion { + p := new(TLSProperties_TLSVersion) + *p = x + return p +} + +func (x TLSProperties_TLSVersion) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TLSProperties_TLSVersion) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_data_accesslog_v3_accesslog_proto_enumTypes[2].Descriptor() +} + +func (TLSProperties_TLSVersion) Type() protoreflect.EnumType { + return &file_envoy_data_accesslog_v3_accesslog_proto_enumTypes[2] +} + +func (x TLSProperties_TLSVersion) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TLSProperties_TLSVersion.Descriptor instead. +func (TLSProperties_TLSVersion) EnumDescriptor() ([]byte, []int) { + return file_envoy_data_accesslog_v3_accesslog_proto_rawDescGZIP(), []int{5, 0} +} + +type TCPAccessLogEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Common properties shared by all Envoy access logs. + CommonProperties *AccessLogCommon `protobuf:"bytes,1,opt,name=common_properties,json=commonProperties,proto3" json:"common_properties,omitempty"` + // Properties of the TCP connection. + ConnectionProperties *ConnectionProperties `protobuf:"bytes,2,opt,name=connection_properties,json=connectionProperties,proto3" json:"connection_properties,omitempty"` +} + +func (x *TCPAccessLogEntry) Reset() { + *x = TCPAccessLogEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TCPAccessLogEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TCPAccessLogEntry) ProtoMessage() {} + +func (x *TCPAccessLogEntry) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TCPAccessLogEntry.ProtoReflect.Descriptor instead. +func (*TCPAccessLogEntry) Descriptor() ([]byte, []int) { + return file_envoy_data_accesslog_v3_accesslog_proto_rawDescGZIP(), []int{0} +} + +func (x *TCPAccessLogEntry) GetCommonProperties() *AccessLogCommon { + if x != nil { + return x.CommonProperties + } + return nil +} + +func (x *TCPAccessLogEntry) GetConnectionProperties() *ConnectionProperties { + if x != nil { + return x.ConnectionProperties + } + return nil +} + +type HTTPAccessLogEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Common properties shared by all Envoy access logs. + CommonProperties *AccessLogCommon `protobuf:"bytes,1,opt,name=common_properties,json=commonProperties,proto3" json:"common_properties,omitempty"` + ProtocolVersion HTTPAccessLogEntry_HTTPVersion `protobuf:"varint,2,opt,name=protocol_version,json=protocolVersion,proto3,enum=envoy.data.accesslog.v3.HTTPAccessLogEntry_HTTPVersion" json:"protocol_version,omitempty"` + // Description of the incoming HTTP request. + Request *HTTPRequestProperties `protobuf:"bytes,3,opt,name=request,proto3" json:"request,omitempty"` + // Description of the outgoing HTTP response. + Response *HTTPResponseProperties `protobuf:"bytes,4,opt,name=response,proto3" json:"response,omitempty"` +} + +func (x *HTTPAccessLogEntry) Reset() { + *x = HTTPAccessLogEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HTTPAccessLogEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTTPAccessLogEntry) ProtoMessage() {} + +func (x *HTTPAccessLogEntry) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HTTPAccessLogEntry.ProtoReflect.Descriptor instead. +func (*HTTPAccessLogEntry) Descriptor() ([]byte, []int) { + return file_envoy_data_accesslog_v3_accesslog_proto_rawDescGZIP(), []int{1} +} + +func (x *HTTPAccessLogEntry) GetCommonProperties() *AccessLogCommon { + if x != nil { + return x.CommonProperties + } + return nil +} + +func (x *HTTPAccessLogEntry) GetProtocolVersion() HTTPAccessLogEntry_HTTPVersion { + if x != nil { + return x.ProtocolVersion + } + return HTTPAccessLogEntry_PROTOCOL_UNSPECIFIED +} + +func (x *HTTPAccessLogEntry) GetRequest() *HTTPRequestProperties { + if x != nil { + return x.Request + } + return nil +} + +func (x *HTTPAccessLogEntry) GetResponse() *HTTPResponseProperties { + if x != nil { + return x.Response + } + return nil +} + +// Defines fields for a connection +type ConnectionProperties struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Number of bytes received from downstream. + ReceivedBytes uint64 `protobuf:"varint,1,opt,name=received_bytes,json=receivedBytes,proto3" json:"received_bytes,omitempty"` + // Number of bytes sent to downstream. + SentBytes uint64 `protobuf:"varint,2,opt,name=sent_bytes,json=sentBytes,proto3" json:"sent_bytes,omitempty"` +} + +func (x *ConnectionProperties) Reset() { + *x = ConnectionProperties{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConnectionProperties) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConnectionProperties) ProtoMessage() {} + +func (x *ConnectionProperties) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConnectionProperties.ProtoReflect.Descriptor instead. +func (*ConnectionProperties) Descriptor() ([]byte, []int) { + return file_envoy_data_accesslog_v3_accesslog_proto_rawDescGZIP(), []int{2} +} + +func (x *ConnectionProperties) GetReceivedBytes() uint64 { + if x != nil { + return x.ReceivedBytes + } + return 0 +} + +func (x *ConnectionProperties) GetSentBytes() uint64 { + if x != nil { + return x.SentBytes + } + return 0 +} + +// Defines fields that are shared by all Envoy access logs. +// [#next-free-field: 23] +type AccessLogCommon struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // [#not-implemented-hide:] + // This field indicates the rate at which this log entry was sampled. + // Valid range is (0.0, 1.0]. + SampleRate float64 `protobuf:"fixed64,1,opt,name=sample_rate,json=sampleRate,proto3" json:"sample_rate,omitempty"` + // This field is the remote/origin address on which the request from the user was received. + // Note: This may not be the physical peer. E.g, if the remote address is inferred from for + // example the x-forwarder-for header, proxy protocol, etc. + DownstreamRemoteAddress *v3.Address `protobuf:"bytes,2,opt,name=downstream_remote_address,json=downstreamRemoteAddress,proto3" json:"downstream_remote_address,omitempty"` + // This field is the local/destination address on which the request from the user was received. + DownstreamLocalAddress *v3.Address `protobuf:"bytes,3,opt,name=downstream_local_address,json=downstreamLocalAddress,proto3" json:"downstream_local_address,omitempty"` + // If the connection is secure,S this field will contain TLS properties. + TlsProperties *TLSProperties `protobuf:"bytes,4,opt,name=tls_properties,json=tlsProperties,proto3" json:"tls_properties,omitempty"` + // The time that Envoy started servicing this request. This is effectively the time that the first + // downstream byte is received. + StartTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // Interval between the first downstream byte received and the last + // downstream byte received (i.e. time it takes to receive a request). + TimeToLastRxByte *durationpb.Duration `protobuf:"bytes,6,opt,name=time_to_last_rx_byte,json=timeToLastRxByte,proto3" json:"time_to_last_rx_byte,omitempty"` + // Interval between the first downstream byte received and the first upstream byte sent. There may + // by considerable delta between “time_to_last_rx_byte“ and this value due to filters. + // Additionally, the same caveats apply as documented in “time_to_last_downstream_tx_byte“ about + // not accounting for kernel socket buffer time, etc. + TimeToFirstUpstreamTxByte *durationpb.Duration `protobuf:"bytes,7,opt,name=time_to_first_upstream_tx_byte,json=timeToFirstUpstreamTxByte,proto3" json:"time_to_first_upstream_tx_byte,omitempty"` + // Interval between the first downstream byte received and the last upstream byte sent. There may + // by considerable delta between “time_to_last_rx_byte“ and this value due to filters. + // Additionally, the same caveats apply as documented in “time_to_last_downstream_tx_byte“ about + // not accounting for kernel socket buffer time, etc. + TimeToLastUpstreamTxByte *durationpb.Duration `protobuf:"bytes,8,opt,name=time_to_last_upstream_tx_byte,json=timeToLastUpstreamTxByte,proto3" json:"time_to_last_upstream_tx_byte,omitempty"` + // Interval between the first downstream byte received and the first upstream + // byte received (i.e. time it takes to start receiving a response). + TimeToFirstUpstreamRxByte *durationpb.Duration `protobuf:"bytes,9,opt,name=time_to_first_upstream_rx_byte,json=timeToFirstUpstreamRxByte,proto3" json:"time_to_first_upstream_rx_byte,omitempty"` + // Interval between the first downstream byte received and the last upstream + // byte received (i.e. time it takes to receive a complete response). + TimeToLastUpstreamRxByte *durationpb.Duration `protobuf:"bytes,10,opt,name=time_to_last_upstream_rx_byte,json=timeToLastUpstreamRxByte,proto3" json:"time_to_last_upstream_rx_byte,omitempty"` + // Interval between the first downstream byte received and the first downstream byte sent. + // There may be a considerable delta between the “time_to_first_upstream_rx_byte“ and this field + // due to filters. Additionally, the same caveats apply as documented in + // “time_to_last_downstream_tx_byte“ about not accounting for kernel socket buffer time, etc. + TimeToFirstDownstreamTxByte *durationpb.Duration `protobuf:"bytes,11,opt,name=time_to_first_downstream_tx_byte,json=timeToFirstDownstreamTxByte,proto3" json:"time_to_first_downstream_tx_byte,omitempty"` + // Interval between the first downstream byte received and the last downstream byte sent. + // Depending on protocol, buffering, windowing, filters, etc. there may be a considerable delta + // between “time_to_last_upstream_rx_byte“ and this field. Note also that this is an approximate + // time. In the current implementation it does not include kernel socket buffer time. In the + // current implementation it also does not include send window buffering inside the HTTP/2 codec. + // In the future it is likely that work will be done to make this duration more accurate. + TimeToLastDownstreamTxByte *durationpb.Duration `protobuf:"bytes,12,opt,name=time_to_last_downstream_tx_byte,json=timeToLastDownstreamTxByte,proto3" json:"time_to_last_downstream_tx_byte,omitempty"` + // The upstream remote/destination address that handles this exchange. This does not include + // retries. + UpstreamRemoteAddress *v3.Address `protobuf:"bytes,13,opt,name=upstream_remote_address,json=upstreamRemoteAddress,proto3" json:"upstream_remote_address,omitempty"` + // The upstream local/origin address that handles this exchange. This does not include retries. + UpstreamLocalAddress *v3.Address `protobuf:"bytes,14,opt,name=upstream_local_address,json=upstreamLocalAddress,proto3" json:"upstream_local_address,omitempty"` + // The upstream cluster that “upstream_remote_address“ belongs to. + UpstreamCluster string `protobuf:"bytes,15,opt,name=upstream_cluster,json=upstreamCluster,proto3" json:"upstream_cluster,omitempty"` + // Flags indicating occurrences during request/response processing. + ResponseFlags *ResponseFlags `protobuf:"bytes,16,opt,name=response_flags,json=responseFlags,proto3" json:"response_flags,omitempty"` + // All metadata encountered during request processing, including endpoint + // selection. + // + // This can be used to associate IDs attached to the various configurations + // used to process this request with the access log entry. For example, a + // route created from a higher level forwarding rule with some ID can place + // that ID in this field and cross reference later. It can also be used to + // determine if a canary endpoint was used or not. + Metadata *v3.Metadata `protobuf:"bytes,17,opt,name=metadata,proto3" json:"metadata,omitempty"` + // If upstream connection failed due to transport socket (e.g. TLS handshake), provides the + // failure reason from the transport socket. The format of this field depends on the configured + // upstream transport socket. Common TLS failures are in + // :ref:`TLS trouble shooting `. + UpstreamTransportFailureReason string `protobuf:"bytes,18,opt,name=upstream_transport_failure_reason,json=upstreamTransportFailureReason,proto3" json:"upstream_transport_failure_reason,omitempty"` + // The name of the route + RouteName string `protobuf:"bytes,19,opt,name=route_name,json=routeName,proto3" json:"route_name,omitempty"` + // This field is the downstream direct remote address on which the request from the user was + // received. Note: This is always the physical peer, even if the remote address is inferred from + // for example the x-forwarder-for header, proxy protocol, etc. + DownstreamDirectRemoteAddress *v3.Address `protobuf:"bytes,20,opt,name=downstream_direct_remote_address,json=downstreamDirectRemoteAddress,proto3" json:"downstream_direct_remote_address,omitempty"` + // Map of filter state in stream info that have been configured to be logged. If the filter + // state serialized to any message other than “google.protobuf.Any“ it will be packed into + // “google.protobuf.Any“. + FilterStateObjects map[string]*anypb.Any `protobuf:"bytes,21,rep,name=filter_state_objects,json=filterStateObjects,proto3" json:"filter_state_objects,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // A list of custom tags, which annotate logs with additional information. + // To configure this value, users should configure + // :ref:`custom_tags `. + CustomTags map[string]string `protobuf:"bytes,22,rep,name=custom_tags,json=customTags,proto3" json:"custom_tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *AccessLogCommon) Reset() { + *x = AccessLogCommon{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessLogCommon) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessLogCommon) ProtoMessage() {} + +func (x *AccessLogCommon) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessLogCommon.ProtoReflect.Descriptor instead. +func (*AccessLogCommon) Descriptor() ([]byte, []int) { + return file_envoy_data_accesslog_v3_accesslog_proto_rawDescGZIP(), []int{3} +} + +func (x *AccessLogCommon) GetSampleRate() float64 { + if x != nil { + return x.SampleRate + } + return 0 +} + +func (x *AccessLogCommon) GetDownstreamRemoteAddress() *v3.Address { + if x != nil { + return x.DownstreamRemoteAddress + } + return nil +} + +func (x *AccessLogCommon) GetDownstreamLocalAddress() *v3.Address { + if x != nil { + return x.DownstreamLocalAddress + } + return nil +} + +func (x *AccessLogCommon) GetTlsProperties() *TLSProperties { + if x != nil { + return x.TlsProperties + } + return nil +} + +func (x *AccessLogCommon) GetStartTime() *timestamppb.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *AccessLogCommon) GetTimeToLastRxByte() *durationpb.Duration { + if x != nil { + return x.TimeToLastRxByte + } + return nil +} + +func (x *AccessLogCommon) GetTimeToFirstUpstreamTxByte() *durationpb.Duration { + if x != nil { + return x.TimeToFirstUpstreamTxByte + } + return nil +} + +func (x *AccessLogCommon) GetTimeToLastUpstreamTxByte() *durationpb.Duration { + if x != nil { + return x.TimeToLastUpstreamTxByte + } + return nil +} + +func (x *AccessLogCommon) GetTimeToFirstUpstreamRxByte() *durationpb.Duration { + if x != nil { + return x.TimeToFirstUpstreamRxByte + } + return nil +} + +func (x *AccessLogCommon) GetTimeToLastUpstreamRxByte() *durationpb.Duration { + if x != nil { + return x.TimeToLastUpstreamRxByte + } + return nil +} + +func (x *AccessLogCommon) GetTimeToFirstDownstreamTxByte() *durationpb.Duration { + if x != nil { + return x.TimeToFirstDownstreamTxByte + } + return nil +} + +func (x *AccessLogCommon) GetTimeToLastDownstreamTxByte() *durationpb.Duration { + if x != nil { + return x.TimeToLastDownstreamTxByte + } + return nil +} + +func (x *AccessLogCommon) GetUpstreamRemoteAddress() *v3.Address { + if x != nil { + return x.UpstreamRemoteAddress + } + return nil +} + +func (x *AccessLogCommon) GetUpstreamLocalAddress() *v3.Address { + if x != nil { + return x.UpstreamLocalAddress + } + return nil +} + +func (x *AccessLogCommon) GetUpstreamCluster() string { + if x != nil { + return x.UpstreamCluster + } + return "" +} + +func (x *AccessLogCommon) GetResponseFlags() *ResponseFlags { + if x != nil { + return x.ResponseFlags + } + return nil +} + +func (x *AccessLogCommon) GetMetadata() *v3.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *AccessLogCommon) GetUpstreamTransportFailureReason() string { + if x != nil { + return x.UpstreamTransportFailureReason + } + return "" +} + +func (x *AccessLogCommon) GetRouteName() string { + if x != nil { + return x.RouteName + } + return "" +} + +func (x *AccessLogCommon) GetDownstreamDirectRemoteAddress() *v3.Address { + if x != nil { + return x.DownstreamDirectRemoteAddress + } + return nil +} + +func (x *AccessLogCommon) GetFilterStateObjects() map[string]*anypb.Any { + if x != nil { + return x.FilterStateObjects + } + return nil +} + +func (x *AccessLogCommon) GetCustomTags() map[string]string { + if x != nil { + return x.CustomTags + } + return nil +} + +// Flags indicating occurrences during request/response processing. +// [#next-free-field: 28] +type ResponseFlags struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Indicates local server healthcheck failed. + FailedLocalHealthcheck bool `protobuf:"varint,1,opt,name=failed_local_healthcheck,json=failedLocalHealthcheck,proto3" json:"failed_local_healthcheck,omitempty"` + // Indicates there was no healthy upstream. + NoHealthyUpstream bool `protobuf:"varint,2,opt,name=no_healthy_upstream,json=noHealthyUpstream,proto3" json:"no_healthy_upstream,omitempty"` + // Indicates an there was an upstream request timeout. + UpstreamRequestTimeout bool `protobuf:"varint,3,opt,name=upstream_request_timeout,json=upstreamRequestTimeout,proto3" json:"upstream_request_timeout,omitempty"` + // Indicates local codec level reset was sent on the stream. + LocalReset bool `protobuf:"varint,4,opt,name=local_reset,json=localReset,proto3" json:"local_reset,omitempty"` + // Indicates remote codec level reset was received on the stream. + UpstreamRemoteReset bool `protobuf:"varint,5,opt,name=upstream_remote_reset,json=upstreamRemoteReset,proto3" json:"upstream_remote_reset,omitempty"` + // Indicates there was a local reset by a connection pool due to an initial connection failure. + UpstreamConnectionFailure bool `protobuf:"varint,6,opt,name=upstream_connection_failure,json=upstreamConnectionFailure,proto3" json:"upstream_connection_failure,omitempty"` + // Indicates the stream was reset due to an upstream connection termination. + UpstreamConnectionTermination bool `protobuf:"varint,7,opt,name=upstream_connection_termination,json=upstreamConnectionTermination,proto3" json:"upstream_connection_termination,omitempty"` + // Indicates the stream was reset because of a resource overflow. + UpstreamOverflow bool `protobuf:"varint,8,opt,name=upstream_overflow,json=upstreamOverflow,proto3" json:"upstream_overflow,omitempty"` + // Indicates no route was found for the request. + NoRouteFound bool `protobuf:"varint,9,opt,name=no_route_found,json=noRouteFound,proto3" json:"no_route_found,omitempty"` + // Indicates that the request was delayed before proxying. + DelayInjected bool `protobuf:"varint,10,opt,name=delay_injected,json=delayInjected,proto3" json:"delay_injected,omitempty"` + // Indicates that the request was aborted with an injected error code. + FaultInjected bool `protobuf:"varint,11,opt,name=fault_injected,json=faultInjected,proto3" json:"fault_injected,omitempty"` + // Indicates that the request was rate-limited locally. + RateLimited bool `protobuf:"varint,12,opt,name=rate_limited,json=rateLimited,proto3" json:"rate_limited,omitempty"` + // Indicates if the request was deemed unauthorized and the reason for it. + UnauthorizedDetails *ResponseFlags_Unauthorized `protobuf:"bytes,13,opt,name=unauthorized_details,json=unauthorizedDetails,proto3" json:"unauthorized_details,omitempty"` + // Indicates that the request was rejected because there was an error in rate limit service. + RateLimitServiceError bool `protobuf:"varint,14,opt,name=rate_limit_service_error,json=rateLimitServiceError,proto3" json:"rate_limit_service_error,omitempty"` + // Indicates the stream was reset due to a downstream connection termination. + DownstreamConnectionTermination bool `protobuf:"varint,15,opt,name=downstream_connection_termination,json=downstreamConnectionTermination,proto3" json:"downstream_connection_termination,omitempty"` + // Indicates that the upstream retry limit was exceeded, resulting in a downstream error. + UpstreamRetryLimitExceeded bool `protobuf:"varint,16,opt,name=upstream_retry_limit_exceeded,json=upstreamRetryLimitExceeded,proto3" json:"upstream_retry_limit_exceeded,omitempty"` + // Indicates that the stream idle timeout was hit, resulting in a downstream 408. + StreamIdleTimeout bool `protobuf:"varint,17,opt,name=stream_idle_timeout,json=streamIdleTimeout,proto3" json:"stream_idle_timeout,omitempty"` + // Indicates that the request was rejected because an envoy request header failed strict + // validation. + InvalidEnvoyRequestHeaders bool `protobuf:"varint,18,opt,name=invalid_envoy_request_headers,json=invalidEnvoyRequestHeaders,proto3" json:"invalid_envoy_request_headers,omitempty"` + // Indicates there was an HTTP protocol error on the downstream request. + DownstreamProtocolError bool `protobuf:"varint,19,opt,name=downstream_protocol_error,json=downstreamProtocolError,proto3" json:"downstream_protocol_error,omitempty"` + // Indicates there was a max stream duration reached on the upstream request. + UpstreamMaxStreamDurationReached bool `protobuf:"varint,20,opt,name=upstream_max_stream_duration_reached,json=upstreamMaxStreamDurationReached,proto3" json:"upstream_max_stream_duration_reached,omitempty"` + // Indicates the response was served from a cache filter. + ResponseFromCacheFilter bool `protobuf:"varint,21,opt,name=response_from_cache_filter,json=responseFromCacheFilter,proto3" json:"response_from_cache_filter,omitempty"` + // Indicates that a filter configuration is not available. + NoFilterConfigFound bool `protobuf:"varint,22,opt,name=no_filter_config_found,json=noFilterConfigFound,proto3" json:"no_filter_config_found,omitempty"` + // Indicates that request or connection exceeded the downstream connection duration. + DurationTimeout bool `protobuf:"varint,23,opt,name=duration_timeout,json=durationTimeout,proto3" json:"duration_timeout,omitempty"` + // Indicates there was an HTTP protocol error in the upstream response. + UpstreamProtocolError bool `protobuf:"varint,24,opt,name=upstream_protocol_error,json=upstreamProtocolError,proto3" json:"upstream_protocol_error,omitempty"` + // Indicates no cluster was found for the request. + NoClusterFound bool `protobuf:"varint,25,opt,name=no_cluster_found,json=noClusterFound,proto3" json:"no_cluster_found,omitempty"` + // Indicates overload manager terminated the request. + OverloadManager bool `protobuf:"varint,26,opt,name=overload_manager,json=overloadManager,proto3" json:"overload_manager,omitempty"` + // Indicates a DNS resolution failed. + DnsResolutionFailure bool `protobuf:"varint,27,opt,name=dns_resolution_failure,json=dnsResolutionFailure,proto3" json:"dns_resolution_failure,omitempty"` +} + +func (x *ResponseFlags) Reset() { + *x = ResponseFlags{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResponseFlags) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseFlags) ProtoMessage() {} + +func (x *ResponseFlags) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseFlags.ProtoReflect.Descriptor instead. +func (*ResponseFlags) Descriptor() ([]byte, []int) { + return file_envoy_data_accesslog_v3_accesslog_proto_rawDescGZIP(), []int{4} +} + +func (x *ResponseFlags) GetFailedLocalHealthcheck() bool { + if x != nil { + return x.FailedLocalHealthcheck + } + return false +} + +func (x *ResponseFlags) GetNoHealthyUpstream() bool { + if x != nil { + return x.NoHealthyUpstream + } + return false +} + +func (x *ResponseFlags) GetUpstreamRequestTimeout() bool { + if x != nil { + return x.UpstreamRequestTimeout + } + return false +} + +func (x *ResponseFlags) GetLocalReset() bool { + if x != nil { + return x.LocalReset + } + return false +} + +func (x *ResponseFlags) GetUpstreamRemoteReset() bool { + if x != nil { + return x.UpstreamRemoteReset + } + return false +} + +func (x *ResponseFlags) GetUpstreamConnectionFailure() bool { + if x != nil { + return x.UpstreamConnectionFailure + } + return false +} + +func (x *ResponseFlags) GetUpstreamConnectionTermination() bool { + if x != nil { + return x.UpstreamConnectionTermination + } + return false +} + +func (x *ResponseFlags) GetUpstreamOverflow() bool { + if x != nil { + return x.UpstreamOverflow + } + return false +} + +func (x *ResponseFlags) GetNoRouteFound() bool { + if x != nil { + return x.NoRouteFound + } + return false +} + +func (x *ResponseFlags) GetDelayInjected() bool { + if x != nil { + return x.DelayInjected + } + return false +} + +func (x *ResponseFlags) GetFaultInjected() bool { + if x != nil { + return x.FaultInjected + } + return false +} + +func (x *ResponseFlags) GetRateLimited() bool { + if x != nil { + return x.RateLimited + } + return false +} + +func (x *ResponseFlags) GetUnauthorizedDetails() *ResponseFlags_Unauthorized { + if x != nil { + return x.UnauthorizedDetails + } + return nil +} + +func (x *ResponseFlags) GetRateLimitServiceError() bool { + if x != nil { + return x.RateLimitServiceError + } + return false +} + +func (x *ResponseFlags) GetDownstreamConnectionTermination() bool { + if x != nil { + return x.DownstreamConnectionTermination + } + return false +} + +func (x *ResponseFlags) GetUpstreamRetryLimitExceeded() bool { + if x != nil { + return x.UpstreamRetryLimitExceeded + } + return false +} + +func (x *ResponseFlags) GetStreamIdleTimeout() bool { + if x != nil { + return x.StreamIdleTimeout + } + return false +} + +func (x *ResponseFlags) GetInvalidEnvoyRequestHeaders() bool { + if x != nil { + return x.InvalidEnvoyRequestHeaders + } + return false +} + +func (x *ResponseFlags) GetDownstreamProtocolError() bool { + if x != nil { + return x.DownstreamProtocolError + } + return false +} + +func (x *ResponseFlags) GetUpstreamMaxStreamDurationReached() bool { + if x != nil { + return x.UpstreamMaxStreamDurationReached + } + return false +} + +func (x *ResponseFlags) GetResponseFromCacheFilter() bool { + if x != nil { + return x.ResponseFromCacheFilter + } + return false +} + +func (x *ResponseFlags) GetNoFilterConfigFound() bool { + if x != nil { + return x.NoFilterConfigFound + } + return false +} + +func (x *ResponseFlags) GetDurationTimeout() bool { + if x != nil { + return x.DurationTimeout + } + return false +} + +func (x *ResponseFlags) GetUpstreamProtocolError() bool { + if x != nil { + return x.UpstreamProtocolError + } + return false +} + +func (x *ResponseFlags) GetNoClusterFound() bool { + if x != nil { + return x.NoClusterFound + } + return false +} + +func (x *ResponseFlags) GetOverloadManager() bool { + if x != nil { + return x.OverloadManager + } + return false +} + +func (x *ResponseFlags) GetDnsResolutionFailure() bool { + if x != nil { + return x.DnsResolutionFailure + } + return false +} + +// Properties of a negotiated TLS connection. +// [#next-free-field: 7] +type TLSProperties struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Version of TLS that was negotiated. + TlsVersion TLSProperties_TLSVersion `protobuf:"varint,1,opt,name=tls_version,json=tlsVersion,proto3,enum=envoy.data.accesslog.v3.TLSProperties_TLSVersion" json:"tls_version,omitempty"` + // TLS cipher suite negotiated during handshake. The value is a + // four-digit hex code defined by the IANA TLS Cipher Suite Registry + // (e.g. “009C“ for “TLS_RSA_WITH_AES_128_GCM_SHA256“). + // + // Here it is expressed as an integer. + TlsCipherSuite *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=tls_cipher_suite,json=tlsCipherSuite,proto3" json:"tls_cipher_suite,omitempty"` + // SNI hostname from handshake. + TlsSniHostname string `protobuf:"bytes,3,opt,name=tls_sni_hostname,json=tlsSniHostname,proto3" json:"tls_sni_hostname,omitempty"` + // Properties of the local certificate used to negotiate TLS. + LocalCertificateProperties *TLSProperties_CertificateProperties `protobuf:"bytes,4,opt,name=local_certificate_properties,json=localCertificateProperties,proto3" json:"local_certificate_properties,omitempty"` + // Properties of the peer certificate used to negotiate TLS. + PeerCertificateProperties *TLSProperties_CertificateProperties `protobuf:"bytes,5,opt,name=peer_certificate_properties,json=peerCertificateProperties,proto3" json:"peer_certificate_properties,omitempty"` + // The TLS session ID. + TlsSessionId string `protobuf:"bytes,6,opt,name=tls_session_id,json=tlsSessionId,proto3" json:"tls_session_id,omitempty"` +} + +func (x *TLSProperties) Reset() { + *x = TLSProperties{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TLSProperties) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TLSProperties) ProtoMessage() {} + +func (x *TLSProperties) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TLSProperties.ProtoReflect.Descriptor instead. +func (*TLSProperties) Descriptor() ([]byte, []int) { + return file_envoy_data_accesslog_v3_accesslog_proto_rawDescGZIP(), []int{5} +} + +func (x *TLSProperties) GetTlsVersion() TLSProperties_TLSVersion { + if x != nil { + return x.TlsVersion + } + return TLSProperties_VERSION_UNSPECIFIED +} + +func (x *TLSProperties) GetTlsCipherSuite() *wrapperspb.UInt32Value { + if x != nil { + return x.TlsCipherSuite + } + return nil +} + +func (x *TLSProperties) GetTlsSniHostname() string { + if x != nil { + return x.TlsSniHostname + } + return "" +} + +func (x *TLSProperties) GetLocalCertificateProperties() *TLSProperties_CertificateProperties { + if x != nil { + return x.LocalCertificateProperties + } + return nil +} + +func (x *TLSProperties) GetPeerCertificateProperties() *TLSProperties_CertificateProperties { + if x != nil { + return x.PeerCertificateProperties + } + return nil +} + +func (x *TLSProperties) GetTlsSessionId() string { + if x != nil { + return x.TlsSessionId + } + return "" +} + +// [#next-free-field: 14] +type HTTPRequestProperties struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The request method (RFC 7231/2616). + RequestMethod v3.RequestMethod `protobuf:"varint,1,opt,name=request_method,json=requestMethod,proto3,enum=envoy.config.core.v3.RequestMethod" json:"request_method,omitempty"` + // The scheme portion of the incoming request URI. + Scheme string `protobuf:"bytes,2,opt,name=scheme,proto3" json:"scheme,omitempty"` + // HTTP/2 “:authority“ or HTTP/1.1 “Host“ header value. + Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` + // The port of the incoming request URI + // (unused currently, as port is composed onto authority). + Port *wrapperspb.UInt32Value `protobuf:"bytes,4,opt,name=port,proto3" json:"port,omitempty"` + // The path portion from the incoming request URI. + Path string `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"` + // Value of the “User-Agent“ request header. + UserAgent string `protobuf:"bytes,6,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"` + // Value of the “Referer“ request header. + Referer string `protobuf:"bytes,7,opt,name=referer,proto3" json:"referer,omitempty"` + // Value of the “X-Forwarded-For“ request header. + ForwardedFor string `protobuf:"bytes,8,opt,name=forwarded_for,json=forwardedFor,proto3" json:"forwarded_for,omitempty"` + // Value of the “X-Request-Id“ request header + // + // This header is used by Envoy to uniquely identify a request. + // It will be generated for all external requests and internal requests that + // do not already have a request ID. + RequestId string `protobuf:"bytes,9,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // Value of the “X-Envoy-Original-Path“ request header. + OriginalPath string `protobuf:"bytes,10,opt,name=original_path,json=originalPath,proto3" json:"original_path,omitempty"` + // Size of the HTTP request headers in bytes. + // + // This value is captured from the OSI layer 7 perspective, i.e. it does not + // include overhead from framing or encoding at other networking layers. + RequestHeadersBytes uint64 `protobuf:"varint,11,opt,name=request_headers_bytes,json=requestHeadersBytes,proto3" json:"request_headers_bytes,omitempty"` + // Size of the HTTP request body in bytes. + // + // This value is captured from the OSI layer 7 perspective, i.e. it does not + // include overhead from framing or encoding at other networking layers. + RequestBodyBytes uint64 `protobuf:"varint,12,opt,name=request_body_bytes,json=requestBodyBytes,proto3" json:"request_body_bytes,omitempty"` + // Map of additional headers that have been configured to be logged. + RequestHeaders map[string]string `protobuf:"bytes,13,rep,name=request_headers,json=requestHeaders,proto3" json:"request_headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *HTTPRequestProperties) Reset() { + *x = HTTPRequestProperties{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HTTPRequestProperties) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTTPRequestProperties) ProtoMessage() {} + +func (x *HTTPRequestProperties) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HTTPRequestProperties.ProtoReflect.Descriptor instead. +func (*HTTPRequestProperties) Descriptor() ([]byte, []int) { + return file_envoy_data_accesslog_v3_accesslog_proto_rawDescGZIP(), []int{6} +} + +func (x *HTTPRequestProperties) GetRequestMethod() v3.RequestMethod { + if x != nil { + return x.RequestMethod + } + return v3.RequestMethod_METHOD_UNSPECIFIED +} + +func (x *HTTPRequestProperties) GetScheme() string { + if x != nil { + return x.Scheme + } + return "" +} + +func (x *HTTPRequestProperties) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *HTTPRequestProperties) GetPort() *wrapperspb.UInt32Value { + if x != nil { + return x.Port + } + return nil +} + +func (x *HTTPRequestProperties) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *HTTPRequestProperties) GetUserAgent() string { + if x != nil { + return x.UserAgent + } + return "" +} + +func (x *HTTPRequestProperties) GetReferer() string { + if x != nil { + return x.Referer + } + return "" +} + +func (x *HTTPRequestProperties) GetForwardedFor() string { + if x != nil { + return x.ForwardedFor + } + return "" +} + +func (x *HTTPRequestProperties) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +func (x *HTTPRequestProperties) GetOriginalPath() string { + if x != nil { + return x.OriginalPath + } + return "" +} + +func (x *HTTPRequestProperties) GetRequestHeadersBytes() uint64 { + if x != nil { + return x.RequestHeadersBytes + } + return 0 +} + +func (x *HTTPRequestProperties) GetRequestBodyBytes() uint64 { + if x != nil { + return x.RequestBodyBytes + } + return 0 +} + +func (x *HTTPRequestProperties) GetRequestHeaders() map[string]string { + if x != nil { + return x.RequestHeaders + } + return nil +} + +// [#next-free-field: 7] +type HTTPResponseProperties struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The HTTP response code returned by Envoy. + ResponseCode *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=response_code,json=responseCode,proto3" json:"response_code,omitempty"` + // Size of the HTTP response headers in bytes. + // + // This value is captured from the OSI layer 7 perspective, i.e. it does not + // include overhead from framing or encoding at other networking layers. + ResponseHeadersBytes uint64 `protobuf:"varint,2,opt,name=response_headers_bytes,json=responseHeadersBytes,proto3" json:"response_headers_bytes,omitempty"` + // Size of the HTTP response body in bytes. + // + // This value is captured from the OSI layer 7 perspective, i.e. it does not + // include overhead from framing or encoding at other networking layers. + ResponseBodyBytes uint64 `protobuf:"varint,3,opt,name=response_body_bytes,json=responseBodyBytes,proto3" json:"response_body_bytes,omitempty"` + // Map of additional headers configured to be logged. + ResponseHeaders map[string]string `protobuf:"bytes,4,rep,name=response_headers,json=responseHeaders,proto3" json:"response_headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Map of trailers configured to be logged. + ResponseTrailers map[string]string `protobuf:"bytes,5,rep,name=response_trailers,json=responseTrailers,proto3" json:"response_trailers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The HTTP response code details. + ResponseCodeDetails string `protobuf:"bytes,6,opt,name=response_code_details,json=responseCodeDetails,proto3" json:"response_code_details,omitempty"` +} + +func (x *HTTPResponseProperties) Reset() { + *x = HTTPResponseProperties{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HTTPResponseProperties) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTTPResponseProperties) ProtoMessage() {} + +func (x *HTTPResponseProperties) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HTTPResponseProperties.ProtoReflect.Descriptor instead. +func (*HTTPResponseProperties) Descriptor() ([]byte, []int) { + return file_envoy_data_accesslog_v3_accesslog_proto_rawDescGZIP(), []int{7} +} + +func (x *HTTPResponseProperties) GetResponseCode() *wrapperspb.UInt32Value { + if x != nil { + return x.ResponseCode + } + return nil +} + +func (x *HTTPResponseProperties) GetResponseHeadersBytes() uint64 { + if x != nil { + return x.ResponseHeadersBytes + } + return 0 +} + +func (x *HTTPResponseProperties) GetResponseBodyBytes() uint64 { + if x != nil { + return x.ResponseBodyBytes + } + return 0 +} + +func (x *HTTPResponseProperties) GetResponseHeaders() map[string]string { + if x != nil { + return x.ResponseHeaders + } + return nil +} + +func (x *HTTPResponseProperties) GetResponseTrailers() map[string]string { + if x != nil { + return x.ResponseTrailers + } + return nil +} + +func (x *HTTPResponseProperties) GetResponseCodeDetails() string { + if x != nil { + return x.ResponseCodeDetails + } + return "" +} + +type ResponseFlags_Unauthorized struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Reason ResponseFlags_Unauthorized_Reason `protobuf:"varint,1,opt,name=reason,proto3,enum=envoy.data.accesslog.v3.ResponseFlags_Unauthorized_Reason" json:"reason,omitempty"` +} + +func (x *ResponseFlags_Unauthorized) Reset() { + *x = ResponseFlags_Unauthorized{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResponseFlags_Unauthorized) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResponseFlags_Unauthorized) ProtoMessage() {} + +func (x *ResponseFlags_Unauthorized) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResponseFlags_Unauthorized.ProtoReflect.Descriptor instead. +func (*ResponseFlags_Unauthorized) Descriptor() ([]byte, []int) { + return file_envoy_data_accesslog_v3_accesslog_proto_rawDescGZIP(), []int{4, 0} +} + +func (x *ResponseFlags_Unauthorized) GetReason() ResponseFlags_Unauthorized_Reason { + if x != nil { + return x.Reason + } + return ResponseFlags_Unauthorized_REASON_UNSPECIFIED +} + +type TLSProperties_CertificateProperties struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // SANs present in the certificate. + SubjectAltName []*TLSProperties_CertificateProperties_SubjectAltName `protobuf:"bytes,1,rep,name=subject_alt_name,json=subjectAltName,proto3" json:"subject_alt_name,omitempty"` + // The subject field of the certificate. + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` +} + +func (x *TLSProperties_CertificateProperties) Reset() { + *x = TLSProperties_CertificateProperties{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TLSProperties_CertificateProperties) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TLSProperties_CertificateProperties) ProtoMessage() {} + +func (x *TLSProperties_CertificateProperties) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TLSProperties_CertificateProperties.ProtoReflect.Descriptor instead. +func (*TLSProperties_CertificateProperties) Descriptor() ([]byte, []int) { + return file_envoy_data_accesslog_v3_accesslog_proto_rawDescGZIP(), []int{5, 0} +} + +func (x *TLSProperties_CertificateProperties) GetSubjectAltName() []*TLSProperties_CertificateProperties_SubjectAltName { + if x != nil { + return x.SubjectAltName + } + return nil +} + +func (x *TLSProperties_CertificateProperties) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +type TLSProperties_CertificateProperties_SubjectAltName struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to San: + // + // *TLSProperties_CertificateProperties_SubjectAltName_Uri + // *TLSProperties_CertificateProperties_SubjectAltName_Dns + San isTLSProperties_CertificateProperties_SubjectAltName_San `protobuf_oneof:"san"` +} + +func (x *TLSProperties_CertificateProperties_SubjectAltName) Reset() { + *x = TLSProperties_CertificateProperties_SubjectAltName{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TLSProperties_CertificateProperties_SubjectAltName) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TLSProperties_CertificateProperties_SubjectAltName) ProtoMessage() {} + +func (x *TLSProperties_CertificateProperties_SubjectAltName) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TLSProperties_CertificateProperties_SubjectAltName.ProtoReflect.Descriptor instead. +func (*TLSProperties_CertificateProperties_SubjectAltName) Descriptor() ([]byte, []int) { + return file_envoy_data_accesslog_v3_accesslog_proto_rawDescGZIP(), []int{5, 0, 0} +} + +func (m *TLSProperties_CertificateProperties_SubjectAltName) GetSan() isTLSProperties_CertificateProperties_SubjectAltName_San { + if m != nil { + return m.San + } + return nil +} + +func (x *TLSProperties_CertificateProperties_SubjectAltName) GetUri() string { + if x, ok := x.GetSan().(*TLSProperties_CertificateProperties_SubjectAltName_Uri); ok { + return x.Uri + } + return "" +} + +func (x *TLSProperties_CertificateProperties_SubjectAltName) GetDns() string { + if x, ok := x.GetSan().(*TLSProperties_CertificateProperties_SubjectAltName_Dns); ok { + return x.Dns + } + return "" +} + +type isTLSProperties_CertificateProperties_SubjectAltName_San interface { + isTLSProperties_CertificateProperties_SubjectAltName_San() +} + +type TLSProperties_CertificateProperties_SubjectAltName_Uri struct { + Uri string `protobuf:"bytes,1,opt,name=uri,proto3,oneof"` +} + +type TLSProperties_CertificateProperties_SubjectAltName_Dns struct { + // [#not-implemented-hide:] + Dns string `protobuf:"bytes,2,opt,name=dns,proto3,oneof"` +} + +func (*TLSProperties_CertificateProperties_SubjectAltName_Uri) isTLSProperties_CertificateProperties_SubjectAltName_San() { +} + +func (*TLSProperties_CertificateProperties_SubjectAltName_Dns) isTLSProperties_CertificateProperties_SubjectAltName_San() { +} + +var File_envoy_data_accesslog_v3_accesslog_proto protoreflect.FileDescriptor + +var file_envoy_data_accesslog_v3_accesslog_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, + 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, + 0x65, 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, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1f, 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, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0x80, + 0x02, 0x0a, 0x11, 0x54, 0x43, 0x50, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x55, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x70, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x62, 0x0a, 0x15, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, + 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x3a, + 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, + 0x54, 0x43, 0x50, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x22, 0xf0, 0x03, 0x0a, 0x12, 0x48, 0x54, 0x54, 0x50, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x55, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x10, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, + 0x62, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, + 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x48, + 0x54, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x69, 0x65, 0x73, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, + 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x55, 0x0a, 0x0b, 0x48, 0x54, + 0x54, 0x50, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x52, 0x4f, + 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x54, 0x54, 0x50, 0x31, 0x30, 0x10, 0x01, 0x12, + 0x0a, 0x0a, 0x06, 0x48, 0x54, 0x54, 0x50, 0x31, 0x31, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x48, + 0x54, 0x54, 0x50, 0x32, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x33, 0x10, + 0x04, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, + 0x32, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x22, 0x91, 0x01, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x25, 0x0a, + 0x0e, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x79, + 0x74, 0x65, 0x73, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, + 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xd9, 0x0f, 0x0a, 0x0f, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x0b, + 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, + 0x3f, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x0a, 0x73, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x52, 0x61, 0x74, 0x65, 0x12, 0x59, 0x0a, 0x19, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x17, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x57, 0x0a, 0x18, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x52, 0x16, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x6f, + 0x63, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4d, 0x0a, 0x0e, 0x74, 0x6c, + 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x4c, 0x53, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0d, 0x74, 0x6c, 0x73, 0x50, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 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, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x49, 0x0a, 0x14, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x5f, + 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x74, + 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x61, 0x73, 0x74, 0x52, 0x78, 0x42, 0x79, 0x74, 0x65, 0x12, + 0x5c, 0x0a, 0x1e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, + 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x74, 0x78, 0x5f, 0x62, 0x79, 0x74, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x19, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x46, 0x69, 0x72, 0x73, 0x74, 0x55, + 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x78, 0x42, 0x79, 0x74, 0x65, 0x12, 0x5a, 0x0a, + 0x1d, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x74, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x18, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x6f, 0x4c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x54, 0x78, 0x42, 0x79, 0x74, 0x65, 0x12, 0x5c, 0x0a, 0x1e, 0x74, 0x69, 0x6d, + 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x5f, 0x72, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x19, 0x74, 0x69, + 0x6d, 0x65, 0x54, 0x6f, 0x46, 0x69, 0x72, 0x73, 0x74, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x52, 0x78, 0x42, 0x79, 0x74, 0x65, 0x12, 0x5a, 0x0a, 0x1d, 0x74, 0x69, 0x6d, 0x65, 0x5f, + 0x74, 0x6f, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x5f, 0x72, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x74, 0x69, 0x6d, 0x65, 0x54, + 0x6f, 0x4c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x78, 0x42, + 0x79, 0x74, 0x65, 0x12, 0x60, 0x0a, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x66, + 0x69, 0x72, 0x73, 0x74, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, + 0x74, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1b, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x6f, + 0x46, 0x69, 0x72, 0x73, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, + 0x78, 0x42, 0x79, 0x74, 0x65, 0x12, 0x5e, 0x0a, 0x1f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, 0x6f, + 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x5f, 0x74, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1a, 0x74, 0x69, 0x6d, 0x65, 0x54, + 0x6f, 0x4c, 0x61, 0x73, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, + 0x78, 0x42, 0x79, 0x74, 0x65, 0x12, 0x55, 0x0a, 0x17, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x15, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, + 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x53, 0x0a, 0x16, + 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x14, 0x75, 0x70, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x29, 0x0a, 0x10, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x75, 0x70, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x0e, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x10, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x0d, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x49, 0x0a, 0x21, 0x75, 0x70, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x66, 0x61, + 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x12, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x1e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x66, 0x0a, 0x20, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, + 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x1d, 0x64, 0x6f, 0x77, 0x6e, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6d, 0x6f, + 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x72, 0x0a, 0x14, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, + 0x33, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x12, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x59, 0x0a, + 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x16, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x5b, 0x0a, 0x17, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 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, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3d, 0x0a, 0x0f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, + 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, + 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0xe9, 0x0d, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, + 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, + 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x12, 0x2e, 0x0a, 0x13, 0x6e, 0x6f, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x75, + 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x6e, + 0x6f, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x12, 0x38, 0x0a, 0x18, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x16, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, + 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x65, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x75, + 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x72, + 0x65, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x75, 0x70, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x65, 0x74, 0x12, + 0x3e, 0x0a, 0x1b, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, + 0x46, 0x0a, 0x1f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x75, 0x70, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x10, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x76, 0x65, 0x72, + 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x24, 0x0a, 0x0e, 0x6e, 0x6f, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x6e, 0x6f, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, + 0x6c, 0x61, 0x79, 0x5f, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0d, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, + 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x69, 0x6e, 0x6a, 0x65, 0x63, + 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x61, 0x74, 0x65, + 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, + 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x12, 0x66, 0x0a, 0x14, 0x75, + 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x61, 0x67, + 0x73, 0x2e, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x13, + 0x75, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x44, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x4a, 0x0a, 0x21, + 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1f, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x1d, 0x75, 0x70, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x5f, 0x65, 0x78, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x1a, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x74, 0x72, 0x79, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x45, 0x78, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x49, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x41, 0x0a, 0x1d, 0x69, + 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x12, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x1a, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x45, 0x6e, 0x76, 0x6f, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x3a, + 0x0a, 0x19, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x17, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x4e, 0x0a, 0x24, 0x75, 0x70, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x61, 0x63, 0x68, + 0x65, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x20, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x4d, 0x61, 0x78, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x1a, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x63, 0x61, 0x63, 0x68, + 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x61, 0x63, 0x68, + 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x16, 0x6e, 0x6f, 0x5f, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x66, 0x6f, 0x75, 0x6e, + 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x6e, 0x6f, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x29, 0x0a, 0x10, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x36, 0x0a, 0x17, 0x75, 0x70, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x18, 0x18, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, + 0x28, 0x0a, 0x10, 0x6e, 0x6f, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x66, 0x6f, + 0x75, 0x6e, 0x64, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x6e, 0x6f, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x6f, 0x76, 0x65, + 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x18, 0x1a, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x16, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, + 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x1b, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x64, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x1a, 0xd5, 0x01, 0x0a, 0x0c, 0x55, + 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x12, 0x52, 0x0a, 0x06, 0x72, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, + 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, + 0x61, 0x67, 0x73, 0x2e, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, + 0x2e, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, + 0x36, 0x0a, 0x06, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45, 0x41, + 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x53, 0x45, + 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x01, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x46, 0x6c, 0x61, 0x67, 0x73, 0x2e, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, + 0x65, 0x64, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, + 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, + 0x22, 0x84, 0x08, 0x0a, 0x0d, 0x54, 0x4c, 0x53, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, + 0x65, 0x73, 0x12, 0x52, 0x0a, 0x0b, 0x74, 0x6c, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, + 0x33, 0x2e, 0x54, 0x4c, 0x53, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, + 0x54, 0x4c, 0x53, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x74, 0x6c, 0x73, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x10, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x69, + 0x70, 0x68, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x69, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, + 0x74, 0x6c, 0x73, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x53, 0x75, 0x69, 0x74, 0x65, 0x12, 0x28, + 0x0a, 0x10, 0x74, 0x6c, 0x73, 0x5f, 0x73, 0x6e, 0x69, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x6c, 0x73, 0x53, 0x6e, 0x69, + 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x7e, 0x0a, 0x1c, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x4c, 0x53, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x1a, 0x6c, 0x6f, + 0x63, 0x61, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x7c, 0x0a, 0x1b, 0x70, 0x65, 0x65, 0x72, + 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x4c, 0x53, 0x50, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x19, 0x70, 0x65, 0x65, + 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x6c, 0x73, 0x5f, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x74, 0x6c, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x1a, 0x81, 0x03, 0x0a, + 0x15, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x75, 0x0a, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x61, 0x6c, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x4c, 0x53, 0x50, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x0e, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x1a, 0x92, 0x01, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x03, 0x75, 0x72, + 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x12, + 0x0a, 0x03, 0x64, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x64, + 0x6e, 0x73, 0x3a, 0x51, 0x9a, 0xc5, 0x88, 0x1e, 0x4c, 0x0a, 0x4a, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, + 0x76, 0x32, 0x2e, 0x54, 0x4c, 0x53, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x73, 0x61, 0x6e, 0x3a, 0x42, 0x9a, 0xc5, + 0x88, 0x1e, 0x3d, 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x4c, 0x53, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x22, 0x57, 0x0a, 0x0a, 0x54, 0x4c, 0x53, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, + 0x0a, 0x13, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x54, 0x4c, 0x53, 0x76, 0x31, + 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x31, 0x10, 0x02, 0x12, + 0x0b, 0x0a, 0x07, 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x32, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, + 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x33, 0x10, 0x04, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, + 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x4c, 0x53, 0x50, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xd3, 0x05, 0x0a, 0x15, 0x48, 0x54, 0x54, 0x50, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x12, 0x54, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x30, 0x0a, + 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, + 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, + 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, + 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x65, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x65, 0x64, 0x46, 0x6f, + 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, + 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, + 0x6c, 0x50, 0x61, 0x74, 0x68, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, + 0x64, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x6b, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x1a, 0x41, 0x0a, 0x13, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x9a, 0x05, + 0x0a, 0x16, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x42, 0x79, 0x74, 0x65, + 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x62, 0x6f, + 0x64, 0x79, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x42, 0x79, 0x74, 0x65, + 0x73, 0x12, 0x6f, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, + 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x12, 0x72, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, + 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, + 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, + 0x6f, 0x64, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x1a, 0x42, 0x0a, 0x14, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x43, + 0x0a, 0x15, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, + 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, + 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x42, 0x8d, 0x01, 0x0a, 0x25, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, + 0x67, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, + 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_envoy_data_accesslog_v3_accesslog_proto_rawDescOnce sync.Once + file_envoy_data_accesslog_v3_accesslog_proto_rawDescData = file_envoy_data_accesslog_v3_accesslog_proto_rawDesc +) + +func file_envoy_data_accesslog_v3_accesslog_proto_rawDescGZIP() []byte { + file_envoy_data_accesslog_v3_accesslog_proto_rawDescOnce.Do(func() { + file_envoy_data_accesslog_v3_accesslog_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_data_accesslog_v3_accesslog_proto_rawDescData) + }) + return file_envoy_data_accesslog_v3_accesslog_proto_rawDescData +} + +var file_envoy_data_accesslog_v3_accesslog_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_envoy_data_accesslog_v3_accesslog_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_envoy_data_accesslog_v3_accesslog_proto_goTypes = []interface{}{ + (HTTPAccessLogEntry_HTTPVersion)(0), // 0: envoy.data.accesslog.v3.HTTPAccessLogEntry.HTTPVersion + (ResponseFlags_Unauthorized_Reason)(0), // 1: envoy.data.accesslog.v3.ResponseFlags.Unauthorized.Reason + (TLSProperties_TLSVersion)(0), // 2: envoy.data.accesslog.v3.TLSProperties.TLSVersion + (*TCPAccessLogEntry)(nil), // 3: envoy.data.accesslog.v3.TCPAccessLogEntry + (*HTTPAccessLogEntry)(nil), // 4: envoy.data.accesslog.v3.HTTPAccessLogEntry + (*ConnectionProperties)(nil), // 5: envoy.data.accesslog.v3.ConnectionProperties + (*AccessLogCommon)(nil), // 6: envoy.data.accesslog.v3.AccessLogCommon + (*ResponseFlags)(nil), // 7: envoy.data.accesslog.v3.ResponseFlags + (*TLSProperties)(nil), // 8: envoy.data.accesslog.v3.TLSProperties + (*HTTPRequestProperties)(nil), // 9: envoy.data.accesslog.v3.HTTPRequestProperties + (*HTTPResponseProperties)(nil), // 10: envoy.data.accesslog.v3.HTTPResponseProperties + nil, // 11: envoy.data.accesslog.v3.AccessLogCommon.FilterStateObjectsEntry + nil, // 12: envoy.data.accesslog.v3.AccessLogCommon.CustomTagsEntry + (*ResponseFlags_Unauthorized)(nil), // 13: envoy.data.accesslog.v3.ResponseFlags.Unauthorized + (*TLSProperties_CertificateProperties)(nil), // 14: envoy.data.accesslog.v3.TLSProperties.CertificateProperties + (*TLSProperties_CertificateProperties_SubjectAltName)(nil), // 15: envoy.data.accesslog.v3.TLSProperties.CertificateProperties.SubjectAltName + nil, // 16: envoy.data.accesslog.v3.HTTPRequestProperties.RequestHeadersEntry + nil, // 17: envoy.data.accesslog.v3.HTTPResponseProperties.ResponseHeadersEntry + nil, // 18: envoy.data.accesslog.v3.HTTPResponseProperties.ResponseTrailersEntry + (*v3.Address)(nil), // 19: envoy.config.core.v3.Address + (*timestamppb.Timestamp)(nil), // 20: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 21: google.protobuf.Duration + (*v3.Metadata)(nil), // 22: envoy.config.core.v3.Metadata + (*wrapperspb.UInt32Value)(nil), // 23: google.protobuf.UInt32Value + (v3.RequestMethod)(0), // 24: envoy.config.core.v3.RequestMethod + (*anypb.Any)(nil), // 25: google.protobuf.Any +} +var file_envoy_data_accesslog_v3_accesslog_proto_depIdxs = []int32{ + 6, // 0: envoy.data.accesslog.v3.TCPAccessLogEntry.common_properties:type_name -> envoy.data.accesslog.v3.AccessLogCommon + 5, // 1: envoy.data.accesslog.v3.TCPAccessLogEntry.connection_properties:type_name -> envoy.data.accesslog.v3.ConnectionProperties + 6, // 2: envoy.data.accesslog.v3.HTTPAccessLogEntry.common_properties:type_name -> envoy.data.accesslog.v3.AccessLogCommon + 0, // 3: envoy.data.accesslog.v3.HTTPAccessLogEntry.protocol_version:type_name -> envoy.data.accesslog.v3.HTTPAccessLogEntry.HTTPVersion + 9, // 4: envoy.data.accesslog.v3.HTTPAccessLogEntry.request:type_name -> envoy.data.accesslog.v3.HTTPRequestProperties + 10, // 5: envoy.data.accesslog.v3.HTTPAccessLogEntry.response:type_name -> envoy.data.accesslog.v3.HTTPResponseProperties + 19, // 6: envoy.data.accesslog.v3.AccessLogCommon.downstream_remote_address:type_name -> envoy.config.core.v3.Address + 19, // 7: envoy.data.accesslog.v3.AccessLogCommon.downstream_local_address:type_name -> envoy.config.core.v3.Address + 8, // 8: envoy.data.accesslog.v3.AccessLogCommon.tls_properties:type_name -> envoy.data.accesslog.v3.TLSProperties + 20, // 9: envoy.data.accesslog.v3.AccessLogCommon.start_time:type_name -> google.protobuf.Timestamp + 21, // 10: envoy.data.accesslog.v3.AccessLogCommon.time_to_last_rx_byte:type_name -> google.protobuf.Duration + 21, // 11: envoy.data.accesslog.v3.AccessLogCommon.time_to_first_upstream_tx_byte:type_name -> google.protobuf.Duration + 21, // 12: envoy.data.accesslog.v3.AccessLogCommon.time_to_last_upstream_tx_byte:type_name -> google.protobuf.Duration + 21, // 13: envoy.data.accesslog.v3.AccessLogCommon.time_to_first_upstream_rx_byte:type_name -> google.protobuf.Duration + 21, // 14: envoy.data.accesslog.v3.AccessLogCommon.time_to_last_upstream_rx_byte:type_name -> google.protobuf.Duration + 21, // 15: envoy.data.accesslog.v3.AccessLogCommon.time_to_first_downstream_tx_byte:type_name -> google.protobuf.Duration + 21, // 16: envoy.data.accesslog.v3.AccessLogCommon.time_to_last_downstream_tx_byte:type_name -> google.protobuf.Duration + 19, // 17: envoy.data.accesslog.v3.AccessLogCommon.upstream_remote_address:type_name -> envoy.config.core.v3.Address + 19, // 18: envoy.data.accesslog.v3.AccessLogCommon.upstream_local_address:type_name -> envoy.config.core.v3.Address + 7, // 19: envoy.data.accesslog.v3.AccessLogCommon.response_flags:type_name -> envoy.data.accesslog.v3.ResponseFlags + 22, // 20: envoy.data.accesslog.v3.AccessLogCommon.metadata:type_name -> envoy.config.core.v3.Metadata + 19, // 21: envoy.data.accesslog.v3.AccessLogCommon.downstream_direct_remote_address:type_name -> envoy.config.core.v3.Address + 11, // 22: envoy.data.accesslog.v3.AccessLogCommon.filter_state_objects:type_name -> envoy.data.accesslog.v3.AccessLogCommon.FilterStateObjectsEntry + 12, // 23: envoy.data.accesslog.v3.AccessLogCommon.custom_tags:type_name -> envoy.data.accesslog.v3.AccessLogCommon.CustomTagsEntry + 13, // 24: envoy.data.accesslog.v3.ResponseFlags.unauthorized_details:type_name -> envoy.data.accesslog.v3.ResponseFlags.Unauthorized + 2, // 25: envoy.data.accesslog.v3.TLSProperties.tls_version:type_name -> envoy.data.accesslog.v3.TLSProperties.TLSVersion + 23, // 26: envoy.data.accesslog.v3.TLSProperties.tls_cipher_suite:type_name -> google.protobuf.UInt32Value + 14, // 27: envoy.data.accesslog.v3.TLSProperties.local_certificate_properties:type_name -> envoy.data.accesslog.v3.TLSProperties.CertificateProperties + 14, // 28: envoy.data.accesslog.v3.TLSProperties.peer_certificate_properties:type_name -> envoy.data.accesslog.v3.TLSProperties.CertificateProperties + 24, // 29: envoy.data.accesslog.v3.HTTPRequestProperties.request_method:type_name -> envoy.config.core.v3.RequestMethod + 23, // 30: envoy.data.accesslog.v3.HTTPRequestProperties.port:type_name -> google.protobuf.UInt32Value + 16, // 31: envoy.data.accesslog.v3.HTTPRequestProperties.request_headers:type_name -> envoy.data.accesslog.v3.HTTPRequestProperties.RequestHeadersEntry + 23, // 32: envoy.data.accesslog.v3.HTTPResponseProperties.response_code:type_name -> google.protobuf.UInt32Value + 17, // 33: envoy.data.accesslog.v3.HTTPResponseProperties.response_headers:type_name -> envoy.data.accesslog.v3.HTTPResponseProperties.ResponseHeadersEntry + 18, // 34: envoy.data.accesslog.v3.HTTPResponseProperties.response_trailers:type_name -> envoy.data.accesslog.v3.HTTPResponseProperties.ResponseTrailersEntry + 25, // 35: envoy.data.accesslog.v3.AccessLogCommon.FilterStateObjectsEntry.value:type_name -> google.protobuf.Any + 1, // 36: envoy.data.accesslog.v3.ResponseFlags.Unauthorized.reason:type_name -> envoy.data.accesslog.v3.ResponseFlags.Unauthorized.Reason + 15, // 37: envoy.data.accesslog.v3.TLSProperties.CertificateProperties.subject_alt_name:type_name -> envoy.data.accesslog.v3.TLSProperties.CertificateProperties.SubjectAltName + 38, // [38:38] is the sub-list for method output_type + 38, // [38:38] is the sub-list for method input_type + 38, // [38:38] is the sub-list for extension type_name + 38, // [38:38] is the sub-list for extension extendee + 0, // [0:38] is the sub-list for field type_name +} + +func init() { file_envoy_data_accesslog_v3_accesslog_proto_init() } +func file_envoy_data_accesslog_v3_accesslog_proto_init() { + if File_envoy_data_accesslog_v3_accesslog_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TCPAccessLogEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HTTPAccessLogEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConnectionProperties); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessLogCommon); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseFlags); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TLSProperties); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HTTPRequestProperties); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HTTPResponseProperties); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseFlags_Unauthorized); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TLSProperties_CertificateProperties); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TLSProperties_CertificateProperties_SubjectAltName); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_data_accesslog_v3_accesslog_proto_msgTypes[12].OneofWrappers = []interface{}{ + (*TLSProperties_CertificateProperties_SubjectAltName_Uri)(nil), + (*TLSProperties_CertificateProperties_SubjectAltName_Dns)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_data_accesslog_v3_accesslog_proto_rawDesc, + NumEnums: 3, + NumMessages: 16, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_data_accesslog_v3_accesslog_proto_goTypes, + DependencyIndexes: file_envoy_data_accesslog_v3_accesslog_proto_depIdxs, + EnumInfos: file_envoy_data_accesslog_v3_accesslog_proto_enumTypes, + MessageInfos: file_envoy_data_accesslog_v3_accesslog_proto_msgTypes, + }.Build() + File_envoy_data_accesslog_v3_accesslog_proto = out.File + file_envoy_data_accesslog_v3_accesslog_proto_rawDesc = nil + file_envoy_data_accesslog_v3_accesslog_proto_goTypes = nil + file_envoy_data_accesslog_v3_accesslog_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/data/accesslog/v3/accesslog.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/data/accesslog/v3/accesslog.pb.validate.go new file mode 100644 index 0000000000000..cb00757c23866 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/data/accesslog/v3/accesslog.pb.validate.go @@ -0,0 +1,2163 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/data/accesslog/v3/accesslog.proto + +package accesslogv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" + + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort + + _ = v3.RequestMethod(0) +) + +// Validate checks the field values on TCPAccessLogEntry 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 *TCPAccessLogEntry) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TCPAccessLogEntry 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 +// TCPAccessLogEntryMultiError, or nil if none found. +func (m *TCPAccessLogEntry) ValidateAll() error { + return m.validate(true) +} + +func (m *TCPAccessLogEntry) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetCommonProperties()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TCPAccessLogEntryValidationError{ + field: "CommonProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TCPAccessLogEntryValidationError{ + field: "CommonProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonProperties()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TCPAccessLogEntryValidationError{ + field: "CommonProperties", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetConnectionProperties()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TCPAccessLogEntryValidationError{ + field: "ConnectionProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TCPAccessLogEntryValidationError{ + field: "ConnectionProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConnectionProperties()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TCPAccessLogEntryValidationError{ + field: "ConnectionProperties", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return TCPAccessLogEntryMultiError(errors) + } + return nil +} + +// TCPAccessLogEntryMultiError is an error wrapping multiple validation errors +// returned by TCPAccessLogEntry.ValidateAll() if the designated constraints +// aren't met. +type TCPAccessLogEntryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TCPAccessLogEntryMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TCPAccessLogEntryMultiError) AllErrors() []error { return m } + +// TCPAccessLogEntryValidationError is the validation error returned by +// TCPAccessLogEntry.Validate if the designated constraints aren't met. +type TCPAccessLogEntryValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TCPAccessLogEntryValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TCPAccessLogEntryValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TCPAccessLogEntryValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TCPAccessLogEntryValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TCPAccessLogEntryValidationError) ErrorName() string { + return "TCPAccessLogEntryValidationError" +} + +// Error satisfies the builtin error interface +func (e TCPAccessLogEntryValidationError) 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 %sTCPAccessLogEntry.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TCPAccessLogEntryValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TCPAccessLogEntryValidationError{} + +// Validate checks the field values on HTTPAccessLogEntry 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 *HTTPAccessLogEntry) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HTTPAccessLogEntry 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 +// HTTPAccessLogEntryMultiError, or nil if none found. +func (m *HTTPAccessLogEntry) ValidateAll() error { + return m.validate(true) +} + +func (m *HTTPAccessLogEntry) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetCommonProperties()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPAccessLogEntryValidationError{ + field: "CommonProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPAccessLogEntryValidationError{ + field: "CommonProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonProperties()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HTTPAccessLogEntryValidationError{ + field: "CommonProperties", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ProtocolVersion + + if all { + switch v := interface{}(m.GetRequest()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPAccessLogEntryValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPAccessLogEntryValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HTTPAccessLogEntryValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPAccessLogEntryValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPAccessLogEntryValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HTTPAccessLogEntryValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return HTTPAccessLogEntryMultiError(errors) + } + return nil +} + +// HTTPAccessLogEntryMultiError is an error wrapping multiple validation errors +// returned by HTTPAccessLogEntry.ValidateAll() if the designated constraints +// aren't met. +type HTTPAccessLogEntryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HTTPAccessLogEntryMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HTTPAccessLogEntryMultiError) AllErrors() []error { return m } + +// HTTPAccessLogEntryValidationError is the validation error returned by +// HTTPAccessLogEntry.Validate if the designated constraints aren't met. +type HTTPAccessLogEntryValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HTTPAccessLogEntryValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HTTPAccessLogEntryValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HTTPAccessLogEntryValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HTTPAccessLogEntryValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HTTPAccessLogEntryValidationError) ErrorName() string { + return "HTTPAccessLogEntryValidationError" +} + +// Error satisfies the builtin error interface +func (e HTTPAccessLogEntryValidationError) 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 %sHTTPAccessLogEntry.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HTTPAccessLogEntryValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HTTPAccessLogEntryValidationError{} + +// Validate checks the field values on ConnectionProperties 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 *ConnectionProperties) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ConnectionProperties 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 +// ConnectionPropertiesMultiError, or nil if none found. +func (m *ConnectionProperties) ValidateAll() error { + return m.validate(true) +} + +func (m *ConnectionProperties) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for ReceivedBytes + + // no validation rules for SentBytes + + if len(errors) > 0 { + return ConnectionPropertiesMultiError(errors) + } + return nil +} + +// ConnectionPropertiesMultiError is an error wrapping multiple validation +// errors returned by ConnectionProperties.ValidateAll() if the designated +// constraints aren't met. +type ConnectionPropertiesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConnectionPropertiesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConnectionPropertiesMultiError) AllErrors() []error { return m } + +// ConnectionPropertiesValidationError is the validation error returned by +// ConnectionProperties.Validate if the designated constraints aren't met. +type ConnectionPropertiesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConnectionPropertiesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConnectionPropertiesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConnectionPropertiesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConnectionPropertiesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConnectionPropertiesValidationError) ErrorName() string { + return "ConnectionPropertiesValidationError" +} + +// Error satisfies the builtin error interface +func (e ConnectionPropertiesValidationError) 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 %sConnectionProperties.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConnectionPropertiesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConnectionPropertiesValidationError{} + +// Validate checks the field values on AccessLogCommon 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 *AccessLogCommon) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AccessLogCommon 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 +// AccessLogCommonMultiError, or nil if none found. +func (m *AccessLogCommon) ValidateAll() error { + return m.validate(true) +} + +func (m *AccessLogCommon) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if val := m.GetSampleRate(); val <= 0 || val > 1 { + err := AccessLogCommonValidationError{ + field: "SampleRate", + reason: "value must be inside range (0, 1]", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetDownstreamRemoteAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "DownstreamRemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "DownstreamRemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDownstreamRemoteAddress()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogCommonValidationError{ + field: "DownstreamRemoteAddress", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetDownstreamLocalAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "DownstreamLocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "DownstreamLocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDownstreamLocalAddress()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogCommonValidationError{ + field: "DownstreamLocalAddress", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetTlsProperties()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TlsProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TlsProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTlsProperties()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogCommonValidationError{ + field: "TlsProperties", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetStartTime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "StartTime", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "StartTime", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStartTime()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogCommonValidationError{ + field: "StartTime", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetTimeToLastRxByte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastRxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastRxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeToLastRxByte()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogCommonValidationError{ + field: "TimeToLastRxByte", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetTimeToFirstUpstreamTxByte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToFirstUpstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToFirstUpstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeToFirstUpstreamTxByte()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogCommonValidationError{ + field: "TimeToFirstUpstreamTxByte", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetTimeToLastUpstreamTxByte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastUpstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastUpstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeToLastUpstreamTxByte()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogCommonValidationError{ + field: "TimeToLastUpstreamTxByte", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetTimeToFirstUpstreamRxByte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToFirstUpstreamRxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToFirstUpstreamRxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeToFirstUpstreamRxByte()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogCommonValidationError{ + field: "TimeToFirstUpstreamRxByte", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetTimeToLastUpstreamRxByte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastUpstreamRxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastUpstreamRxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeToLastUpstreamRxByte()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogCommonValidationError{ + field: "TimeToLastUpstreamRxByte", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetTimeToFirstDownstreamTxByte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToFirstDownstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToFirstDownstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeToFirstDownstreamTxByte()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogCommonValidationError{ + field: "TimeToFirstDownstreamTxByte", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetTimeToLastDownstreamTxByte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastDownstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "TimeToLastDownstreamTxByte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeToLastDownstreamTxByte()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogCommonValidationError{ + field: "TimeToLastDownstreamTxByte", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetUpstreamRemoteAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "UpstreamRemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "UpstreamRemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamRemoteAddress()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogCommonValidationError{ + field: "UpstreamRemoteAddress", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetUpstreamLocalAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "UpstreamLocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "UpstreamLocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamLocalAddress()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogCommonValidationError{ + field: "UpstreamLocalAddress", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for UpstreamCluster + + if all { + switch v := interface{}(m.GetResponseFlags()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "ResponseFlags", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "ResponseFlags", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseFlags()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogCommonValidationError{ + field: "ResponseFlags", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogCommonValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for UpstreamTransportFailureReason + + // no validation rules for RouteName + + if all { + switch v := interface{}(m.GetDownstreamDirectRemoteAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "DownstreamDirectRemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: "DownstreamDirectRemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDownstreamDirectRemoteAddress()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogCommonValidationError{ + field: "DownstreamDirectRemoteAddress", + reason: "embedded message failed validation", + cause: err, + } + } + } + + { + sorted_keys := make([]string, len(m.GetFilterStateObjects())) + i := 0 + for key := range m.GetFilterStateObjects() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetFilterStateObjects()[key] + _ = val + + // no validation rules for FilterStateObjects[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: fmt.Sprintf("FilterStateObjects[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AccessLogCommonValidationError{ + field: fmt.Sprintf("FilterStateObjects[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AccessLogCommonValidationError{ + field: fmt.Sprintf("FilterStateObjects[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + // no validation rules for CustomTags + + if len(errors) > 0 { + return AccessLogCommonMultiError(errors) + } + return nil +} + +// AccessLogCommonMultiError is an error wrapping multiple validation errors +// returned by AccessLogCommon.ValidateAll() if the designated constraints +// aren't met. +type AccessLogCommonMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AccessLogCommonMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AccessLogCommonMultiError) AllErrors() []error { return m } + +// AccessLogCommonValidationError is the validation error returned by +// AccessLogCommon.Validate if the designated constraints aren't met. +type AccessLogCommonValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AccessLogCommonValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AccessLogCommonValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AccessLogCommonValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AccessLogCommonValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AccessLogCommonValidationError) ErrorName() string { return "AccessLogCommonValidationError" } + +// Error satisfies the builtin error interface +func (e AccessLogCommonValidationError) 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 %sAccessLogCommon.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AccessLogCommonValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AccessLogCommonValidationError{} + +// Validate checks the field values on ResponseFlags 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 *ResponseFlags) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ResponseFlags 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 ResponseFlagsMultiError, or +// nil if none found. +func (m *ResponseFlags) ValidateAll() error { + return m.validate(true) +} + +func (m *ResponseFlags) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for FailedLocalHealthcheck + + // no validation rules for NoHealthyUpstream + + // no validation rules for UpstreamRequestTimeout + + // no validation rules for LocalReset + + // no validation rules for UpstreamRemoteReset + + // no validation rules for UpstreamConnectionFailure + + // no validation rules for UpstreamConnectionTermination + + // no validation rules for UpstreamOverflow + + // no validation rules for NoRouteFound + + // no validation rules for DelayInjected + + // no validation rules for FaultInjected + + // no validation rules for RateLimited + + if all { + switch v := interface{}(m.GetUnauthorizedDetails()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResponseFlagsValidationError{ + field: "UnauthorizedDetails", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResponseFlagsValidationError{ + field: "UnauthorizedDetails", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUnauthorizedDetails()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResponseFlagsValidationError{ + field: "UnauthorizedDetails", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for RateLimitServiceError + + // no validation rules for DownstreamConnectionTermination + + // no validation rules for UpstreamRetryLimitExceeded + + // no validation rules for StreamIdleTimeout + + // no validation rules for InvalidEnvoyRequestHeaders + + // no validation rules for DownstreamProtocolError + + // no validation rules for UpstreamMaxStreamDurationReached + + // no validation rules for ResponseFromCacheFilter + + // no validation rules for NoFilterConfigFound + + // no validation rules for DurationTimeout + + // no validation rules for UpstreamProtocolError + + // no validation rules for NoClusterFound + + // no validation rules for OverloadManager + + // no validation rules for DnsResolutionFailure + + if len(errors) > 0 { + return ResponseFlagsMultiError(errors) + } + return nil +} + +// ResponseFlagsMultiError is an error wrapping multiple validation errors +// returned by ResponseFlags.ValidateAll() if the designated constraints +// aren't met. +type ResponseFlagsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResponseFlagsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResponseFlagsMultiError) AllErrors() []error { return m } + +// ResponseFlagsValidationError is the validation error returned by +// ResponseFlags.Validate if the designated constraints aren't met. +type ResponseFlagsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ResponseFlagsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ResponseFlagsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ResponseFlagsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ResponseFlagsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ResponseFlagsValidationError) ErrorName() string { return "ResponseFlagsValidationError" } + +// Error satisfies the builtin error interface +func (e ResponseFlagsValidationError) 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 %sResponseFlags.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ResponseFlagsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ResponseFlagsValidationError{} + +// Validate checks the field values on TLSProperties 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 *TLSProperties) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TLSProperties 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 TLSPropertiesMultiError, or +// nil if none found. +func (m *TLSProperties) ValidateAll() error { + return m.validate(true) +} + +func (m *TLSProperties) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for TlsVersion + + if all { + switch v := interface{}(m.GetTlsCipherSuite()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TLSPropertiesValidationError{ + field: "TlsCipherSuite", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TLSPropertiesValidationError{ + field: "TlsCipherSuite", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTlsCipherSuite()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TLSPropertiesValidationError{ + field: "TlsCipherSuite", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for TlsSniHostname + + if all { + switch v := interface{}(m.GetLocalCertificateProperties()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TLSPropertiesValidationError{ + field: "LocalCertificateProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TLSPropertiesValidationError{ + field: "LocalCertificateProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocalCertificateProperties()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TLSPropertiesValidationError{ + field: "LocalCertificateProperties", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetPeerCertificateProperties()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TLSPropertiesValidationError{ + field: "PeerCertificateProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TLSPropertiesValidationError{ + field: "PeerCertificateProperties", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPeerCertificateProperties()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TLSPropertiesValidationError{ + field: "PeerCertificateProperties", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for TlsSessionId + + if len(errors) > 0 { + return TLSPropertiesMultiError(errors) + } + return nil +} + +// TLSPropertiesMultiError is an error wrapping multiple validation errors +// returned by TLSProperties.ValidateAll() if the designated constraints +// aren't met. +type TLSPropertiesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TLSPropertiesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TLSPropertiesMultiError) AllErrors() []error { return m } + +// TLSPropertiesValidationError is the validation error returned by +// TLSProperties.Validate if the designated constraints aren't met. +type TLSPropertiesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TLSPropertiesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TLSPropertiesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TLSPropertiesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TLSPropertiesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TLSPropertiesValidationError) ErrorName() string { return "TLSPropertiesValidationError" } + +// Error satisfies the builtin error interface +func (e TLSPropertiesValidationError) 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 %sTLSProperties.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TLSPropertiesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TLSPropertiesValidationError{} + +// Validate checks the field values on HTTPRequestProperties 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 *HTTPRequestProperties) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HTTPRequestProperties 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 +// HTTPRequestPropertiesMultiError, or nil if none found. +func (m *HTTPRequestProperties) ValidateAll() error { + return m.validate(true) +} + +func (m *HTTPRequestProperties) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if _, ok := v3.RequestMethod_name[int32(m.GetRequestMethod())]; !ok { + err := HTTPRequestPropertiesValidationError{ + field: "RequestMethod", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for Scheme + + // no validation rules for Authority + + if all { + switch v := interface{}(m.GetPort()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPRequestPropertiesValidationError{ + field: "Port", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPRequestPropertiesValidationError{ + field: "Port", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPort()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HTTPRequestPropertiesValidationError{ + field: "Port", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Path + + // no validation rules for UserAgent + + // no validation rules for Referer + + // no validation rules for ForwardedFor + + // no validation rules for RequestId + + // no validation rules for OriginalPath + + // no validation rules for RequestHeadersBytes + + // no validation rules for RequestBodyBytes + + // no validation rules for RequestHeaders + + if len(errors) > 0 { + return HTTPRequestPropertiesMultiError(errors) + } + return nil +} + +// HTTPRequestPropertiesMultiError is an error wrapping multiple validation +// errors returned by HTTPRequestProperties.ValidateAll() if the designated +// constraints aren't met. +type HTTPRequestPropertiesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HTTPRequestPropertiesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HTTPRequestPropertiesMultiError) AllErrors() []error { return m } + +// HTTPRequestPropertiesValidationError is the validation error returned by +// HTTPRequestProperties.Validate if the designated constraints aren't met. +type HTTPRequestPropertiesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HTTPRequestPropertiesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HTTPRequestPropertiesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HTTPRequestPropertiesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HTTPRequestPropertiesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HTTPRequestPropertiesValidationError) ErrorName() string { + return "HTTPRequestPropertiesValidationError" +} + +// Error satisfies the builtin error interface +func (e HTTPRequestPropertiesValidationError) 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 %sHTTPRequestProperties.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HTTPRequestPropertiesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HTTPRequestPropertiesValidationError{} + +// Validate checks the field values on HTTPResponseProperties 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 *HTTPResponseProperties) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HTTPResponseProperties 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 +// HTTPResponsePropertiesMultiError, or nil if none found. +func (m *HTTPResponseProperties) ValidateAll() error { + return m.validate(true) +} + +func (m *HTTPResponseProperties) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetResponseCode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPResponsePropertiesValidationError{ + field: "ResponseCode", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPResponsePropertiesValidationError{ + field: "ResponseCode", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseCode()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HTTPResponsePropertiesValidationError{ + field: "ResponseCode", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ResponseHeadersBytes + + // no validation rules for ResponseBodyBytes + + // no validation rules for ResponseHeaders + + // no validation rules for ResponseTrailers + + // no validation rules for ResponseCodeDetails + + if len(errors) > 0 { + return HTTPResponsePropertiesMultiError(errors) + } + return nil +} + +// HTTPResponsePropertiesMultiError is an error wrapping multiple validation +// errors returned by HTTPResponseProperties.ValidateAll() if the designated +// constraints aren't met. +type HTTPResponsePropertiesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HTTPResponsePropertiesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HTTPResponsePropertiesMultiError) AllErrors() []error { return m } + +// HTTPResponsePropertiesValidationError is the validation error returned by +// HTTPResponseProperties.Validate if the designated constraints aren't met. +type HTTPResponsePropertiesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HTTPResponsePropertiesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HTTPResponsePropertiesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HTTPResponsePropertiesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HTTPResponsePropertiesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HTTPResponsePropertiesValidationError) ErrorName() string { + return "HTTPResponsePropertiesValidationError" +} + +// Error satisfies the builtin error interface +func (e HTTPResponsePropertiesValidationError) 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 %sHTTPResponseProperties.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HTTPResponsePropertiesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HTTPResponsePropertiesValidationError{} + +// Validate checks the field values on ResponseFlags_Unauthorized 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 *ResponseFlags_Unauthorized) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ResponseFlags_Unauthorized 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 +// ResponseFlags_UnauthorizedMultiError, or nil if none found. +func (m *ResponseFlags_Unauthorized) ValidateAll() error { + return m.validate(true) +} + +func (m *ResponseFlags_Unauthorized) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Reason + + if len(errors) > 0 { + return ResponseFlags_UnauthorizedMultiError(errors) + } + return nil +} + +// ResponseFlags_UnauthorizedMultiError is an error wrapping multiple +// validation errors returned by ResponseFlags_Unauthorized.ValidateAll() if +// the designated constraints aren't met. +type ResponseFlags_UnauthorizedMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResponseFlags_UnauthorizedMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResponseFlags_UnauthorizedMultiError) AllErrors() []error { return m } + +// ResponseFlags_UnauthorizedValidationError is the validation error returned +// by ResponseFlags_Unauthorized.Validate if the designated constraints aren't met. +type ResponseFlags_UnauthorizedValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ResponseFlags_UnauthorizedValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ResponseFlags_UnauthorizedValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ResponseFlags_UnauthorizedValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ResponseFlags_UnauthorizedValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ResponseFlags_UnauthorizedValidationError) ErrorName() string { + return "ResponseFlags_UnauthorizedValidationError" +} + +// Error satisfies the builtin error interface +func (e ResponseFlags_UnauthorizedValidationError) 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 %sResponseFlags_Unauthorized.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ResponseFlags_UnauthorizedValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ResponseFlags_UnauthorizedValidationError{} + +// Validate checks the field values on TLSProperties_CertificateProperties 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 *TLSProperties_CertificateProperties) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TLSProperties_CertificateProperties +// 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 +// TLSProperties_CertificatePropertiesMultiError, or nil if none found. +func (m *TLSProperties_CertificateProperties) ValidateAll() error { + return m.validate(true) +} + +func (m *TLSProperties_CertificateProperties) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetSubjectAltName() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TLSProperties_CertificatePropertiesValidationError{ + field: fmt.Sprintf("SubjectAltName[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TLSProperties_CertificatePropertiesValidationError{ + field: fmt.Sprintf("SubjectAltName[%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 TLSProperties_CertificatePropertiesValidationError{ + field: fmt.Sprintf("SubjectAltName[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for Subject + + if len(errors) > 0 { + return TLSProperties_CertificatePropertiesMultiError(errors) + } + return nil +} + +// TLSProperties_CertificatePropertiesMultiError is an error wrapping multiple +// validation errors returned by +// TLSProperties_CertificateProperties.ValidateAll() if the designated +// constraints aren't met. +type TLSProperties_CertificatePropertiesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TLSProperties_CertificatePropertiesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TLSProperties_CertificatePropertiesMultiError) AllErrors() []error { return m } + +// TLSProperties_CertificatePropertiesValidationError is the validation error +// returned by TLSProperties_CertificateProperties.Validate if the designated +// constraints aren't met. +type TLSProperties_CertificatePropertiesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TLSProperties_CertificatePropertiesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TLSProperties_CertificatePropertiesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TLSProperties_CertificatePropertiesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TLSProperties_CertificatePropertiesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TLSProperties_CertificatePropertiesValidationError) ErrorName() string { + return "TLSProperties_CertificatePropertiesValidationError" +} + +// Error satisfies the builtin error interface +func (e TLSProperties_CertificatePropertiesValidationError) 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 %sTLSProperties_CertificateProperties.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TLSProperties_CertificatePropertiesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TLSProperties_CertificatePropertiesValidationError{} + +// Validate checks the field values on +// TLSProperties_CertificateProperties_SubjectAltName 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 *TLSProperties_CertificateProperties_SubjectAltName) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// TLSProperties_CertificateProperties_SubjectAltName 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 +// TLSProperties_CertificateProperties_SubjectAltNameMultiError, or nil if +// none found. +func (m *TLSProperties_CertificateProperties_SubjectAltName) ValidateAll() error { + return m.validate(true) +} + +func (m *TLSProperties_CertificateProperties_SubjectAltName) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.San.(type) { + + case *TLSProperties_CertificateProperties_SubjectAltName_Uri: + // no validation rules for Uri + + case *TLSProperties_CertificateProperties_SubjectAltName_Dns: + // no validation rules for Dns + + } + + if len(errors) > 0 { + return TLSProperties_CertificateProperties_SubjectAltNameMultiError(errors) + } + return nil +} + +// TLSProperties_CertificateProperties_SubjectAltNameMultiError is an error +// wrapping multiple validation errors returned by +// TLSProperties_CertificateProperties_SubjectAltName.ValidateAll() if the +// designated constraints aren't met. +type TLSProperties_CertificateProperties_SubjectAltNameMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TLSProperties_CertificateProperties_SubjectAltNameMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TLSProperties_CertificateProperties_SubjectAltNameMultiError) AllErrors() []error { return m } + +// TLSProperties_CertificateProperties_SubjectAltNameValidationError is the +// validation error returned by +// TLSProperties_CertificateProperties_SubjectAltName.Validate if the +// designated constraints aren't met. +type TLSProperties_CertificateProperties_SubjectAltNameValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TLSProperties_CertificateProperties_SubjectAltNameValidationError) Field() string { + return e.field +} + +// Reason function returns reason value. +func (e TLSProperties_CertificateProperties_SubjectAltNameValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e TLSProperties_CertificateProperties_SubjectAltNameValidationError) Cause() error { + return e.cause +} + +// Key function returns key value. +func (e TLSProperties_CertificateProperties_SubjectAltNameValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TLSProperties_CertificateProperties_SubjectAltNameValidationError) ErrorName() string { + return "TLSProperties_CertificateProperties_SubjectAltNameValidationError" +} + +// Error satisfies the builtin error interface +func (e TLSProperties_CertificateProperties_SubjectAltNameValidationError) 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 %sTLSProperties_CertificateProperties_SubjectAltName.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TLSProperties_CertificateProperties_SubjectAltNameValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TLSProperties_CertificateProperties_SubjectAltNameValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/data/cluster/v3/outlier_detection_event.pb.go b/vendor/github.com/cilium/proxy/go/envoy/data/cluster/v3/outlier_detection_event.pb.go new file mode 100644 index 0000000000000..d4b12c802f1a4 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/data/cluster/v3/outlier_detection_event.pb.go @@ -0,0 +1,750 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/data/cluster/v3/outlier_detection_event.proto + +package clusterv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Type of ejection that took place +type OutlierEjectionType int32 + +const ( + // In case upstream host returns certain number of consecutive 5xx. + // If + // :ref:`outlier_detection.split_external_local_origin_errors` + // is “false“, all type of errors are treated as HTTP 5xx errors. + // See :ref:`Cluster outlier detection ` documentation for + // details. + OutlierEjectionType_CONSECUTIVE_5XX OutlierEjectionType = 0 + // In case upstream host returns certain number of consecutive gateway errors + OutlierEjectionType_CONSECUTIVE_GATEWAY_FAILURE OutlierEjectionType = 1 + // Runs over aggregated success rate statistics from every host in cluster + // and selects hosts for which ratio of successful replies deviates from other hosts + // in the cluster. + // If + // :ref:`outlier_detection.split_external_local_origin_errors` + // is “false“, all errors (externally and locally generated) are used to calculate success rate + // statistics. See :ref:`Cluster outlier detection ` + // documentation for details. + OutlierEjectionType_SUCCESS_RATE OutlierEjectionType = 2 + // Consecutive local origin failures: Connection failures, resets, timeouts, etc + // This type of ejection happens only when + // :ref:`outlier_detection.split_external_local_origin_errors` + // is set to “true“. + // See :ref:`Cluster outlier detection ` documentation for + OutlierEjectionType_CONSECUTIVE_LOCAL_ORIGIN_FAILURE OutlierEjectionType = 3 + // Runs over aggregated success rate statistics for local origin failures + // for all hosts in the cluster and selects hosts for which success rate deviates from other + // hosts in the cluster. This type of ejection happens only when + // :ref:`outlier_detection.split_external_local_origin_errors` + // is set to “true“. + // See :ref:`Cluster outlier detection ` documentation for + OutlierEjectionType_SUCCESS_RATE_LOCAL_ORIGIN OutlierEjectionType = 4 + // Runs over aggregated success rate statistics from every host in cluster and selects hosts for + // which ratio of failed replies is above configured value. + OutlierEjectionType_FAILURE_PERCENTAGE OutlierEjectionType = 5 + // Runs over aggregated success rate statistics for local origin failures from every host in + // cluster and selects hosts for which ratio of failed replies is above configured value. + OutlierEjectionType_FAILURE_PERCENTAGE_LOCAL_ORIGIN OutlierEjectionType = 6 +) + +// Enum value maps for OutlierEjectionType. +var ( + OutlierEjectionType_name = map[int32]string{ + 0: "CONSECUTIVE_5XX", + 1: "CONSECUTIVE_GATEWAY_FAILURE", + 2: "SUCCESS_RATE", + 3: "CONSECUTIVE_LOCAL_ORIGIN_FAILURE", + 4: "SUCCESS_RATE_LOCAL_ORIGIN", + 5: "FAILURE_PERCENTAGE", + 6: "FAILURE_PERCENTAGE_LOCAL_ORIGIN", + } + OutlierEjectionType_value = map[string]int32{ + "CONSECUTIVE_5XX": 0, + "CONSECUTIVE_GATEWAY_FAILURE": 1, + "SUCCESS_RATE": 2, + "CONSECUTIVE_LOCAL_ORIGIN_FAILURE": 3, + "SUCCESS_RATE_LOCAL_ORIGIN": 4, + "FAILURE_PERCENTAGE": 5, + "FAILURE_PERCENTAGE_LOCAL_ORIGIN": 6, + } +) + +func (x OutlierEjectionType) Enum() *OutlierEjectionType { + p := new(OutlierEjectionType) + *p = x + return p +} + +func (x OutlierEjectionType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OutlierEjectionType) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_data_cluster_v3_outlier_detection_event_proto_enumTypes[0].Descriptor() +} + +func (OutlierEjectionType) Type() protoreflect.EnumType { + return &file_envoy_data_cluster_v3_outlier_detection_event_proto_enumTypes[0] +} + +func (x OutlierEjectionType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use OutlierEjectionType.Descriptor instead. +func (OutlierEjectionType) EnumDescriptor() ([]byte, []int) { + return file_envoy_data_cluster_v3_outlier_detection_event_proto_rawDescGZIP(), []int{0} +} + +// Represents possible action applied to upstream host +type Action int32 + +const ( + // In case host was excluded from service + Action_EJECT Action = 0 + // In case host was brought back into service + Action_UNEJECT Action = 1 +) + +// Enum value maps for Action. +var ( + Action_name = map[int32]string{ + 0: "EJECT", + 1: "UNEJECT", + } + Action_value = map[string]int32{ + "EJECT": 0, + "UNEJECT": 1, + } +) + +func (x Action) Enum() *Action { + p := new(Action) + *p = x + return p +} + +func (x Action) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Action) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_data_cluster_v3_outlier_detection_event_proto_enumTypes[1].Descriptor() +} + +func (Action) Type() protoreflect.EnumType { + return &file_envoy_data_cluster_v3_outlier_detection_event_proto_enumTypes[1] +} + +func (x Action) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Action.Descriptor instead. +func (Action) EnumDescriptor() ([]byte, []int) { + return file_envoy_data_cluster_v3_outlier_detection_event_proto_rawDescGZIP(), []int{1} +} + +// [#next-free-field: 12] +type OutlierDetectionEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // In case of eject represents type of ejection that took place. + Type OutlierEjectionType `protobuf:"varint,1,opt,name=type,proto3,enum=envoy.data.cluster.v3.OutlierEjectionType" json:"type,omitempty"` + // Timestamp for event. + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // The time in seconds since the last action (either an ejection or unejection) took place. + SecsSinceLastAction *wrapperspb.UInt64Value `protobuf:"bytes,3,opt,name=secs_since_last_action,json=secsSinceLastAction,proto3" json:"secs_since_last_action,omitempty"` + // The :ref:`cluster ` that owns the ejected host. + ClusterName string `protobuf:"bytes,4,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` + // The URL of the ejected host. E.g., “tcp://1.2.3.4:80“. + UpstreamUrl string `protobuf:"bytes,5,opt,name=upstream_url,json=upstreamUrl,proto3" json:"upstream_url,omitempty"` + // The action that took place. + Action Action `protobuf:"varint,6,opt,name=action,proto3,enum=envoy.data.cluster.v3.Action" json:"action,omitempty"` + // If “action“ is “eject“, specifies the number of times the host has been ejected (local to + // that Envoy and gets reset if the host gets removed from the upstream cluster for any reason and + // then re-added). + NumEjections uint32 `protobuf:"varint,7,opt,name=num_ejections,json=numEjections,proto3" json:"num_ejections,omitempty"` + // If “action“ is “eject“, specifies if the ejection was enforced. “true“ means the host was + // ejected. “false“ means the event was logged but the host was not actually ejected. + Enforced bool `protobuf:"varint,8,opt,name=enforced,proto3" json:"enforced,omitempty"` + // Types that are assignable to Event: + // + // *OutlierDetectionEvent_EjectSuccessRateEvent + // *OutlierDetectionEvent_EjectConsecutiveEvent + // *OutlierDetectionEvent_EjectFailurePercentageEvent + Event isOutlierDetectionEvent_Event `protobuf_oneof:"event"` +} + +func (x *OutlierDetectionEvent) Reset() { + *x = OutlierDetectionEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_cluster_v3_outlier_detection_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OutlierDetectionEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutlierDetectionEvent) ProtoMessage() {} + +func (x *OutlierDetectionEvent) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_cluster_v3_outlier_detection_event_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutlierDetectionEvent.ProtoReflect.Descriptor instead. +func (*OutlierDetectionEvent) Descriptor() ([]byte, []int) { + return file_envoy_data_cluster_v3_outlier_detection_event_proto_rawDescGZIP(), []int{0} +} + +func (x *OutlierDetectionEvent) GetType() OutlierEjectionType { + if x != nil { + return x.Type + } + return OutlierEjectionType_CONSECUTIVE_5XX +} + +func (x *OutlierDetectionEvent) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *OutlierDetectionEvent) GetSecsSinceLastAction() *wrapperspb.UInt64Value { + if x != nil { + return x.SecsSinceLastAction + } + return nil +} + +func (x *OutlierDetectionEvent) GetClusterName() string { + if x != nil { + return x.ClusterName + } + return "" +} + +func (x *OutlierDetectionEvent) GetUpstreamUrl() string { + if x != nil { + return x.UpstreamUrl + } + return "" +} + +func (x *OutlierDetectionEvent) GetAction() Action { + if x != nil { + return x.Action + } + return Action_EJECT +} + +func (x *OutlierDetectionEvent) GetNumEjections() uint32 { + if x != nil { + return x.NumEjections + } + return 0 +} + +func (x *OutlierDetectionEvent) GetEnforced() bool { + if x != nil { + return x.Enforced + } + return false +} + +func (m *OutlierDetectionEvent) GetEvent() isOutlierDetectionEvent_Event { + if m != nil { + return m.Event + } + return nil +} + +func (x *OutlierDetectionEvent) GetEjectSuccessRateEvent() *OutlierEjectSuccessRate { + if x, ok := x.GetEvent().(*OutlierDetectionEvent_EjectSuccessRateEvent); ok { + return x.EjectSuccessRateEvent + } + return nil +} + +func (x *OutlierDetectionEvent) GetEjectConsecutiveEvent() *OutlierEjectConsecutive { + if x, ok := x.GetEvent().(*OutlierDetectionEvent_EjectConsecutiveEvent); ok { + return x.EjectConsecutiveEvent + } + return nil +} + +func (x *OutlierDetectionEvent) GetEjectFailurePercentageEvent() *OutlierEjectFailurePercentage { + if x, ok := x.GetEvent().(*OutlierDetectionEvent_EjectFailurePercentageEvent); ok { + return x.EjectFailurePercentageEvent + } + return nil +} + +type isOutlierDetectionEvent_Event interface { + isOutlierDetectionEvent_Event() +} + +type OutlierDetectionEvent_EjectSuccessRateEvent struct { + EjectSuccessRateEvent *OutlierEjectSuccessRate `protobuf:"bytes,9,opt,name=eject_success_rate_event,json=ejectSuccessRateEvent,proto3,oneof"` +} + +type OutlierDetectionEvent_EjectConsecutiveEvent struct { + EjectConsecutiveEvent *OutlierEjectConsecutive `protobuf:"bytes,10,opt,name=eject_consecutive_event,json=ejectConsecutiveEvent,proto3,oneof"` +} + +type OutlierDetectionEvent_EjectFailurePercentageEvent struct { + EjectFailurePercentageEvent *OutlierEjectFailurePercentage `protobuf:"bytes,11,opt,name=eject_failure_percentage_event,json=ejectFailurePercentageEvent,proto3,oneof"` +} + +func (*OutlierDetectionEvent_EjectSuccessRateEvent) isOutlierDetectionEvent_Event() {} + +func (*OutlierDetectionEvent_EjectConsecutiveEvent) isOutlierDetectionEvent_Event() {} + +func (*OutlierDetectionEvent_EjectFailurePercentageEvent) isOutlierDetectionEvent_Event() {} + +type OutlierEjectSuccessRate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Host’s success rate at the time of the ejection event on a 0-100 range. + HostSuccessRate uint32 `protobuf:"varint,1,opt,name=host_success_rate,json=hostSuccessRate,proto3" json:"host_success_rate,omitempty"` + // Average success rate of the hosts in the cluster at the time of the ejection event on a 0-100 + // range. + ClusterAverageSuccessRate uint32 `protobuf:"varint,2,opt,name=cluster_average_success_rate,json=clusterAverageSuccessRate,proto3" json:"cluster_average_success_rate,omitempty"` + // Success rate ejection threshold at the time of the ejection event. + ClusterSuccessRateEjectionThreshold uint32 `protobuf:"varint,3,opt,name=cluster_success_rate_ejection_threshold,json=clusterSuccessRateEjectionThreshold,proto3" json:"cluster_success_rate_ejection_threshold,omitempty"` +} + +func (x *OutlierEjectSuccessRate) Reset() { + *x = OutlierEjectSuccessRate{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_cluster_v3_outlier_detection_event_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OutlierEjectSuccessRate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutlierEjectSuccessRate) ProtoMessage() {} + +func (x *OutlierEjectSuccessRate) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_cluster_v3_outlier_detection_event_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutlierEjectSuccessRate.ProtoReflect.Descriptor instead. +func (*OutlierEjectSuccessRate) Descriptor() ([]byte, []int) { + return file_envoy_data_cluster_v3_outlier_detection_event_proto_rawDescGZIP(), []int{1} +} + +func (x *OutlierEjectSuccessRate) GetHostSuccessRate() uint32 { + if x != nil { + return x.HostSuccessRate + } + return 0 +} + +func (x *OutlierEjectSuccessRate) GetClusterAverageSuccessRate() uint32 { + if x != nil { + return x.ClusterAverageSuccessRate + } + return 0 +} + +func (x *OutlierEjectSuccessRate) GetClusterSuccessRateEjectionThreshold() uint32 { + if x != nil { + return x.ClusterSuccessRateEjectionThreshold + } + return 0 +} + +type OutlierEjectConsecutive struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *OutlierEjectConsecutive) Reset() { + *x = OutlierEjectConsecutive{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_cluster_v3_outlier_detection_event_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OutlierEjectConsecutive) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutlierEjectConsecutive) ProtoMessage() {} + +func (x *OutlierEjectConsecutive) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_cluster_v3_outlier_detection_event_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutlierEjectConsecutive.ProtoReflect.Descriptor instead. +func (*OutlierEjectConsecutive) Descriptor() ([]byte, []int) { + return file_envoy_data_cluster_v3_outlier_detection_event_proto_rawDescGZIP(), []int{2} +} + +type OutlierEjectFailurePercentage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Host's success rate at the time of the ejection event on a 0-100 range. + HostSuccessRate uint32 `protobuf:"varint,1,opt,name=host_success_rate,json=hostSuccessRate,proto3" json:"host_success_rate,omitempty"` +} + +func (x *OutlierEjectFailurePercentage) Reset() { + *x = OutlierEjectFailurePercentage{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_cluster_v3_outlier_detection_event_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OutlierEjectFailurePercentage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutlierEjectFailurePercentage) ProtoMessage() {} + +func (x *OutlierEjectFailurePercentage) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_cluster_v3_outlier_detection_event_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutlierEjectFailurePercentage.ProtoReflect.Descriptor instead. +func (*OutlierEjectFailurePercentage) Descriptor() ([]byte, []int) { + return file_envoy_data_cluster_v3_outlier_detection_event_proto_rawDescGZIP(), []int{3} +} + +func (x *OutlierEjectFailurePercentage) GetHostSuccessRate() uint32 { + if x != nil { + return x.HostSuccessRate + } + return 0 +} + +var File_envoy_data_cluster_v3_outlier_detection_event_proto protoreflect.FileDescriptor + +var file_envoy_data_cluster_v3_outlier_detection_event_proto_rawDesc = []byte{ + 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x5f, + 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 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, 0x1e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, + 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0xe1, 0x06, 0x0a, 0x15, 0x4f, 0x75, 0x74, + 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, + 0x45, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 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, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x51, 0x0a, 0x16, 0x73, 0x65, 0x63, 0x73, 0x5f, 0x73, + 0x69, 0x6e, 0x63, 0x65, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, 0x73, 0x65, 0x63, 0x73, 0x53, 0x69, 0x6e, 0x63, 0x65, 0x4c, + 0x61, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x0c, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x0c, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x55, 0x72, + 0x6c, 0x12, 0x3f, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x75, 0x6d, 0x5f, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6e, 0x75, 0x6d, 0x45, 0x6a, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x66, 0x6f, 0x72, + 0x63, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x65, 0x6e, 0x66, 0x6f, 0x72, + 0x63, 0x65, 0x64, 0x12, 0x69, 0x0a, 0x18, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x75, + 0x74, 0x6c, 0x69, 0x65, 0x72, 0x45, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x52, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x15, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x68, + 0x0a, 0x17, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x45, + 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x48, + 0x00, 0x52, 0x15, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x76, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x7b, 0x0a, 0x1e, 0x65, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, + 0x74, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, + 0x45, 0x6a, 0x65, 0x63, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x50, 0x65, 0x72, 0x63, + 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x1b, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x46, + 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, + 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x0c, + 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xb2, 0x02, 0x0a, + 0x17, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x45, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x52, 0x61, 0x74, 0x65, 0x12, 0x33, 0x0a, 0x11, 0x68, 0x6f, 0x73, 0x74, + 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x64, 0x52, 0x0f, 0x68, 0x6f, + 0x73, 0x74, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x61, 0x74, 0x65, 0x12, 0x48, 0x0a, + 0x1c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x61, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, + 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x64, 0x52, 0x19, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x41, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x53, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x52, 0x61, 0x74, 0x65, 0x12, 0x5d, 0x0a, 0x27, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, + 0x65, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, + 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, + 0x64, 0x52, 0x23, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x52, 0x61, 0x74, 0x65, 0x45, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x68, 0x72, + 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, + 0x72, 0x45, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x61, 0x74, + 0x65, 0x22, 0x54, 0x0a, 0x17, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x45, 0x6a, 0x65, 0x63, + 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x3a, 0x39, 0x9a, 0xc5, + 0x88, 0x1e, 0x34, 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x45, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x73, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x1d, 0x4f, 0x75, 0x74, 0x6c, + 0x69, 0x65, 0x72, 0x45, 0x6a, 0x65, 0x63, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x50, + 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x33, 0x0a, 0x11, 0x68, 0x6f, 0x73, + 0x74, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x64, 0x52, 0x0f, 0x68, + 0x6f, 0x73, 0x74, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x61, 0x74, 0x65, 0x3a, 0x3f, + 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x45, 0x6a, 0x65, 0x63, 0x74, 0x46, 0x61, + 0x69, 0x6c, 0x75, 0x72, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x2a, + 0xdf, 0x01, 0x0a, 0x13, 0x4f, 0x75, 0x74, 0x6c, 0x69, 0x65, 0x72, 0x45, 0x6a, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x4f, 0x4e, 0x53, 0x45, + 0x43, 0x55, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x35, 0x58, 0x58, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, + 0x43, 0x4f, 0x4e, 0x53, 0x45, 0x43, 0x55, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x47, 0x41, 0x54, 0x45, + 0x57, 0x41, 0x59, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x01, 0x12, 0x10, 0x0a, + 0x0c, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x52, 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, + 0x24, 0x0a, 0x20, 0x43, 0x4f, 0x4e, 0x53, 0x45, 0x43, 0x55, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x4c, + 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x4f, 0x52, 0x49, 0x47, 0x49, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, + 0x55, 0x52, 0x45, 0x10, 0x03, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, + 0x5f, 0x52, 0x41, 0x54, 0x45, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x4f, 0x52, 0x49, 0x47, + 0x49, 0x4e, 0x10, 0x04, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, + 0x50, 0x45, 0x52, 0x43, 0x45, 0x4e, 0x54, 0x41, 0x47, 0x45, 0x10, 0x05, 0x12, 0x23, 0x0a, 0x1f, + 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x50, 0x45, 0x52, 0x43, 0x45, 0x4e, 0x54, 0x41, + 0x47, 0x45, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x4f, 0x52, 0x49, 0x47, 0x49, 0x4e, 0x10, + 0x06, 0x2a, 0x20, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x09, 0x0a, 0x05, 0x45, + 0x4a, 0x45, 0x43, 0x54, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x45, 0x4a, 0x45, 0x43, + 0x54, 0x10, 0x01, 0x42, 0x93, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x1a, 0x4f, 0x75, 0x74, + 0x6c, 0x69, 0x65, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_data_cluster_v3_outlier_detection_event_proto_rawDescOnce sync.Once + file_envoy_data_cluster_v3_outlier_detection_event_proto_rawDescData = file_envoy_data_cluster_v3_outlier_detection_event_proto_rawDesc +) + +func file_envoy_data_cluster_v3_outlier_detection_event_proto_rawDescGZIP() []byte { + file_envoy_data_cluster_v3_outlier_detection_event_proto_rawDescOnce.Do(func() { + file_envoy_data_cluster_v3_outlier_detection_event_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_data_cluster_v3_outlier_detection_event_proto_rawDescData) + }) + return file_envoy_data_cluster_v3_outlier_detection_event_proto_rawDescData +} + +var file_envoy_data_cluster_v3_outlier_detection_event_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_envoy_data_cluster_v3_outlier_detection_event_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_envoy_data_cluster_v3_outlier_detection_event_proto_goTypes = []interface{}{ + (OutlierEjectionType)(0), // 0: envoy.data.cluster.v3.OutlierEjectionType + (Action)(0), // 1: envoy.data.cluster.v3.Action + (*OutlierDetectionEvent)(nil), // 2: envoy.data.cluster.v3.OutlierDetectionEvent + (*OutlierEjectSuccessRate)(nil), // 3: envoy.data.cluster.v3.OutlierEjectSuccessRate + (*OutlierEjectConsecutive)(nil), // 4: envoy.data.cluster.v3.OutlierEjectConsecutive + (*OutlierEjectFailurePercentage)(nil), // 5: envoy.data.cluster.v3.OutlierEjectFailurePercentage + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp + (*wrapperspb.UInt64Value)(nil), // 7: google.protobuf.UInt64Value +} +var file_envoy_data_cluster_v3_outlier_detection_event_proto_depIdxs = []int32{ + 0, // 0: envoy.data.cluster.v3.OutlierDetectionEvent.type:type_name -> envoy.data.cluster.v3.OutlierEjectionType + 6, // 1: envoy.data.cluster.v3.OutlierDetectionEvent.timestamp:type_name -> google.protobuf.Timestamp + 7, // 2: envoy.data.cluster.v3.OutlierDetectionEvent.secs_since_last_action:type_name -> google.protobuf.UInt64Value + 1, // 3: envoy.data.cluster.v3.OutlierDetectionEvent.action:type_name -> envoy.data.cluster.v3.Action + 3, // 4: envoy.data.cluster.v3.OutlierDetectionEvent.eject_success_rate_event:type_name -> envoy.data.cluster.v3.OutlierEjectSuccessRate + 4, // 5: envoy.data.cluster.v3.OutlierDetectionEvent.eject_consecutive_event:type_name -> envoy.data.cluster.v3.OutlierEjectConsecutive + 5, // 6: envoy.data.cluster.v3.OutlierDetectionEvent.eject_failure_percentage_event:type_name -> envoy.data.cluster.v3.OutlierEjectFailurePercentage + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_envoy_data_cluster_v3_outlier_detection_event_proto_init() } +func file_envoy_data_cluster_v3_outlier_detection_event_proto_init() { + if File_envoy_data_cluster_v3_outlier_detection_event_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_data_cluster_v3_outlier_detection_event_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OutlierDetectionEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_cluster_v3_outlier_detection_event_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OutlierEjectSuccessRate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_cluster_v3_outlier_detection_event_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OutlierEjectConsecutive); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_cluster_v3_outlier_detection_event_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OutlierEjectFailurePercentage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_data_cluster_v3_outlier_detection_event_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*OutlierDetectionEvent_EjectSuccessRateEvent)(nil), + (*OutlierDetectionEvent_EjectConsecutiveEvent)(nil), + (*OutlierDetectionEvent_EjectFailurePercentageEvent)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_data_cluster_v3_outlier_detection_event_proto_rawDesc, + NumEnums: 2, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_data_cluster_v3_outlier_detection_event_proto_goTypes, + DependencyIndexes: file_envoy_data_cluster_v3_outlier_detection_event_proto_depIdxs, + EnumInfos: file_envoy_data_cluster_v3_outlier_detection_event_proto_enumTypes, + MessageInfos: file_envoy_data_cluster_v3_outlier_detection_event_proto_msgTypes, + }.Build() + File_envoy_data_cluster_v3_outlier_detection_event_proto = out.File + file_envoy_data_cluster_v3_outlier_detection_event_proto_rawDesc = nil + file_envoy_data_cluster_v3_outlier_detection_event_proto_goTypes = nil + file_envoy_data_cluster_v3_outlier_detection_event_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/data/cluster/v3/outlier_detection_event.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/data/cluster/v3/outlier_detection_event.pb.validate.go new file mode 100644 index 0000000000000..6ecf5a0ffa633 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/data/cluster/v3/outlier_detection_event.pb.validate.go @@ -0,0 +1,698 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/data/cluster/v3/outlier_detection_event.proto + +package clusterv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on OutlierDetectionEvent 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 *OutlierDetectionEvent) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OutlierDetectionEvent 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 +// OutlierDetectionEventMultiError, or nil if none found. +func (m *OutlierDetectionEvent) ValidateAll() error { + return m.validate(true) +} + +func (m *OutlierDetectionEvent) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if _, ok := OutlierEjectionType_name[int32(m.GetType())]; !ok { + err := OutlierDetectionEventValidationError{ + field: "Type", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetTimestamp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimestamp()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OutlierDetectionEventValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetSecsSinceLastAction()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "SecsSinceLastAction", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "SecsSinceLastAction", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSecsSinceLastAction()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OutlierDetectionEventValidationError{ + field: "SecsSinceLastAction", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if utf8.RuneCountInString(m.GetClusterName()) < 1 { + err := OutlierDetectionEventValidationError{ + field: "ClusterName", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if utf8.RuneCountInString(m.GetUpstreamUrl()) < 1 { + err := OutlierDetectionEventValidationError{ + field: "UpstreamUrl", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := Action_name[int32(m.GetAction())]; !ok { + err := OutlierDetectionEventValidationError{ + field: "Action", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for NumEjections + + // no validation rules for Enforced + + switch m.Event.(type) { + + case *OutlierDetectionEvent_EjectSuccessRateEvent: + + if all { + switch v := interface{}(m.GetEjectSuccessRateEvent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "EjectSuccessRateEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "EjectSuccessRateEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEjectSuccessRateEvent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OutlierDetectionEventValidationError{ + field: "EjectSuccessRateEvent", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *OutlierDetectionEvent_EjectConsecutiveEvent: + + if all { + switch v := interface{}(m.GetEjectConsecutiveEvent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "EjectConsecutiveEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "EjectConsecutiveEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEjectConsecutiveEvent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OutlierDetectionEventValidationError{ + field: "EjectConsecutiveEvent", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *OutlierDetectionEvent_EjectFailurePercentageEvent: + + if all { + switch v := interface{}(m.GetEjectFailurePercentageEvent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "EjectFailurePercentageEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OutlierDetectionEventValidationError{ + field: "EjectFailurePercentageEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEjectFailurePercentageEvent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OutlierDetectionEventValidationError{ + field: "EjectFailurePercentageEvent", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := OutlierDetectionEventValidationError{ + field: "Event", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return OutlierDetectionEventMultiError(errors) + } + return nil +} + +// OutlierDetectionEventMultiError is an error wrapping multiple validation +// errors returned by OutlierDetectionEvent.ValidateAll() if the designated +// constraints aren't met. +type OutlierDetectionEventMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OutlierDetectionEventMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OutlierDetectionEventMultiError) AllErrors() []error { return m } + +// OutlierDetectionEventValidationError is the validation error returned by +// OutlierDetectionEvent.Validate if the designated constraints aren't met. +type OutlierDetectionEventValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OutlierDetectionEventValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OutlierDetectionEventValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OutlierDetectionEventValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OutlierDetectionEventValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OutlierDetectionEventValidationError) ErrorName() string { + return "OutlierDetectionEventValidationError" +} + +// Error satisfies the builtin error interface +func (e OutlierDetectionEventValidationError) 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 %sOutlierDetectionEvent.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OutlierDetectionEventValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OutlierDetectionEventValidationError{} + +// Validate checks the field values on OutlierEjectSuccessRate 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 *OutlierEjectSuccessRate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OutlierEjectSuccessRate 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 +// OutlierEjectSuccessRateMultiError, or nil if none found. +func (m *OutlierEjectSuccessRate) ValidateAll() error { + return m.validate(true) +} + +func (m *OutlierEjectSuccessRate) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetHostSuccessRate() > 100 { + err := OutlierEjectSuccessRateValidationError{ + field: "HostSuccessRate", + reason: "value must be less than or equal to 100", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetClusterAverageSuccessRate() > 100 { + err := OutlierEjectSuccessRateValidationError{ + field: "ClusterAverageSuccessRate", + reason: "value must be less than or equal to 100", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetClusterSuccessRateEjectionThreshold() > 100 { + err := OutlierEjectSuccessRateValidationError{ + field: "ClusterSuccessRateEjectionThreshold", + reason: "value must be less than or equal to 100", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return OutlierEjectSuccessRateMultiError(errors) + } + return nil +} + +// OutlierEjectSuccessRateMultiError is an error wrapping multiple validation +// errors returned by OutlierEjectSuccessRate.ValidateAll() if the designated +// constraints aren't met. +type OutlierEjectSuccessRateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OutlierEjectSuccessRateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OutlierEjectSuccessRateMultiError) AllErrors() []error { return m } + +// OutlierEjectSuccessRateValidationError is the validation error returned by +// OutlierEjectSuccessRate.Validate if the designated constraints aren't met. +type OutlierEjectSuccessRateValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OutlierEjectSuccessRateValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OutlierEjectSuccessRateValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OutlierEjectSuccessRateValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OutlierEjectSuccessRateValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OutlierEjectSuccessRateValidationError) ErrorName() string { + return "OutlierEjectSuccessRateValidationError" +} + +// Error satisfies the builtin error interface +func (e OutlierEjectSuccessRateValidationError) 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 %sOutlierEjectSuccessRate.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OutlierEjectSuccessRateValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OutlierEjectSuccessRateValidationError{} + +// Validate checks the field values on OutlierEjectConsecutive 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 *OutlierEjectConsecutive) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OutlierEjectConsecutive 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 +// OutlierEjectConsecutiveMultiError, or nil if none found. +func (m *OutlierEjectConsecutive) ValidateAll() error { + return m.validate(true) +} + +func (m *OutlierEjectConsecutive) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return OutlierEjectConsecutiveMultiError(errors) + } + return nil +} + +// OutlierEjectConsecutiveMultiError is an error wrapping multiple validation +// errors returned by OutlierEjectConsecutive.ValidateAll() if the designated +// constraints aren't met. +type OutlierEjectConsecutiveMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OutlierEjectConsecutiveMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OutlierEjectConsecutiveMultiError) AllErrors() []error { return m } + +// OutlierEjectConsecutiveValidationError is the validation error returned by +// OutlierEjectConsecutive.Validate if the designated constraints aren't met. +type OutlierEjectConsecutiveValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OutlierEjectConsecutiveValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OutlierEjectConsecutiveValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OutlierEjectConsecutiveValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OutlierEjectConsecutiveValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OutlierEjectConsecutiveValidationError) ErrorName() string { + return "OutlierEjectConsecutiveValidationError" +} + +// Error satisfies the builtin error interface +func (e OutlierEjectConsecutiveValidationError) 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 %sOutlierEjectConsecutive.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OutlierEjectConsecutiveValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OutlierEjectConsecutiveValidationError{} + +// Validate checks the field values on OutlierEjectFailurePercentage 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 *OutlierEjectFailurePercentage) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OutlierEjectFailurePercentage 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 +// OutlierEjectFailurePercentageMultiError, or nil if none found. +func (m *OutlierEjectFailurePercentage) ValidateAll() error { + return m.validate(true) +} + +func (m *OutlierEjectFailurePercentage) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetHostSuccessRate() > 100 { + err := OutlierEjectFailurePercentageValidationError{ + field: "HostSuccessRate", + reason: "value must be less than or equal to 100", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return OutlierEjectFailurePercentageMultiError(errors) + } + return nil +} + +// OutlierEjectFailurePercentageMultiError is an error wrapping multiple +// validation errors returned by OutlierEjectFailurePercentage.ValidateAll() +// if the designated constraints aren't met. +type OutlierEjectFailurePercentageMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OutlierEjectFailurePercentageMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OutlierEjectFailurePercentageMultiError) AllErrors() []error { return m } + +// OutlierEjectFailurePercentageValidationError is the validation error +// returned by OutlierEjectFailurePercentage.Validate if the designated +// constraints aren't met. +type OutlierEjectFailurePercentageValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OutlierEjectFailurePercentageValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OutlierEjectFailurePercentageValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OutlierEjectFailurePercentageValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OutlierEjectFailurePercentageValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OutlierEjectFailurePercentageValidationError) ErrorName() string { + return "OutlierEjectFailurePercentageValidationError" +} + +// Error satisfies the builtin error interface +func (e OutlierEjectFailurePercentageValidationError) 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 %sOutlierEjectFailurePercentage.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OutlierEjectFailurePercentageValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OutlierEjectFailurePercentageValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/data/core/v3/health_check_event.pb.go b/vendor/github.com/cilium/proxy/go/envoy/data/core/v3/health_check_event.pb.go new file mode 100644 index 0000000000000..1b4b656129406 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/data/core/v3/health_check_event.pb.go @@ -0,0 +1,807 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/data/core/v3/health_check_event.proto + +package corev3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type HealthCheckFailureType int32 + +const ( + HealthCheckFailureType_ACTIVE HealthCheckFailureType = 0 + HealthCheckFailureType_PASSIVE HealthCheckFailureType = 1 + HealthCheckFailureType_NETWORK HealthCheckFailureType = 2 + HealthCheckFailureType_NETWORK_TIMEOUT HealthCheckFailureType = 3 +) + +// Enum value maps for HealthCheckFailureType. +var ( + HealthCheckFailureType_name = map[int32]string{ + 0: "ACTIVE", + 1: "PASSIVE", + 2: "NETWORK", + 3: "NETWORK_TIMEOUT", + } + HealthCheckFailureType_value = map[string]int32{ + "ACTIVE": 0, + "PASSIVE": 1, + "NETWORK": 2, + "NETWORK_TIMEOUT": 3, + } +) + +func (x HealthCheckFailureType) Enum() *HealthCheckFailureType { + p := new(HealthCheckFailureType) + *p = x + return p +} + +func (x HealthCheckFailureType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HealthCheckFailureType) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_data_core_v3_health_check_event_proto_enumTypes[0].Descriptor() +} + +func (HealthCheckFailureType) Type() protoreflect.EnumType { + return &file_envoy_data_core_v3_health_check_event_proto_enumTypes[0] +} + +func (x HealthCheckFailureType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HealthCheckFailureType.Descriptor instead. +func (HealthCheckFailureType) EnumDescriptor() ([]byte, []int) { + return file_envoy_data_core_v3_health_check_event_proto_rawDescGZIP(), []int{0} +} + +type HealthCheckerType int32 + +const ( + HealthCheckerType_HTTP HealthCheckerType = 0 + HealthCheckerType_TCP HealthCheckerType = 1 + HealthCheckerType_GRPC HealthCheckerType = 2 + HealthCheckerType_REDIS HealthCheckerType = 3 +) + +// Enum value maps for HealthCheckerType. +var ( + HealthCheckerType_name = map[int32]string{ + 0: "HTTP", + 1: "TCP", + 2: "GRPC", + 3: "REDIS", + } + HealthCheckerType_value = map[string]int32{ + "HTTP": 0, + "TCP": 1, + "GRPC": 2, + "REDIS": 3, + } +) + +func (x HealthCheckerType) Enum() *HealthCheckerType { + p := new(HealthCheckerType) + *p = x + return p +} + +func (x HealthCheckerType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HealthCheckerType) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_data_core_v3_health_check_event_proto_enumTypes[1].Descriptor() +} + +func (HealthCheckerType) Type() protoreflect.EnumType { + return &file_envoy_data_core_v3_health_check_event_proto_enumTypes[1] +} + +func (x HealthCheckerType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HealthCheckerType.Descriptor instead. +func (HealthCheckerType) EnumDescriptor() ([]byte, []int) { + return file_envoy_data_core_v3_health_check_event_proto_rawDescGZIP(), []int{1} +} + +// [#next-free-field: 10] +type HealthCheckEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HealthCheckerType HealthCheckerType `protobuf:"varint,1,opt,name=health_checker_type,json=healthCheckerType,proto3,enum=envoy.data.core.v3.HealthCheckerType" json:"health_checker_type,omitempty"` + Host *v3.Address `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"` + ClusterName string `protobuf:"bytes,3,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` + // Types that are assignable to Event: + // + // *HealthCheckEvent_EjectUnhealthyEvent + // *HealthCheckEvent_AddHealthyEvent + // *HealthCheckEvent_HealthCheckFailureEvent + // *HealthCheckEvent_DegradedHealthyHost + // *HealthCheckEvent_NoLongerDegradedHost + Event isHealthCheckEvent_Event `protobuf_oneof:"event"` + // Timestamp for event. + Timestamp *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *HealthCheckEvent) Reset() { + *x = HealthCheckEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_core_v3_health_check_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HealthCheckEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HealthCheckEvent) ProtoMessage() {} + +func (x *HealthCheckEvent) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_core_v3_health_check_event_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HealthCheckEvent.ProtoReflect.Descriptor instead. +func (*HealthCheckEvent) Descriptor() ([]byte, []int) { + return file_envoy_data_core_v3_health_check_event_proto_rawDescGZIP(), []int{0} +} + +func (x *HealthCheckEvent) GetHealthCheckerType() HealthCheckerType { + if x != nil { + return x.HealthCheckerType + } + return HealthCheckerType_HTTP +} + +func (x *HealthCheckEvent) GetHost() *v3.Address { + if x != nil { + return x.Host + } + return nil +} + +func (x *HealthCheckEvent) GetClusterName() string { + if x != nil { + return x.ClusterName + } + return "" +} + +func (m *HealthCheckEvent) GetEvent() isHealthCheckEvent_Event { + if m != nil { + return m.Event + } + return nil +} + +func (x *HealthCheckEvent) GetEjectUnhealthyEvent() *HealthCheckEjectUnhealthy { + if x, ok := x.GetEvent().(*HealthCheckEvent_EjectUnhealthyEvent); ok { + return x.EjectUnhealthyEvent + } + return nil +} + +func (x *HealthCheckEvent) GetAddHealthyEvent() *HealthCheckAddHealthy { + if x, ok := x.GetEvent().(*HealthCheckEvent_AddHealthyEvent); ok { + return x.AddHealthyEvent + } + return nil +} + +func (x *HealthCheckEvent) GetHealthCheckFailureEvent() *HealthCheckFailure { + if x, ok := x.GetEvent().(*HealthCheckEvent_HealthCheckFailureEvent); ok { + return x.HealthCheckFailureEvent + } + return nil +} + +func (x *HealthCheckEvent) GetDegradedHealthyHost() *DegradedHealthyHost { + if x, ok := x.GetEvent().(*HealthCheckEvent_DegradedHealthyHost); ok { + return x.DegradedHealthyHost + } + return nil +} + +func (x *HealthCheckEvent) GetNoLongerDegradedHost() *NoLongerDegradedHost { + if x, ok := x.GetEvent().(*HealthCheckEvent_NoLongerDegradedHost); ok { + return x.NoLongerDegradedHost + } + return nil +} + +func (x *HealthCheckEvent) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +type isHealthCheckEvent_Event interface { + isHealthCheckEvent_Event() +} + +type HealthCheckEvent_EjectUnhealthyEvent struct { + // Host ejection. + EjectUnhealthyEvent *HealthCheckEjectUnhealthy `protobuf:"bytes,4,opt,name=eject_unhealthy_event,json=ejectUnhealthyEvent,proto3,oneof"` +} + +type HealthCheckEvent_AddHealthyEvent struct { + // Host addition. + AddHealthyEvent *HealthCheckAddHealthy `protobuf:"bytes,5,opt,name=add_healthy_event,json=addHealthyEvent,proto3,oneof"` +} + +type HealthCheckEvent_HealthCheckFailureEvent struct { + // Host failure. + HealthCheckFailureEvent *HealthCheckFailure `protobuf:"bytes,7,opt,name=health_check_failure_event,json=healthCheckFailureEvent,proto3,oneof"` +} + +type HealthCheckEvent_DegradedHealthyHost struct { + // Healthy host became degraded. + DegradedHealthyHost *DegradedHealthyHost `protobuf:"bytes,8,opt,name=degraded_healthy_host,json=degradedHealthyHost,proto3,oneof"` +} + +type HealthCheckEvent_NoLongerDegradedHost struct { + // A degraded host returned to being healthy. + NoLongerDegradedHost *NoLongerDegradedHost `protobuf:"bytes,9,opt,name=no_longer_degraded_host,json=noLongerDegradedHost,proto3,oneof"` +} + +func (*HealthCheckEvent_EjectUnhealthyEvent) isHealthCheckEvent_Event() {} + +func (*HealthCheckEvent_AddHealthyEvent) isHealthCheckEvent_Event() {} + +func (*HealthCheckEvent_HealthCheckFailureEvent) isHealthCheckEvent_Event() {} + +func (*HealthCheckEvent_DegradedHealthyHost) isHealthCheckEvent_Event() {} + +func (*HealthCheckEvent_NoLongerDegradedHost) isHealthCheckEvent_Event() {} + +type HealthCheckEjectUnhealthy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The type of failure that caused this ejection. + FailureType HealthCheckFailureType `protobuf:"varint,1,opt,name=failure_type,json=failureType,proto3,enum=envoy.data.core.v3.HealthCheckFailureType" json:"failure_type,omitempty"` +} + +func (x *HealthCheckEjectUnhealthy) Reset() { + *x = HealthCheckEjectUnhealthy{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_core_v3_health_check_event_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HealthCheckEjectUnhealthy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HealthCheckEjectUnhealthy) ProtoMessage() {} + +func (x *HealthCheckEjectUnhealthy) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_core_v3_health_check_event_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HealthCheckEjectUnhealthy.ProtoReflect.Descriptor instead. +func (*HealthCheckEjectUnhealthy) Descriptor() ([]byte, []int) { + return file_envoy_data_core_v3_health_check_event_proto_rawDescGZIP(), []int{1} +} + +func (x *HealthCheckEjectUnhealthy) GetFailureType() HealthCheckFailureType { + if x != nil { + return x.FailureType + } + return HealthCheckFailureType_ACTIVE +} + +type HealthCheckAddHealthy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Whether this addition is the result of the first ever health check on a host, in which case + // the configured :ref:`healthy threshold ` + // is bypassed and the host is immediately added. + FirstCheck bool `protobuf:"varint,1,opt,name=first_check,json=firstCheck,proto3" json:"first_check,omitempty"` +} + +func (x *HealthCheckAddHealthy) Reset() { + *x = HealthCheckAddHealthy{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_core_v3_health_check_event_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HealthCheckAddHealthy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HealthCheckAddHealthy) ProtoMessage() {} + +func (x *HealthCheckAddHealthy) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_core_v3_health_check_event_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HealthCheckAddHealthy.ProtoReflect.Descriptor instead. +func (*HealthCheckAddHealthy) Descriptor() ([]byte, []int) { + return file_envoy_data_core_v3_health_check_event_proto_rawDescGZIP(), []int{2} +} + +func (x *HealthCheckAddHealthy) GetFirstCheck() bool { + if x != nil { + return x.FirstCheck + } + return false +} + +type HealthCheckFailure struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The type of failure that caused this event. + FailureType HealthCheckFailureType `protobuf:"varint,1,opt,name=failure_type,json=failureType,proto3,enum=envoy.data.core.v3.HealthCheckFailureType" json:"failure_type,omitempty"` + // Whether this event is the result of the first ever health check on a host. + FirstCheck bool `protobuf:"varint,2,opt,name=first_check,json=firstCheck,proto3" json:"first_check,omitempty"` +} + +func (x *HealthCheckFailure) Reset() { + *x = HealthCheckFailure{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_core_v3_health_check_event_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HealthCheckFailure) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HealthCheckFailure) ProtoMessage() {} + +func (x *HealthCheckFailure) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_core_v3_health_check_event_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HealthCheckFailure.ProtoReflect.Descriptor instead. +func (*HealthCheckFailure) Descriptor() ([]byte, []int) { + return file_envoy_data_core_v3_health_check_event_proto_rawDescGZIP(), []int{3} +} + +func (x *HealthCheckFailure) GetFailureType() HealthCheckFailureType { + if x != nil { + return x.FailureType + } + return HealthCheckFailureType_ACTIVE +} + +func (x *HealthCheckFailure) GetFirstCheck() bool { + if x != nil { + return x.FirstCheck + } + return false +} + +type DegradedHealthyHost struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DegradedHealthyHost) Reset() { + *x = DegradedHealthyHost{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_core_v3_health_check_event_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DegradedHealthyHost) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DegradedHealthyHost) ProtoMessage() {} + +func (x *DegradedHealthyHost) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_core_v3_health_check_event_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DegradedHealthyHost.ProtoReflect.Descriptor instead. +func (*DegradedHealthyHost) Descriptor() ([]byte, []int) { + return file_envoy_data_core_v3_health_check_event_proto_rawDescGZIP(), []int{4} +} + +type NoLongerDegradedHost struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *NoLongerDegradedHost) Reset() { + *x = NoLongerDegradedHost{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_core_v3_health_check_event_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NoLongerDegradedHost) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NoLongerDegradedHost) ProtoMessage() {} + +func (x *NoLongerDegradedHost) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_core_v3_health_check_event_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NoLongerDegradedHost.ProtoReflect.Descriptor instead. +func (*NoLongerDegradedHost) Descriptor() ([]byte, []int) { + return file_envoy_data_core_v3_health_check_event_proto_rawDescGZIP(), []int{5} +} + +var File_envoy_data_core_v3_health_check_event_proto protoreflect.FileDescriptor + +var file_envoy_data_core_v3_health_check_event_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 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, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, + 0x6e, 0x67, 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, 0xb2, 0x06, 0x0a, 0x10, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x5f, 0x0a, 0x13, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x11, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x0c, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x63, 0x0a, 0x15, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x75, 0x6e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x79, 0x48, 0x00, 0x52, 0x13, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, 0x68, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x57, 0x0a, 0x11, 0x61, + 0x64, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x64, 0x64, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x79, 0x48, 0x00, 0x52, 0x0f, 0x61, 0x64, 0x64, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x65, 0x0a, 0x1a, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, + 0x48, 0x00, 0x52, 0x17, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, + 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x5d, 0x0a, 0x15, 0x64, + 0x65, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, + 0x68, 0x6f, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x44, 0x65, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x48, + 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x13, 0x64, 0x65, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x61, 0x0a, 0x17, 0x6e, 0x6f, + 0x5f, 0x6c, 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, + 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x4e, 0x6f, 0x4c, 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x44, 0x65, 0x67, 0x72, 0x61, 0x64, 0x65, + 0x64, 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x14, 0x6e, 0x6f, 0x4c, 0x6f, 0x6e, 0x67, 0x65, + 0x72, 0x44, 0x65, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x38, 0x0a, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 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, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x0c, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xae, 0x01, 0x0a, 0x19, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x79, 0x12, 0x57, 0x0a, 0x0c, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, + 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, + 0x52, 0x0b, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x38, 0x9a, + 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x22, 0x6e, 0x0a, 0x15, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x64, 0x64, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, + 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x66, 0x69, 0x72, 0x73, 0x74, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x64, 0x64, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x22, 0xc1, 0x01, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x57, + 0x0a, 0x0c, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x66, 0x61, 0x69, 0x6c, + 0x75, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x69, 0x72, 0x73, 0x74, + 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x66, 0x69, + 0x72, 0x73, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, + 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x22, 0x49, 0x0a, 0x13, 0x44, + 0x65, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x48, 0x6f, + 0x73, 0x74, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x44, 0x65, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x14, 0x4e, 0x6f, 0x4c, 0x6f, 0x6e, 0x67, + 0x65, 0x72, 0x44, 0x65, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x33, + 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4e, + 0x6f, 0x4c, 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x44, 0x65, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x48, + 0x6f, 0x73, 0x74, 0x2a, 0x53, 0x0a, 0x16, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, + 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x41, 0x53, + 0x53, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, + 0x4b, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x54, + 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x2a, 0x3b, 0x0a, 0x11, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, + 0x04, 0x48, 0x54, 0x54, 0x50, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x43, 0x50, 0x10, 0x01, + 0x12, 0x08, 0x0a, 0x04, 0x47, 0x52, 0x50, 0x43, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, + 0x44, 0x49, 0x53, 0x10, 0x03, 0x42, 0x85, 0x01, 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x15, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, + 0x6f, 0x72, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_data_core_v3_health_check_event_proto_rawDescOnce sync.Once + file_envoy_data_core_v3_health_check_event_proto_rawDescData = file_envoy_data_core_v3_health_check_event_proto_rawDesc +) + +func file_envoy_data_core_v3_health_check_event_proto_rawDescGZIP() []byte { + file_envoy_data_core_v3_health_check_event_proto_rawDescOnce.Do(func() { + file_envoy_data_core_v3_health_check_event_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_data_core_v3_health_check_event_proto_rawDescData) + }) + return file_envoy_data_core_v3_health_check_event_proto_rawDescData +} + +var file_envoy_data_core_v3_health_check_event_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_envoy_data_core_v3_health_check_event_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_envoy_data_core_v3_health_check_event_proto_goTypes = []interface{}{ + (HealthCheckFailureType)(0), // 0: envoy.data.core.v3.HealthCheckFailureType + (HealthCheckerType)(0), // 1: envoy.data.core.v3.HealthCheckerType + (*HealthCheckEvent)(nil), // 2: envoy.data.core.v3.HealthCheckEvent + (*HealthCheckEjectUnhealthy)(nil), // 3: envoy.data.core.v3.HealthCheckEjectUnhealthy + (*HealthCheckAddHealthy)(nil), // 4: envoy.data.core.v3.HealthCheckAddHealthy + (*HealthCheckFailure)(nil), // 5: envoy.data.core.v3.HealthCheckFailure + (*DegradedHealthyHost)(nil), // 6: envoy.data.core.v3.DegradedHealthyHost + (*NoLongerDegradedHost)(nil), // 7: envoy.data.core.v3.NoLongerDegradedHost + (*v3.Address)(nil), // 8: envoy.config.core.v3.Address + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp +} +var file_envoy_data_core_v3_health_check_event_proto_depIdxs = []int32{ + 1, // 0: envoy.data.core.v3.HealthCheckEvent.health_checker_type:type_name -> envoy.data.core.v3.HealthCheckerType + 8, // 1: envoy.data.core.v3.HealthCheckEvent.host:type_name -> envoy.config.core.v3.Address + 3, // 2: envoy.data.core.v3.HealthCheckEvent.eject_unhealthy_event:type_name -> envoy.data.core.v3.HealthCheckEjectUnhealthy + 4, // 3: envoy.data.core.v3.HealthCheckEvent.add_healthy_event:type_name -> envoy.data.core.v3.HealthCheckAddHealthy + 5, // 4: envoy.data.core.v3.HealthCheckEvent.health_check_failure_event:type_name -> envoy.data.core.v3.HealthCheckFailure + 6, // 5: envoy.data.core.v3.HealthCheckEvent.degraded_healthy_host:type_name -> envoy.data.core.v3.DegradedHealthyHost + 7, // 6: envoy.data.core.v3.HealthCheckEvent.no_longer_degraded_host:type_name -> envoy.data.core.v3.NoLongerDegradedHost + 9, // 7: envoy.data.core.v3.HealthCheckEvent.timestamp:type_name -> google.protobuf.Timestamp + 0, // 8: envoy.data.core.v3.HealthCheckEjectUnhealthy.failure_type:type_name -> envoy.data.core.v3.HealthCheckFailureType + 0, // 9: envoy.data.core.v3.HealthCheckFailure.failure_type:type_name -> envoy.data.core.v3.HealthCheckFailureType + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_envoy_data_core_v3_health_check_event_proto_init() } +func file_envoy_data_core_v3_health_check_event_proto_init() { + if File_envoy_data_core_v3_health_check_event_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_data_core_v3_health_check_event_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HealthCheckEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_core_v3_health_check_event_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HealthCheckEjectUnhealthy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_core_v3_health_check_event_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HealthCheckAddHealthy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_core_v3_health_check_event_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HealthCheckFailure); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_core_v3_health_check_event_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DegradedHealthyHost); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_core_v3_health_check_event_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NoLongerDegradedHost); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_data_core_v3_health_check_event_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*HealthCheckEvent_EjectUnhealthyEvent)(nil), + (*HealthCheckEvent_AddHealthyEvent)(nil), + (*HealthCheckEvent_HealthCheckFailureEvent)(nil), + (*HealthCheckEvent_DegradedHealthyHost)(nil), + (*HealthCheckEvent_NoLongerDegradedHost)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_data_core_v3_health_check_event_proto_rawDesc, + NumEnums: 2, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_data_core_v3_health_check_event_proto_goTypes, + DependencyIndexes: file_envoy_data_core_v3_health_check_event_proto_depIdxs, + EnumInfos: file_envoy_data_core_v3_health_check_event_proto_enumTypes, + MessageInfos: file_envoy_data_core_v3_health_check_event_proto_msgTypes, + }.Build() + File_envoy_data_core_v3_health_check_event_proto = out.File + file_envoy_data_core_v3_health_check_event_proto_rawDesc = nil + file_envoy_data_core_v3_health_check_event_proto_goTypes = nil + file_envoy_data_core_v3_health_check_event_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/data/core/v3/health_check_event.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/data/core/v3/health_check_event.pb.validate.go new file mode 100644 index 0000000000000..d6fdd9f8790c4 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/data/core/v3/health_check_event.pb.validate.go @@ -0,0 +1,915 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/data/core/v3/health_check_event.proto + +package corev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on HealthCheckEvent 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 *HealthCheckEvent) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheckEvent 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 +// HealthCheckEventMultiError, or nil if none found. +func (m *HealthCheckEvent) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheckEvent) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if _, ok := HealthCheckerType_name[int32(m.GetHealthCheckerType())]; !ok { + err := HealthCheckEventValidationError{ + field: "HealthCheckerType", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetHost()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "Host", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "Host", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHost()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheckEventValidationError{ + field: "Host", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if utf8.RuneCountInString(m.GetClusterName()) < 1 { + err := HealthCheckEventValidationError{ + field: "ClusterName", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetTimestamp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimestamp()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheckEventValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.Event.(type) { + + case *HealthCheckEvent_EjectUnhealthyEvent: + + if all { + switch v := interface{}(m.GetEjectUnhealthyEvent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "EjectUnhealthyEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "EjectUnhealthyEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEjectUnhealthyEvent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheckEventValidationError{ + field: "EjectUnhealthyEvent", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *HealthCheckEvent_AddHealthyEvent: + + if all { + switch v := interface{}(m.GetAddHealthyEvent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "AddHealthyEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "AddHealthyEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddHealthyEvent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheckEventValidationError{ + field: "AddHealthyEvent", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *HealthCheckEvent_HealthCheckFailureEvent: + + if all { + switch v := interface{}(m.GetHealthCheckFailureEvent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "HealthCheckFailureEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "HealthCheckFailureEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHealthCheckFailureEvent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheckEventValidationError{ + field: "HealthCheckFailureEvent", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *HealthCheckEvent_DegradedHealthyHost: + + if all { + switch v := interface{}(m.GetDegradedHealthyHost()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "DegradedHealthyHost", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "DegradedHealthyHost", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDegradedHealthyHost()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheckEventValidationError{ + field: "DegradedHealthyHost", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *HealthCheckEvent_NoLongerDegradedHost: + + if all { + switch v := interface{}(m.GetNoLongerDegradedHost()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "NoLongerDegradedHost", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckEventValidationError{ + field: "NoLongerDegradedHost", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNoLongerDegradedHost()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheckEventValidationError{ + field: "NoLongerDegradedHost", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := HealthCheckEventValidationError{ + field: "Event", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return HealthCheckEventMultiError(errors) + } + return nil +} + +// HealthCheckEventMultiError is an error wrapping multiple validation errors +// returned by HealthCheckEvent.ValidateAll() if the designated constraints +// aren't met. +type HealthCheckEventMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckEventMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckEventMultiError) AllErrors() []error { return m } + +// HealthCheckEventValidationError is the validation error returned by +// HealthCheckEvent.Validate if the designated constraints aren't met. +type HealthCheckEventValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HealthCheckEventValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HealthCheckEventValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HealthCheckEventValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HealthCheckEventValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HealthCheckEventValidationError) ErrorName() string { return "HealthCheckEventValidationError" } + +// Error satisfies the builtin error interface +func (e HealthCheckEventValidationError) 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 %sHealthCheckEvent.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HealthCheckEventValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HealthCheckEventValidationError{} + +// Validate checks the field values on HealthCheckEjectUnhealthy 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 *HealthCheckEjectUnhealthy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheckEjectUnhealthy 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 +// HealthCheckEjectUnhealthyMultiError, or nil if none found. +func (m *HealthCheckEjectUnhealthy) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheckEjectUnhealthy) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if _, ok := HealthCheckFailureType_name[int32(m.GetFailureType())]; !ok { + err := HealthCheckEjectUnhealthyValidationError{ + field: "FailureType", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return HealthCheckEjectUnhealthyMultiError(errors) + } + return nil +} + +// HealthCheckEjectUnhealthyMultiError is an error wrapping multiple validation +// errors returned by HealthCheckEjectUnhealthy.ValidateAll() if the +// designated constraints aren't met. +type HealthCheckEjectUnhealthyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckEjectUnhealthyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckEjectUnhealthyMultiError) AllErrors() []error { return m } + +// HealthCheckEjectUnhealthyValidationError is the validation error returned by +// HealthCheckEjectUnhealthy.Validate if the designated constraints aren't met. +type HealthCheckEjectUnhealthyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HealthCheckEjectUnhealthyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HealthCheckEjectUnhealthyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HealthCheckEjectUnhealthyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HealthCheckEjectUnhealthyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HealthCheckEjectUnhealthyValidationError) ErrorName() string { + return "HealthCheckEjectUnhealthyValidationError" +} + +// Error satisfies the builtin error interface +func (e HealthCheckEjectUnhealthyValidationError) 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 %sHealthCheckEjectUnhealthy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HealthCheckEjectUnhealthyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HealthCheckEjectUnhealthyValidationError{} + +// Validate checks the field values on HealthCheckAddHealthy 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 *HealthCheckAddHealthy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheckAddHealthy 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 +// HealthCheckAddHealthyMultiError, or nil if none found. +func (m *HealthCheckAddHealthy) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheckAddHealthy) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for FirstCheck + + if len(errors) > 0 { + return HealthCheckAddHealthyMultiError(errors) + } + return nil +} + +// HealthCheckAddHealthyMultiError is an error wrapping multiple validation +// errors returned by HealthCheckAddHealthy.ValidateAll() if the designated +// constraints aren't met. +type HealthCheckAddHealthyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckAddHealthyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckAddHealthyMultiError) AllErrors() []error { return m } + +// HealthCheckAddHealthyValidationError is the validation error returned by +// HealthCheckAddHealthy.Validate if the designated constraints aren't met. +type HealthCheckAddHealthyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HealthCheckAddHealthyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HealthCheckAddHealthyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HealthCheckAddHealthyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HealthCheckAddHealthyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HealthCheckAddHealthyValidationError) ErrorName() string { + return "HealthCheckAddHealthyValidationError" +} + +// Error satisfies the builtin error interface +func (e HealthCheckAddHealthyValidationError) 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 %sHealthCheckAddHealthy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HealthCheckAddHealthyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HealthCheckAddHealthyValidationError{} + +// Validate checks the field values on HealthCheckFailure 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 *HealthCheckFailure) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheckFailure 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 +// HealthCheckFailureMultiError, or nil if none found. +func (m *HealthCheckFailure) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheckFailure) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if _, ok := HealthCheckFailureType_name[int32(m.GetFailureType())]; !ok { + err := HealthCheckFailureValidationError{ + field: "FailureType", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for FirstCheck + + if len(errors) > 0 { + return HealthCheckFailureMultiError(errors) + } + return nil +} + +// HealthCheckFailureMultiError is an error wrapping multiple validation errors +// returned by HealthCheckFailure.ValidateAll() if the designated constraints +// aren't met. +type HealthCheckFailureMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckFailureMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckFailureMultiError) AllErrors() []error { return m } + +// HealthCheckFailureValidationError is the validation error returned by +// HealthCheckFailure.Validate if the designated constraints aren't met. +type HealthCheckFailureValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HealthCheckFailureValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HealthCheckFailureValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HealthCheckFailureValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HealthCheckFailureValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HealthCheckFailureValidationError) ErrorName() string { + return "HealthCheckFailureValidationError" +} + +// Error satisfies the builtin error interface +func (e HealthCheckFailureValidationError) 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 %sHealthCheckFailure.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HealthCheckFailureValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HealthCheckFailureValidationError{} + +// Validate checks the field values on DegradedHealthyHost 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 *DegradedHealthyHost) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DegradedHealthyHost 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 +// DegradedHealthyHostMultiError, or nil if none found. +func (m *DegradedHealthyHost) ValidateAll() error { + return m.validate(true) +} + +func (m *DegradedHealthyHost) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return DegradedHealthyHostMultiError(errors) + } + return nil +} + +// DegradedHealthyHostMultiError is an error wrapping multiple validation +// errors returned by DegradedHealthyHost.ValidateAll() if the designated +// constraints aren't met. +type DegradedHealthyHostMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DegradedHealthyHostMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DegradedHealthyHostMultiError) AllErrors() []error { return m } + +// DegradedHealthyHostValidationError is the validation error returned by +// DegradedHealthyHost.Validate if the designated constraints aren't met. +type DegradedHealthyHostValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DegradedHealthyHostValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DegradedHealthyHostValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DegradedHealthyHostValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DegradedHealthyHostValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DegradedHealthyHostValidationError) ErrorName() string { + return "DegradedHealthyHostValidationError" +} + +// Error satisfies the builtin error interface +func (e DegradedHealthyHostValidationError) 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 %sDegradedHealthyHost.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DegradedHealthyHostValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DegradedHealthyHostValidationError{} + +// Validate checks the field values on NoLongerDegradedHost 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 *NoLongerDegradedHost) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on NoLongerDegradedHost 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 +// NoLongerDegradedHostMultiError, or nil if none found. +func (m *NoLongerDegradedHost) ValidateAll() error { + return m.validate(true) +} + +func (m *NoLongerDegradedHost) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return NoLongerDegradedHostMultiError(errors) + } + return nil +} + +// NoLongerDegradedHostMultiError is an error wrapping multiple validation +// errors returned by NoLongerDegradedHost.ValidateAll() if the designated +// constraints aren't met. +type NoLongerDegradedHostMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m NoLongerDegradedHostMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m NoLongerDegradedHostMultiError) AllErrors() []error { return m } + +// NoLongerDegradedHostValidationError is the validation error returned by +// NoLongerDegradedHost.Validate if the designated constraints aren't met. +type NoLongerDegradedHostValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e NoLongerDegradedHostValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e NoLongerDegradedHostValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e NoLongerDegradedHostValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e NoLongerDegradedHostValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e NoLongerDegradedHostValidationError) ErrorName() string { + return "NoLongerDegradedHostValidationError" +} + +// Error satisfies the builtin error interface +func (e NoLongerDegradedHostValidationError) 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 %sNoLongerDegradedHost.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = NoLongerDegradedHostValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = NoLongerDegradedHostValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/data/dns/v3/dns_table.pb.go b/vendor/github.com/cilium/proxy/go/envoy/data/dns/v3/dns_table.pb.go new file mode 100644 index 0000000000000..8aa5148b2b2fc --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/data/dns/v3/dns_table.pb.go @@ -0,0 +1,965 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/data/dns/v3/dns_table.proto + +package dnsv3 + +import ( + _ "github.com/cilium/proxy/go/envoy/annotations" + v3 "github.com/cilium/proxy/go/envoy/type/matcher/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// This message contains the configuration for the DNS Filter if populated +// from the control plane +type DnsTable struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Control how many times Envoy makes an attempt to forward a query to an external DNS server + ExternalRetryCount uint32 `protobuf:"varint,1,opt,name=external_retry_count,json=externalRetryCount,proto3" json:"external_retry_count,omitempty"` + // Fully qualified domain names for which Envoy will respond to DNS queries. By leaving this + // list empty, Envoy will forward all queries to external resolvers + VirtualDomains []*DnsTable_DnsVirtualDomain `protobuf:"bytes,2,rep,name=virtual_domains,json=virtualDomains,proto3" json:"virtual_domains,omitempty"` + // This field is deprecated and no longer used in Envoy. The filter's behavior has changed + // internally to use a different data structure allowing the filter to determine whether a + // query is for known domain without the use of this field. + // + // This field serves to help Envoy determine whether it can authoritatively answer a query + // for a name matching a suffix in this list. If the query name does not match a suffix in + // this list, Envoy will forward the query to an upstream DNS server + // + // Deprecated: Do not use. + KnownSuffixes []*v3.StringMatcher `protobuf:"bytes,3,rep,name=known_suffixes,json=knownSuffixes,proto3" json:"known_suffixes,omitempty"` +} + +func (x *DnsTable) Reset() { + *x = DnsTable{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_dns_v3_dns_table_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DnsTable) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DnsTable) ProtoMessage() {} + +func (x *DnsTable) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_dns_v3_dns_table_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DnsTable.ProtoReflect.Descriptor instead. +func (*DnsTable) Descriptor() ([]byte, []int) { + return file_envoy_data_dns_v3_dns_table_proto_rawDescGZIP(), []int{0} +} + +func (x *DnsTable) GetExternalRetryCount() uint32 { + if x != nil { + return x.ExternalRetryCount + } + return 0 +} + +func (x *DnsTable) GetVirtualDomains() []*DnsTable_DnsVirtualDomain { + if x != nil { + return x.VirtualDomains + } + return nil +} + +// Deprecated: Do not use. +func (x *DnsTable) GetKnownSuffixes() []*v3.StringMatcher { + if x != nil { + return x.KnownSuffixes + } + return nil +} + +// This message contains a list of IP addresses returned for a query for a known name +type DnsTable_AddressList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This field contains a well formed IP address that is returned in the answer for a + // name query. The address field can be an IPv4 or IPv6 address. Address family + // detection is done automatically when Envoy parses the string. Since this field is + // repeated, Envoy will return as many entries from this list in the DNS response while + // keeping the response under 512 bytes + Address []string `protobuf:"bytes,1,rep,name=address,proto3" json:"address,omitempty"` +} + +func (x *DnsTable_AddressList) Reset() { + *x = DnsTable_AddressList{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_dns_v3_dns_table_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DnsTable_AddressList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DnsTable_AddressList) ProtoMessage() {} + +func (x *DnsTable_AddressList) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_dns_v3_dns_table_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DnsTable_AddressList.ProtoReflect.Descriptor instead. +func (*DnsTable_AddressList) Descriptor() ([]byte, []int) { + return file_envoy_data_dns_v3_dns_table_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *DnsTable_AddressList) GetAddress() []string { + if x != nil { + return x.Address + } + return nil +} + +// Specify the service protocol using a numeric or string value +type DnsTable_DnsServiceProtocol struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to ProtocolConfig: + // + // *DnsTable_DnsServiceProtocol_Number + // *DnsTable_DnsServiceProtocol_Name + ProtocolConfig isDnsTable_DnsServiceProtocol_ProtocolConfig `protobuf_oneof:"protocol_config"` +} + +func (x *DnsTable_DnsServiceProtocol) Reset() { + *x = DnsTable_DnsServiceProtocol{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_dns_v3_dns_table_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DnsTable_DnsServiceProtocol) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DnsTable_DnsServiceProtocol) ProtoMessage() {} + +func (x *DnsTable_DnsServiceProtocol) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_dns_v3_dns_table_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DnsTable_DnsServiceProtocol.ProtoReflect.Descriptor instead. +func (*DnsTable_DnsServiceProtocol) Descriptor() ([]byte, []int) { + return file_envoy_data_dns_v3_dns_table_proto_rawDescGZIP(), []int{0, 1} +} + +func (m *DnsTable_DnsServiceProtocol) GetProtocolConfig() isDnsTable_DnsServiceProtocol_ProtocolConfig { + if m != nil { + return m.ProtocolConfig + } + return nil +} + +func (x *DnsTable_DnsServiceProtocol) GetNumber() uint32 { + if x, ok := x.GetProtocolConfig().(*DnsTable_DnsServiceProtocol_Number); ok { + return x.Number + } + return 0 +} + +func (x *DnsTable_DnsServiceProtocol) GetName() string { + if x, ok := x.GetProtocolConfig().(*DnsTable_DnsServiceProtocol_Name); ok { + return x.Name + } + return "" +} + +type isDnsTable_DnsServiceProtocol_ProtocolConfig interface { + isDnsTable_DnsServiceProtocol_ProtocolConfig() +} + +type DnsTable_DnsServiceProtocol_Number struct { + // Specify the protocol number for the service. Envoy will try to resolve the number to + // the protocol name. For example, 6 will resolve to "tcp". Refer to: + // https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml + // for protocol names and numbers + Number uint32 `protobuf:"varint,1,opt,name=number,proto3,oneof"` +} + +type DnsTable_DnsServiceProtocol_Name struct { + // Specify the protocol name for the service. + Name string `protobuf:"bytes,2,opt,name=name,proto3,oneof"` +} + +func (*DnsTable_DnsServiceProtocol_Number) isDnsTable_DnsServiceProtocol_ProtocolConfig() {} + +func (*DnsTable_DnsServiceProtocol_Name) isDnsTable_DnsServiceProtocol_ProtocolConfig() {} + +// Specify the target for a given DNS service +// [#next-free-field: 6] +type DnsTable_DnsServiceTarget struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specify the name of the endpoint for the Service. The name is a hostname or a cluster + // + // Types that are assignable to EndpointType: + // + // *DnsTable_DnsServiceTarget_HostName + // *DnsTable_DnsServiceTarget_ClusterName + EndpointType isDnsTable_DnsServiceTarget_EndpointType `protobuf_oneof:"endpoint_type"` + // The priority of the service record target + Priority uint32 `protobuf:"varint,3,opt,name=priority,proto3" json:"priority,omitempty"` + // The weight of the service record target + Weight uint32 `protobuf:"varint,4,opt,name=weight,proto3" json:"weight,omitempty"` + // The port to which the service is bound. This value is optional if the target is a + // cluster. Setting port to zero in this case makes the filter use the port value + // from the cluster host + Port uint32 `protobuf:"varint,5,opt,name=port,proto3" json:"port,omitempty"` +} + +func (x *DnsTable_DnsServiceTarget) Reset() { + *x = DnsTable_DnsServiceTarget{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_dns_v3_dns_table_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DnsTable_DnsServiceTarget) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DnsTable_DnsServiceTarget) ProtoMessage() {} + +func (x *DnsTable_DnsServiceTarget) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_dns_v3_dns_table_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DnsTable_DnsServiceTarget.ProtoReflect.Descriptor instead. +func (*DnsTable_DnsServiceTarget) Descriptor() ([]byte, []int) { + return file_envoy_data_dns_v3_dns_table_proto_rawDescGZIP(), []int{0, 2} +} + +func (m *DnsTable_DnsServiceTarget) GetEndpointType() isDnsTable_DnsServiceTarget_EndpointType { + if m != nil { + return m.EndpointType + } + return nil +} + +func (x *DnsTable_DnsServiceTarget) GetHostName() string { + if x, ok := x.GetEndpointType().(*DnsTable_DnsServiceTarget_HostName); ok { + return x.HostName + } + return "" +} + +func (x *DnsTable_DnsServiceTarget) GetClusterName() string { + if x, ok := x.GetEndpointType().(*DnsTable_DnsServiceTarget_ClusterName); ok { + return x.ClusterName + } + return "" +} + +func (x *DnsTable_DnsServiceTarget) GetPriority() uint32 { + if x != nil { + return x.Priority + } + return 0 +} + +func (x *DnsTable_DnsServiceTarget) GetWeight() uint32 { + if x != nil { + return x.Weight + } + return 0 +} + +func (x *DnsTable_DnsServiceTarget) GetPort() uint32 { + if x != nil { + return x.Port + } + return 0 +} + +type isDnsTable_DnsServiceTarget_EndpointType interface { + isDnsTable_DnsServiceTarget_EndpointType() +} + +type DnsTable_DnsServiceTarget_HostName struct { + // Use a resolvable hostname as the endpoint for a service. + HostName string `protobuf:"bytes,1,opt,name=host_name,json=hostName,proto3,oneof"` +} + +type DnsTable_DnsServiceTarget_ClusterName struct { + // Use a cluster name as the endpoint for a service. + ClusterName string `protobuf:"bytes,2,opt,name=cluster_name,json=clusterName,proto3,oneof"` +} + +func (*DnsTable_DnsServiceTarget_HostName) isDnsTable_DnsServiceTarget_EndpointType() {} + +func (*DnsTable_DnsServiceTarget_ClusterName) isDnsTable_DnsServiceTarget_EndpointType() {} + +// This message defines a service selection record returned for a service query in a domain +type DnsTable_DnsService struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the service without the protocol or domain name + ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` + // The service protocol. This can be specified as a string or the numeric value of the protocol + Protocol *DnsTable_DnsServiceProtocol `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"` + // The service entry time to live. This is independent from the DNS Answer record TTL + Ttl *durationpb.Duration `protobuf:"bytes,3,opt,name=ttl,proto3" json:"ttl,omitempty"` + // The list of targets hosting the service + Targets []*DnsTable_DnsServiceTarget `protobuf:"bytes,4,rep,name=targets,proto3" json:"targets,omitempty"` +} + +func (x *DnsTable_DnsService) Reset() { + *x = DnsTable_DnsService{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_dns_v3_dns_table_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DnsTable_DnsService) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DnsTable_DnsService) ProtoMessage() {} + +func (x *DnsTable_DnsService) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_dns_v3_dns_table_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DnsTable_DnsService.ProtoReflect.Descriptor instead. +func (*DnsTable_DnsService) Descriptor() ([]byte, []int) { + return file_envoy_data_dns_v3_dns_table_proto_rawDescGZIP(), []int{0, 3} +} + +func (x *DnsTable_DnsService) GetServiceName() string { + if x != nil { + return x.ServiceName + } + return "" +} + +func (x *DnsTable_DnsService) GetProtocol() *DnsTable_DnsServiceProtocol { + if x != nil { + return x.Protocol + } + return nil +} + +func (x *DnsTable_DnsService) GetTtl() *durationpb.Duration { + if x != nil { + return x.Ttl + } + return nil +} + +func (x *DnsTable_DnsService) GetTargets() []*DnsTable_DnsServiceTarget { + if x != nil { + return x.Targets + } + return nil +} + +// Define a list of service records for a given service +type DnsTable_DnsServiceList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Services []*DnsTable_DnsService `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"` +} + +func (x *DnsTable_DnsServiceList) Reset() { + *x = DnsTable_DnsServiceList{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_dns_v3_dns_table_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DnsTable_DnsServiceList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DnsTable_DnsServiceList) ProtoMessage() {} + +func (x *DnsTable_DnsServiceList) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_dns_v3_dns_table_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DnsTable_DnsServiceList.ProtoReflect.Descriptor instead. +func (*DnsTable_DnsServiceList) Descriptor() ([]byte, []int) { + return file_envoy_data_dns_v3_dns_table_proto_rawDescGZIP(), []int{0, 4} +} + +func (x *DnsTable_DnsServiceList) GetServices() []*DnsTable_DnsService { + if x != nil { + return x.Services + } + return nil +} + +type DnsTable_DnsEndpoint struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to EndpointConfig: + // + // *DnsTable_DnsEndpoint_AddressList + // *DnsTable_DnsEndpoint_ClusterName + // *DnsTable_DnsEndpoint_ServiceList + EndpointConfig isDnsTable_DnsEndpoint_EndpointConfig `protobuf_oneof:"endpoint_config"` +} + +func (x *DnsTable_DnsEndpoint) Reset() { + *x = DnsTable_DnsEndpoint{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_dns_v3_dns_table_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DnsTable_DnsEndpoint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DnsTable_DnsEndpoint) ProtoMessage() {} + +func (x *DnsTable_DnsEndpoint) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_dns_v3_dns_table_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DnsTable_DnsEndpoint.ProtoReflect.Descriptor instead. +func (*DnsTable_DnsEndpoint) Descriptor() ([]byte, []int) { + return file_envoy_data_dns_v3_dns_table_proto_rawDescGZIP(), []int{0, 5} +} + +func (m *DnsTable_DnsEndpoint) GetEndpointConfig() isDnsTable_DnsEndpoint_EndpointConfig { + if m != nil { + return m.EndpointConfig + } + return nil +} + +func (x *DnsTable_DnsEndpoint) GetAddressList() *DnsTable_AddressList { + if x, ok := x.GetEndpointConfig().(*DnsTable_DnsEndpoint_AddressList); ok { + return x.AddressList + } + return nil +} + +func (x *DnsTable_DnsEndpoint) GetClusterName() string { + if x, ok := x.GetEndpointConfig().(*DnsTable_DnsEndpoint_ClusterName); ok { + return x.ClusterName + } + return "" +} + +func (x *DnsTable_DnsEndpoint) GetServiceList() *DnsTable_DnsServiceList { + if x, ok := x.GetEndpointConfig().(*DnsTable_DnsEndpoint_ServiceList); ok { + return x.ServiceList + } + return nil +} + +type isDnsTable_DnsEndpoint_EndpointConfig interface { + isDnsTable_DnsEndpoint_EndpointConfig() +} + +type DnsTable_DnsEndpoint_AddressList struct { + // Define a list of addresses to return for the specified endpoint + AddressList *DnsTable_AddressList `protobuf:"bytes,1,opt,name=address_list,json=addressList,proto3,oneof"` +} + +type DnsTable_DnsEndpoint_ClusterName struct { + // Define a cluster whose addresses are returned for the specified endpoint + ClusterName string `protobuf:"bytes,2,opt,name=cluster_name,json=clusterName,proto3,oneof"` +} + +type DnsTable_DnsEndpoint_ServiceList struct { + // Define a DNS Service List for the specified endpoint + ServiceList *DnsTable_DnsServiceList `protobuf:"bytes,3,opt,name=service_list,json=serviceList,proto3,oneof"` +} + +func (*DnsTable_DnsEndpoint_AddressList) isDnsTable_DnsEndpoint_EndpointConfig() {} + +func (*DnsTable_DnsEndpoint_ClusterName) isDnsTable_DnsEndpoint_EndpointConfig() {} + +func (*DnsTable_DnsEndpoint_ServiceList) isDnsTable_DnsEndpoint_EndpointConfig() {} + +type DnsTable_DnsVirtualDomain struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A domain name for which Envoy will respond to query requests + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The configuration containing the method to determine the address of this endpoint + Endpoint *DnsTable_DnsEndpoint `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"` + // Sets the TTL in DNS answers from Envoy returned to the client. The default TTL is 300s + AnswerTtl *durationpb.Duration `protobuf:"bytes,3,opt,name=answer_ttl,json=answerTtl,proto3" json:"answer_ttl,omitempty"` +} + +func (x *DnsTable_DnsVirtualDomain) Reset() { + *x = DnsTable_DnsVirtualDomain{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_dns_v3_dns_table_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DnsTable_DnsVirtualDomain) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DnsTable_DnsVirtualDomain) ProtoMessage() {} + +func (x *DnsTable_DnsVirtualDomain) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_dns_v3_dns_table_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DnsTable_DnsVirtualDomain.ProtoReflect.Descriptor instead. +func (*DnsTable_DnsVirtualDomain) Descriptor() ([]byte, []int) { + return file_envoy_data_dns_v3_dns_table_proto_rawDescGZIP(), []int{0, 6} +} + +func (x *DnsTable_DnsVirtualDomain) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DnsTable_DnsVirtualDomain) GetEndpoint() *DnsTable_DnsEndpoint { + if x != nil { + return x.Endpoint + } + return nil +} + +func (x *DnsTable_DnsVirtualDomain) GetAnswerTtl() *durationpb.Duration { + if x != nil { + return x.AnswerTtl + } + return nil +} + +var File_envoy_data_dns_v3_dns_table_proto protoreflect.FileDescriptor + +var file_envoy_data_dns_v3_dns_table_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x64, 0x6e, 0x73, + 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x6e, 0x73, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0xfd, 0x0c, 0x0a, 0x08, 0x44, + 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x14, 0x65, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x03, 0x52, 0x12, + 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x55, 0x0a, 0x0f, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x64, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, + 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x56, 0x69, 0x72, 0x74, + 0x75, 0x61, 0x6c, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x0e, 0x76, 0x69, 0x72, 0x74, 0x75, + 0x61, 0x6c, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x0e, 0x6b, 0x6e, 0x6f, + 0x77, 0x6e, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, + 0x03, 0x33, 0x2e, 0x30, 0x52, 0x0d, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x53, 0x75, 0x66, 0x66, 0x69, + 0x78, 0x65, 0x73, 0x1a, 0x6b, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x28, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x92, 0x01, 0x08, 0x08, 0x01, 0x22, 0x04, 0x72, + 0x02, 0x10, 0x03, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x32, 0x9a, 0xc5, + 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6e, 0x73, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, + 0x1a, 0x72, 0x0a, 0x12, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x22, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x2a, 0x03, 0x10, 0xff, 0x01, + 0x48, 0x00, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, + 0x01, 0xc0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x16, 0x0a, 0x0f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xed, 0x01, 0x0a, 0x10, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x68, 0x6f, 0x73, + 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, + 0x07, 0x72, 0x05, 0x10, 0x01, 0xc0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, + 0x05, 0x10, 0x01, 0xc0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x10, 0x80, + 0x80, 0x04, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x21, 0x0a, 0x06, + 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, + 0x06, 0x2a, 0x04, 0x10, 0x80, 0x80, 0x04, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, + 0x1d, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, + 0x42, 0x06, 0x2a, 0x04, 0x10, 0x80, 0x80, 0x04, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x14, + 0x0a, 0x0d, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x03, 0xf8, 0x42, 0x01, 0x1a, 0x92, 0x02, 0x0a, 0x0a, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x2d, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, + 0x10, 0x01, 0xc0, 0x01, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x37, + 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x32, 0x02, + 0x08, 0x01, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x50, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, + 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x1a, 0x5e, 0x0a, 0x0e, 0x44, 0x6e, 0x73, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x08, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, + 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, + 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x1a, 0x9d, 0x02, 0x0a, 0x0b, 0x44, 0x6e, + 0x73, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x0c, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, + 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4f, 0x0a, 0x0c, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, + 0x44, 0x6e, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, + 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x3a, 0x32, 0x9a, + 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6e, 0x73, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x42, 0x16, 0x0a, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xf6, 0x01, 0x0a, 0x10, 0x44, 0x6e, + 0x73, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1e, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, + 0x07, 0x72, 0x05, 0x10, 0x01, 0xc0, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x43, + 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, + 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x44, 0x6e, + 0x73, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x0a, 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x5f, 0x74, 0x74, + 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x32, 0x02, 0x08, 0x1e, 0x52, 0x09, + 0x61, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x54, 0x74, 0x6c, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, + 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x2e, 0x44, 0x6e, 0x73, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x44, 0x6f, 0x6d, 0x61, + 0x69, 0x6e, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x7a, 0x0a, 0x1f, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x44, + 0x6e, 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, + 0x61, 0x2f, 0x64, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x64, 0x6e, 0x73, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_data_dns_v3_dns_table_proto_rawDescOnce sync.Once + file_envoy_data_dns_v3_dns_table_proto_rawDescData = file_envoy_data_dns_v3_dns_table_proto_rawDesc +) + +func file_envoy_data_dns_v3_dns_table_proto_rawDescGZIP() []byte { + file_envoy_data_dns_v3_dns_table_proto_rawDescOnce.Do(func() { + file_envoy_data_dns_v3_dns_table_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_data_dns_v3_dns_table_proto_rawDescData) + }) + return file_envoy_data_dns_v3_dns_table_proto_rawDescData +} + +var file_envoy_data_dns_v3_dns_table_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_envoy_data_dns_v3_dns_table_proto_goTypes = []interface{}{ + (*DnsTable)(nil), // 0: envoy.data.dns.v3.DnsTable + (*DnsTable_AddressList)(nil), // 1: envoy.data.dns.v3.DnsTable.AddressList + (*DnsTable_DnsServiceProtocol)(nil), // 2: envoy.data.dns.v3.DnsTable.DnsServiceProtocol + (*DnsTable_DnsServiceTarget)(nil), // 3: envoy.data.dns.v3.DnsTable.DnsServiceTarget + (*DnsTable_DnsService)(nil), // 4: envoy.data.dns.v3.DnsTable.DnsService + (*DnsTable_DnsServiceList)(nil), // 5: envoy.data.dns.v3.DnsTable.DnsServiceList + (*DnsTable_DnsEndpoint)(nil), // 6: envoy.data.dns.v3.DnsTable.DnsEndpoint + (*DnsTable_DnsVirtualDomain)(nil), // 7: envoy.data.dns.v3.DnsTable.DnsVirtualDomain + (*v3.StringMatcher)(nil), // 8: envoy.type.matcher.v3.StringMatcher + (*durationpb.Duration)(nil), // 9: google.protobuf.Duration +} +var file_envoy_data_dns_v3_dns_table_proto_depIdxs = []int32{ + 7, // 0: envoy.data.dns.v3.DnsTable.virtual_domains:type_name -> envoy.data.dns.v3.DnsTable.DnsVirtualDomain + 8, // 1: envoy.data.dns.v3.DnsTable.known_suffixes:type_name -> envoy.type.matcher.v3.StringMatcher + 2, // 2: envoy.data.dns.v3.DnsTable.DnsService.protocol:type_name -> envoy.data.dns.v3.DnsTable.DnsServiceProtocol + 9, // 3: envoy.data.dns.v3.DnsTable.DnsService.ttl:type_name -> google.protobuf.Duration + 3, // 4: envoy.data.dns.v3.DnsTable.DnsService.targets:type_name -> envoy.data.dns.v3.DnsTable.DnsServiceTarget + 4, // 5: envoy.data.dns.v3.DnsTable.DnsServiceList.services:type_name -> envoy.data.dns.v3.DnsTable.DnsService + 1, // 6: envoy.data.dns.v3.DnsTable.DnsEndpoint.address_list:type_name -> envoy.data.dns.v3.DnsTable.AddressList + 5, // 7: envoy.data.dns.v3.DnsTable.DnsEndpoint.service_list:type_name -> envoy.data.dns.v3.DnsTable.DnsServiceList + 6, // 8: envoy.data.dns.v3.DnsTable.DnsVirtualDomain.endpoint:type_name -> envoy.data.dns.v3.DnsTable.DnsEndpoint + 9, // 9: envoy.data.dns.v3.DnsTable.DnsVirtualDomain.answer_ttl:type_name -> google.protobuf.Duration + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_envoy_data_dns_v3_dns_table_proto_init() } +func file_envoy_data_dns_v3_dns_table_proto_init() { + if File_envoy_data_dns_v3_dns_table_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_data_dns_v3_dns_table_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DnsTable); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_dns_v3_dns_table_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DnsTable_AddressList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_dns_v3_dns_table_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DnsTable_DnsServiceProtocol); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_dns_v3_dns_table_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DnsTable_DnsServiceTarget); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_dns_v3_dns_table_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DnsTable_DnsService); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_dns_v3_dns_table_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DnsTable_DnsServiceList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_dns_v3_dns_table_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DnsTable_DnsEndpoint); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_dns_v3_dns_table_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DnsTable_DnsVirtualDomain); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_data_dns_v3_dns_table_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*DnsTable_DnsServiceProtocol_Number)(nil), + (*DnsTable_DnsServiceProtocol_Name)(nil), + } + file_envoy_data_dns_v3_dns_table_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*DnsTable_DnsServiceTarget_HostName)(nil), + (*DnsTable_DnsServiceTarget_ClusterName)(nil), + } + file_envoy_data_dns_v3_dns_table_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*DnsTable_DnsEndpoint_AddressList)(nil), + (*DnsTable_DnsEndpoint_ClusterName)(nil), + (*DnsTable_DnsEndpoint_ServiceList)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_data_dns_v3_dns_table_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_data_dns_v3_dns_table_proto_goTypes, + DependencyIndexes: file_envoy_data_dns_v3_dns_table_proto_depIdxs, + MessageInfos: file_envoy_data_dns_v3_dns_table_proto_msgTypes, + }.Build() + File_envoy_data_dns_v3_dns_table_proto = out.File + file_envoy_data_dns_v3_dns_table_proto_rawDesc = nil + file_envoy_data_dns_v3_dns_table_proto_goTypes = nil + file_envoy_data_dns_v3_dns_table_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/data/dns/v3/dns_table.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/data/dns/v3/dns_table.pb.validate.go new file mode 100644 index 0000000000000..24fb00aa18ccb --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/data/dns/v3/dns_table.pb.validate.go @@ -0,0 +1,1435 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/data/dns/v3/dns_table.proto + +package dnsv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on DnsTable 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 *DnsTable) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsTable 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 DnsTableMultiError, or nil +// if none found. +func (m *DnsTable) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsTable) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetExternalRetryCount() > 3 { + err := DnsTableValidationError{ + field: "ExternalRetryCount", + reason: "value must be less than or equal to 3", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetVirtualDomains() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsTableValidationError{ + field: fmt.Sprintf("VirtualDomains[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsTableValidationError{ + field: fmt.Sprintf("VirtualDomains[%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 DnsTableValidationError{ + field: fmt.Sprintf("VirtualDomains[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetKnownSuffixes() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsTableValidationError{ + field: fmt.Sprintf("KnownSuffixes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsTableValidationError{ + field: fmt.Sprintf("KnownSuffixes[%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 DnsTableValidationError{ + field: fmt.Sprintf("KnownSuffixes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return DnsTableMultiError(errors) + } + return nil +} + +// DnsTableMultiError is an error wrapping multiple validation errors returned +// by DnsTable.ValidateAll() if the designated constraints aren't met. +type DnsTableMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsTableMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsTableMultiError) AllErrors() []error { return m } + +// DnsTableValidationError is the validation error returned by +// DnsTable.Validate if the designated constraints aren't met. +type DnsTableValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DnsTableValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DnsTableValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DnsTableValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DnsTableValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DnsTableValidationError) ErrorName() string { return "DnsTableValidationError" } + +// Error satisfies the builtin error interface +func (e DnsTableValidationError) 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 %sDnsTable.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DnsTableValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DnsTableValidationError{} + +// Validate checks the field values on DnsTable_AddressList 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 *DnsTable_AddressList) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsTable_AddressList 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 +// DnsTable_AddressListMultiError, or nil if none found. +func (m *DnsTable_AddressList) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsTable_AddressList) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetAddress()) < 1 { + err := DnsTable_AddressListValidationError{ + field: "Address", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetAddress() { + _, _ = idx, item + + if utf8.RuneCountInString(item) < 3 { + err := DnsTable_AddressListValidationError{ + field: fmt.Sprintf("Address[%v]", idx), + reason: "value length must be at least 3 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if len(errors) > 0 { + return DnsTable_AddressListMultiError(errors) + } + return nil +} + +// DnsTable_AddressListMultiError is an error wrapping multiple validation +// errors returned by DnsTable_AddressList.ValidateAll() if the designated +// constraints aren't met. +type DnsTable_AddressListMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsTable_AddressListMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsTable_AddressListMultiError) AllErrors() []error { return m } + +// DnsTable_AddressListValidationError is the validation error returned by +// DnsTable_AddressList.Validate if the designated constraints aren't met. +type DnsTable_AddressListValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DnsTable_AddressListValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DnsTable_AddressListValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DnsTable_AddressListValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DnsTable_AddressListValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DnsTable_AddressListValidationError) ErrorName() string { + return "DnsTable_AddressListValidationError" +} + +// Error satisfies the builtin error interface +func (e DnsTable_AddressListValidationError) 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 %sDnsTable_AddressList.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DnsTable_AddressListValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DnsTable_AddressListValidationError{} + +// Validate checks the field values on DnsTable_DnsServiceProtocol 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 *DnsTable_DnsServiceProtocol) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsTable_DnsServiceProtocol 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 +// DnsTable_DnsServiceProtocolMultiError, or nil if none found. +func (m *DnsTable_DnsServiceProtocol) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsTable_DnsServiceProtocol) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.ProtocolConfig.(type) { + + case *DnsTable_DnsServiceProtocol_Number: + + if m.GetNumber() >= 255 { + err := DnsTable_DnsServiceProtocolValidationError{ + field: "Number", + reason: "value must be less than 255", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *DnsTable_DnsServiceProtocol_Name: + + if utf8.RuneCountInString(m.GetName()) < 1 { + err := DnsTable_DnsServiceProtocolValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if !_DnsTable_DnsServiceProtocol_Name_Pattern.MatchString(m.GetName()) { + err := DnsTable_DnsServiceProtocolValidationError{ + field: "Name", + reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + default: + err := DnsTable_DnsServiceProtocolValidationError{ + field: "ProtocolConfig", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return DnsTable_DnsServiceProtocolMultiError(errors) + } + return nil +} + +// DnsTable_DnsServiceProtocolMultiError is an error wrapping multiple +// validation errors returned by DnsTable_DnsServiceProtocol.ValidateAll() if +// the designated constraints aren't met. +type DnsTable_DnsServiceProtocolMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsTable_DnsServiceProtocolMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsTable_DnsServiceProtocolMultiError) AllErrors() []error { return m } + +// DnsTable_DnsServiceProtocolValidationError is the validation error returned +// by DnsTable_DnsServiceProtocol.Validate if the designated constraints +// aren't met. +type DnsTable_DnsServiceProtocolValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DnsTable_DnsServiceProtocolValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DnsTable_DnsServiceProtocolValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DnsTable_DnsServiceProtocolValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DnsTable_DnsServiceProtocolValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DnsTable_DnsServiceProtocolValidationError) ErrorName() string { + return "DnsTable_DnsServiceProtocolValidationError" +} + +// Error satisfies the builtin error interface +func (e DnsTable_DnsServiceProtocolValidationError) 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 %sDnsTable_DnsServiceProtocol.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DnsTable_DnsServiceProtocolValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DnsTable_DnsServiceProtocolValidationError{} + +var _DnsTable_DnsServiceProtocol_Name_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$") + +// Validate checks the field values on DnsTable_DnsServiceTarget 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 *DnsTable_DnsServiceTarget) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsTable_DnsServiceTarget 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 +// DnsTable_DnsServiceTargetMultiError, or nil if none found. +func (m *DnsTable_DnsServiceTarget) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsTable_DnsServiceTarget) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetPriority() >= 65536 { + err := DnsTable_DnsServiceTargetValidationError{ + field: "Priority", + reason: "value must be less than 65536", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetWeight() >= 65536 { + err := DnsTable_DnsServiceTargetValidationError{ + field: "Weight", + reason: "value must be less than 65536", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetPort() >= 65536 { + err := DnsTable_DnsServiceTargetValidationError{ + field: "Port", + reason: "value must be less than 65536", + } + if !all { + return err + } + errors = append(errors, err) + } + + switch m.EndpointType.(type) { + + case *DnsTable_DnsServiceTarget_HostName: + + if utf8.RuneCountInString(m.GetHostName()) < 1 { + err := DnsTable_DnsServiceTargetValidationError{ + field: "HostName", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if !_DnsTable_DnsServiceTarget_HostName_Pattern.MatchString(m.GetHostName()) { + err := DnsTable_DnsServiceTargetValidationError{ + field: "HostName", + reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *DnsTable_DnsServiceTarget_ClusterName: + + if utf8.RuneCountInString(m.GetClusterName()) < 1 { + err := DnsTable_DnsServiceTargetValidationError{ + field: "ClusterName", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if !_DnsTable_DnsServiceTarget_ClusterName_Pattern.MatchString(m.GetClusterName()) { + err := DnsTable_DnsServiceTargetValidationError{ + field: "ClusterName", + reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + default: + err := DnsTable_DnsServiceTargetValidationError{ + field: "EndpointType", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return DnsTable_DnsServiceTargetMultiError(errors) + } + return nil +} + +// DnsTable_DnsServiceTargetMultiError is an error wrapping multiple validation +// errors returned by DnsTable_DnsServiceTarget.ValidateAll() if the +// designated constraints aren't met. +type DnsTable_DnsServiceTargetMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsTable_DnsServiceTargetMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsTable_DnsServiceTargetMultiError) AllErrors() []error { return m } + +// DnsTable_DnsServiceTargetValidationError is the validation error returned by +// DnsTable_DnsServiceTarget.Validate if the designated constraints aren't met. +type DnsTable_DnsServiceTargetValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DnsTable_DnsServiceTargetValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DnsTable_DnsServiceTargetValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DnsTable_DnsServiceTargetValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DnsTable_DnsServiceTargetValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DnsTable_DnsServiceTargetValidationError) ErrorName() string { + return "DnsTable_DnsServiceTargetValidationError" +} + +// Error satisfies the builtin error interface +func (e DnsTable_DnsServiceTargetValidationError) 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 %sDnsTable_DnsServiceTarget.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DnsTable_DnsServiceTargetValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DnsTable_DnsServiceTargetValidationError{} + +var _DnsTable_DnsServiceTarget_HostName_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$") + +var _DnsTable_DnsServiceTarget_ClusterName_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$") + +// Validate checks the field values on DnsTable_DnsService 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 *DnsTable_DnsService) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsTable_DnsService 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 +// DnsTable_DnsServiceMultiError, or nil if none found. +func (m *DnsTable_DnsService) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsTable_DnsService) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetServiceName()) < 1 { + err := DnsTable_DnsServiceValidationError{ + field: "ServiceName", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if !_DnsTable_DnsService_ServiceName_Pattern.MatchString(m.GetServiceName()) { + err := DnsTable_DnsServiceValidationError{ + field: "ServiceName", + reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetProtocol()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsTable_DnsServiceValidationError{ + field: "Protocol", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsTable_DnsServiceValidationError{ + field: "Protocol", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProtocol()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsTable_DnsServiceValidationError{ + field: "Protocol", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if d := m.GetTtl(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = DnsTable_DnsServiceValidationError{ + field: "Ttl", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gte := time.Duration(1*time.Second + 0*time.Nanosecond) + + if dur < gte { + err := DnsTable_DnsServiceValidationError{ + field: "Ttl", + reason: "value must be greater than or equal to 1s", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if len(m.GetTargets()) < 1 { + err := DnsTable_DnsServiceValidationError{ + field: "Targets", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetTargets() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsTable_DnsServiceValidationError{ + field: fmt.Sprintf("Targets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsTable_DnsServiceValidationError{ + field: fmt.Sprintf("Targets[%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 DnsTable_DnsServiceValidationError{ + field: fmt.Sprintf("Targets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return DnsTable_DnsServiceMultiError(errors) + } + return nil +} + +// DnsTable_DnsServiceMultiError is an error wrapping multiple validation +// errors returned by DnsTable_DnsService.ValidateAll() if the designated +// constraints aren't met. +type DnsTable_DnsServiceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsTable_DnsServiceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsTable_DnsServiceMultiError) AllErrors() []error { return m } + +// DnsTable_DnsServiceValidationError is the validation error returned by +// DnsTable_DnsService.Validate if the designated constraints aren't met. +type DnsTable_DnsServiceValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DnsTable_DnsServiceValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DnsTable_DnsServiceValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DnsTable_DnsServiceValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DnsTable_DnsServiceValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DnsTable_DnsServiceValidationError) ErrorName() string { + return "DnsTable_DnsServiceValidationError" +} + +// Error satisfies the builtin error interface +func (e DnsTable_DnsServiceValidationError) 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 %sDnsTable_DnsService.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DnsTable_DnsServiceValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DnsTable_DnsServiceValidationError{} + +var _DnsTable_DnsService_ServiceName_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$") + +// Validate checks the field values on DnsTable_DnsServiceList 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 *DnsTable_DnsServiceList) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsTable_DnsServiceList 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 +// DnsTable_DnsServiceListMultiError, or nil if none found. +func (m *DnsTable_DnsServiceList) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsTable_DnsServiceList) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetServices()) < 1 { + err := DnsTable_DnsServiceListValidationError{ + field: "Services", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetServices() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsTable_DnsServiceListValidationError{ + field: fmt.Sprintf("Services[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsTable_DnsServiceListValidationError{ + field: fmt.Sprintf("Services[%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 DnsTable_DnsServiceListValidationError{ + field: fmt.Sprintf("Services[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return DnsTable_DnsServiceListMultiError(errors) + } + return nil +} + +// DnsTable_DnsServiceListMultiError is an error wrapping multiple validation +// errors returned by DnsTable_DnsServiceList.ValidateAll() if the designated +// constraints aren't met. +type DnsTable_DnsServiceListMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsTable_DnsServiceListMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsTable_DnsServiceListMultiError) AllErrors() []error { return m } + +// DnsTable_DnsServiceListValidationError is the validation error returned by +// DnsTable_DnsServiceList.Validate if the designated constraints aren't met. +type DnsTable_DnsServiceListValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DnsTable_DnsServiceListValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DnsTable_DnsServiceListValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DnsTable_DnsServiceListValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DnsTable_DnsServiceListValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DnsTable_DnsServiceListValidationError) ErrorName() string { + return "DnsTable_DnsServiceListValidationError" +} + +// Error satisfies the builtin error interface +func (e DnsTable_DnsServiceListValidationError) 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 %sDnsTable_DnsServiceList.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DnsTable_DnsServiceListValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DnsTable_DnsServiceListValidationError{} + +// Validate checks the field values on DnsTable_DnsEndpoint 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 *DnsTable_DnsEndpoint) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsTable_DnsEndpoint 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 +// DnsTable_DnsEndpointMultiError, or nil if none found. +func (m *DnsTable_DnsEndpoint) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsTable_DnsEndpoint) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.EndpointConfig.(type) { + + case *DnsTable_DnsEndpoint_AddressList: + + if all { + switch v := interface{}(m.GetAddressList()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsTable_DnsEndpointValidationError{ + field: "AddressList", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsTable_DnsEndpointValidationError{ + field: "AddressList", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddressList()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsTable_DnsEndpointValidationError{ + field: "AddressList", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *DnsTable_DnsEndpoint_ClusterName: + // no validation rules for ClusterName + + case *DnsTable_DnsEndpoint_ServiceList: + + if all { + switch v := interface{}(m.GetServiceList()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsTable_DnsEndpointValidationError{ + field: "ServiceList", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsTable_DnsEndpointValidationError{ + field: "ServiceList", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetServiceList()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsTable_DnsEndpointValidationError{ + field: "ServiceList", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := DnsTable_DnsEndpointValidationError{ + field: "EndpointConfig", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return DnsTable_DnsEndpointMultiError(errors) + } + return nil +} + +// DnsTable_DnsEndpointMultiError is an error wrapping multiple validation +// errors returned by DnsTable_DnsEndpoint.ValidateAll() if the designated +// constraints aren't met. +type DnsTable_DnsEndpointMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsTable_DnsEndpointMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsTable_DnsEndpointMultiError) AllErrors() []error { return m } + +// DnsTable_DnsEndpointValidationError is the validation error returned by +// DnsTable_DnsEndpoint.Validate if the designated constraints aren't met. +type DnsTable_DnsEndpointValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DnsTable_DnsEndpointValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DnsTable_DnsEndpointValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DnsTable_DnsEndpointValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DnsTable_DnsEndpointValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DnsTable_DnsEndpointValidationError) ErrorName() string { + return "DnsTable_DnsEndpointValidationError" +} + +// Error satisfies the builtin error interface +func (e DnsTable_DnsEndpointValidationError) 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 %sDnsTable_DnsEndpoint.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DnsTable_DnsEndpointValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DnsTable_DnsEndpointValidationError{} + +// Validate checks the field values on DnsTable_DnsVirtualDomain 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 *DnsTable_DnsVirtualDomain) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsTable_DnsVirtualDomain 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 +// DnsTable_DnsVirtualDomainMultiError, or nil if none found. +func (m *DnsTable_DnsVirtualDomain) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsTable_DnsVirtualDomain) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetName()) < 1 { + err := DnsTable_DnsVirtualDomainValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if !_DnsTable_DnsVirtualDomain_Name_Pattern.MatchString(m.GetName()) { + err := DnsTable_DnsVirtualDomainValidationError{ + field: "Name", + reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetEndpoint()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsTable_DnsVirtualDomainValidationError{ + field: "Endpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsTable_DnsVirtualDomainValidationError{ + field: "Endpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEndpoint()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsTable_DnsVirtualDomainValidationError{ + field: "Endpoint", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if d := m.GetAnswerTtl(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = DnsTable_DnsVirtualDomainValidationError{ + field: "AnswerTtl", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gte := time.Duration(30*time.Second + 0*time.Nanosecond) + + if dur < gte { + err := DnsTable_DnsVirtualDomainValidationError{ + field: "AnswerTtl", + reason: "value must be greater than or equal to 30s", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if len(errors) > 0 { + return DnsTable_DnsVirtualDomainMultiError(errors) + } + return nil +} + +// DnsTable_DnsVirtualDomainMultiError is an error wrapping multiple validation +// errors returned by DnsTable_DnsVirtualDomain.ValidateAll() if the +// designated constraints aren't met. +type DnsTable_DnsVirtualDomainMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsTable_DnsVirtualDomainMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsTable_DnsVirtualDomainMultiError) AllErrors() []error { return m } + +// DnsTable_DnsVirtualDomainValidationError is the validation error returned by +// DnsTable_DnsVirtualDomain.Validate if the designated constraints aren't met. +type DnsTable_DnsVirtualDomainValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DnsTable_DnsVirtualDomainValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DnsTable_DnsVirtualDomainValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DnsTable_DnsVirtualDomainValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DnsTable_DnsVirtualDomainValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DnsTable_DnsVirtualDomainValidationError) ErrorName() string { + return "DnsTable_DnsVirtualDomainValidationError" +} + +// Error satisfies the builtin error interface +func (e DnsTable_DnsVirtualDomainValidationError) 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 %sDnsTable_DnsVirtualDomain.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DnsTable_DnsVirtualDomainValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DnsTable_DnsVirtualDomainValidationError{} + +var _DnsTable_DnsVirtualDomain_Name_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$") diff --git a/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/common.pb.go b/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/common.pb.go new file mode 100644 index 0000000000000..8d2a8ce868830 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/common.pb.go @@ -0,0 +1,225 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/data/tap/v3/common.proto + +package tapv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Wrapper for tapped body data. This includes HTTP request/response body, transport socket received +// and transmitted data, etc. +type Body struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to BodyType: + // + // *Body_AsBytes + // *Body_AsString + BodyType isBody_BodyType `protobuf_oneof:"body_type"` + // Specifies whether body data has been truncated to fit within the specified + // :ref:`max_buffered_rx_bytes + // ` and + // :ref:`max_buffered_tx_bytes + // ` settings. + Truncated bool `protobuf:"varint,3,opt,name=truncated,proto3" json:"truncated,omitempty"` +} + +func (x *Body) Reset() { + *x = Body{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_tap_v3_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Body) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Body) ProtoMessage() {} + +func (x *Body) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_tap_v3_common_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Body.ProtoReflect.Descriptor instead. +func (*Body) Descriptor() ([]byte, []int) { + return file_envoy_data_tap_v3_common_proto_rawDescGZIP(), []int{0} +} + +func (m *Body) GetBodyType() isBody_BodyType { + if m != nil { + return m.BodyType + } + return nil +} + +func (x *Body) GetAsBytes() []byte { + if x, ok := x.GetBodyType().(*Body_AsBytes); ok { + return x.AsBytes + } + return nil +} + +func (x *Body) GetAsString() string { + if x, ok := x.GetBodyType().(*Body_AsString); ok { + return x.AsString + } + return "" +} + +func (x *Body) GetTruncated() bool { + if x != nil { + return x.Truncated + } + return false +} + +type isBody_BodyType interface { + isBody_BodyType() +} + +type Body_AsBytes struct { + // Body data as bytes. By default, tap body data will be present in this field, as the proto + // “bytes“ type can contain any valid byte. + AsBytes []byte `protobuf:"bytes,1,opt,name=as_bytes,json=asBytes,proto3,oneof"` +} + +type Body_AsString struct { + // Body data as string. This field is only used when the :ref:`JSON_BODY_AS_STRING + // ` sink + // format type is selected. See the documentation for that option for why this is useful. + AsString string `protobuf:"bytes,2,opt,name=as_string,json=asString,proto3,oneof"` +} + +func (*Body_AsBytes) isBody_BodyType() {} + +func (*Body_AsString) isBody_BodyType() {} + +var File_envoy_data_tap_v3_common_proto protoreflect.FileDescriptor + +var file_envoy_data_tap_v3_common_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, 0x61, 0x70, + 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x11, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, + 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x91, 0x01, 0x0a, 0x04, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x1b, + 0x0a, 0x08, 0x61, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x48, 0x00, 0x52, 0x07, 0x61, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x09, 0x61, + 0x73, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x08, 0x61, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x72, + 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x74, + 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x22, 0x9a, 0xc5, 0x88, 0x1e, 0x1d, 0x0a, + 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, + 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x42, 0x0b, 0x0a, 0x09, + 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x78, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, + 0x61, 0x70, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x61, 0x70, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_data_tap_v3_common_proto_rawDescOnce sync.Once + file_envoy_data_tap_v3_common_proto_rawDescData = file_envoy_data_tap_v3_common_proto_rawDesc +) + +func file_envoy_data_tap_v3_common_proto_rawDescGZIP() []byte { + file_envoy_data_tap_v3_common_proto_rawDescOnce.Do(func() { + file_envoy_data_tap_v3_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_data_tap_v3_common_proto_rawDescData) + }) + return file_envoy_data_tap_v3_common_proto_rawDescData +} + +var file_envoy_data_tap_v3_common_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_data_tap_v3_common_proto_goTypes = []interface{}{ + (*Body)(nil), // 0: envoy.data.tap.v3.Body +} +var file_envoy_data_tap_v3_common_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_data_tap_v3_common_proto_init() } +func file_envoy_data_tap_v3_common_proto_init() { + if File_envoy_data_tap_v3_common_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_data_tap_v3_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Body); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_data_tap_v3_common_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Body_AsBytes)(nil), + (*Body_AsString)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_data_tap_v3_common_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_data_tap_v3_common_proto_goTypes, + DependencyIndexes: file_envoy_data_tap_v3_common_proto_depIdxs, + MessageInfos: file_envoy_data_tap_v3_common_proto_msgTypes, + }.Build() + File_envoy_data_tap_v3_common_proto = out.File + file_envoy_data_tap_v3_common_proto_rawDesc = nil + file_envoy_data_tap_v3_common_proto_goTypes = nil + file_envoy_data_tap_v3_common_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/common.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/common.pb.validate.go new file mode 100644 index 0000000000000..ebae7041830d1 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/common.pb.validate.go @@ -0,0 +1,145 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/data/tap/v3/common.proto + +package tapv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Body 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 *Body) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Body 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 BodyMultiError, or nil if none found. +func (m *Body) ValidateAll() error { + return m.validate(true) +} + +func (m *Body) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Truncated + + switch m.BodyType.(type) { + + case *Body_AsBytes: + // no validation rules for AsBytes + + case *Body_AsString: + // no validation rules for AsString + + } + + if len(errors) > 0 { + return BodyMultiError(errors) + } + return nil +} + +// BodyMultiError is an error wrapping multiple validation errors returned by +// Body.ValidateAll() if the designated constraints aren't met. +type BodyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BodyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BodyMultiError) AllErrors() []error { return m } + +// BodyValidationError is the validation error returned by Body.Validate if the +// designated constraints aren't met. +type BodyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BodyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BodyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BodyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BodyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BodyValidationError) ErrorName() string { return "BodyValidationError" } + +// Error satisfies the builtin error interface +func (e BodyValidationError) 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 %sBody.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BodyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BodyValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/http.pb.go b/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/http.pb.go new file mode 100644 index 0000000000000..beb48520d8801 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/http.pb.go @@ -0,0 +1,510 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/data/tap/v3/http.proto + +package tapv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// A fully buffered HTTP trace message. +type HttpBufferedTrace struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Request message. + Request *HttpBufferedTrace_Message `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` + // Response message. + Response *HttpBufferedTrace_Message `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"` +} + +func (x *HttpBufferedTrace) Reset() { + *x = HttpBufferedTrace{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_tap_v3_http_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpBufferedTrace) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpBufferedTrace) ProtoMessage() {} + +func (x *HttpBufferedTrace) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_tap_v3_http_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpBufferedTrace.ProtoReflect.Descriptor instead. +func (*HttpBufferedTrace) Descriptor() ([]byte, []int) { + return file_envoy_data_tap_v3_http_proto_rawDescGZIP(), []int{0} +} + +func (x *HttpBufferedTrace) GetRequest() *HttpBufferedTrace_Message { + if x != nil { + return x.Request + } + return nil +} + +func (x *HttpBufferedTrace) GetResponse() *HttpBufferedTrace_Message { + if x != nil { + return x.Response + } + return nil +} + +// A streamed HTTP trace segment. Multiple segments make up a full trace. +// [#next-free-field: 8] +type HttpStreamedTraceSegment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Trace ID unique to the originating Envoy only. Trace IDs can repeat and should not be used + // for long term stable uniqueness. + TraceId uint64 `protobuf:"varint,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` + // Types that are assignable to MessagePiece: + // + // *HttpStreamedTraceSegment_RequestHeaders + // *HttpStreamedTraceSegment_RequestBodyChunk + // *HttpStreamedTraceSegment_RequestTrailers + // *HttpStreamedTraceSegment_ResponseHeaders + // *HttpStreamedTraceSegment_ResponseBodyChunk + // *HttpStreamedTraceSegment_ResponseTrailers + MessagePiece isHttpStreamedTraceSegment_MessagePiece `protobuf_oneof:"message_piece"` +} + +func (x *HttpStreamedTraceSegment) Reset() { + *x = HttpStreamedTraceSegment{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_tap_v3_http_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpStreamedTraceSegment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpStreamedTraceSegment) ProtoMessage() {} + +func (x *HttpStreamedTraceSegment) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_tap_v3_http_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpStreamedTraceSegment.ProtoReflect.Descriptor instead. +func (*HttpStreamedTraceSegment) Descriptor() ([]byte, []int) { + return file_envoy_data_tap_v3_http_proto_rawDescGZIP(), []int{1} +} + +func (x *HttpStreamedTraceSegment) GetTraceId() uint64 { + if x != nil { + return x.TraceId + } + return 0 +} + +func (m *HttpStreamedTraceSegment) GetMessagePiece() isHttpStreamedTraceSegment_MessagePiece { + if m != nil { + return m.MessagePiece + } + return nil +} + +func (x *HttpStreamedTraceSegment) GetRequestHeaders() *v3.HeaderMap { + if x, ok := x.GetMessagePiece().(*HttpStreamedTraceSegment_RequestHeaders); ok { + return x.RequestHeaders + } + return nil +} + +func (x *HttpStreamedTraceSegment) GetRequestBodyChunk() *Body { + if x, ok := x.GetMessagePiece().(*HttpStreamedTraceSegment_RequestBodyChunk); ok { + return x.RequestBodyChunk + } + return nil +} + +func (x *HttpStreamedTraceSegment) GetRequestTrailers() *v3.HeaderMap { + if x, ok := x.GetMessagePiece().(*HttpStreamedTraceSegment_RequestTrailers); ok { + return x.RequestTrailers + } + return nil +} + +func (x *HttpStreamedTraceSegment) GetResponseHeaders() *v3.HeaderMap { + if x, ok := x.GetMessagePiece().(*HttpStreamedTraceSegment_ResponseHeaders); ok { + return x.ResponseHeaders + } + return nil +} + +func (x *HttpStreamedTraceSegment) GetResponseBodyChunk() *Body { + if x, ok := x.GetMessagePiece().(*HttpStreamedTraceSegment_ResponseBodyChunk); ok { + return x.ResponseBodyChunk + } + return nil +} + +func (x *HttpStreamedTraceSegment) GetResponseTrailers() *v3.HeaderMap { + if x, ok := x.GetMessagePiece().(*HttpStreamedTraceSegment_ResponseTrailers); ok { + return x.ResponseTrailers + } + return nil +} + +type isHttpStreamedTraceSegment_MessagePiece interface { + isHttpStreamedTraceSegment_MessagePiece() +} + +type HttpStreamedTraceSegment_RequestHeaders struct { + // Request headers. + RequestHeaders *v3.HeaderMap `protobuf:"bytes,2,opt,name=request_headers,json=requestHeaders,proto3,oneof"` +} + +type HttpStreamedTraceSegment_RequestBodyChunk struct { + // Request body chunk. + RequestBodyChunk *Body `protobuf:"bytes,3,opt,name=request_body_chunk,json=requestBodyChunk,proto3,oneof"` +} + +type HttpStreamedTraceSegment_RequestTrailers struct { + // Request trailers. + RequestTrailers *v3.HeaderMap `protobuf:"bytes,4,opt,name=request_trailers,json=requestTrailers,proto3,oneof"` +} + +type HttpStreamedTraceSegment_ResponseHeaders struct { + // Response headers. + ResponseHeaders *v3.HeaderMap `protobuf:"bytes,5,opt,name=response_headers,json=responseHeaders,proto3,oneof"` +} + +type HttpStreamedTraceSegment_ResponseBodyChunk struct { + // Response body chunk. + ResponseBodyChunk *Body `protobuf:"bytes,6,opt,name=response_body_chunk,json=responseBodyChunk,proto3,oneof"` +} + +type HttpStreamedTraceSegment_ResponseTrailers struct { + // Response trailers. + ResponseTrailers *v3.HeaderMap `protobuf:"bytes,7,opt,name=response_trailers,json=responseTrailers,proto3,oneof"` +} + +func (*HttpStreamedTraceSegment_RequestHeaders) isHttpStreamedTraceSegment_MessagePiece() {} + +func (*HttpStreamedTraceSegment_RequestBodyChunk) isHttpStreamedTraceSegment_MessagePiece() {} + +func (*HttpStreamedTraceSegment_RequestTrailers) isHttpStreamedTraceSegment_MessagePiece() {} + +func (*HttpStreamedTraceSegment_ResponseHeaders) isHttpStreamedTraceSegment_MessagePiece() {} + +func (*HttpStreamedTraceSegment_ResponseBodyChunk) isHttpStreamedTraceSegment_MessagePiece() {} + +func (*HttpStreamedTraceSegment_ResponseTrailers) isHttpStreamedTraceSegment_MessagePiece() {} + +// HTTP message wrapper. +type HttpBufferedTrace_Message struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Message headers. + Headers []*v3.HeaderValue `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` + // Message body. + Body *Body `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` + // Message trailers. + Trailers []*v3.HeaderValue `protobuf:"bytes,3,rep,name=trailers,proto3" json:"trailers,omitempty"` +} + +func (x *HttpBufferedTrace_Message) Reset() { + *x = HttpBufferedTrace_Message{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_tap_v3_http_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpBufferedTrace_Message) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpBufferedTrace_Message) ProtoMessage() {} + +func (x *HttpBufferedTrace_Message) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_tap_v3_http_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpBufferedTrace_Message.ProtoReflect.Descriptor instead. +func (*HttpBufferedTrace_Message) Descriptor() ([]byte, []int) { + return file_envoy_data_tap_v3_http_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *HttpBufferedTrace_Message) GetHeaders() []*v3.HeaderValue { + if x != nil { + return x.Headers + } + return nil +} + +func (x *HttpBufferedTrace_Message) GetBody() *Body { + if x != nil { + return x.Body + } + return nil +} + +func (x *HttpBufferedTrace_Message) GetTrailers() []*v3.HeaderValue { + if x != nil { + return x.Trailers + } + return nil +} + +var File_envoy_data_tap_v3_http_proto protoreflect.FileDescriptor + +var file_envoy_data_tap_v3_http_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, 0x61, 0x70, + 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, + 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, + 0x61, 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc4, 0x03, 0x0a, 0x11, 0x48, 0x74, 0x74, 0x70, 0x42, 0x75, 0x66, + 0x66, 0x65, 0x72, 0x65, 0x64, 0x54, 0x72, 0x61, 0x63, 0x65, 0x12, 0x46, 0x0a, 0x07, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, + 0x48, 0x74, 0x74, 0x70, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, 0x54, 0x72, 0x61, 0x63, + 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x48, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x75, 0x66, + 0x66, 0x65, 0x72, 0x65, 0x64, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0xeb, 0x01, 0x0a, + 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x2b, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x62, 0x6f, + 0x64, 0x79, 0x12, 0x3d, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, + 0x73, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, 0x54, 0x72, 0x61, + 0x63, 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, + 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, + 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x75, + 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, 0x54, 0x72, 0x61, 0x63, 0x65, 0x22, 0xca, 0x04, 0x0a, 0x18, + 0x48, 0x74, 0x74, 0x70, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x65, 0x64, 0x54, 0x72, 0x61, 0x63, + 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, + 0x65, 0x49, 0x64, 0x12, 0x4a, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, + 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, + 0x47, 0x0a, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, + 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, + 0x42, 0x6f, 0x64, 0x79, 0x48, 0x00, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, + 0x6f, 0x64, 0x79, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x4c, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x72, + 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x4c, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, + 0x70, 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x12, 0x49, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, + 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, + 0x4e, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x69, + 0x6c, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x10, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x3a, + 0x36, 0x9a, 0xc5, 0x88, 0x1e, 0x31, 0x0a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x48, + 0x74, 0x74, 0x70, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x65, 0x64, 0x54, 0x72, 0x61, 0x63, 0x65, + 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x0f, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x5f, 0x70, 0x69, 0x65, 0x63, 0x65, 0x42, 0x76, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x48, 0x74, 0x74, + 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, 0x61, 0x70, 0x2f, + 0x76, 0x33, 0x3b, 0x74, 0x61, 0x70, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_data_tap_v3_http_proto_rawDescOnce sync.Once + file_envoy_data_tap_v3_http_proto_rawDescData = file_envoy_data_tap_v3_http_proto_rawDesc +) + +func file_envoy_data_tap_v3_http_proto_rawDescGZIP() []byte { + file_envoy_data_tap_v3_http_proto_rawDescOnce.Do(func() { + file_envoy_data_tap_v3_http_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_data_tap_v3_http_proto_rawDescData) + }) + return file_envoy_data_tap_v3_http_proto_rawDescData +} + +var file_envoy_data_tap_v3_http_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_data_tap_v3_http_proto_goTypes = []interface{}{ + (*HttpBufferedTrace)(nil), // 0: envoy.data.tap.v3.HttpBufferedTrace + (*HttpStreamedTraceSegment)(nil), // 1: envoy.data.tap.v3.HttpStreamedTraceSegment + (*HttpBufferedTrace_Message)(nil), // 2: envoy.data.tap.v3.HttpBufferedTrace.Message + (*v3.HeaderMap)(nil), // 3: envoy.config.core.v3.HeaderMap + (*Body)(nil), // 4: envoy.data.tap.v3.Body + (*v3.HeaderValue)(nil), // 5: envoy.config.core.v3.HeaderValue +} +var file_envoy_data_tap_v3_http_proto_depIdxs = []int32{ + 2, // 0: envoy.data.tap.v3.HttpBufferedTrace.request:type_name -> envoy.data.tap.v3.HttpBufferedTrace.Message + 2, // 1: envoy.data.tap.v3.HttpBufferedTrace.response:type_name -> envoy.data.tap.v3.HttpBufferedTrace.Message + 3, // 2: envoy.data.tap.v3.HttpStreamedTraceSegment.request_headers:type_name -> envoy.config.core.v3.HeaderMap + 4, // 3: envoy.data.tap.v3.HttpStreamedTraceSegment.request_body_chunk:type_name -> envoy.data.tap.v3.Body + 3, // 4: envoy.data.tap.v3.HttpStreamedTraceSegment.request_trailers:type_name -> envoy.config.core.v3.HeaderMap + 3, // 5: envoy.data.tap.v3.HttpStreamedTraceSegment.response_headers:type_name -> envoy.config.core.v3.HeaderMap + 4, // 6: envoy.data.tap.v3.HttpStreamedTraceSegment.response_body_chunk:type_name -> envoy.data.tap.v3.Body + 3, // 7: envoy.data.tap.v3.HttpStreamedTraceSegment.response_trailers:type_name -> envoy.config.core.v3.HeaderMap + 5, // 8: envoy.data.tap.v3.HttpBufferedTrace.Message.headers:type_name -> envoy.config.core.v3.HeaderValue + 4, // 9: envoy.data.tap.v3.HttpBufferedTrace.Message.body:type_name -> envoy.data.tap.v3.Body + 5, // 10: envoy.data.tap.v3.HttpBufferedTrace.Message.trailers:type_name -> envoy.config.core.v3.HeaderValue + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_envoy_data_tap_v3_http_proto_init() } +func file_envoy_data_tap_v3_http_proto_init() { + if File_envoy_data_tap_v3_http_proto != nil { + return + } + file_envoy_data_tap_v3_common_proto_init() + if !protoimpl.UnsafeEnabled { + file_envoy_data_tap_v3_http_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpBufferedTrace); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_tap_v3_http_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpStreamedTraceSegment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_tap_v3_http_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpBufferedTrace_Message); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_data_tap_v3_http_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*HttpStreamedTraceSegment_RequestHeaders)(nil), + (*HttpStreamedTraceSegment_RequestBodyChunk)(nil), + (*HttpStreamedTraceSegment_RequestTrailers)(nil), + (*HttpStreamedTraceSegment_ResponseHeaders)(nil), + (*HttpStreamedTraceSegment_ResponseBodyChunk)(nil), + (*HttpStreamedTraceSegment_ResponseTrailers)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_data_tap_v3_http_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_data_tap_v3_http_proto_goTypes, + DependencyIndexes: file_envoy_data_tap_v3_http_proto_depIdxs, + MessageInfos: file_envoy_data_tap_v3_http_proto_msgTypes, + }.Build() + File_envoy_data_tap_v3_http_proto = out.File + file_envoy_data_tap_v3_http_proto_rawDesc = nil + file_envoy_data_tap_v3_http_proto_goTypes = nil + file_envoy_data_tap_v3_http_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/http.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/http.pb.validate.go new file mode 100644 index 0000000000000..fa8c6497024f6 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/http.pb.validate.go @@ -0,0 +1,686 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/data/tap/v3/http.proto + +package tapv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on HttpBufferedTrace 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 *HttpBufferedTrace) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpBufferedTrace 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 +// HttpBufferedTraceMultiError, or nil if none found. +func (m *HttpBufferedTrace) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpBufferedTrace) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetRequest()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpBufferedTraceValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpBufferedTraceValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpBufferedTraceValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpBufferedTraceValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpBufferedTraceValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpBufferedTraceValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return HttpBufferedTraceMultiError(errors) + } + return nil +} + +// HttpBufferedTraceMultiError is an error wrapping multiple validation errors +// returned by HttpBufferedTrace.ValidateAll() if the designated constraints +// aren't met. +type HttpBufferedTraceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpBufferedTraceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpBufferedTraceMultiError) AllErrors() []error { return m } + +// HttpBufferedTraceValidationError is the validation error returned by +// HttpBufferedTrace.Validate if the designated constraints aren't met. +type HttpBufferedTraceValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpBufferedTraceValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpBufferedTraceValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpBufferedTraceValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpBufferedTraceValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpBufferedTraceValidationError) ErrorName() string { + return "HttpBufferedTraceValidationError" +} + +// Error satisfies the builtin error interface +func (e HttpBufferedTraceValidationError) 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 %sHttpBufferedTrace.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpBufferedTraceValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpBufferedTraceValidationError{} + +// Validate checks the field values on HttpStreamedTraceSegment 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 *HttpStreamedTraceSegment) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpStreamedTraceSegment 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 +// HttpStreamedTraceSegmentMultiError, or nil if none found. +func (m *HttpStreamedTraceSegment) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpStreamedTraceSegment) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for TraceId + + switch m.MessagePiece.(type) { + + case *HttpStreamedTraceSegment_RequestHeaders: + + if all { + switch v := interface{}(m.GetRequestHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestHeaders()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpStreamedTraceSegmentValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *HttpStreamedTraceSegment_RequestBodyChunk: + + if all { + switch v := interface{}(m.GetRequestBodyChunk()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "RequestBodyChunk", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "RequestBodyChunk", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestBodyChunk()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpStreamedTraceSegmentValidationError{ + field: "RequestBodyChunk", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *HttpStreamedTraceSegment_RequestTrailers: + + if all { + switch v := interface{}(m.GetRequestTrailers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "RequestTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "RequestTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestTrailers()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpStreamedTraceSegmentValidationError{ + field: "RequestTrailers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *HttpStreamedTraceSegment_ResponseHeaders: + + if all { + switch v := interface{}(m.GetResponseHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "ResponseHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "ResponseHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseHeaders()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpStreamedTraceSegmentValidationError{ + field: "ResponseHeaders", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *HttpStreamedTraceSegment_ResponseBodyChunk: + + if all { + switch v := interface{}(m.GetResponseBodyChunk()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "ResponseBodyChunk", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "ResponseBodyChunk", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseBodyChunk()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpStreamedTraceSegmentValidationError{ + field: "ResponseBodyChunk", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *HttpStreamedTraceSegment_ResponseTrailers: + + if all { + switch v := interface{}(m.GetResponseTrailers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "ResponseTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpStreamedTraceSegmentValidationError{ + field: "ResponseTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseTrailers()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpStreamedTraceSegmentValidationError{ + field: "ResponseTrailers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return HttpStreamedTraceSegmentMultiError(errors) + } + return nil +} + +// HttpStreamedTraceSegmentMultiError is an error wrapping multiple validation +// errors returned by HttpStreamedTraceSegment.ValidateAll() if the designated +// constraints aren't met. +type HttpStreamedTraceSegmentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpStreamedTraceSegmentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpStreamedTraceSegmentMultiError) AllErrors() []error { return m } + +// HttpStreamedTraceSegmentValidationError is the validation error returned by +// HttpStreamedTraceSegment.Validate if the designated constraints aren't met. +type HttpStreamedTraceSegmentValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpStreamedTraceSegmentValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpStreamedTraceSegmentValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpStreamedTraceSegmentValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpStreamedTraceSegmentValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpStreamedTraceSegmentValidationError) ErrorName() string { + return "HttpStreamedTraceSegmentValidationError" +} + +// Error satisfies the builtin error interface +func (e HttpStreamedTraceSegmentValidationError) 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 %sHttpStreamedTraceSegment.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpStreamedTraceSegmentValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpStreamedTraceSegmentValidationError{} + +// Validate checks the field values on HttpBufferedTrace_Message 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 *HttpBufferedTrace_Message) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpBufferedTrace_Message 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 +// HttpBufferedTrace_MessageMultiError, or nil if none found. +func (m *HttpBufferedTrace_Message) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpBufferedTrace_Message) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetHeaders() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpBufferedTrace_MessageValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpBufferedTrace_MessageValidationError{ + field: fmt.Sprintf("Headers[%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 HttpBufferedTrace_MessageValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetBody()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpBufferedTrace_MessageValidationError{ + field: "Body", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpBufferedTrace_MessageValidationError{ + field: "Body", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBody()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpBufferedTrace_MessageValidationError{ + field: "Body", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetTrailers() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpBufferedTrace_MessageValidationError{ + field: fmt.Sprintf("Trailers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpBufferedTrace_MessageValidationError{ + field: fmt.Sprintf("Trailers[%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 HttpBufferedTrace_MessageValidationError{ + field: fmt.Sprintf("Trailers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return HttpBufferedTrace_MessageMultiError(errors) + } + return nil +} + +// HttpBufferedTrace_MessageMultiError is an error wrapping multiple validation +// errors returned by HttpBufferedTrace_Message.ValidateAll() if the +// designated constraints aren't met. +type HttpBufferedTrace_MessageMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpBufferedTrace_MessageMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpBufferedTrace_MessageMultiError) AllErrors() []error { return m } + +// HttpBufferedTrace_MessageValidationError is the validation error returned by +// HttpBufferedTrace_Message.Validate if the designated constraints aren't met. +type HttpBufferedTrace_MessageValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpBufferedTrace_MessageValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpBufferedTrace_MessageValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpBufferedTrace_MessageValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpBufferedTrace_MessageValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpBufferedTrace_MessageValidationError) ErrorName() string { + return "HttpBufferedTrace_MessageValidationError" +} + +// Error satisfies the builtin error interface +func (e HttpBufferedTrace_MessageValidationError) 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 %sHttpBufferedTrace_Message.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpBufferedTrace_MessageValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpBufferedTrace_MessageValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/transport.pb.go b/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/transport.pb.go new file mode 100644 index 0000000000000..0601ddbe1b405 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/transport.pb.go @@ -0,0 +1,802 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/data/tap/v3/transport.proto + +package tapv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Connection properties. +type Connection struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Local address. + LocalAddress *v3.Address `protobuf:"bytes,2,opt,name=local_address,json=localAddress,proto3" json:"local_address,omitempty"` + // Remote address. + RemoteAddress *v3.Address `protobuf:"bytes,3,opt,name=remote_address,json=remoteAddress,proto3" json:"remote_address,omitempty"` +} + +func (x *Connection) Reset() { + *x = Connection{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_tap_v3_transport_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Connection) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Connection) ProtoMessage() {} + +func (x *Connection) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_tap_v3_transport_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Connection.ProtoReflect.Descriptor instead. +func (*Connection) Descriptor() ([]byte, []int) { + return file_envoy_data_tap_v3_transport_proto_rawDescGZIP(), []int{0} +} + +func (x *Connection) GetLocalAddress() *v3.Address { + if x != nil { + return x.LocalAddress + } + return nil +} + +func (x *Connection) GetRemoteAddress() *v3.Address { + if x != nil { + return x.RemoteAddress + } + return nil +} + +// Event in a socket trace. +type SocketEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Timestamp for event. + Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // Read or write with content as bytes string. + // + // Types that are assignable to EventSelector: + // + // *SocketEvent_Read_ + // *SocketEvent_Write_ + // *SocketEvent_Closed_ + EventSelector isSocketEvent_EventSelector `protobuf_oneof:"event_selector"` +} + +func (x *SocketEvent) Reset() { + *x = SocketEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_tap_v3_transport_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SocketEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SocketEvent) ProtoMessage() {} + +func (x *SocketEvent) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_tap_v3_transport_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SocketEvent.ProtoReflect.Descriptor instead. +func (*SocketEvent) Descriptor() ([]byte, []int) { + return file_envoy_data_tap_v3_transport_proto_rawDescGZIP(), []int{1} +} + +func (x *SocketEvent) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (m *SocketEvent) GetEventSelector() isSocketEvent_EventSelector { + if m != nil { + return m.EventSelector + } + return nil +} + +func (x *SocketEvent) GetRead() *SocketEvent_Read { + if x, ok := x.GetEventSelector().(*SocketEvent_Read_); ok { + return x.Read + } + return nil +} + +func (x *SocketEvent) GetWrite() *SocketEvent_Write { + if x, ok := x.GetEventSelector().(*SocketEvent_Write_); ok { + return x.Write + } + return nil +} + +func (x *SocketEvent) GetClosed() *SocketEvent_Closed { + if x, ok := x.GetEventSelector().(*SocketEvent_Closed_); ok { + return x.Closed + } + return nil +} + +type isSocketEvent_EventSelector interface { + isSocketEvent_EventSelector() +} + +type SocketEvent_Read_ struct { + Read *SocketEvent_Read `protobuf:"bytes,2,opt,name=read,proto3,oneof"` +} + +type SocketEvent_Write_ struct { + Write *SocketEvent_Write `protobuf:"bytes,3,opt,name=write,proto3,oneof"` +} + +type SocketEvent_Closed_ struct { + Closed *SocketEvent_Closed `protobuf:"bytes,4,opt,name=closed,proto3,oneof"` +} + +func (*SocketEvent_Read_) isSocketEvent_EventSelector() {} + +func (*SocketEvent_Write_) isSocketEvent_EventSelector() {} + +func (*SocketEvent_Closed_) isSocketEvent_EventSelector() {} + +// Sequence of read/write events that constitute a buffered trace on a socket. +// [#next-free-field: 6] +type SocketBufferedTrace struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Trace ID unique to the originating Envoy only. Trace IDs can repeat and should not be used + // for long term stable uniqueness. Matches connection IDs used in Envoy logs. + TraceId uint64 `protobuf:"varint,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` + // Connection properties. + Connection *Connection `protobuf:"bytes,2,opt,name=connection,proto3" json:"connection,omitempty"` + // Sequence of observed events. + Events []*SocketEvent `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"` + // Set to true if read events were truncated due to the :ref:`max_buffered_rx_bytes + // ` setting. + ReadTruncated bool `protobuf:"varint,4,opt,name=read_truncated,json=readTruncated,proto3" json:"read_truncated,omitempty"` + // Set to true if write events were truncated due to the :ref:`max_buffered_tx_bytes + // ` setting. + WriteTruncated bool `protobuf:"varint,5,opt,name=write_truncated,json=writeTruncated,proto3" json:"write_truncated,omitempty"` +} + +func (x *SocketBufferedTrace) Reset() { + *x = SocketBufferedTrace{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_tap_v3_transport_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SocketBufferedTrace) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SocketBufferedTrace) ProtoMessage() {} + +func (x *SocketBufferedTrace) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_tap_v3_transport_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SocketBufferedTrace.ProtoReflect.Descriptor instead. +func (*SocketBufferedTrace) Descriptor() ([]byte, []int) { + return file_envoy_data_tap_v3_transport_proto_rawDescGZIP(), []int{2} +} + +func (x *SocketBufferedTrace) GetTraceId() uint64 { + if x != nil { + return x.TraceId + } + return 0 +} + +func (x *SocketBufferedTrace) GetConnection() *Connection { + if x != nil { + return x.Connection + } + return nil +} + +func (x *SocketBufferedTrace) GetEvents() []*SocketEvent { + if x != nil { + return x.Events + } + return nil +} + +func (x *SocketBufferedTrace) GetReadTruncated() bool { + if x != nil { + return x.ReadTruncated + } + return false +} + +func (x *SocketBufferedTrace) GetWriteTruncated() bool { + if x != nil { + return x.WriteTruncated + } + return false +} + +// A streamed socket trace segment. Multiple segments make up a full trace. +type SocketStreamedTraceSegment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Trace ID unique to the originating Envoy only. Trace IDs can repeat and should not be used + // for long term stable uniqueness. Matches connection IDs used in Envoy logs. + TraceId uint64 `protobuf:"varint,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` + // Types that are assignable to MessagePiece: + // + // *SocketStreamedTraceSegment_Connection + // *SocketStreamedTraceSegment_Event + MessagePiece isSocketStreamedTraceSegment_MessagePiece `protobuf_oneof:"message_piece"` +} + +func (x *SocketStreamedTraceSegment) Reset() { + *x = SocketStreamedTraceSegment{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_tap_v3_transport_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SocketStreamedTraceSegment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SocketStreamedTraceSegment) ProtoMessage() {} + +func (x *SocketStreamedTraceSegment) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_tap_v3_transport_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SocketStreamedTraceSegment.ProtoReflect.Descriptor instead. +func (*SocketStreamedTraceSegment) Descriptor() ([]byte, []int) { + return file_envoy_data_tap_v3_transport_proto_rawDescGZIP(), []int{3} +} + +func (x *SocketStreamedTraceSegment) GetTraceId() uint64 { + if x != nil { + return x.TraceId + } + return 0 +} + +func (m *SocketStreamedTraceSegment) GetMessagePiece() isSocketStreamedTraceSegment_MessagePiece { + if m != nil { + return m.MessagePiece + } + return nil +} + +func (x *SocketStreamedTraceSegment) GetConnection() *Connection { + if x, ok := x.GetMessagePiece().(*SocketStreamedTraceSegment_Connection); ok { + return x.Connection + } + return nil +} + +func (x *SocketStreamedTraceSegment) GetEvent() *SocketEvent { + if x, ok := x.GetMessagePiece().(*SocketStreamedTraceSegment_Event); ok { + return x.Event + } + return nil +} + +type isSocketStreamedTraceSegment_MessagePiece interface { + isSocketStreamedTraceSegment_MessagePiece() +} + +type SocketStreamedTraceSegment_Connection struct { + // Connection properties. + Connection *Connection `protobuf:"bytes,2,opt,name=connection,proto3,oneof"` +} + +type SocketStreamedTraceSegment_Event struct { + // Socket event. + Event *SocketEvent `protobuf:"bytes,3,opt,name=event,proto3,oneof"` +} + +func (*SocketStreamedTraceSegment_Connection) isSocketStreamedTraceSegment_MessagePiece() {} + +func (*SocketStreamedTraceSegment_Event) isSocketStreamedTraceSegment_MessagePiece() {} + +// Data read by Envoy from the transport socket. +type SocketEvent_Read struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Binary data read. + Data *Body `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *SocketEvent_Read) Reset() { + *x = SocketEvent_Read{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_tap_v3_transport_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SocketEvent_Read) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SocketEvent_Read) ProtoMessage() {} + +func (x *SocketEvent_Read) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_tap_v3_transport_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SocketEvent_Read.ProtoReflect.Descriptor instead. +func (*SocketEvent_Read) Descriptor() ([]byte, []int) { + return file_envoy_data_tap_v3_transport_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *SocketEvent_Read) GetData() *Body { + if x != nil { + return x.Data + } + return nil +} + +// Data written by Envoy to the transport socket. +type SocketEvent_Write struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Binary data written. + Data *Body `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + // Stream was half closed after this write. + EndStream bool `protobuf:"varint,2,opt,name=end_stream,json=endStream,proto3" json:"end_stream,omitempty"` +} + +func (x *SocketEvent_Write) Reset() { + *x = SocketEvent_Write{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_tap_v3_transport_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SocketEvent_Write) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SocketEvent_Write) ProtoMessage() {} + +func (x *SocketEvent_Write) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_tap_v3_transport_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SocketEvent_Write.ProtoReflect.Descriptor instead. +func (*SocketEvent_Write) Descriptor() ([]byte, []int) { + return file_envoy_data_tap_v3_transport_proto_rawDescGZIP(), []int{1, 1} +} + +func (x *SocketEvent_Write) GetData() *Body { + if x != nil { + return x.Data + } + return nil +} + +func (x *SocketEvent_Write) GetEndStream() bool { + if x != nil { + return x.EndStream + } + return false +} + +// The connection was closed. +type SocketEvent_Closed struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SocketEvent_Closed) Reset() { + *x = SocketEvent_Closed{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_tap_v3_transport_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SocketEvent_Closed) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SocketEvent_Closed) ProtoMessage() {} + +func (x *SocketEvent_Closed) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_tap_v3_transport_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SocketEvent_Closed.ProtoReflect.Descriptor instead. +func (*SocketEvent_Closed) Descriptor() ([]byte, []int) { + return file_envoy_data_tap_v3_transport_proto_rawDescGZIP(), []int{1, 2} +} + +var File_envoy_data_tap_v3_transport_proto protoreflect.FileDescriptor + +var file_envoy_data_tap_v3_transport_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, 0x61, 0x70, + 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 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, 0x1d, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc0, 0x01, + 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x0d, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x52, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x44, 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0xe6, 0x04, 0x0a, 0x0b, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 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, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x39, 0x0a, 0x04, 0x72, 0x65, + 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x48, 0x00, 0x52, + 0x04, 0x72, 0x65, 0x61, 0x64, 0x12, 0x3c, 0x0a, 0x05, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x00, 0x52, 0x05, 0x77, 0x72, + 0x69, 0x74, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x48, 0x00, 0x52, 0x06, 0x63, 0x6c, + 0x6f, 0x73, 0x65, 0x64, 0x1a, 0x63, 0x0a, 0x04, 0x52, 0x65, 0x61, 0x64, 0x12, 0x2b, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x42, + 0x6f, 0x64, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, + 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x1a, 0x84, 0x01, 0x0a, 0x05, 0x57, 0x72, + 0x69, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, + 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x3a, + 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, + 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, + 0x1a, 0x3a, 0x0a, 0x06, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, + 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, + 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x3a, 0x29, 0x9a, 0xc5, + 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x6f, 0x63, 0x6b, + 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x10, 0x0a, 0x0e, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0xaa, 0x02, 0x0a, 0x13, 0x53, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, 0x54, 0x72, 0x61, 0x63, + 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x3d, 0x0a, 0x0a, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, + 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x06, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, + 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x74, 0x72, 0x75, 0x6e, + 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x72, 0x65, 0x61, + 0x64, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x72, + 0x69, 0x74, 0x65, 0x5f, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0e, 0x77, 0x72, 0x69, 0x74, 0x65, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, + 0x74, 0x65, 0x64, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, + 0x64, 0x54, 0x72, 0x61, 0x63, 0x65, 0x22, 0xfb, 0x01, 0x0a, 0x1a, 0x53, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x65, 0x64, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, + 0x12, 0x3f, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x36, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, + 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x48, 0x00, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, + 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x65, 0x64, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, 0x67, 0x6d, + 0x65, 0x6e, 0x74, 0x42, 0x0f, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x70, + 0x69, 0x65, 0x63, 0x65, 0x42, 0x7b, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, 0x61, 0x70, + 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x61, 0x70, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_data_tap_v3_transport_proto_rawDescOnce sync.Once + file_envoy_data_tap_v3_transport_proto_rawDescData = file_envoy_data_tap_v3_transport_proto_rawDesc +) + +func file_envoy_data_tap_v3_transport_proto_rawDescGZIP() []byte { + file_envoy_data_tap_v3_transport_proto_rawDescOnce.Do(func() { + file_envoy_data_tap_v3_transport_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_data_tap_v3_transport_proto_rawDescData) + }) + return file_envoy_data_tap_v3_transport_proto_rawDescData +} + +var file_envoy_data_tap_v3_transport_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_envoy_data_tap_v3_transport_proto_goTypes = []interface{}{ + (*Connection)(nil), // 0: envoy.data.tap.v3.Connection + (*SocketEvent)(nil), // 1: envoy.data.tap.v3.SocketEvent + (*SocketBufferedTrace)(nil), // 2: envoy.data.tap.v3.SocketBufferedTrace + (*SocketStreamedTraceSegment)(nil), // 3: envoy.data.tap.v3.SocketStreamedTraceSegment + (*SocketEvent_Read)(nil), // 4: envoy.data.tap.v3.SocketEvent.Read + (*SocketEvent_Write)(nil), // 5: envoy.data.tap.v3.SocketEvent.Write + (*SocketEvent_Closed)(nil), // 6: envoy.data.tap.v3.SocketEvent.Closed + (*v3.Address)(nil), // 7: envoy.config.core.v3.Address + (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp + (*Body)(nil), // 9: envoy.data.tap.v3.Body +} +var file_envoy_data_tap_v3_transport_proto_depIdxs = []int32{ + 7, // 0: envoy.data.tap.v3.Connection.local_address:type_name -> envoy.config.core.v3.Address + 7, // 1: envoy.data.tap.v3.Connection.remote_address:type_name -> envoy.config.core.v3.Address + 8, // 2: envoy.data.tap.v3.SocketEvent.timestamp:type_name -> google.protobuf.Timestamp + 4, // 3: envoy.data.tap.v3.SocketEvent.read:type_name -> envoy.data.tap.v3.SocketEvent.Read + 5, // 4: envoy.data.tap.v3.SocketEvent.write:type_name -> envoy.data.tap.v3.SocketEvent.Write + 6, // 5: envoy.data.tap.v3.SocketEvent.closed:type_name -> envoy.data.tap.v3.SocketEvent.Closed + 0, // 6: envoy.data.tap.v3.SocketBufferedTrace.connection:type_name -> envoy.data.tap.v3.Connection + 1, // 7: envoy.data.tap.v3.SocketBufferedTrace.events:type_name -> envoy.data.tap.v3.SocketEvent + 0, // 8: envoy.data.tap.v3.SocketStreamedTraceSegment.connection:type_name -> envoy.data.tap.v3.Connection + 1, // 9: envoy.data.tap.v3.SocketStreamedTraceSegment.event:type_name -> envoy.data.tap.v3.SocketEvent + 9, // 10: envoy.data.tap.v3.SocketEvent.Read.data:type_name -> envoy.data.tap.v3.Body + 9, // 11: envoy.data.tap.v3.SocketEvent.Write.data:type_name -> envoy.data.tap.v3.Body + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_envoy_data_tap_v3_transport_proto_init() } +func file_envoy_data_tap_v3_transport_proto_init() { + if File_envoy_data_tap_v3_transport_proto != nil { + return + } + file_envoy_data_tap_v3_common_proto_init() + if !protoimpl.UnsafeEnabled { + file_envoy_data_tap_v3_transport_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Connection); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_tap_v3_transport_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SocketEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_tap_v3_transport_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SocketBufferedTrace); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_tap_v3_transport_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SocketStreamedTraceSegment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_tap_v3_transport_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SocketEvent_Read); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_tap_v3_transport_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SocketEvent_Write); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_data_tap_v3_transport_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SocketEvent_Closed); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_data_tap_v3_transport_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*SocketEvent_Read_)(nil), + (*SocketEvent_Write_)(nil), + (*SocketEvent_Closed_)(nil), + } + file_envoy_data_tap_v3_transport_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*SocketStreamedTraceSegment_Connection)(nil), + (*SocketStreamedTraceSegment_Event)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_data_tap_v3_transport_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_data_tap_v3_transport_proto_goTypes, + DependencyIndexes: file_envoy_data_tap_v3_transport_proto_depIdxs, + MessageInfos: file_envoy_data_tap_v3_transport_proto_msgTypes, + }.Build() + File_envoy_data_tap_v3_transport_proto = out.File + file_envoy_data_tap_v3_transport_proto_rawDesc = nil + file_envoy_data_tap_v3_transport_proto_goTypes = nil + file_envoy_data_tap_v3_transport_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/transport.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/transport.pb.validate.go new file mode 100644 index 0000000000000..55e16994faf50 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/transport.pb.validate.go @@ -0,0 +1,1116 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/data/tap/v3/transport.proto + +package tapv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Connection 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 *Connection) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Connection 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 ConnectionMultiError, or +// nil if none found. +func (m *Connection) ValidateAll() error { + return m.validate(true) +} + +func (m *Connection) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetLocalAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConnectionValidationError{ + field: "LocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConnectionValidationError{ + field: "LocalAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocalAddress()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ConnectionValidationError{ + field: "LocalAddress", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetRemoteAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConnectionValidationError{ + field: "RemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConnectionValidationError{ + field: "RemoteAddress", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRemoteAddress()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ConnectionValidationError{ + field: "RemoteAddress", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ConnectionMultiError(errors) + } + return nil +} + +// ConnectionMultiError is an error wrapping multiple validation errors +// returned by Connection.ValidateAll() if the designated constraints aren't met. +type ConnectionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConnectionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConnectionMultiError) AllErrors() []error { return m } + +// ConnectionValidationError is the validation error returned by +// Connection.Validate if the designated constraints aren't met. +type ConnectionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConnectionValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConnectionValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConnectionValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConnectionValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConnectionValidationError) ErrorName() string { return "ConnectionValidationError" } + +// Error satisfies the builtin error interface +func (e ConnectionValidationError) 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 %sConnection.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConnectionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConnectionValidationError{} + +// Validate checks the field values on SocketEvent 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 *SocketEvent) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketEvent 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 SocketEventMultiError, or +// nil if none found. +func (m *SocketEvent) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketEvent) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetTimestamp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimestamp()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SocketEventValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.EventSelector.(type) { + + case *SocketEvent_Read_: + + if all { + switch v := interface{}(m.GetRead()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Read", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Read", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRead()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SocketEventValidationError{ + field: "Read", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *SocketEvent_Write_: + + if all { + switch v := interface{}(m.GetWrite()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Write", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Write", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWrite()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SocketEventValidationError{ + field: "Write", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *SocketEvent_Closed_: + + if all { + switch v := interface{}(m.GetClosed()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Closed", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketEventValidationError{ + field: "Closed", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetClosed()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SocketEventValidationError{ + field: "Closed", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return SocketEventMultiError(errors) + } + return nil +} + +// SocketEventMultiError is an error wrapping multiple validation errors +// returned by SocketEvent.ValidateAll() if the designated constraints aren't met. +type SocketEventMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketEventMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketEventMultiError) AllErrors() []error { return m } + +// SocketEventValidationError is the validation error returned by +// SocketEvent.Validate if the designated constraints aren't met. +type SocketEventValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SocketEventValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SocketEventValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SocketEventValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SocketEventValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SocketEventValidationError) ErrorName() string { return "SocketEventValidationError" } + +// Error satisfies the builtin error interface +func (e SocketEventValidationError) 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 %sSocketEvent.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SocketEventValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SocketEventValidationError{} + +// Validate checks the field values on SocketBufferedTrace 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 *SocketBufferedTrace) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketBufferedTrace 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 +// SocketBufferedTraceMultiError, or nil if none found. +func (m *SocketBufferedTrace) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketBufferedTrace) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for TraceId + + if all { + switch v := interface{}(m.GetConnection()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketBufferedTraceValidationError{ + field: "Connection", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketBufferedTraceValidationError{ + field: "Connection", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConnection()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SocketBufferedTraceValidationError{ + field: "Connection", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetEvents() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketBufferedTraceValidationError{ + field: fmt.Sprintf("Events[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketBufferedTraceValidationError{ + field: fmt.Sprintf("Events[%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 SocketBufferedTraceValidationError{ + field: fmt.Sprintf("Events[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for ReadTruncated + + // no validation rules for WriteTruncated + + if len(errors) > 0 { + return SocketBufferedTraceMultiError(errors) + } + return nil +} + +// SocketBufferedTraceMultiError is an error wrapping multiple validation +// errors returned by SocketBufferedTrace.ValidateAll() if the designated +// constraints aren't met. +type SocketBufferedTraceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketBufferedTraceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketBufferedTraceMultiError) AllErrors() []error { return m } + +// SocketBufferedTraceValidationError is the validation error returned by +// SocketBufferedTrace.Validate if the designated constraints aren't met. +type SocketBufferedTraceValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SocketBufferedTraceValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SocketBufferedTraceValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SocketBufferedTraceValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SocketBufferedTraceValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SocketBufferedTraceValidationError) ErrorName() string { + return "SocketBufferedTraceValidationError" +} + +// Error satisfies the builtin error interface +func (e SocketBufferedTraceValidationError) 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 %sSocketBufferedTrace.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SocketBufferedTraceValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SocketBufferedTraceValidationError{} + +// Validate checks the field values on SocketStreamedTraceSegment 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 *SocketStreamedTraceSegment) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketStreamedTraceSegment 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 +// SocketStreamedTraceSegmentMultiError, or nil if none found. +func (m *SocketStreamedTraceSegment) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketStreamedTraceSegment) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for TraceId + + switch m.MessagePiece.(type) { + + case *SocketStreamedTraceSegment_Connection: + + if all { + switch v := interface{}(m.GetConnection()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketStreamedTraceSegmentValidationError{ + field: "Connection", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketStreamedTraceSegmentValidationError{ + field: "Connection", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConnection()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SocketStreamedTraceSegmentValidationError{ + field: "Connection", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *SocketStreamedTraceSegment_Event: + + if all { + switch v := interface{}(m.GetEvent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketStreamedTraceSegmentValidationError{ + field: "Event", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketStreamedTraceSegmentValidationError{ + field: "Event", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEvent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SocketStreamedTraceSegmentValidationError{ + field: "Event", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return SocketStreamedTraceSegmentMultiError(errors) + } + return nil +} + +// SocketStreamedTraceSegmentMultiError is an error wrapping multiple +// validation errors returned by SocketStreamedTraceSegment.ValidateAll() if +// the designated constraints aren't met. +type SocketStreamedTraceSegmentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketStreamedTraceSegmentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketStreamedTraceSegmentMultiError) AllErrors() []error { return m } + +// SocketStreamedTraceSegmentValidationError is the validation error returned +// by SocketStreamedTraceSegment.Validate if the designated constraints aren't met. +type SocketStreamedTraceSegmentValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SocketStreamedTraceSegmentValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SocketStreamedTraceSegmentValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SocketStreamedTraceSegmentValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SocketStreamedTraceSegmentValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SocketStreamedTraceSegmentValidationError) ErrorName() string { + return "SocketStreamedTraceSegmentValidationError" +} + +// Error satisfies the builtin error interface +func (e SocketStreamedTraceSegmentValidationError) 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 %sSocketStreamedTraceSegment.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SocketStreamedTraceSegmentValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SocketStreamedTraceSegmentValidationError{} + +// Validate checks the field values on SocketEvent_Read 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 *SocketEvent_Read) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketEvent_Read 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 +// SocketEvent_ReadMultiError, or nil if none found. +func (m *SocketEvent_Read) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketEvent_Read) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetData()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketEvent_ReadValidationError{ + field: "Data", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketEvent_ReadValidationError{ + field: "Data", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetData()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SocketEvent_ReadValidationError{ + field: "Data", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return SocketEvent_ReadMultiError(errors) + } + return nil +} + +// SocketEvent_ReadMultiError is an error wrapping multiple validation errors +// returned by SocketEvent_Read.ValidateAll() if the designated constraints +// aren't met. +type SocketEvent_ReadMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketEvent_ReadMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketEvent_ReadMultiError) AllErrors() []error { return m } + +// SocketEvent_ReadValidationError is the validation error returned by +// SocketEvent_Read.Validate if the designated constraints aren't met. +type SocketEvent_ReadValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SocketEvent_ReadValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SocketEvent_ReadValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SocketEvent_ReadValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SocketEvent_ReadValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SocketEvent_ReadValidationError) ErrorName() string { return "SocketEvent_ReadValidationError" } + +// Error satisfies the builtin error interface +func (e SocketEvent_ReadValidationError) 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 %sSocketEvent_Read.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SocketEvent_ReadValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SocketEvent_ReadValidationError{} + +// Validate checks the field values on SocketEvent_Write 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 *SocketEvent_Write) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketEvent_Write 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 +// SocketEvent_WriteMultiError, or nil if none found. +func (m *SocketEvent_Write) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketEvent_Write) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetData()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SocketEvent_WriteValidationError{ + field: "Data", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SocketEvent_WriteValidationError{ + field: "Data", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetData()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SocketEvent_WriteValidationError{ + field: "Data", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for EndStream + + if len(errors) > 0 { + return SocketEvent_WriteMultiError(errors) + } + return nil +} + +// SocketEvent_WriteMultiError is an error wrapping multiple validation errors +// returned by SocketEvent_Write.ValidateAll() if the designated constraints +// aren't met. +type SocketEvent_WriteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketEvent_WriteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketEvent_WriteMultiError) AllErrors() []error { return m } + +// SocketEvent_WriteValidationError is the validation error returned by +// SocketEvent_Write.Validate if the designated constraints aren't met. +type SocketEvent_WriteValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SocketEvent_WriteValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SocketEvent_WriteValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SocketEvent_WriteValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SocketEvent_WriteValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SocketEvent_WriteValidationError) ErrorName() string { + return "SocketEvent_WriteValidationError" +} + +// Error satisfies the builtin error interface +func (e SocketEvent_WriteValidationError) 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 %sSocketEvent_Write.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SocketEvent_WriteValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SocketEvent_WriteValidationError{} + +// Validate checks the field values on SocketEvent_Closed 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 *SocketEvent_Closed) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SocketEvent_Closed 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 +// SocketEvent_ClosedMultiError, or nil if none found. +func (m *SocketEvent_Closed) ValidateAll() error { + return m.validate(true) +} + +func (m *SocketEvent_Closed) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return SocketEvent_ClosedMultiError(errors) + } + return nil +} + +// SocketEvent_ClosedMultiError is an error wrapping multiple validation errors +// returned by SocketEvent_Closed.ValidateAll() if the designated constraints +// aren't met. +type SocketEvent_ClosedMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SocketEvent_ClosedMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SocketEvent_ClosedMultiError) AllErrors() []error { return m } + +// SocketEvent_ClosedValidationError is the validation error returned by +// SocketEvent_Closed.Validate if the designated constraints aren't met. +type SocketEvent_ClosedValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SocketEvent_ClosedValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SocketEvent_ClosedValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SocketEvent_ClosedValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SocketEvent_ClosedValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SocketEvent_ClosedValidationError) ErrorName() string { + return "SocketEvent_ClosedValidationError" +} + +// Error satisfies the builtin error interface +func (e SocketEvent_ClosedValidationError) 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 %sSocketEvent_Closed.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SocketEvent_ClosedValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SocketEvent_ClosedValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/wrapper.pb.go b/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/wrapper.pb.go new file mode 100644 index 0000000000000..bf23ab0f5a14f --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/wrapper.pb.go @@ -0,0 +1,279 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/data/tap/v3/wrapper.proto + +package tapv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Wrapper for all fully buffered and streamed tap traces that Envoy emits. This is required for +// sending traces over gRPC APIs or more easily persisting binary messages to files. +type TraceWrapper struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Trace: + // + // *TraceWrapper_HttpBufferedTrace + // *TraceWrapper_HttpStreamedTraceSegment + // *TraceWrapper_SocketBufferedTrace + // *TraceWrapper_SocketStreamedTraceSegment + Trace isTraceWrapper_Trace `protobuf_oneof:"trace"` +} + +func (x *TraceWrapper) Reset() { + *x = TraceWrapper{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_data_tap_v3_wrapper_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TraceWrapper) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TraceWrapper) ProtoMessage() {} + +func (x *TraceWrapper) ProtoReflect() protoreflect.Message { + mi := &file_envoy_data_tap_v3_wrapper_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TraceWrapper.ProtoReflect.Descriptor instead. +func (*TraceWrapper) Descriptor() ([]byte, []int) { + return file_envoy_data_tap_v3_wrapper_proto_rawDescGZIP(), []int{0} +} + +func (m *TraceWrapper) GetTrace() isTraceWrapper_Trace { + if m != nil { + return m.Trace + } + return nil +} + +func (x *TraceWrapper) GetHttpBufferedTrace() *HttpBufferedTrace { + if x, ok := x.GetTrace().(*TraceWrapper_HttpBufferedTrace); ok { + return x.HttpBufferedTrace + } + return nil +} + +func (x *TraceWrapper) GetHttpStreamedTraceSegment() *HttpStreamedTraceSegment { + if x, ok := x.GetTrace().(*TraceWrapper_HttpStreamedTraceSegment); ok { + return x.HttpStreamedTraceSegment + } + return nil +} + +func (x *TraceWrapper) GetSocketBufferedTrace() *SocketBufferedTrace { + if x, ok := x.GetTrace().(*TraceWrapper_SocketBufferedTrace); ok { + return x.SocketBufferedTrace + } + return nil +} + +func (x *TraceWrapper) GetSocketStreamedTraceSegment() *SocketStreamedTraceSegment { + if x, ok := x.GetTrace().(*TraceWrapper_SocketStreamedTraceSegment); ok { + return x.SocketStreamedTraceSegment + } + return nil +} + +type isTraceWrapper_Trace interface { + isTraceWrapper_Trace() +} + +type TraceWrapper_HttpBufferedTrace struct { + // An HTTP buffered tap trace. + HttpBufferedTrace *HttpBufferedTrace `protobuf:"bytes,1,opt,name=http_buffered_trace,json=httpBufferedTrace,proto3,oneof"` +} + +type TraceWrapper_HttpStreamedTraceSegment struct { + // An HTTP streamed tap trace segment. + HttpStreamedTraceSegment *HttpStreamedTraceSegment `protobuf:"bytes,2,opt,name=http_streamed_trace_segment,json=httpStreamedTraceSegment,proto3,oneof"` +} + +type TraceWrapper_SocketBufferedTrace struct { + // A socket buffered tap trace. + SocketBufferedTrace *SocketBufferedTrace `protobuf:"bytes,3,opt,name=socket_buffered_trace,json=socketBufferedTrace,proto3,oneof"` +} + +type TraceWrapper_SocketStreamedTraceSegment struct { + // A socket streamed tap trace segment. + SocketStreamedTraceSegment *SocketStreamedTraceSegment `protobuf:"bytes,4,opt,name=socket_streamed_trace_segment,json=socketStreamedTraceSegment,proto3,oneof"` +} + +func (*TraceWrapper_HttpBufferedTrace) isTraceWrapper_Trace() {} + +func (*TraceWrapper_HttpStreamedTraceSegment) isTraceWrapper_Trace() {} + +func (*TraceWrapper_SocketBufferedTrace) isTraceWrapper_Trace() {} + +func (*TraceWrapper_SocketStreamedTraceSegment) isTraceWrapper_Trace() {} + +var File_envoy_data_tap_v3_wrapper_proto protoreflect.FileDescriptor + +var file_envoy_data_tap_v3_wrapper_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, 0x61, 0x70, + 0x2f, 0x76, 0x33, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x11, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, + 0x70, 0x2e, 0x76, 0x33, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, + 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, + 0x61, 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, + 0x67, 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, 0xe0, 0x03, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, + 0x72, 0x12, 0x56, 0x0a, 0x13, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, + 0x65, 0x64, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, + 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, 0x54, + 0x72, 0x61, 0x63, 0x65, 0x48, 0x00, 0x52, 0x11, 0x68, 0x74, 0x74, 0x70, 0x42, 0x75, 0x66, 0x66, + 0x65, 0x72, 0x65, 0x64, 0x54, 0x72, 0x61, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x1b, 0x68, 0x74, 0x74, + 0x70, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, + 0x5f, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, + 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x65, 0x64, 0x54, + 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x18, 0x68, + 0x74, 0x74, 0x70, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x65, 0x64, 0x54, 0x72, 0x61, 0x63, 0x65, + 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5c, 0x0a, 0x15, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, 0x54, 0x72, 0x61, 0x63, 0x65, 0x48, 0x00, + 0x52, 0x13, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x65, 0x64, + 0x54, 0x72, 0x61, 0x63, 0x65, 0x12, 0x72, 0x0a, 0x1d, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x73, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, + 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x65, 0x64, 0x54, + 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x1a, 0x73, + 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x65, 0x64, 0x54, 0x72, 0x61, + 0x63, 0x65, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, + 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x57, 0x72, + 0x61, 0x70, 0x70, 0x65, 0x72, 0x42, 0x0c, 0x0a, 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, 0x12, 0x03, + 0xf8, 0x42, 0x01, 0x42, 0x79, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x33, + 0x3b, 0x74, 0x61, 0x70, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_data_tap_v3_wrapper_proto_rawDescOnce sync.Once + file_envoy_data_tap_v3_wrapper_proto_rawDescData = file_envoy_data_tap_v3_wrapper_proto_rawDesc +) + +func file_envoy_data_tap_v3_wrapper_proto_rawDescGZIP() []byte { + file_envoy_data_tap_v3_wrapper_proto_rawDescOnce.Do(func() { + file_envoy_data_tap_v3_wrapper_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_data_tap_v3_wrapper_proto_rawDescData) + }) + return file_envoy_data_tap_v3_wrapper_proto_rawDescData +} + +var file_envoy_data_tap_v3_wrapper_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_data_tap_v3_wrapper_proto_goTypes = []interface{}{ + (*TraceWrapper)(nil), // 0: envoy.data.tap.v3.TraceWrapper + (*HttpBufferedTrace)(nil), // 1: envoy.data.tap.v3.HttpBufferedTrace + (*HttpStreamedTraceSegment)(nil), // 2: envoy.data.tap.v3.HttpStreamedTraceSegment + (*SocketBufferedTrace)(nil), // 3: envoy.data.tap.v3.SocketBufferedTrace + (*SocketStreamedTraceSegment)(nil), // 4: envoy.data.tap.v3.SocketStreamedTraceSegment +} +var file_envoy_data_tap_v3_wrapper_proto_depIdxs = []int32{ + 1, // 0: envoy.data.tap.v3.TraceWrapper.http_buffered_trace:type_name -> envoy.data.tap.v3.HttpBufferedTrace + 2, // 1: envoy.data.tap.v3.TraceWrapper.http_streamed_trace_segment:type_name -> envoy.data.tap.v3.HttpStreamedTraceSegment + 3, // 2: envoy.data.tap.v3.TraceWrapper.socket_buffered_trace:type_name -> envoy.data.tap.v3.SocketBufferedTrace + 4, // 3: envoy.data.tap.v3.TraceWrapper.socket_streamed_trace_segment:type_name -> envoy.data.tap.v3.SocketStreamedTraceSegment + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_envoy_data_tap_v3_wrapper_proto_init() } +func file_envoy_data_tap_v3_wrapper_proto_init() { + if File_envoy_data_tap_v3_wrapper_proto != nil { + return + } + file_envoy_data_tap_v3_http_proto_init() + file_envoy_data_tap_v3_transport_proto_init() + if !protoimpl.UnsafeEnabled { + file_envoy_data_tap_v3_wrapper_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TraceWrapper); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_data_tap_v3_wrapper_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*TraceWrapper_HttpBufferedTrace)(nil), + (*TraceWrapper_HttpStreamedTraceSegment)(nil), + (*TraceWrapper_SocketBufferedTrace)(nil), + (*TraceWrapper_SocketStreamedTraceSegment)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_data_tap_v3_wrapper_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_data_tap_v3_wrapper_proto_goTypes, + DependencyIndexes: file_envoy_data_tap_v3_wrapper_proto_depIdxs, + MessageInfos: file_envoy_data_tap_v3_wrapper_proto_msgTypes, + }.Build() + File_envoy_data_tap_v3_wrapper_proto = out.File + file_envoy_data_tap_v3_wrapper_proto_rawDesc = nil + file_envoy_data_tap_v3_wrapper_proto_goTypes = nil + file_envoy_data_tap_v3_wrapper_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/wrapper.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/wrapper.pb.validate.go new file mode 100644 index 0000000000000..27a756e0ce56f --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/data/tap/v3/wrapper.pb.validate.go @@ -0,0 +1,272 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/data/tap/v3/wrapper.proto + +package tapv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on TraceWrapper 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 *TraceWrapper) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TraceWrapper 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 TraceWrapperMultiError, or +// nil if none found. +func (m *TraceWrapper) ValidateAll() error { + return m.validate(true) +} + +func (m *TraceWrapper) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.Trace.(type) { + + case *TraceWrapper_HttpBufferedTrace: + + if all { + switch v := interface{}(m.GetHttpBufferedTrace()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "HttpBufferedTrace", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "HttpBufferedTrace", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpBufferedTrace()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TraceWrapperValidationError{ + field: "HttpBufferedTrace", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *TraceWrapper_HttpStreamedTraceSegment: + + if all { + switch v := interface{}(m.GetHttpStreamedTraceSegment()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "HttpStreamedTraceSegment", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "HttpStreamedTraceSegment", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpStreamedTraceSegment()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TraceWrapperValidationError{ + field: "HttpStreamedTraceSegment", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *TraceWrapper_SocketBufferedTrace: + + if all { + switch v := interface{}(m.GetSocketBufferedTrace()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "SocketBufferedTrace", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "SocketBufferedTrace", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSocketBufferedTrace()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TraceWrapperValidationError{ + field: "SocketBufferedTrace", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *TraceWrapper_SocketStreamedTraceSegment: + + if all { + switch v := interface{}(m.GetSocketStreamedTraceSegment()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "SocketStreamedTraceSegment", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TraceWrapperValidationError{ + field: "SocketStreamedTraceSegment", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSocketStreamedTraceSegment()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TraceWrapperValidationError{ + field: "SocketStreamedTraceSegment", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := TraceWrapperValidationError{ + field: "Trace", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return TraceWrapperMultiError(errors) + } + return nil +} + +// TraceWrapperMultiError is an error wrapping multiple validation errors +// returned by TraceWrapper.ValidateAll() if the designated constraints aren't met. +type TraceWrapperMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TraceWrapperMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TraceWrapperMultiError) AllErrors() []error { return m } + +// TraceWrapperValidationError is the validation error returned by +// TraceWrapper.Validate if the designated constraints aren't met. +type TraceWrapperValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TraceWrapperValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TraceWrapperValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TraceWrapperValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TraceWrapperValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TraceWrapperValidationError) ErrorName() string { return "TraceWrapperValidationError" } + +// Error satisfies the builtin error interface +func (e TraceWrapperValidationError) 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 %sTraceWrapper.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TraceWrapperValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TraceWrapperValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/file/v3/file.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/file/v3/file.pb.go new file mode 100644 index 0000000000000..3a93ff8590d44 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/file/v3/file.pb.go @@ -0,0 +1,314 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/access_loggers/file/v3/file.proto + +package filev3 + +import ( + _ "github.com/cilium/proxy/go/envoy/annotations" + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Custom configuration for an :ref:`AccessLog ` +// that writes log entries directly to a file. Configures the built-in “envoy.access_loggers.file“ +// AccessLog. +// [#next-free-field: 6] +type FileAccessLog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A path to a local file to which to write the access log entries. + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + // Types that are assignable to AccessLogFormat: + // + // *FileAccessLog_Format + // *FileAccessLog_JsonFormat + // *FileAccessLog_TypedJsonFormat + // *FileAccessLog_LogFormat + AccessLogFormat isFileAccessLog_AccessLogFormat `protobuf_oneof:"access_log_format"` +} + +func (x *FileAccessLog) Reset() { + *x = FileAccessLog{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_access_loggers_file_v3_file_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FileAccessLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FileAccessLog) ProtoMessage() {} + +func (x *FileAccessLog) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_access_loggers_file_v3_file_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FileAccessLog.ProtoReflect.Descriptor instead. +func (*FileAccessLog) Descriptor() ([]byte, []int) { + return file_envoy_extensions_access_loggers_file_v3_file_proto_rawDescGZIP(), []int{0} +} + +func (x *FileAccessLog) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (m *FileAccessLog) GetAccessLogFormat() isFileAccessLog_AccessLogFormat { + if m != nil { + return m.AccessLogFormat + } + return nil +} + +// Deprecated: Do not use. +func (x *FileAccessLog) GetFormat() string { + if x, ok := x.GetAccessLogFormat().(*FileAccessLog_Format); ok { + return x.Format + } + return "" +} + +// Deprecated: Do not use. +func (x *FileAccessLog) GetJsonFormat() *structpb.Struct { + if x, ok := x.GetAccessLogFormat().(*FileAccessLog_JsonFormat); ok { + return x.JsonFormat + } + return nil +} + +// Deprecated: Do not use. +func (x *FileAccessLog) GetTypedJsonFormat() *structpb.Struct { + if x, ok := x.GetAccessLogFormat().(*FileAccessLog_TypedJsonFormat); ok { + return x.TypedJsonFormat + } + return nil +} + +func (x *FileAccessLog) GetLogFormat() *v3.SubstitutionFormatString { + if x, ok := x.GetAccessLogFormat().(*FileAccessLog_LogFormat); ok { + return x.LogFormat + } + return nil +} + +type isFileAccessLog_AccessLogFormat interface { + isFileAccessLog_AccessLogFormat() +} + +type FileAccessLog_Format struct { + // Access log :ref:`format string`. + // Envoy supports :ref:`custom access log formats ` as well as a + // :ref:`default format `. + // This field is deprecated. + // Please use :ref:`log_format `. + // + // Deprecated: Do not use. + Format string `protobuf:"bytes,2,opt,name=format,proto3,oneof"` +} + +type FileAccessLog_JsonFormat struct { + // Access log :ref:`format dictionary`. All values + // are rendered as strings. + // This field is deprecated. + // Please use :ref:`log_format `. + // + // Deprecated: Do not use. + JsonFormat *structpb.Struct `protobuf:"bytes,3,opt,name=json_format,json=jsonFormat,proto3,oneof"` +} + +type FileAccessLog_TypedJsonFormat struct { + // Access log :ref:`format dictionary`. Values are + // rendered as strings, numbers, or boolean values as appropriate. Nested JSON objects may + // be produced by some command operators (e.g.FILTER_STATE or DYNAMIC_METADATA). See the + // documentation for a specific command operator for details. + // This field is deprecated. + // Please use :ref:`log_format `. + // + // Deprecated: Do not use. + TypedJsonFormat *structpb.Struct `protobuf:"bytes,4,opt,name=typed_json_format,json=typedJsonFormat,proto3,oneof"` +} + +type FileAccessLog_LogFormat struct { + // Configuration to form access log data and format. + // If not specified, use :ref:`default format `. + LogFormat *v3.SubstitutionFormatString `protobuf:"bytes,5,opt,name=log_format,json=logFormat,proto3,oneof"` +} + +func (*FileAccessLog_Format) isFileAccessLog_AccessLogFormat() {} + +func (*FileAccessLog_JsonFormat) isFileAccessLog_AccessLogFormat() {} + +func (*FileAccessLog_TypedJsonFormat) isFileAccessLog_AccessLogFormat() {} + +func (*FileAccessLog_LogFormat) isFileAccessLog_AccessLogFormat() {} + +var File_envoy_extensions_access_loggers_file_v3_file_proto protoreflect.FileDescriptor + +var file_envoy_extensions_access_loggers_file_v3_file_proto_rawDesc = []byte{ + 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, + 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, + 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x35, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x69, 0x6e, 0x67, 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, 0x90, 0x03, 0x0a, 0x0d, 0x46, 0x69, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x1b, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x12, 0x25, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x48, 0x00, + 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x47, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, + 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, + 0x33, 0x2e, 0x30, 0x48, 0x00, 0x52, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x12, 0x52, 0x0a, 0x11, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, + 0x2e, 0x30, 0x48, 0x00, 0x52, 0x0f, 0x74, 0x79, 0x70, 0x65, 0x64, 0x4a, 0x73, 0x6f, 0x6e, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x59, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x5f, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, + 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, + 0x76, 0x32, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, + 0x42, 0x13, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0xa3, 0x01, 0x0a, 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, + 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x76, 0x33, 0x42, + 0x09, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x55, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, + 0x67, 0x65, 0x72, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x66, 0x69, 0x6c, + 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_access_loggers_file_v3_file_proto_rawDescOnce sync.Once + file_envoy_extensions_access_loggers_file_v3_file_proto_rawDescData = file_envoy_extensions_access_loggers_file_v3_file_proto_rawDesc +) + +func file_envoy_extensions_access_loggers_file_v3_file_proto_rawDescGZIP() []byte { + file_envoy_extensions_access_loggers_file_v3_file_proto_rawDescOnce.Do(func() { + file_envoy_extensions_access_loggers_file_v3_file_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_access_loggers_file_v3_file_proto_rawDescData) + }) + return file_envoy_extensions_access_loggers_file_v3_file_proto_rawDescData +} + +var file_envoy_extensions_access_loggers_file_v3_file_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_access_loggers_file_v3_file_proto_goTypes = []interface{}{ + (*FileAccessLog)(nil), // 0: envoy.extensions.access_loggers.file.v3.FileAccessLog + (*structpb.Struct)(nil), // 1: google.protobuf.Struct + (*v3.SubstitutionFormatString)(nil), // 2: envoy.config.core.v3.SubstitutionFormatString +} +var file_envoy_extensions_access_loggers_file_v3_file_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.access_loggers.file.v3.FileAccessLog.json_format:type_name -> google.protobuf.Struct + 1, // 1: envoy.extensions.access_loggers.file.v3.FileAccessLog.typed_json_format:type_name -> google.protobuf.Struct + 2, // 2: envoy.extensions.access_loggers.file.v3.FileAccessLog.log_format:type_name -> envoy.config.core.v3.SubstitutionFormatString + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_access_loggers_file_v3_file_proto_init() } +func file_envoy_extensions_access_loggers_file_v3_file_proto_init() { + if File_envoy_extensions_access_loggers_file_v3_file_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_access_loggers_file_v3_file_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FileAccessLog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_access_loggers_file_v3_file_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*FileAccessLog_Format)(nil), + (*FileAccessLog_JsonFormat)(nil), + (*FileAccessLog_TypedJsonFormat)(nil), + (*FileAccessLog_LogFormat)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_access_loggers_file_v3_file_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_access_loggers_file_v3_file_proto_goTypes, + DependencyIndexes: file_envoy_extensions_access_loggers_file_v3_file_proto_depIdxs, + MessageInfos: file_envoy_extensions_access_loggers_file_v3_file_proto_msgTypes, + }.Build() + File_envoy_extensions_access_loggers_file_v3_file_proto = out.File + file_envoy_extensions_access_loggers_file_v3_file_proto_rawDesc = nil + file_envoy_extensions_access_loggers_file_v3_file_proto_goTypes = nil + file_envoy_extensions_access_loggers_file_v3_file_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/file/v3/file.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/file/v3/file.pb.validate.go new file mode 100644 index 0000000000000..66f389d2d1667 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/file/v3/file.pb.validate.go @@ -0,0 +1,257 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/access_loggers/file/v3/file.proto + +package filev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on FileAccessLog 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 *FileAccessLog) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FileAccessLog 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 FileAccessLogMultiError, or +// nil if none found. +func (m *FileAccessLog) ValidateAll() error { + return m.validate(true) +} + +func (m *FileAccessLog) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetPath()) < 1 { + err := FileAccessLogValidationError{ + field: "Path", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + switch m.AccessLogFormat.(type) { + + case *FileAccessLog_Format: + // no validation rules for Format + + case *FileAccessLog_JsonFormat: + + if all { + switch v := interface{}(m.GetJsonFormat()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FileAccessLogValidationError{ + field: "JsonFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FileAccessLogValidationError{ + field: "JsonFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetJsonFormat()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FileAccessLogValidationError{ + field: "JsonFormat", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *FileAccessLog_TypedJsonFormat: + + if all { + switch v := interface{}(m.GetTypedJsonFormat()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FileAccessLogValidationError{ + field: "TypedJsonFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FileAccessLogValidationError{ + field: "TypedJsonFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedJsonFormat()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FileAccessLogValidationError{ + field: "TypedJsonFormat", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *FileAccessLog_LogFormat: + + if m.GetLogFormat() == nil { + err := FileAccessLogValidationError{ + field: "LogFormat", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetLogFormat()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FileAccessLogValidationError{ + field: "LogFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FileAccessLogValidationError{ + field: "LogFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLogFormat()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FileAccessLogValidationError{ + field: "LogFormat", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return FileAccessLogMultiError(errors) + } + return nil +} + +// FileAccessLogMultiError is an error wrapping multiple validation errors +// returned by FileAccessLog.ValidateAll() if the designated constraints +// aren't met. +type FileAccessLogMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FileAccessLogMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FileAccessLogMultiError) AllErrors() []error { return m } + +// FileAccessLogValidationError is the validation error returned by +// FileAccessLog.Validate if the designated constraints aren't met. +type FileAccessLogValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FileAccessLogValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FileAccessLogValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FileAccessLogValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FileAccessLogValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FileAccessLogValidationError) ErrorName() string { return "FileAccessLogValidationError" } + +// Error satisfies the builtin error interface +func (e FileAccessLogValidationError) 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 %sFileAccessLog.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FileAccessLogValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FileAccessLogValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/filters/cel/v3/cel.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/filters/cel/v3/cel.pb.go new file mode 100644 index 0000000000000..15f59c092aa16 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/filters/cel/v3/cel.pb.go @@ -0,0 +1,175 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/access_loggers/filters/cel/v3/cel.proto + +package celv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// ExpressionFilter is an access logging filter that evaluates configured +// symbolic Common Expression Language expressions to inform the decision +// to generate an access log. +type ExpressionFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Expression that, when evaluated, will be used to filter access logs. + // Expressions are based on the set of Envoy :ref:`attributes `. + // The provided expression must evaluate to true for logging (expression errors are considered false). + // Examples: + // - “response.code >= 400“ + // - “(connection.mtls && request.headers['x-log-mtls'] == 'true') || request.url_path.contains('v1beta3')“ + Expression string `protobuf:"bytes,1,opt,name=expression,proto3" json:"expression,omitempty"` +} + +func (x *ExpressionFilter) Reset() { + *x = ExpressionFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExpressionFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExpressionFilter) ProtoMessage() {} + +func (x *ExpressionFilter) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExpressionFilter.ProtoReflect.Descriptor instead. +func (*ExpressionFilter) Descriptor() ([]byte, []int) { + return file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDescGZIP(), []int{0} +} + +func (x *ExpressionFilter) GetExpression() string { + if x != nil { + return x.Expression + } + return "" +} + +var File_envoy_extensions_access_loggers_filters_cel_v3_cel_proto protoreflect.FileDescriptor + +var file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDesc = []byte{ + 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, + 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x65, 0x6c, 0x2f, 0x76, 0x33, + 0x2f, 0x63, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x32, 0x0a, 0x10, 0x45, 0x78, 0x70, + 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x0a, + 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0xaf, 0x01, + 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x76, 0x33, 0x42, 0x08, + 0x43, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, + 0x72, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x65, 0x6c, 0x2f, 0x76, + 0x33, 0x3b, 0x63, 0x65, 0x6c, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDescOnce sync.Once + file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDescData = file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDesc +) + +func file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDescGZIP() []byte { + file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDescOnce.Do(func() { + file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDescData) + }) + return file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDescData +} + +var file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_goTypes = []interface{}{ + (*ExpressionFilter)(nil), // 0: envoy.extensions.access_loggers.filters.cel.v3.ExpressionFilter +} +var file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_init() } +func file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_init() { + if File_envoy_extensions_access_loggers_filters_cel_v3_cel_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExpressionFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_goTypes, + DependencyIndexes: file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_depIdxs, + MessageInfos: file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_msgTypes, + }.Build() + File_envoy_extensions_access_loggers_filters_cel_v3_cel_proto = out.File + file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_rawDesc = nil + file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_goTypes = nil + file_envoy_extensions_access_loggers_filters_cel_v3_cel_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/filters/cel/v3/cel.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/filters/cel/v3/cel.pb.validate.go new file mode 100644 index 0000000000000..493b04fdce113 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/filters/cel/v3/cel.pb.validate.go @@ -0,0 +1,137 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/access_loggers/filters/cel/v3/cel.proto + +package celv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ExpressionFilter 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 *ExpressionFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExpressionFilter 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 +// ExpressionFilterMultiError, or nil if none found. +func (m *ExpressionFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *ExpressionFilter) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Expression + + if len(errors) > 0 { + return ExpressionFilterMultiError(errors) + } + return nil +} + +// ExpressionFilterMultiError is an error wrapping multiple validation errors +// returned by ExpressionFilter.ValidateAll() if the designated constraints +// aren't met. +type ExpressionFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExpressionFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExpressionFilterMultiError) AllErrors() []error { return m } + +// ExpressionFilterValidationError is the validation error returned by +// ExpressionFilter.Validate if the designated constraints aren't met. +type ExpressionFilterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExpressionFilterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExpressionFilterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExpressionFilterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExpressionFilterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExpressionFilterValidationError) ErrorName() string { return "ExpressionFilterValidationError" } + +// Error satisfies the builtin error interface +func (e ExpressionFilterValidationError) 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 %sExpressionFilter.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExpressionFilterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExpressionFilterValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/grpc/v3/als.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/grpc/v3/als.pb.go new file mode 100644 index 0000000000000..bf87909b1b306 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/grpc/v3/als.pb.go @@ -0,0 +1,518 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/access_loggers/grpc/v3/als.proto + +package grpcv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + v31 "github.com/cilium/proxy/go/envoy/type/tracing/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for the built-in “envoy.access_loggers.http_grpc“ +// :ref:`AccessLog `. This configuration will +// populate :ref:`StreamAccessLogsMessage.http_logs +// `. +// [#extension: envoy.access_loggers.http_grpc] +type HttpGrpcAccessLogConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CommonConfig *CommonGrpcAccessLogConfig `protobuf:"bytes,1,opt,name=common_config,json=commonConfig,proto3" json:"common_config,omitempty"` + // Additional request headers to log in :ref:`HTTPRequestProperties.request_headers + // `. + AdditionalRequestHeadersToLog []string `protobuf:"bytes,2,rep,name=additional_request_headers_to_log,json=additionalRequestHeadersToLog,proto3" json:"additional_request_headers_to_log,omitempty"` + // Additional response headers to log in :ref:`HTTPResponseProperties.response_headers + // `. + AdditionalResponseHeadersToLog []string `protobuf:"bytes,3,rep,name=additional_response_headers_to_log,json=additionalResponseHeadersToLog,proto3" json:"additional_response_headers_to_log,omitempty"` + // Additional response trailers to log in :ref:`HTTPResponseProperties.response_trailers + // `. + AdditionalResponseTrailersToLog []string `protobuf:"bytes,4,rep,name=additional_response_trailers_to_log,json=additionalResponseTrailersToLog,proto3" json:"additional_response_trailers_to_log,omitempty"` +} + +func (x *HttpGrpcAccessLogConfig) Reset() { + *x = HttpGrpcAccessLogConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_access_loggers_grpc_v3_als_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpGrpcAccessLogConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpGrpcAccessLogConfig) ProtoMessage() {} + +func (x *HttpGrpcAccessLogConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_access_loggers_grpc_v3_als_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpGrpcAccessLogConfig.ProtoReflect.Descriptor instead. +func (*HttpGrpcAccessLogConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_access_loggers_grpc_v3_als_proto_rawDescGZIP(), []int{0} +} + +func (x *HttpGrpcAccessLogConfig) GetCommonConfig() *CommonGrpcAccessLogConfig { + if x != nil { + return x.CommonConfig + } + return nil +} + +func (x *HttpGrpcAccessLogConfig) GetAdditionalRequestHeadersToLog() []string { + if x != nil { + return x.AdditionalRequestHeadersToLog + } + return nil +} + +func (x *HttpGrpcAccessLogConfig) GetAdditionalResponseHeadersToLog() []string { + if x != nil { + return x.AdditionalResponseHeadersToLog + } + return nil +} + +func (x *HttpGrpcAccessLogConfig) GetAdditionalResponseTrailersToLog() []string { + if x != nil { + return x.AdditionalResponseTrailersToLog + } + return nil +} + +// Configuration for the built-in “envoy.access_loggers.tcp_grpc“ type. This configuration will +// populate “StreamAccessLogsMessage.tcp_logs“. +// [#extension: envoy.access_loggers.tcp_grpc] +type TcpGrpcAccessLogConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CommonConfig *CommonGrpcAccessLogConfig `protobuf:"bytes,1,opt,name=common_config,json=commonConfig,proto3" json:"common_config,omitempty"` +} + +func (x *TcpGrpcAccessLogConfig) Reset() { + *x = TcpGrpcAccessLogConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_access_loggers_grpc_v3_als_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TcpGrpcAccessLogConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TcpGrpcAccessLogConfig) ProtoMessage() {} + +func (x *TcpGrpcAccessLogConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_access_loggers_grpc_v3_als_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TcpGrpcAccessLogConfig.ProtoReflect.Descriptor instead. +func (*TcpGrpcAccessLogConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_access_loggers_grpc_v3_als_proto_rawDescGZIP(), []int{1} +} + +func (x *TcpGrpcAccessLogConfig) GetCommonConfig() *CommonGrpcAccessLogConfig { + if x != nil { + return x.CommonConfig + } + return nil +} + +// Common configuration for gRPC access logs. +// [#next-free-field: 9] +type CommonGrpcAccessLogConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The friendly name of the access log to be returned in :ref:`StreamAccessLogsMessage.Identifier + // `. This allows the + // access log server to differentiate between different access logs coming from the same Envoy. + LogName string `protobuf:"bytes,1,opt,name=log_name,json=logName,proto3" json:"log_name,omitempty"` + // The gRPC service for the access log service. + GrpcService *v3.GrpcService `protobuf:"bytes,2,opt,name=grpc_service,json=grpcService,proto3" json:"grpc_service,omitempty"` + // API version for access logs service transport protocol. This describes the access logs service + // gRPC endpoint and version of messages used on the wire. + TransportApiVersion v3.ApiVersion `protobuf:"varint,6,opt,name=transport_api_version,json=transportApiVersion,proto3,enum=envoy.config.core.v3.ApiVersion" json:"transport_api_version,omitempty"` + // Interval for flushing access logs to the gRPC stream. Logger will flush requests every time + // this interval is elapsed, or when batch size limit is hit, whichever comes first. Defaults to + // 1 second. + BufferFlushInterval *durationpb.Duration `protobuf:"bytes,3,opt,name=buffer_flush_interval,json=bufferFlushInterval,proto3" json:"buffer_flush_interval,omitempty"` + // Soft size limit in bytes for access log entries buffer. Logger will buffer requests until + // this limit it hit, or every time flush interval is elapsed, whichever comes first. Setting it + // to zero effectively disables the batching. Defaults to 16384. + BufferSizeBytes *wrapperspb.UInt32Value `protobuf:"bytes,4,opt,name=buffer_size_bytes,json=bufferSizeBytes,proto3" json:"buffer_size_bytes,omitempty"` + // Additional filter state objects to log in :ref:`filter_state_objects + // `. + // Logger will call “FilterState::Object::serializeAsProto“ to serialize the filter state object. + FilterStateObjectsToLog []string `protobuf:"bytes,5,rep,name=filter_state_objects_to_log,json=filterStateObjectsToLog,proto3" json:"filter_state_objects_to_log,omitempty"` + // Sets the retry policy when the establishment of a gRPC stream fails. + // If the stream succeeds at least once in establishing itself, + // no retry will be performed no matter what gRPC status is received. + // Note that only :ref:`num_retries ` + // will be used in this configuration. This feature is used only when you are using + // :ref:`Envoy gRPC client `. + GrpcStreamRetryPolicy *v3.RetryPolicy `protobuf:"bytes,7,opt,name=grpc_stream_retry_policy,json=grpcStreamRetryPolicy,proto3" json:"grpc_stream_retry_policy,omitempty"` + // A list of custom tags with unique tag name to create tags for the logs. + CustomTags []*v31.CustomTag `protobuf:"bytes,8,rep,name=custom_tags,json=customTags,proto3" json:"custom_tags,omitempty"` +} + +func (x *CommonGrpcAccessLogConfig) Reset() { + *x = CommonGrpcAccessLogConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_access_loggers_grpc_v3_als_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommonGrpcAccessLogConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommonGrpcAccessLogConfig) ProtoMessage() {} + +func (x *CommonGrpcAccessLogConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_access_loggers_grpc_v3_als_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommonGrpcAccessLogConfig.ProtoReflect.Descriptor instead. +func (*CommonGrpcAccessLogConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_access_loggers_grpc_v3_als_proto_rawDescGZIP(), []int{2} +} + +func (x *CommonGrpcAccessLogConfig) GetLogName() string { + if x != nil { + return x.LogName + } + return "" +} + +func (x *CommonGrpcAccessLogConfig) GetGrpcService() *v3.GrpcService { + if x != nil { + return x.GrpcService + } + return nil +} + +func (x *CommonGrpcAccessLogConfig) GetTransportApiVersion() v3.ApiVersion { + if x != nil { + return x.TransportApiVersion + } + return v3.ApiVersion_AUTO +} + +func (x *CommonGrpcAccessLogConfig) GetBufferFlushInterval() *durationpb.Duration { + if x != nil { + return x.BufferFlushInterval + } + return nil +} + +func (x *CommonGrpcAccessLogConfig) GetBufferSizeBytes() *wrapperspb.UInt32Value { + if x != nil { + return x.BufferSizeBytes + } + return nil +} + +func (x *CommonGrpcAccessLogConfig) GetFilterStateObjectsToLog() []string { + if x != nil { + return x.FilterStateObjectsToLog + } + return nil +} + +func (x *CommonGrpcAccessLogConfig) GetGrpcStreamRetryPolicy() *v3.RetryPolicy { + if x != nil { + return x.GrpcStreamRetryPolicy + } + return nil +} + +func (x *CommonGrpcAccessLogConfig) GetCustomTags() []*v31.CustomTag { + if x != nil { + return x.CustomTags + } + return nil +} + +var File_envoy_extensions_access_loggers_grpc_v3_als_proto protoreflect.FileDescriptor + +var file_envoy_extensions_access_loggers_grpc_v3_als_proto_rawDesc = []byte{ + 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, + 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x6c, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, + 0x67, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, + 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x74, 0x72, 0x61, + 0x63, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, + 0x61, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, + 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x69, 0x6e, 0x67, 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, 0xaa, 0x03, 0x0a, 0x17, 0x48, 0x74, 0x74, 0x70, 0x47, 0x72, 0x70, 0x63, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x71, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, + 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x48, 0x0a, 0x21, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1d, 0x61, + 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x4c, 0x6f, 0x67, 0x12, 0x4a, 0x0a, 0x22, + 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, + 0x6f, 0x67, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1e, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x54, 0x6f, 0x4c, 0x6f, 0x67, 0x12, 0x4c, 0x0a, 0x23, 0x61, 0x64, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, + 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x6f, 0x67, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, + 0x73, 0x54, 0x6f, 0x4c, 0x6f, 0x67, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x47, 0x72, 0x70, + 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x22, 0xc4, 0x01, 0x0a, 0x16, 0x54, 0x63, 0x70, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x71, 0x0a, 0x0d, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, + 0x67, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, + 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x37, + 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, + 0x2e, 0x54, 0x63, 0x70, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, + 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xab, 0x05, 0x0a, 0x19, 0x43, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x22, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x07, 0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x0c, 0x67, 0x72, 0x70, + 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x67, 0x72, + 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x41, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x41, + 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x15, 0x62, 0x75, 0x66, + 0x66, 0x65, 0x72, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x13, 0x62, + 0x75, 0x66, 0x66, 0x65, 0x72, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x12, 0x48, 0x0a, 0x11, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x62, 0x75, 0x66, + 0x66, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x1b, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x17, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x54, 0x6f, 0x4c, 0x6f, 0x67, 0x12, 0x5a, 0x0a, 0x18, 0x67, 0x72, + 0x70, 0x63, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, + 0x15, 0x67, 0x72, 0x70, 0x63, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x74, 0x72, 0x79, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x41, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x73, 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, 0x35, + 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x47, 0x72, 0x70, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xa2, 0x01, 0x0a, 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, + 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x42, + 0x08, 0x41, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x55, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, + 0x65, 0x72, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x67, 0x72, 0x70, 0x63, + 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_envoy_extensions_access_loggers_grpc_v3_als_proto_rawDescOnce sync.Once + file_envoy_extensions_access_loggers_grpc_v3_als_proto_rawDescData = file_envoy_extensions_access_loggers_grpc_v3_als_proto_rawDesc +) + +func file_envoy_extensions_access_loggers_grpc_v3_als_proto_rawDescGZIP() []byte { + file_envoy_extensions_access_loggers_grpc_v3_als_proto_rawDescOnce.Do(func() { + file_envoy_extensions_access_loggers_grpc_v3_als_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_access_loggers_grpc_v3_als_proto_rawDescData) + }) + return file_envoy_extensions_access_loggers_grpc_v3_als_proto_rawDescData +} + +var file_envoy_extensions_access_loggers_grpc_v3_als_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_access_loggers_grpc_v3_als_proto_goTypes = []interface{}{ + (*HttpGrpcAccessLogConfig)(nil), // 0: envoy.extensions.access_loggers.grpc.v3.HttpGrpcAccessLogConfig + (*TcpGrpcAccessLogConfig)(nil), // 1: envoy.extensions.access_loggers.grpc.v3.TcpGrpcAccessLogConfig + (*CommonGrpcAccessLogConfig)(nil), // 2: envoy.extensions.access_loggers.grpc.v3.CommonGrpcAccessLogConfig + (*v3.GrpcService)(nil), // 3: envoy.config.core.v3.GrpcService + (v3.ApiVersion)(0), // 4: envoy.config.core.v3.ApiVersion + (*durationpb.Duration)(nil), // 5: google.protobuf.Duration + (*wrapperspb.UInt32Value)(nil), // 6: google.protobuf.UInt32Value + (*v3.RetryPolicy)(nil), // 7: envoy.config.core.v3.RetryPolicy + (*v31.CustomTag)(nil), // 8: envoy.type.tracing.v3.CustomTag +} +var file_envoy_extensions_access_loggers_grpc_v3_als_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.access_loggers.grpc.v3.HttpGrpcAccessLogConfig.common_config:type_name -> envoy.extensions.access_loggers.grpc.v3.CommonGrpcAccessLogConfig + 2, // 1: envoy.extensions.access_loggers.grpc.v3.TcpGrpcAccessLogConfig.common_config:type_name -> envoy.extensions.access_loggers.grpc.v3.CommonGrpcAccessLogConfig + 3, // 2: envoy.extensions.access_loggers.grpc.v3.CommonGrpcAccessLogConfig.grpc_service:type_name -> envoy.config.core.v3.GrpcService + 4, // 3: envoy.extensions.access_loggers.grpc.v3.CommonGrpcAccessLogConfig.transport_api_version:type_name -> envoy.config.core.v3.ApiVersion + 5, // 4: envoy.extensions.access_loggers.grpc.v3.CommonGrpcAccessLogConfig.buffer_flush_interval:type_name -> google.protobuf.Duration + 6, // 5: envoy.extensions.access_loggers.grpc.v3.CommonGrpcAccessLogConfig.buffer_size_bytes:type_name -> google.protobuf.UInt32Value + 7, // 6: envoy.extensions.access_loggers.grpc.v3.CommonGrpcAccessLogConfig.grpc_stream_retry_policy:type_name -> envoy.config.core.v3.RetryPolicy + 8, // 7: envoy.extensions.access_loggers.grpc.v3.CommonGrpcAccessLogConfig.custom_tags:type_name -> envoy.type.tracing.v3.CustomTag + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_access_loggers_grpc_v3_als_proto_init() } +func file_envoy_extensions_access_loggers_grpc_v3_als_proto_init() { + if File_envoy_extensions_access_loggers_grpc_v3_als_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_access_loggers_grpc_v3_als_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpGrpcAccessLogConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_access_loggers_grpc_v3_als_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TcpGrpcAccessLogConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_access_loggers_grpc_v3_als_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommonGrpcAccessLogConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_access_loggers_grpc_v3_als_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_access_loggers_grpc_v3_als_proto_goTypes, + DependencyIndexes: file_envoy_extensions_access_loggers_grpc_v3_als_proto_depIdxs, + MessageInfos: file_envoy_extensions_access_loggers_grpc_v3_als_proto_msgTypes, + }.Build() + File_envoy_extensions_access_loggers_grpc_v3_als_proto = out.File + file_envoy_extensions_access_loggers_grpc_v3_als_proto_rawDesc = nil + file_envoy_extensions_access_loggers_grpc_v3_als_proto_goTypes = nil + file_envoy_extensions_access_loggers_grpc_v3_als_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/grpc/v3/als.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/grpc/v3/als.pb.validate.go new file mode 100644 index 0000000000000..cc464112e436a --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/grpc/v3/als.pb.validate.go @@ -0,0 +1,607 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/access_loggers/grpc/v3/als.proto + +package grpcv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" + + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort + + _ = v3.ApiVersion(0) +) + +// Validate checks the field values on HttpGrpcAccessLogConfig 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 *HttpGrpcAccessLogConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpGrpcAccessLogConfig 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 +// HttpGrpcAccessLogConfigMultiError, or nil if none found. +func (m *HttpGrpcAccessLogConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpGrpcAccessLogConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetCommonConfig() == nil { + err := HttpGrpcAccessLogConfigValidationError{ + field: "CommonConfig", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetCommonConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpGrpcAccessLogConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpGrpcAccessLogConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpGrpcAccessLogConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return HttpGrpcAccessLogConfigMultiError(errors) + } + return nil +} + +// HttpGrpcAccessLogConfigMultiError is an error wrapping multiple validation +// errors returned by HttpGrpcAccessLogConfig.ValidateAll() if the designated +// constraints aren't met. +type HttpGrpcAccessLogConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpGrpcAccessLogConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpGrpcAccessLogConfigMultiError) AllErrors() []error { return m } + +// HttpGrpcAccessLogConfigValidationError is the validation error returned by +// HttpGrpcAccessLogConfig.Validate if the designated constraints aren't met. +type HttpGrpcAccessLogConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpGrpcAccessLogConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpGrpcAccessLogConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpGrpcAccessLogConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpGrpcAccessLogConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpGrpcAccessLogConfigValidationError) ErrorName() string { + return "HttpGrpcAccessLogConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e HttpGrpcAccessLogConfigValidationError) 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 %sHttpGrpcAccessLogConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpGrpcAccessLogConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpGrpcAccessLogConfigValidationError{} + +// Validate checks the field values on TcpGrpcAccessLogConfig 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 *TcpGrpcAccessLogConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TcpGrpcAccessLogConfig 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 +// TcpGrpcAccessLogConfigMultiError, or nil if none found. +func (m *TcpGrpcAccessLogConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *TcpGrpcAccessLogConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetCommonConfig() == nil { + err := TcpGrpcAccessLogConfigValidationError{ + field: "CommonConfig", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetCommonConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TcpGrpcAccessLogConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TcpGrpcAccessLogConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TcpGrpcAccessLogConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return TcpGrpcAccessLogConfigMultiError(errors) + } + return nil +} + +// TcpGrpcAccessLogConfigMultiError is an error wrapping multiple validation +// errors returned by TcpGrpcAccessLogConfig.ValidateAll() if the designated +// constraints aren't met. +type TcpGrpcAccessLogConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TcpGrpcAccessLogConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TcpGrpcAccessLogConfigMultiError) AllErrors() []error { return m } + +// TcpGrpcAccessLogConfigValidationError is the validation error returned by +// TcpGrpcAccessLogConfig.Validate if the designated constraints aren't met. +type TcpGrpcAccessLogConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TcpGrpcAccessLogConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TcpGrpcAccessLogConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TcpGrpcAccessLogConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TcpGrpcAccessLogConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TcpGrpcAccessLogConfigValidationError) ErrorName() string { + return "TcpGrpcAccessLogConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e TcpGrpcAccessLogConfigValidationError) 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 %sTcpGrpcAccessLogConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TcpGrpcAccessLogConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TcpGrpcAccessLogConfigValidationError{} + +// Validate checks the field values on CommonGrpcAccessLogConfig 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 *CommonGrpcAccessLogConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CommonGrpcAccessLogConfig 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 +// CommonGrpcAccessLogConfigMultiError, or nil if none found. +func (m *CommonGrpcAccessLogConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *CommonGrpcAccessLogConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetLogName()) < 1 { + err := CommonGrpcAccessLogConfigValidationError{ + field: "LogName", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetGrpcService() == nil { + err := CommonGrpcAccessLogConfigValidationError{ + field: "GrpcService", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonGrpcAccessLogConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonGrpcAccessLogConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommonGrpcAccessLogConfigValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if _, ok := v3.ApiVersion_name[int32(m.GetTransportApiVersion())]; !ok { + err := CommonGrpcAccessLogConfigValidationError{ + field: "TransportApiVersion", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if d := m.GetBufferFlushInterval(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = CommonGrpcAccessLogConfigValidationError{ + field: "BufferFlushInterval", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := CommonGrpcAccessLogConfigValidationError{ + field: "BufferFlushInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if all { + switch v := interface{}(m.GetBufferSizeBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonGrpcAccessLogConfigValidationError{ + field: "BufferSizeBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonGrpcAccessLogConfigValidationError{ + field: "BufferSizeBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBufferSizeBytes()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommonGrpcAccessLogConfigValidationError{ + field: "BufferSizeBytes", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetGrpcStreamRetryPolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonGrpcAccessLogConfigValidationError{ + field: "GrpcStreamRetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonGrpcAccessLogConfigValidationError{ + field: "GrpcStreamRetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcStreamRetryPolicy()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommonGrpcAccessLogConfigValidationError{ + field: "GrpcStreamRetryPolicy", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetCustomTags() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonGrpcAccessLogConfigValidationError{ + field: fmt.Sprintf("CustomTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonGrpcAccessLogConfigValidationError{ + field: fmt.Sprintf("CustomTags[%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 CommonGrpcAccessLogConfigValidationError{ + field: fmt.Sprintf("CustomTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return CommonGrpcAccessLogConfigMultiError(errors) + } + return nil +} + +// CommonGrpcAccessLogConfigMultiError is an error wrapping multiple validation +// errors returned by CommonGrpcAccessLogConfig.ValidateAll() if the +// designated constraints aren't met. +type CommonGrpcAccessLogConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CommonGrpcAccessLogConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CommonGrpcAccessLogConfigMultiError) AllErrors() []error { return m } + +// CommonGrpcAccessLogConfigValidationError is the validation error returned by +// CommonGrpcAccessLogConfig.Validate if the designated constraints aren't met. +type CommonGrpcAccessLogConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CommonGrpcAccessLogConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CommonGrpcAccessLogConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CommonGrpcAccessLogConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CommonGrpcAccessLogConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CommonGrpcAccessLogConfigValidationError) ErrorName() string { + return "CommonGrpcAccessLogConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e CommonGrpcAccessLogConfigValidationError) 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 %sCommonGrpcAccessLogConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CommonGrpcAccessLogConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CommonGrpcAccessLogConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/stream/v3/stream.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/stream/v3/stream.pb.go new file mode 100644 index 0000000000000..88a6d304465f7 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/stream/v3/stream.pb.go @@ -0,0 +1,304 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/access_loggers/stream/v3/stream.proto + +package streamv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Custom configuration for an :ref:`AccessLog ` +// that writes log entries directly to the operating system's standard output. +// [#extension: envoy.access_loggers.stdout] +type StdoutAccessLog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to AccessLogFormat: + // + // *StdoutAccessLog_LogFormat + AccessLogFormat isStdoutAccessLog_AccessLogFormat `protobuf_oneof:"access_log_format"` +} + +func (x *StdoutAccessLog) Reset() { + *x = StdoutAccessLog{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_access_loggers_stream_v3_stream_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StdoutAccessLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StdoutAccessLog) ProtoMessage() {} + +func (x *StdoutAccessLog) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_access_loggers_stream_v3_stream_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StdoutAccessLog.ProtoReflect.Descriptor instead. +func (*StdoutAccessLog) Descriptor() ([]byte, []int) { + return file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDescGZIP(), []int{0} +} + +func (m *StdoutAccessLog) GetAccessLogFormat() isStdoutAccessLog_AccessLogFormat { + if m != nil { + return m.AccessLogFormat + } + return nil +} + +func (x *StdoutAccessLog) GetLogFormat() *v3.SubstitutionFormatString { + if x, ok := x.GetAccessLogFormat().(*StdoutAccessLog_LogFormat); ok { + return x.LogFormat + } + return nil +} + +type isStdoutAccessLog_AccessLogFormat interface { + isStdoutAccessLog_AccessLogFormat() +} + +type StdoutAccessLog_LogFormat struct { + // Configuration to form access log data and format. + // If not specified, use :ref:`default format `. + LogFormat *v3.SubstitutionFormatString `protobuf:"bytes,1,opt,name=log_format,json=logFormat,proto3,oneof"` +} + +func (*StdoutAccessLog_LogFormat) isStdoutAccessLog_AccessLogFormat() {} + +// Custom configuration for an :ref:`AccessLog ` +// that writes log entries directly to the operating system's standard error. +// [#extension: envoy.access_loggers.stderr] +type StderrAccessLog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to AccessLogFormat: + // + // *StderrAccessLog_LogFormat + AccessLogFormat isStderrAccessLog_AccessLogFormat `protobuf_oneof:"access_log_format"` +} + +func (x *StderrAccessLog) Reset() { + *x = StderrAccessLog{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_access_loggers_stream_v3_stream_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StderrAccessLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StderrAccessLog) ProtoMessage() {} + +func (x *StderrAccessLog) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_access_loggers_stream_v3_stream_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StderrAccessLog.ProtoReflect.Descriptor instead. +func (*StderrAccessLog) Descriptor() ([]byte, []int) { + return file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDescGZIP(), []int{1} +} + +func (m *StderrAccessLog) GetAccessLogFormat() isStderrAccessLog_AccessLogFormat { + if m != nil { + return m.AccessLogFormat + } + return nil +} + +func (x *StderrAccessLog) GetLogFormat() *v3.SubstitutionFormatString { + if x, ok := x.GetAccessLogFormat().(*StderrAccessLog_LogFormat); ok { + return x.LogFormat + } + return nil +} + +type isStderrAccessLog_AccessLogFormat interface { + isStderrAccessLog_AccessLogFormat() +} + +type StderrAccessLog_LogFormat struct { + // Configuration to form access log data and format. + // If not specified, use :ref:`default format `. + LogFormat *v3.SubstitutionFormatString `protobuf:"bytes,1,opt,name=log_format,json=logFormat,proto3,oneof"` +} + +func (*StderrAccessLog_LogFormat) isStderrAccessLog_AccessLogFormat() {} + +var File_envoy_extensions_access_loggers_stream_v3_stream_proto protoreflect.FileDescriptor + +var file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDesc = []byte{ + 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, + 0x73, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x2e, 0x76, 0x33, 0x1a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x69, + 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 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, 0x81, 0x01, 0x0a, 0x0f, 0x53, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x59, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x5f, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, + 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x46, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x42, 0x13, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x81, 0x01, 0x0a, 0x0f, 0x53, 0x74, 0x64, 0x65, 0x72, + 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x59, 0x0a, 0x0a, 0x6c, 0x6f, + 0x67, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x6f, 0x67, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x13, 0x0a, 0x11, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, + 0x6c, 0x6f, 0x67, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0xab, 0x01, 0x0a, 0x37, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2f, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x33, 0x3b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDescOnce sync.Once + file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDescData = file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDesc +) + +func file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDescGZIP() []byte { + file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDescOnce.Do(func() { + file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDescData) + }) + return file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDescData +} + +var file_envoy_extensions_access_loggers_stream_v3_stream_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_access_loggers_stream_v3_stream_proto_goTypes = []interface{}{ + (*StdoutAccessLog)(nil), // 0: envoy.extensions.access_loggers.stream.v3.StdoutAccessLog + (*StderrAccessLog)(nil), // 1: envoy.extensions.access_loggers.stream.v3.StderrAccessLog + (*v3.SubstitutionFormatString)(nil), // 2: envoy.config.core.v3.SubstitutionFormatString +} +var file_envoy_extensions_access_loggers_stream_v3_stream_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.access_loggers.stream.v3.StdoutAccessLog.log_format:type_name -> envoy.config.core.v3.SubstitutionFormatString + 2, // 1: envoy.extensions.access_loggers.stream.v3.StderrAccessLog.log_format:type_name -> envoy.config.core.v3.SubstitutionFormatString + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_access_loggers_stream_v3_stream_proto_init() } +func file_envoy_extensions_access_loggers_stream_v3_stream_proto_init() { + if File_envoy_extensions_access_loggers_stream_v3_stream_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_access_loggers_stream_v3_stream_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StdoutAccessLog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_access_loggers_stream_v3_stream_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StderrAccessLog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_access_loggers_stream_v3_stream_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*StdoutAccessLog_LogFormat)(nil), + } + file_envoy_extensions_access_loggers_stream_v3_stream_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*StderrAccessLog_LogFormat)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_access_loggers_stream_v3_stream_proto_goTypes, + DependencyIndexes: file_envoy_extensions_access_loggers_stream_v3_stream_proto_depIdxs, + MessageInfos: file_envoy_extensions_access_loggers_stream_v3_stream_proto_msgTypes, + }.Build() + File_envoy_extensions_access_loggers_stream_v3_stream_proto = out.File + file_envoy_extensions_access_loggers_stream_v3_stream_proto_rawDesc = nil + file_envoy_extensions_access_loggers_stream_v3_stream_proto_goTypes = nil + file_envoy_extensions_access_loggers_stream_v3_stream_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/stream/v3/stream.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/stream/v3/stream.pb.validate.go new file mode 100644 index 0000000000000..c6f50fbe0431e --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/stream/v3/stream.pb.validate.go @@ -0,0 +1,326 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/access_loggers/stream/v3/stream.proto + +package streamv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on StdoutAccessLog 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 *StdoutAccessLog) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StdoutAccessLog 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 +// StdoutAccessLogMultiError, or nil if none found. +func (m *StdoutAccessLog) ValidateAll() error { + return m.validate(true) +} + +func (m *StdoutAccessLog) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.AccessLogFormat.(type) { + + case *StdoutAccessLog_LogFormat: + + if m.GetLogFormat() == nil { + err := StdoutAccessLogValidationError{ + field: "LogFormat", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetLogFormat()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StdoutAccessLogValidationError{ + field: "LogFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StdoutAccessLogValidationError{ + field: "LogFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLogFormat()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StdoutAccessLogValidationError{ + field: "LogFormat", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return StdoutAccessLogMultiError(errors) + } + return nil +} + +// StdoutAccessLogMultiError is an error wrapping multiple validation errors +// returned by StdoutAccessLog.ValidateAll() if the designated constraints +// aren't met. +type StdoutAccessLogMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StdoutAccessLogMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StdoutAccessLogMultiError) AllErrors() []error { return m } + +// StdoutAccessLogValidationError is the validation error returned by +// StdoutAccessLog.Validate if the designated constraints aren't met. +type StdoutAccessLogValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StdoutAccessLogValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StdoutAccessLogValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StdoutAccessLogValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StdoutAccessLogValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StdoutAccessLogValidationError) ErrorName() string { return "StdoutAccessLogValidationError" } + +// Error satisfies the builtin error interface +func (e StdoutAccessLogValidationError) 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 %sStdoutAccessLog.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StdoutAccessLogValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StdoutAccessLogValidationError{} + +// Validate checks the field values on StderrAccessLog 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 *StderrAccessLog) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StderrAccessLog 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 +// StderrAccessLogMultiError, or nil if none found. +func (m *StderrAccessLog) ValidateAll() error { + return m.validate(true) +} + +func (m *StderrAccessLog) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.AccessLogFormat.(type) { + + case *StderrAccessLog_LogFormat: + + if m.GetLogFormat() == nil { + err := StderrAccessLogValidationError{ + field: "LogFormat", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetLogFormat()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StderrAccessLogValidationError{ + field: "LogFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StderrAccessLogValidationError{ + field: "LogFormat", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLogFormat()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StderrAccessLogValidationError{ + field: "LogFormat", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return StderrAccessLogMultiError(errors) + } + return nil +} + +// StderrAccessLogMultiError is an error wrapping multiple validation errors +// returned by StderrAccessLog.ValidateAll() if the designated constraints +// aren't met. +type StderrAccessLogMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StderrAccessLogMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StderrAccessLogMultiError) AllErrors() []error { return m } + +// StderrAccessLogValidationError is the validation error returned by +// StderrAccessLog.Validate if the designated constraints aren't met. +type StderrAccessLogValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StderrAccessLogValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StderrAccessLogValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StderrAccessLogValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StderrAccessLogValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StderrAccessLogValidationError) ErrorName() string { return "StderrAccessLogValidationError" } + +// Error satisfies the builtin error interface +func (e StderrAccessLogValidationError) 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 %sStderrAccessLog.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StderrAccessLogValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StderrAccessLogValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/wasm/v3/wasm.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/wasm/v3/wasm.pb.go new file mode 100644 index 0000000000000..2ea0683f2625d --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/wasm/v3/wasm.pb.go @@ -0,0 +1,174 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/access_loggers/wasm/v3/wasm.proto + +package wasmv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/extensions/wasm/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Custom configuration for an :ref:`AccessLog ` +// that calls into a WASM VM. Configures the built-in “envoy.access_loggers.wasm“ +// AccessLog. +type WasmAccessLog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Config *v3.PluginConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *WasmAccessLog) Reset() { + *x = WasmAccessLog{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WasmAccessLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WasmAccessLog) ProtoMessage() {} + +func (x *WasmAccessLog) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WasmAccessLog.ProtoReflect.Descriptor instead. +func (*WasmAccessLog) Descriptor() ([]byte, []int) { + return file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_rawDescGZIP(), []int{0} +} + +func (x *WasmAccessLog) GetConfig() *v3.PluginConfig { + if x != nil { + return x.Config + } + return nil +} + +var File_envoy_extensions_access_loggers_wasm_v3_wasm_proto protoreflect.FileDescriptor + +var file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_rawDesc = []byte{ + 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, + 0x73, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2f, 0x76, 0x33, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, + 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x1a, 0x23, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x77, 0x61, 0x73, 0x6d, 0x2f, 0x76, 0x33, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x4f, 0x0a, 0x0d, 0x57, 0x61, 0x73, 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, + 0x6f, 0x67, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x42, 0xa3, 0x01, 0x0a, 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, + 0x67, 0x65, 0x72, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x57, 0x61, + 0x73, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x55, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, + 0x73, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2f, 0x76, 0x33, 0x3b, 0x77, 0x61, 0x73, 0x6d, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_rawDescOnce sync.Once + file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_rawDescData = file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_rawDesc +) + +func file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_rawDescGZIP() []byte { + file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_rawDescOnce.Do(func() { + file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_rawDescData) + }) + return file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_rawDescData +} + +var file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_goTypes = []interface{}{ + (*WasmAccessLog)(nil), // 0: envoy.extensions.access_loggers.wasm.v3.WasmAccessLog + (*v3.PluginConfig)(nil), // 1: envoy.extensions.wasm.v3.PluginConfig +} +var file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.access_loggers.wasm.v3.WasmAccessLog.config:type_name -> envoy.extensions.wasm.v3.PluginConfig + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_init() } +func file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_init() { + if File_envoy_extensions_access_loggers_wasm_v3_wasm_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WasmAccessLog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_goTypes, + DependencyIndexes: file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_depIdxs, + MessageInfos: file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_msgTypes, + }.Build() + File_envoy_extensions_access_loggers_wasm_v3_wasm_proto = out.File + file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_rawDesc = nil + file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_goTypes = nil + file_envoy_extensions_access_loggers_wasm_v3_wasm_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/wasm/v3/wasm.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/wasm/v3/wasm.pb.validate.go new file mode 100644 index 0000000000000..d202182600f1a --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/access_loggers/wasm/v3/wasm.pb.validate.go @@ -0,0 +1,164 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/access_loggers/wasm/v3/wasm.proto + +package wasmv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on WasmAccessLog 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 *WasmAccessLog) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on WasmAccessLog 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 WasmAccessLogMultiError, or +// nil if none found. +func (m *WasmAccessLog) ValidateAll() error { + return m.validate(true) +} + +func (m *WasmAccessLog) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WasmAccessLogValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WasmAccessLogValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return WasmAccessLogValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return WasmAccessLogMultiError(errors) + } + return nil +} + +// WasmAccessLogMultiError is an error wrapping multiple validation errors +// returned by WasmAccessLog.ValidateAll() if the designated constraints +// aren't met. +type WasmAccessLogMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WasmAccessLogMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WasmAccessLogMultiError) AllErrors() []error { return m } + +// WasmAccessLogValidationError is the validation error returned by +// WasmAccessLog.Validate if the designated constraints aren't met. +type WasmAccessLogValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e WasmAccessLogValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e WasmAccessLogValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e WasmAccessLogValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e WasmAccessLogValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e WasmAccessLogValidationError) ErrorName() string { return "WasmAccessLogValidationError" } + +// Error satisfies the builtin error interface +func (e WasmAccessLogValidationError) 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 %sWasmAccessLog.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = WasmAccessLogValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = WasmAccessLogValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/bootstrap/internal_listener/v3/internal_listener.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/bootstrap/internal_listener/v3/internal_listener.pb.go new file mode 100644 index 0000000000000..eac4c8d58d447 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/bootstrap/internal_listener/v3/internal_listener.pb.go @@ -0,0 +1,162 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/bootstrap/internal_listener/v3/internal_listener.proto + +package internal_listenerv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for internal listener. +type InternalListener struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *InternalListener) Reset() { + *x = InternalListener{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InternalListener) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InternalListener) ProtoMessage() {} + +func (x *InternalListener) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InternalListener.ProtoReflect.Descriptor instead. +func (*InternalListener) Descriptor() ([]byte, []int) { + return file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto protoreflect.FileDescriptor + +var file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDesc = []byte{ + 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, + 0x33, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x62, 0x6f, 0x6f, 0x74, + 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x12, 0x0a, 0x10, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x42, 0xd4, + 0x01, 0x0a, 0x3d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x42, 0x15, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6a, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x76, + 0x33, 0x3b, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0xd2, 0xc6, 0xa4, + 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDescOnce sync.Once + file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDescData = file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDesc +) + +func file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDescGZIP() []byte { + file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDescOnce.Do(func() { + file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDescData) + }) + return file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDescData +} + +var file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_goTypes = []interface{}{ + (*InternalListener)(nil), // 0: envoy.extensions.bootstrap.internal_listener.v3.InternalListener +} +var file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_init() } +func file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_init() { + if File_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InternalListener); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_goTypes, + DependencyIndexes: file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_depIdxs, + MessageInfos: file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_msgTypes, + }.Build() + File_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto = out.File + file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_rawDesc = nil + file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_goTypes = nil + file_envoy_extensions_bootstrap_internal_listener_v3_internal_listener_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/bootstrap/internal_listener/v3/internal_listener.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/bootstrap/internal_listener/v3/internal_listener.pb.validate.go new file mode 100644 index 0000000000000..234f868cdbcb8 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/bootstrap/internal_listener/v3/internal_listener.pb.validate.go @@ -0,0 +1,135 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/bootstrap/internal_listener/v3/internal_listener.proto + +package internal_listenerv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on InternalListener 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 *InternalListener) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on InternalListener 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 +// InternalListenerMultiError, or nil if none found. +func (m *InternalListener) ValidateAll() error { + return m.validate(true) +} + +func (m *InternalListener) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return InternalListenerMultiError(errors) + } + return nil +} + +// InternalListenerMultiError is an error wrapping multiple validation errors +// returned by InternalListener.ValidateAll() if the designated constraints +// aren't met. +type InternalListenerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m InternalListenerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m InternalListenerMultiError) AllErrors() []error { return m } + +// InternalListenerValidationError is the validation error returned by +// InternalListener.Validate if the designated constraints aren't met. +type InternalListenerValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e InternalListenerValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e InternalListenerValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e InternalListenerValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e InternalListenerValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e InternalListenerValidationError) ErrorName() string { return "InternalListenerValidationError" } + +// Error satisfies the builtin error interface +func (e InternalListenerValidationError) 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 %sInternalListener.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = InternalListenerValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = InternalListenerValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/cache/simple_http_cache/v3/config.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/cache/simple_http_cache/v3/config.pb.go new file mode 100644 index 0000000000000..ac5c457aa8ab2 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/cache/simple_http_cache/v3/config.pb.go @@ -0,0 +1,157 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/cache/simple_http_cache/v3/config.proto + +package simple_http_cachev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// [#extension: envoy.extensions.http.cache.simple] +type SimpleHttpCacheConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SimpleHttpCacheConfig) Reset() { + *x = SimpleHttpCacheConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_cache_simple_http_cache_v3_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SimpleHttpCacheConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SimpleHttpCacheConfig) ProtoMessage() {} + +func (x *SimpleHttpCacheConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_cache_simple_http_cache_v3_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SimpleHttpCacheConfig.ProtoReflect.Descriptor instead. +func (*SimpleHttpCacheConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_cache_simple_http_cache_v3_config_proto protoreflect.FileDescriptor + +var file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDesc = []byte{ + 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x5f, + 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x61, 0x63, + 0x68, 0x65, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, + 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, + 0x48, 0x74, 0x74, 0x70, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, + 0xba, 0x01, 0x0a, 0x39, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x5f, + 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x73, 0x69, 0x6d, 0x70, + 0x6c, 0x65, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x76, 0x33, + 0x3b, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x61, 0x63, + 0x68, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDescOnce sync.Once + file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDescData = file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDesc +) + +func file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDescGZIP() []byte { + file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDescOnce.Do(func() { + file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDescData) + }) + return file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDescData +} + +var file_envoy_extensions_cache_simple_http_cache_v3_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_cache_simple_http_cache_v3_config_proto_goTypes = []interface{}{ + (*SimpleHttpCacheConfig)(nil), // 0: envoy.extensions.cache.simple_http_cache.v3.SimpleHttpCacheConfig +} +var file_envoy_extensions_cache_simple_http_cache_v3_config_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_cache_simple_http_cache_v3_config_proto_init() } +func file_envoy_extensions_cache_simple_http_cache_v3_config_proto_init() { + if File_envoy_extensions_cache_simple_http_cache_v3_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_cache_simple_http_cache_v3_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SimpleHttpCacheConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_cache_simple_http_cache_v3_config_proto_goTypes, + DependencyIndexes: file_envoy_extensions_cache_simple_http_cache_v3_config_proto_depIdxs, + MessageInfos: file_envoy_extensions_cache_simple_http_cache_v3_config_proto_msgTypes, + }.Build() + File_envoy_extensions_cache_simple_http_cache_v3_config_proto = out.File + file_envoy_extensions_cache_simple_http_cache_v3_config_proto_rawDesc = nil + file_envoy_extensions_cache_simple_http_cache_v3_config_proto_goTypes = nil + file_envoy_extensions_cache_simple_http_cache_v3_config_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/cache/simple_http_cache/v3/config.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/cache/simple_http_cache/v3/config.pb.validate.go new file mode 100644 index 0000000000000..02eccd5dad099 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/cache/simple_http_cache/v3/config.pb.validate.go @@ -0,0 +1,137 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/cache/simple_http_cache/v3/config.proto + +package simple_http_cachev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on SimpleHttpCacheConfig 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 *SimpleHttpCacheConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SimpleHttpCacheConfig 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 +// SimpleHttpCacheConfigMultiError, or nil if none found. +func (m *SimpleHttpCacheConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *SimpleHttpCacheConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return SimpleHttpCacheConfigMultiError(errors) + } + return nil +} + +// SimpleHttpCacheConfigMultiError is an error wrapping multiple validation +// errors returned by SimpleHttpCacheConfig.ValidateAll() if the designated +// constraints aren't met. +type SimpleHttpCacheConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SimpleHttpCacheConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SimpleHttpCacheConfigMultiError) AllErrors() []error { return m } + +// SimpleHttpCacheConfigValidationError is the validation error returned by +// SimpleHttpCacheConfig.Validate if the designated constraints aren't met. +type SimpleHttpCacheConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SimpleHttpCacheConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SimpleHttpCacheConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SimpleHttpCacheConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SimpleHttpCacheConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SimpleHttpCacheConfigValidationError) ErrorName() string { + return "SimpleHttpCacheConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e SimpleHttpCacheConfigValidationError) 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 %sSimpleHttpCacheConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SimpleHttpCacheConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SimpleHttpCacheConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/clusters/aggregate/v3/cluster.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/clusters/aggregate/v3/cluster.pb.go new file mode 100644 index 0000000000000..096d72b56d830 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/clusters/aggregate/v3/cluster.pb.go @@ -0,0 +1,179 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/clusters/aggregate/v3/cluster.proto + +package aggregatev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for the aggregate cluster. See the :ref:`architecture overview +// ` for more information. +// [#extension: envoy.clusters.aggregate] +type ClusterConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Load balancing clusters in aggregate cluster. Clusters are prioritized based on the order they + // appear in this list. + Clusters []string `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"` +} + +func (x *ClusterConfig) Reset() { + *x = ClusterConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_clusters_aggregate_v3_cluster_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterConfig) ProtoMessage() {} + +func (x *ClusterConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_clusters_aggregate_v3_cluster_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterConfig.ProtoReflect.Descriptor instead. +func (*ClusterConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_clusters_aggregate_v3_cluster_proto_rawDescGZIP(), []int{0} +} + +func (x *ClusterConfig) GetClusters() []string { + if x != nil { + return x.Clusters + } + return nil +} + +var File_envoy_extensions_clusters_aggregate_v3_cluster_proto protoreflect.FileDescriptor + +var file_envoy_extensions_clusters_aggregate_v3_cluster_proto_rawDesc = []byte{ + 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0x72, 0x0a, 0x0d, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x24, 0x0a, 0x08, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, + 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xa9, 0x01, + 0x0a, 0x34, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_extensions_clusters_aggregate_v3_cluster_proto_rawDescOnce sync.Once + file_envoy_extensions_clusters_aggregate_v3_cluster_proto_rawDescData = file_envoy_extensions_clusters_aggregate_v3_cluster_proto_rawDesc +) + +func file_envoy_extensions_clusters_aggregate_v3_cluster_proto_rawDescGZIP() []byte { + file_envoy_extensions_clusters_aggregate_v3_cluster_proto_rawDescOnce.Do(func() { + file_envoy_extensions_clusters_aggregate_v3_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_clusters_aggregate_v3_cluster_proto_rawDescData) + }) + return file_envoy_extensions_clusters_aggregate_v3_cluster_proto_rawDescData +} + +var file_envoy_extensions_clusters_aggregate_v3_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_clusters_aggregate_v3_cluster_proto_goTypes = []interface{}{ + (*ClusterConfig)(nil), // 0: envoy.extensions.clusters.aggregate.v3.ClusterConfig +} +var file_envoy_extensions_clusters_aggregate_v3_cluster_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_clusters_aggregate_v3_cluster_proto_init() } +func file_envoy_extensions_clusters_aggregate_v3_cluster_proto_init() { + if File_envoy_extensions_clusters_aggregate_v3_cluster_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_clusters_aggregate_v3_cluster_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_clusters_aggregate_v3_cluster_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_clusters_aggregate_v3_cluster_proto_goTypes, + DependencyIndexes: file_envoy_extensions_clusters_aggregate_v3_cluster_proto_depIdxs, + MessageInfos: file_envoy_extensions_clusters_aggregate_v3_cluster_proto_msgTypes, + }.Build() + File_envoy_extensions_clusters_aggregate_v3_cluster_proto = out.File + file_envoy_extensions_clusters_aggregate_v3_cluster_proto_rawDesc = nil + file_envoy_extensions_clusters_aggregate_v3_cluster_proto_goTypes = nil + file_envoy_extensions_clusters_aggregate_v3_cluster_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/clusters/aggregate/v3/cluster.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/clusters/aggregate/v3/cluster.pb.validate.go new file mode 100644 index 0000000000000..8766b20df7a59 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/clusters/aggregate/v3/cluster.pb.validate.go @@ -0,0 +1,146 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/clusters/aggregate/v3/cluster.proto + +package aggregatev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ClusterConfig 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 *ClusterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterConfig 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 ClusterConfigMultiError, or +// nil if none found. +func (m *ClusterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetClusters()) < 1 { + err := ClusterConfigValidationError{ + field: "Clusters", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return ClusterConfigMultiError(errors) + } + return nil +} + +// ClusterConfigMultiError is an error wrapping multiple validation errors +// returned by ClusterConfig.ValidateAll() if the designated constraints +// aren't met. +type ClusterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterConfigMultiError) AllErrors() []error { return m } + +// ClusterConfigValidationError is the validation error returned by +// ClusterConfig.Validate if the designated constraints aren't met. +type ClusterConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ClusterConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ClusterConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ClusterConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ClusterConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ClusterConfigValidationError) ErrorName() string { return "ClusterConfigValidationError" } + +// Error satisfies the builtin error interface +func (e ClusterConfigValidationError) 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 %sClusterConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ClusterConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ClusterConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/clusters/redis/v3/redis_cluster.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/clusters/redis/v3/redis_cluster.pb.go new file mode 100644 index 0000000000000..4dbd7b5705087 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/clusters/redis/v3/redis_cluster.pb.go @@ -0,0 +1,267 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/clusters/redis/v3/redis_cluster.proto + +package redisv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// [#next-free-field: 7] +type RedisClusterConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Interval between successive topology refresh requests. If not set, this defaults to 5s. + ClusterRefreshRate *durationpb.Duration `protobuf:"bytes,1,opt,name=cluster_refresh_rate,json=clusterRefreshRate,proto3" json:"cluster_refresh_rate,omitempty"` + // Timeout for topology refresh request. If not set, this defaults to 3s. + ClusterRefreshTimeout *durationpb.Duration `protobuf:"bytes,2,opt,name=cluster_refresh_timeout,json=clusterRefreshTimeout,proto3" json:"cluster_refresh_timeout,omitempty"` + // The minimum interval that must pass after triggering a topology refresh request before a new + // request can possibly be triggered again. Any errors received during one of these + // time intervals are ignored. If not set, this defaults to 5s. + RedirectRefreshInterval *durationpb.Duration `protobuf:"bytes,3,opt,name=redirect_refresh_interval,json=redirectRefreshInterval,proto3" json:"redirect_refresh_interval,omitempty"` + // The number of redirection errors that must be received before + // triggering a topology refresh request. If not set, this defaults to 5. + // If this is set to 0, topology refresh after redirect is disabled. + RedirectRefreshThreshold *wrapperspb.UInt32Value `protobuf:"bytes,4,opt,name=redirect_refresh_threshold,json=redirectRefreshThreshold,proto3" json:"redirect_refresh_threshold,omitempty"` + // The number of failures that must be received before triggering a topology refresh request. + // If not set, this defaults to 0, which disables the topology refresh due to failure. + FailureRefreshThreshold uint32 `protobuf:"varint,5,opt,name=failure_refresh_threshold,json=failureRefreshThreshold,proto3" json:"failure_refresh_threshold,omitempty"` + // The number of hosts became degraded or unhealthy before triggering a topology refresh request. + // If not set, this defaults to 0, which disables the topology refresh due to degraded or + // unhealthy host. + HostDegradedRefreshThreshold uint32 `protobuf:"varint,6,opt,name=host_degraded_refresh_threshold,json=hostDegradedRefreshThreshold,proto3" json:"host_degraded_refresh_threshold,omitempty"` +} + +func (x *RedisClusterConfig) Reset() { + *x = RedisClusterConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RedisClusterConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RedisClusterConfig) ProtoMessage() {} + +func (x *RedisClusterConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RedisClusterConfig.ProtoReflect.Descriptor instead. +func (*RedisClusterConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_rawDescGZIP(), []int{0} +} + +func (x *RedisClusterConfig) GetClusterRefreshRate() *durationpb.Duration { + if x != nil { + return x.ClusterRefreshRate + } + return nil +} + +func (x *RedisClusterConfig) GetClusterRefreshTimeout() *durationpb.Duration { + if x != nil { + return x.ClusterRefreshTimeout + } + return nil +} + +func (x *RedisClusterConfig) GetRedirectRefreshInterval() *durationpb.Duration { + if x != nil { + return x.RedirectRefreshInterval + } + return nil +} + +func (x *RedisClusterConfig) GetRedirectRefreshThreshold() *wrapperspb.UInt32Value { + if x != nil { + return x.RedirectRefreshThreshold + } + return nil +} + +func (x *RedisClusterConfig) GetFailureRefreshThreshold() uint32 { + if x != nil { + return x.FailureRefreshThreshold + } + return 0 +} + +func (x *RedisClusterConfig) GetHostDegradedRefreshThreshold() uint32 { + if x != nil { + return x.HostDegradedRefreshThreshold + } + return 0 +} + +var File_envoy_extensions_clusters_redis_v3_redis_cluster_proto protoreflect.FileDescriptor + +var file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_rawDesc = []byte{ + 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x72, 0x65, 0x64, 0x69, + 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, + 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0xb4, 0x04, 0x0a, 0x12, 0x52, 0x65, 0x64, 0x69, + 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x55, + 0x0a, 0x14, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, + 0x00, 0x52, 0x12, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x52, 0x61, 0x74, 0x65, 0x12, 0x5b, 0x0a, 0x17, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x15, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x12, 0x55, 0x0a, 0x19, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, + 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x17, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x5a, 0x0a, 0x1a, 0x72, 0x65, 0x64, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x68, + 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x18, 0x72, 0x65, 0x64, + 0x69, 0x72, 0x65, 0x63, 0x74, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x68, 0x72, 0x65, + 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x3a, 0x0a, 0x19, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, + 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, + 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x17, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, + 0x65, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, + 0x64, 0x12, 0x45, 0x0a, 0x1f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x64, 0x65, 0x67, 0x72, 0x61, 0x64, + 0x65, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x1c, 0x68, 0x6f, 0x73, 0x74, + 0x44, 0x65, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, + 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, + 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x2e, 0x52, 0x65, 0x64, 0x69, + 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xa2, + 0x01, 0x0a, 0x30, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, + 0x2e, 0x76, 0x33, 0x42, 0x11, 0x52, 0x65, 0x64, 0x69, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x72, 0x65, 0x64, 0x69, 0x73, + 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x65, 0x64, 0x69, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_rawDescOnce sync.Once + file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_rawDescData = file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_rawDesc +) + +func file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_rawDescGZIP() []byte { + file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_rawDescOnce.Do(func() { + file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_rawDescData) + }) + return file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_rawDescData +} + +var file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_goTypes = []interface{}{ + (*RedisClusterConfig)(nil), // 0: envoy.extensions.clusters.redis.v3.RedisClusterConfig + (*durationpb.Duration)(nil), // 1: google.protobuf.Duration + (*wrapperspb.UInt32Value)(nil), // 2: google.protobuf.UInt32Value +} +var file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.clusters.redis.v3.RedisClusterConfig.cluster_refresh_rate:type_name -> google.protobuf.Duration + 1, // 1: envoy.extensions.clusters.redis.v3.RedisClusterConfig.cluster_refresh_timeout:type_name -> google.protobuf.Duration + 1, // 2: envoy.extensions.clusters.redis.v3.RedisClusterConfig.redirect_refresh_interval:type_name -> google.protobuf.Duration + 2, // 3: envoy.extensions.clusters.redis.v3.RedisClusterConfig.redirect_refresh_threshold:type_name -> google.protobuf.UInt32Value + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_init() } +func file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_init() { + if File_envoy_extensions_clusters_redis_v3_redis_cluster_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RedisClusterConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_goTypes, + DependencyIndexes: file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_depIdxs, + MessageInfos: file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_msgTypes, + }.Build() + File_envoy_extensions_clusters_redis_v3_redis_cluster_proto = out.File + file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_rawDesc = nil + file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_goTypes = nil + file_envoy_extensions_clusters_redis_v3_redis_cluster_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/clusters/redis/v3/redis_cluster.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/clusters/redis/v3/redis_cluster.pb.validate.go new file mode 100644 index 0000000000000..6eb06c0100c8f --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/clusters/redis/v3/redis_cluster.pb.validate.go @@ -0,0 +1,259 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/clusters/redis/v3/redis_cluster.proto + +package redisv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RedisClusterConfig 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 *RedisClusterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RedisClusterConfig 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 +// RedisClusterConfigMultiError, or nil if none found. +func (m *RedisClusterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisClusterConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if d := m.GetClusterRefreshRate(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = RedisClusterConfigValidationError{ + field: "ClusterRefreshRate", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := RedisClusterConfigValidationError{ + field: "ClusterRefreshRate", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if d := m.GetClusterRefreshTimeout(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = RedisClusterConfigValidationError{ + field: "ClusterRefreshTimeout", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := RedisClusterConfigValidationError{ + field: "ClusterRefreshTimeout", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if all { + switch v := interface{}(m.GetRedirectRefreshInterval()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisClusterConfigValidationError{ + field: "RedirectRefreshInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisClusterConfigValidationError{ + field: "RedirectRefreshInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRedirectRefreshInterval()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RedisClusterConfigValidationError{ + field: "RedirectRefreshInterval", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetRedirectRefreshThreshold()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisClusterConfigValidationError{ + field: "RedirectRefreshThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisClusterConfigValidationError{ + field: "RedirectRefreshThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRedirectRefreshThreshold()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RedisClusterConfigValidationError{ + field: "RedirectRefreshThreshold", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for FailureRefreshThreshold + + // no validation rules for HostDegradedRefreshThreshold + + if len(errors) > 0 { + return RedisClusterConfigMultiError(errors) + } + return nil +} + +// RedisClusterConfigMultiError is an error wrapping multiple validation errors +// returned by RedisClusterConfig.ValidateAll() if the designated constraints +// aren't met. +type RedisClusterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisClusterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisClusterConfigMultiError) AllErrors() []error { return m } + +// RedisClusterConfigValidationError is the validation error returned by +// RedisClusterConfig.Validate if the designated constraints aren't met. +type RedisClusterConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RedisClusterConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RedisClusterConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RedisClusterConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RedisClusterConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RedisClusterConfigValidationError) ErrorName() string { + return "RedisClusterConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e RedisClusterConfigValidationError) 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 %sRedisClusterConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RedisClusterConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RedisClusterConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/common/async_files/v3/async_file_manager.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/common/async_files/v3/async_file_manager.pb.go new file mode 100644 index 0000000000000..7a8438cade2d7 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/common/async_files/v3/async_file_manager.pb.go @@ -0,0 +1,285 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/common/async_files/v3/async_file_manager.proto + +package async_filesv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration to instantiate or select a singleton “AsyncFileManager“. +type AsyncFileManagerConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // An optional identifier for the manager. An empty string is a valid identifier + // for a common, default “AsyncFileManager“. + // + // Reusing the same id with different configurations in the same envoy instance + // is an error. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Types that are assignable to ManagerType: + // + // *AsyncFileManagerConfig_ThreadPool_ + ManagerType isAsyncFileManagerConfig_ManagerType `protobuf_oneof:"manager_type"` +} + +func (x *AsyncFileManagerConfig) Reset() { + *x = AsyncFileManagerConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_common_async_files_v3_async_file_manager_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AsyncFileManagerConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AsyncFileManagerConfig) ProtoMessage() {} + +func (x *AsyncFileManagerConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_common_async_files_v3_async_file_manager_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AsyncFileManagerConfig.ProtoReflect.Descriptor instead. +func (*AsyncFileManagerConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_common_async_files_v3_async_file_manager_proto_rawDescGZIP(), []int{0} +} + +func (x *AsyncFileManagerConfig) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (m *AsyncFileManagerConfig) GetManagerType() isAsyncFileManagerConfig_ManagerType { + if m != nil { + return m.ManagerType + } + return nil +} + +func (x *AsyncFileManagerConfig) GetThreadPool() *AsyncFileManagerConfig_ThreadPool { + if x, ok := x.GetManagerType().(*AsyncFileManagerConfig_ThreadPool_); ok { + return x.ThreadPool + } + return nil +} + +type isAsyncFileManagerConfig_ManagerType interface { + isAsyncFileManagerConfig_ManagerType() +} + +type AsyncFileManagerConfig_ThreadPool_ struct { + // Configuration for a thread-pool based async file manager. + ThreadPool *AsyncFileManagerConfig_ThreadPool `protobuf:"bytes,2,opt,name=thread_pool,json=threadPool,proto3,oneof"` +} + +func (*AsyncFileManagerConfig_ThreadPool_) isAsyncFileManagerConfig_ManagerType() {} + +type AsyncFileManagerConfig_ThreadPool struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The number of threads to use. If unset or zero, will default to the number + // of concurrent threads the hardware supports. This default is subject to + // change if performance analysis suggests it. + ThreadCount uint32 `protobuf:"varint,1,opt,name=thread_count,json=threadCount,proto3" json:"thread_count,omitempty"` +} + +func (x *AsyncFileManagerConfig_ThreadPool) Reset() { + *x = AsyncFileManagerConfig_ThreadPool{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_common_async_files_v3_async_file_manager_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AsyncFileManagerConfig_ThreadPool) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AsyncFileManagerConfig_ThreadPool) ProtoMessage() {} + +func (x *AsyncFileManagerConfig_ThreadPool) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_common_async_files_v3_async_file_manager_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AsyncFileManagerConfig_ThreadPool.ProtoReflect.Descriptor instead. +func (*AsyncFileManagerConfig_ThreadPool) Descriptor() ([]byte, []int) { + return file_envoy_extensions_common_async_files_v3_async_file_manager_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *AsyncFileManagerConfig_ThreadPool) GetThreadCount() uint32 { + if x != nil { + return x.ThreadCount + } + return 0 +} + +var File_envoy_extensions_common_async_files_v3_async_file_manager_proto protoreflect.FileDescriptor + +var file_envoy_extensions_common_async_files_v3_async_file_manager_proto_rawDesc = []byte{ + 0x0a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x5f, + 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x66, + 0x69, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x61, 0x73, 0x79, 0x6e, 0x63, + 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 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, 0xdc, 0x01, 0x0a, 0x16, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x69, 0x6c, 0x65, + 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x6c, 0x0a, + 0x0b, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x61, 0x73, 0x79, + 0x6e, 0x63, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x73, 0x79, 0x6e, + 0x63, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x48, 0x00, 0x52, + 0x0a, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x1a, 0x2f, 0x0a, 0x0a, 0x54, + 0x68, 0x72, 0x65, 0x61, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x68, 0x72, + 0x65, 0x61, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0b, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x13, 0x0a, 0x0c, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, + 0x01, 0x42, 0xbc, 0x01, 0x0a, 0x34, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x61, 0x73, 0x79, 0x6e, + 0x63, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x15, 0x41, 0x73, 0x79, 0x6e, + 0x63, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, + 0x76, 0x33, 0x3b, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_common_async_files_v3_async_file_manager_proto_rawDescOnce sync.Once + file_envoy_extensions_common_async_files_v3_async_file_manager_proto_rawDescData = file_envoy_extensions_common_async_files_v3_async_file_manager_proto_rawDesc +) + +func file_envoy_extensions_common_async_files_v3_async_file_manager_proto_rawDescGZIP() []byte { + file_envoy_extensions_common_async_files_v3_async_file_manager_proto_rawDescOnce.Do(func() { + file_envoy_extensions_common_async_files_v3_async_file_manager_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_common_async_files_v3_async_file_manager_proto_rawDescData) + }) + return file_envoy_extensions_common_async_files_v3_async_file_manager_proto_rawDescData +} + +var file_envoy_extensions_common_async_files_v3_async_file_manager_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_common_async_files_v3_async_file_manager_proto_goTypes = []interface{}{ + (*AsyncFileManagerConfig)(nil), // 0: envoy.extensions.common.async_files.v3.AsyncFileManagerConfig + (*AsyncFileManagerConfig_ThreadPool)(nil), // 1: envoy.extensions.common.async_files.v3.AsyncFileManagerConfig.ThreadPool +} +var file_envoy_extensions_common_async_files_v3_async_file_manager_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.common.async_files.v3.AsyncFileManagerConfig.thread_pool:type_name -> envoy.extensions.common.async_files.v3.AsyncFileManagerConfig.ThreadPool + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_common_async_files_v3_async_file_manager_proto_init() } +func file_envoy_extensions_common_async_files_v3_async_file_manager_proto_init() { + if File_envoy_extensions_common_async_files_v3_async_file_manager_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_common_async_files_v3_async_file_manager_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AsyncFileManagerConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_common_async_files_v3_async_file_manager_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AsyncFileManagerConfig_ThreadPool); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_common_async_files_v3_async_file_manager_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*AsyncFileManagerConfig_ThreadPool_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_common_async_files_v3_async_file_manager_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_common_async_files_v3_async_file_manager_proto_goTypes, + DependencyIndexes: file_envoy_extensions_common_async_files_v3_async_file_manager_proto_depIdxs, + MessageInfos: file_envoy_extensions_common_async_files_v3_async_file_manager_proto_msgTypes, + }.Build() + File_envoy_extensions_common_async_files_v3_async_file_manager_proto = out.File + file_envoy_extensions_common_async_files_v3_async_file_manager_proto_rawDesc = nil + file_envoy_extensions_common_async_files_v3_async_file_manager_proto_goTypes = nil + file_envoy_extensions_common_async_files_v3_async_file_manager_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/common/async_files/v3/async_file_manager.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/common/async_files/v3/async_file_manager.pb.validate.go new file mode 100644 index 0000000000000..ea18243b3848c --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/common/async_files/v3/async_file_manager.pb.validate.go @@ -0,0 +1,290 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/common/async_files/v3/async_file_manager.proto + +package async_filesv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on AsyncFileManagerConfig 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 *AsyncFileManagerConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AsyncFileManagerConfig 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 +// AsyncFileManagerConfigMultiError, or nil if none found. +func (m *AsyncFileManagerConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *AsyncFileManagerConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Id + + switch m.ManagerType.(type) { + + case *AsyncFileManagerConfig_ThreadPool_: + + if all { + switch v := interface{}(m.GetThreadPool()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AsyncFileManagerConfigValidationError{ + field: "ThreadPool", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AsyncFileManagerConfigValidationError{ + field: "ThreadPool", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetThreadPool()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AsyncFileManagerConfigValidationError{ + field: "ThreadPool", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := AsyncFileManagerConfigValidationError{ + field: "ManagerType", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return AsyncFileManagerConfigMultiError(errors) + } + return nil +} + +// AsyncFileManagerConfigMultiError is an error wrapping multiple validation +// errors returned by AsyncFileManagerConfig.ValidateAll() if the designated +// constraints aren't met. +type AsyncFileManagerConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AsyncFileManagerConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AsyncFileManagerConfigMultiError) AllErrors() []error { return m } + +// AsyncFileManagerConfigValidationError is the validation error returned by +// AsyncFileManagerConfig.Validate if the designated constraints aren't met. +type AsyncFileManagerConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AsyncFileManagerConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AsyncFileManagerConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AsyncFileManagerConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AsyncFileManagerConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AsyncFileManagerConfigValidationError) ErrorName() string { + return "AsyncFileManagerConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e AsyncFileManagerConfigValidationError) 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 %sAsyncFileManagerConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AsyncFileManagerConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AsyncFileManagerConfigValidationError{} + +// Validate checks the field values on AsyncFileManagerConfig_ThreadPool 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 *AsyncFileManagerConfig_ThreadPool) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AsyncFileManagerConfig_ThreadPool +// 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 +// AsyncFileManagerConfig_ThreadPoolMultiError, or nil if none found. +func (m *AsyncFileManagerConfig_ThreadPool) ValidateAll() error { + return m.validate(true) +} + +func (m *AsyncFileManagerConfig_ThreadPool) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for ThreadCount + + if len(errors) > 0 { + return AsyncFileManagerConfig_ThreadPoolMultiError(errors) + } + return nil +} + +// AsyncFileManagerConfig_ThreadPoolMultiError is an error wrapping multiple +// validation errors returned by +// AsyncFileManagerConfig_ThreadPool.ValidateAll() if the designated +// constraints aren't met. +type AsyncFileManagerConfig_ThreadPoolMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AsyncFileManagerConfig_ThreadPoolMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AsyncFileManagerConfig_ThreadPoolMultiError) AllErrors() []error { return m } + +// AsyncFileManagerConfig_ThreadPoolValidationError is the validation error +// returned by AsyncFileManagerConfig_ThreadPool.Validate if the designated +// constraints aren't met. +type AsyncFileManagerConfig_ThreadPoolValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AsyncFileManagerConfig_ThreadPoolValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AsyncFileManagerConfig_ThreadPoolValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AsyncFileManagerConfig_ThreadPoolValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AsyncFileManagerConfig_ThreadPoolValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AsyncFileManagerConfig_ThreadPoolValidationError) ErrorName() string { + return "AsyncFileManagerConfig_ThreadPoolValidationError" +} + +// Error satisfies the builtin error interface +func (e AsyncFileManagerConfig_ThreadPoolValidationError) 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 %sAsyncFileManagerConfig_ThreadPool.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AsyncFileManagerConfig_ThreadPoolValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AsyncFileManagerConfig_ThreadPoolValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/common/matching/v3/extension_matcher.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/common/matching/v3/extension_matcher.pb.go new file mode 100644 index 0000000000000..0e2a714ced8a7 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/common/matching/v3/extension_matcher.pb.go @@ -0,0 +1,229 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/common/matching/v3/extension_matcher.proto + +package matchingv3 + +import ( + _ "github.com/cilium/proxy/go/envoy/annotations" + v3 "github.com/cilium/proxy/go/envoy/config/common/matcher/v3" + v32 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + v31 "github.com/cncf/xds/go/xds/type/matcher/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Wrapper around an existing extension that provides an associated matcher. This allows +// decorating an existing extension with a matcher, which can be used to match against +// relevant protocol data. +type ExtensionWithMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The associated matcher. This is deprecated in favor of xds_matcher. + // + // Deprecated: Do not use. + Matcher *v3.Matcher `protobuf:"bytes,1,opt,name=matcher,proto3" json:"matcher,omitempty"` + // The associated matcher. + XdsMatcher *v31.Matcher `protobuf:"bytes,3,opt,name=xds_matcher,json=xdsMatcher,proto3" json:"xds_matcher,omitempty"` + // The underlying extension config. + ExtensionConfig *v32.TypedExtensionConfig `protobuf:"bytes,2,opt,name=extension_config,json=extensionConfig,proto3" json:"extension_config,omitempty"` +} + +func (x *ExtensionWithMatcher) Reset() { + *x = ExtensionWithMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_common_matching_v3_extension_matcher_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExtensionWithMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExtensionWithMatcher) ProtoMessage() {} + +func (x *ExtensionWithMatcher) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_common_matching_v3_extension_matcher_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExtensionWithMatcher.ProtoReflect.Descriptor instead. +func (*ExtensionWithMatcher) Descriptor() ([]byte, []int) { + return file_envoy_extensions_common_matching_v3_extension_matcher_proto_rawDescGZIP(), []int{0} +} + +// Deprecated: Do not use. +func (x *ExtensionWithMatcher) GetMatcher() *v3.Matcher { + if x != nil { + return x.Matcher + } + return nil +} + +func (x *ExtensionWithMatcher) GetXdsMatcher() *v31.Matcher { + if x != nil { + return x.XdsMatcher + } + return nil +} + +func (x *ExtensionWithMatcher) GetExtensionConfig() *v32.TypedExtensionConfig { + if x != nil { + return x.ExtensionConfig + } + return nil +} + +var File_envoy_extensions_common_matching_v3_extension_matcher_proto protoreflect.FileDescriptor + +var file_envoy_extensions_common_matching_v3_extension_matcher_proto_rawDesc = []byte{ + 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, + 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x23, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x33, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, + 0x76, 0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x90, 0x02, 0x0a, 0x14, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x12, 0x4e, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, + 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x12, 0x3d, 0x0a, 0x0b, 0x78, 0x64, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x52, 0x0a, 0x78, 0x64, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, + 0x5f, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x3a, 0x08, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x42, 0xab, 0x01, 0x0a, 0x31, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, + 0x42, 0x15, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x55, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, + 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_common_matching_v3_extension_matcher_proto_rawDescOnce sync.Once + file_envoy_extensions_common_matching_v3_extension_matcher_proto_rawDescData = file_envoy_extensions_common_matching_v3_extension_matcher_proto_rawDesc +) + +func file_envoy_extensions_common_matching_v3_extension_matcher_proto_rawDescGZIP() []byte { + file_envoy_extensions_common_matching_v3_extension_matcher_proto_rawDescOnce.Do(func() { + file_envoy_extensions_common_matching_v3_extension_matcher_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_common_matching_v3_extension_matcher_proto_rawDescData) + }) + return file_envoy_extensions_common_matching_v3_extension_matcher_proto_rawDescData +} + +var file_envoy_extensions_common_matching_v3_extension_matcher_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_common_matching_v3_extension_matcher_proto_goTypes = []interface{}{ + (*ExtensionWithMatcher)(nil), // 0: envoy.extensions.common.matching.v3.ExtensionWithMatcher + (*v3.Matcher)(nil), // 1: envoy.config.common.matcher.v3.Matcher + (*v31.Matcher)(nil), // 2: xds.type.matcher.v3.Matcher + (*v32.TypedExtensionConfig)(nil), // 3: envoy.config.core.v3.TypedExtensionConfig +} +var file_envoy_extensions_common_matching_v3_extension_matcher_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.common.matching.v3.ExtensionWithMatcher.matcher:type_name -> envoy.config.common.matcher.v3.Matcher + 2, // 1: envoy.extensions.common.matching.v3.ExtensionWithMatcher.xds_matcher:type_name -> xds.type.matcher.v3.Matcher + 3, // 2: envoy.extensions.common.matching.v3.ExtensionWithMatcher.extension_config:type_name -> envoy.config.core.v3.TypedExtensionConfig + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_common_matching_v3_extension_matcher_proto_init() } +func file_envoy_extensions_common_matching_v3_extension_matcher_proto_init() { + if File_envoy_extensions_common_matching_v3_extension_matcher_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_common_matching_v3_extension_matcher_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExtensionWithMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_common_matching_v3_extension_matcher_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_common_matching_v3_extension_matcher_proto_goTypes, + DependencyIndexes: file_envoy_extensions_common_matching_v3_extension_matcher_proto_depIdxs, + MessageInfos: file_envoy_extensions_common_matching_v3_extension_matcher_proto_msgTypes, + }.Build() + File_envoy_extensions_common_matching_v3_extension_matcher_proto = out.File + file_envoy_extensions_common_matching_v3_extension_matcher_proto_rawDesc = nil + file_envoy_extensions_common_matching_v3_extension_matcher_proto_goTypes = nil + file_envoy_extensions_common_matching_v3_extension_matcher_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/common/matching/v3/extension_matcher.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/common/matching/v3/extension_matcher.pb.validate.go new file mode 100644 index 0000000000000..1a3ad66911d7b --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/common/matching/v3/extension_matcher.pb.validate.go @@ -0,0 +1,235 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/common/matching/v3/extension_matcher.proto + +package matchingv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ExtensionWithMatcher 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 *ExtensionWithMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExtensionWithMatcher 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 +// ExtensionWithMatcherMultiError, or nil if none found. +func (m *ExtensionWithMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *ExtensionWithMatcher) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtensionWithMatcherValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtensionWithMatcherValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExtensionWithMatcherValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetXdsMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtensionWithMatcherValidationError{ + field: "XdsMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtensionWithMatcherValidationError{ + field: "XdsMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetXdsMatcher()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExtensionWithMatcherValidationError{ + field: "XdsMatcher", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetExtensionConfig() == nil { + err := ExtensionWithMatcherValidationError{ + field: "ExtensionConfig", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetExtensionConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtensionWithMatcherValidationError{ + field: "ExtensionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtensionWithMatcherValidationError{ + field: "ExtensionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExtensionConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExtensionWithMatcherValidationError{ + field: "ExtensionConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ExtensionWithMatcherMultiError(errors) + } + return nil +} + +// ExtensionWithMatcherMultiError is an error wrapping multiple validation +// errors returned by ExtensionWithMatcher.ValidateAll() if the designated +// constraints aren't met. +type ExtensionWithMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExtensionWithMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExtensionWithMatcherMultiError) AllErrors() []error { return m } + +// ExtensionWithMatcherValidationError is the validation error returned by +// ExtensionWithMatcher.Validate if the designated constraints aren't met. +type ExtensionWithMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExtensionWithMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExtensionWithMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExtensionWithMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExtensionWithMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExtensionWithMatcherValidationError) ErrorName() string { + return "ExtensionWithMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e ExtensionWithMatcherValidationError) 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 %sExtensionWithMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExtensionWithMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExtensionWithMatcherValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/common/tap/v3/common.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/common/tap/v3/common.pb.go new file mode 100644 index 0000000000000..3501b3783c27f --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/common/tap/v3/common.pb.go @@ -0,0 +1,299 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/common/tap/v3/common.proto + +package tapv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/tap/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Common configuration for all tap extensions. +type CommonExtensionConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to ConfigType: + // + // *CommonExtensionConfig_AdminConfig + // *CommonExtensionConfig_StaticConfig + ConfigType isCommonExtensionConfig_ConfigType `protobuf_oneof:"config_type"` +} + +func (x *CommonExtensionConfig) Reset() { + *x = CommonExtensionConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_common_tap_v3_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommonExtensionConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommonExtensionConfig) ProtoMessage() {} + +func (x *CommonExtensionConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_common_tap_v3_common_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommonExtensionConfig.ProtoReflect.Descriptor instead. +func (*CommonExtensionConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_common_tap_v3_common_proto_rawDescGZIP(), []int{0} +} + +func (m *CommonExtensionConfig) GetConfigType() isCommonExtensionConfig_ConfigType { + if m != nil { + return m.ConfigType + } + return nil +} + +func (x *CommonExtensionConfig) GetAdminConfig() *AdminConfig { + if x, ok := x.GetConfigType().(*CommonExtensionConfig_AdminConfig); ok { + return x.AdminConfig + } + return nil +} + +func (x *CommonExtensionConfig) GetStaticConfig() *v3.TapConfig { + if x, ok := x.GetConfigType().(*CommonExtensionConfig_StaticConfig); ok { + return x.StaticConfig + } + return nil +} + +type isCommonExtensionConfig_ConfigType interface { + isCommonExtensionConfig_ConfigType() +} + +type CommonExtensionConfig_AdminConfig struct { + // If specified, the tap filter will be configured via an admin handler. + AdminConfig *AdminConfig `protobuf:"bytes,1,opt,name=admin_config,json=adminConfig,proto3,oneof"` +} + +type CommonExtensionConfig_StaticConfig struct { + // If specified, the tap filter will be configured via a static configuration that cannot be + // changed. + StaticConfig *v3.TapConfig `protobuf:"bytes,2,opt,name=static_config,json=staticConfig,proto3,oneof"` +} + +func (*CommonExtensionConfig_AdminConfig) isCommonExtensionConfig_ConfigType() {} + +func (*CommonExtensionConfig_StaticConfig) isCommonExtensionConfig_ConfigType() {} + +// Configuration for the admin handler. See :ref:`here ` for +// more information. +type AdminConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Opaque configuration ID. When requests are made to the admin handler, the passed opaque ID is + // matched to the configured filter opaque ID to determine which filter to configure. + ConfigId string `protobuf:"bytes,1,opt,name=config_id,json=configId,proto3" json:"config_id,omitempty"` +} + +func (x *AdminConfig) Reset() { + *x = AdminConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_common_tap_v3_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AdminConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdminConfig) ProtoMessage() {} + +func (x *AdminConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_common_tap_v3_common_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdminConfig.ProtoReflect.Descriptor instead. +func (*AdminConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_common_tap_v3_common_proto_rawDescGZIP(), []int{1} +} + +func (x *AdminConfig) GetConfigId() string { + if x != nil { + return x.ConfigId + } + return "" +} + +var File_envoy_extensions_common_tap_v3_common_proto protoreflect.FileDescriptor + +var file_envoy_extensions_common_tap_v3_common_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x33, + 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x1a, 0x20, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x61, 0x70, 0x2f, + 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0x82, 0x02, 0x0a, 0x15, 0x43, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x50, 0x0a, 0x0c, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x6d, 0x69, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x61, 0x70, + 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x61, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, + 0x0c, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x3c, 0x9a, + 0xc5, 0x88, 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x12, 0x0a, 0x0b, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, + 0x67, 0x0a, 0x0b, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x24, + 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x49, 0x64, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x64, 0x6d, + 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x92, 0x01, 0x0a, 0x2c, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x33, 0x3b, + 0x74, 0x61, 0x70, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_common_tap_v3_common_proto_rawDescOnce sync.Once + file_envoy_extensions_common_tap_v3_common_proto_rawDescData = file_envoy_extensions_common_tap_v3_common_proto_rawDesc +) + +func file_envoy_extensions_common_tap_v3_common_proto_rawDescGZIP() []byte { + file_envoy_extensions_common_tap_v3_common_proto_rawDescOnce.Do(func() { + file_envoy_extensions_common_tap_v3_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_common_tap_v3_common_proto_rawDescData) + }) + return file_envoy_extensions_common_tap_v3_common_proto_rawDescData +} + +var file_envoy_extensions_common_tap_v3_common_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_common_tap_v3_common_proto_goTypes = []interface{}{ + (*CommonExtensionConfig)(nil), // 0: envoy.extensions.common.tap.v3.CommonExtensionConfig + (*AdminConfig)(nil), // 1: envoy.extensions.common.tap.v3.AdminConfig + (*v3.TapConfig)(nil), // 2: envoy.config.tap.v3.TapConfig +} +var file_envoy_extensions_common_tap_v3_common_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.common.tap.v3.CommonExtensionConfig.admin_config:type_name -> envoy.extensions.common.tap.v3.AdminConfig + 2, // 1: envoy.extensions.common.tap.v3.CommonExtensionConfig.static_config:type_name -> envoy.config.tap.v3.TapConfig + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_common_tap_v3_common_proto_init() } +func file_envoy_extensions_common_tap_v3_common_proto_init() { + if File_envoy_extensions_common_tap_v3_common_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_common_tap_v3_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommonExtensionConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_common_tap_v3_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AdminConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_common_tap_v3_common_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*CommonExtensionConfig_AdminConfig)(nil), + (*CommonExtensionConfig_StaticConfig)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_common_tap_v3_common_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_common_tap_v3_common_proto_goTypes, + DependencyIndexes: file_envoy_extensions_common_tap_v3_common_proto_depIdxs, + MessageInfos: file_envoy_extensions_common_tap_v3_common_proto_msgTypes, + }.Build() + File_envoy_extensions_common_tap_v3_common_proto = out.File + file_envoy_extensions_common_tap_v3_common_proto_rawDesc = nil + file_envoy_extensions_common_tap_v3_common_proto_goTypes = nil + file_envoy_extensions_common_tap_v3_common_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/common/tap/v3/common.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/common/tap/v3/common.pb.validate.go new file mode 100644 index 0000000000000..42bda056bc07e --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/common/tap/v3/common.pb.validate.go @@ -0,0 +1,322 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/common/tap/v3/common.proto + +package tapv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on CommonExtensionConfig 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 *CommonExtensionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CommonExtensionConfig 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 +// CommonExtensionConfigMultiError, or nil if none found. +func (m *CommonExtensionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *CommonExtensionConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.ConfigType.(type) { + + case *CommonExtensionConfig_AdminConfig: + + if all { + switch v := interface{}(m.GetAdminConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonExtensionConfigValidationError{ + field: "AdminConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonExtensionConfigValidationError{ + field: "AdminConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAdminConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommonExtensionConfigValidationError{ + field: "AdminConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *CommonExtensionConfig_StaticConfig: + + if all { + switch v := interface{}(m.GetStaticConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonExtensionConfigValidationError{ + field: "StaticConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonExtensionConfigValidationError{ + field: "StaticConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStaticConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommonExtensionConfigValidationError{ + field: "StaticConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := CommonExtensionConfigValidationError{ + field: "ConfigType", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return CommonExtensionConfigMultiError(errors) + } + return nil +} + +// CommonExtensionConfigMultiError is an error wrapping multiple validation +// errors returned by CommonExtensionConfig.ValidateAll() if the designated +// constraints aren't met. +type CommonExtensionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CommonExtensionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CommonExtensionConfigMultiError) AllErrors() []error { return m } + +// CommonExtensionConfigValidationError is the validation error returned by +// CommonExtensionConfig.Validate if the designated constraints aren't met. +type CommonExtensionConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CommonExtensionConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CommonExtensionConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CommonExtensionConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CommonExtensionConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CommonExtensionConfigValidationError) ErrorName() string { + return "CommonExtensionConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e CommonExtensionConfigValidationError) 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 %sCommonExtensionConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CommonExtensionConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CommonExtensionConfigValidationError{} + +// Validate checks the field values on AdminConfig 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 *AdminConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AdminConfig 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 AdminConfigMultiError, or +// nil if none found. +func (m *AdminConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *AdminConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetConfigId()) < 1 { + err := AdminConfigValidationError{ + field: "ConfigId", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return AdminConfigMultiError(errors) + } + return nil +} + +// AdminConfigMultiError is an error wrapping multiple validation errors +// returned by AdminConfig.ValidateAll() if the designated constraints aren't met. +type AdminConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AdminConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AdminConfigMultiError) AllErrors() []error { return m } + +// AdminConfigValidationError is the validation error returned by +// AdminConfig.Validate if the designated constraints aren't met. +type AdminConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AdminConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AdminConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AdminConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AdminConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AdminConfigValidationError) ErrorName() string { return "AdminConfigValidationError" } + +// Error satisfies the builtin error interface +func (e AdminConfigValidationError) 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 %sAdminConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AdminConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AdminConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/brotli/compressor/v3/brotli.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/brotli/compressor/v3/brotli.pb.go new file mode 100644 index 0000000000000..fa06a5781a993 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/brotli/compressor/v3/brotli.pb.go @@ -0,0 +1,323 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/compression/brotli/compressor/v3/brotli.proto + +package compressorv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Brotli_EncoderMode int32 + +const ( + Brotli_DEFAULT Brotli_EncoderMode = 0 + Brotli_GENERIC Brotli_EncoderMode = 1 + Brotli_TEXT Brotli_EncoderMode = 2 + Brotli_FONT Brotli_EncoderMode = 3 +) + +// Enum value maps for Brotli_EncoderMode. +var ( + Brotli_EncoderMode_name = map[int32]string{ + 0: "DEFAULT", + 1: "GENERIC", + 2: "TEXT", + 3: "FONT", + } + Brotli_EncoderMode_value = map[string]int32{ + "DEFAULT": 0, + "GENERIC": 1, + "TEXT": 2, + "FONT": 3, + } +) + +func (x Brotli_EncoderMode) Enum() *Brotli_EncoderMode { + p := new(Brotli_EncoderMode) + *p = x + return p +} + +func (x Brotli_EncoderMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Brotli_EncoderMode) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_enumTypes[0].Descriptor() +} + +func (Brotli_EncoderMode) Type() protoreflect.EnumType { + return &file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_enumTypes[0] +} + +func (x Brotli_EncoderMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Brotli_EncoderMode.Descriptor instead. +func (Brotli_EncoderMode) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDescGZIP(), []int{0, 0} +} + +// [#next-free-field: 7] +type Brotli struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Value from 0 to 11 that controls the main compression speed-density lever. + // The higher quality, the slower compression. The default value is 3. + Quality *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=quality,proto3" json:"quality,omitempty"` + // A value used to tune encoder for specific input. For more information about modes, + // please refer to brotli manual: https://brotli.org/encode.html#aa6f + // This field will be set to "DEFAULT" if not specified. + EncoderMode Brotli_EncoderMode `protobuf:"varint,2,opt,name=encoder_mode,json=encoderMode,proto3,enum=envoy.extensions.compression.brotli.compressor.v3.Brotli_EncoderMode" json:"encoder_mode,omitempty"` + // Value from 10 to 24 that represents the base two logarithmic of the compressor's window size. + // Larger window results in better compression at the expense of memory usage. The default is 18. + // For more details about this parameter, please refer to brotli manual: + // https://brotli.org/encode.html#a9a8 + WindowBits *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=window_bits,json=windowBits,proto3" json:"window_bits,omitempty"` + // Value from 16 to 24 that represents the base two logarithmic of the compressor's input block + // size. Larger input block results in better compression at the expense of memory usage. The + // default is 24. For more details about this parameter, please refer to brotli manual: + // https://brotli.org/encode.html#a9a8 + InputBlockBits *wrapperspb.UInt32Value `protobuf:"bytes,4,opt,name=input_block_bits,json=inputBlockBits,proto3" json:"input_block_bits,omitempty"` + // Value for compressor's next output buffer. If not set, defaults to 4096. + ChunkSize *wrapperspb.UInt32Value `protobuf:"bytes,5,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"` + // If true, disables "literal context modeling" format feature. + // This flag is a "decoding-speed vs compression ratio" trade-off. + DisableLiteralContextModeling bool `protobuf:"varint,6,opt,name=disable_literal_context_modeling,json=disableLiteralContextModeling,proto3" json:"disable_literal_context_modeling,omitempty"` +} + +func (x *Brotli) Reset() { + *x = Brotli{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Brotli) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Brotli) ProtoMessage() {} + +func (x *Brotli) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Brotli.ProtoReflect.Descriptor instead. +func (*Brotli) Descriptor() ([]byte, []int) { + return file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDescGZIP(), []int{0} +} + +func (x *Brotli) GetQuality() *wrapperspb.UInt32Value { + if x != nil { + return x.Quality + } + return nil +} + +func (x *Brotli) GetEncoderMode() Brotli_EncoderMode { + if x != nil { + return x.EncoderMode + } + return Brotli_DEFAULT +} + +func (x *Brotli) GetWindowBits() *wrapperspb.UInt32Value { + if x != nil { + return x.WindowBits + } + return nil +} + +func (x *Brotli) GetInputBlockBits() *wrapperspb.UInt32Value { + if x != nil { + return x.InputBlockBits + } + return nil +} + +func (x *Brotli) GetChunkSize() *wrapperspb.UInt32Value { + if x != nil { + return x.ChunkSize + } + return nil +} + +func (x *Brotli) GetDisableLiteralContextModeling() bool { + if x != nil { + return x.DisableLiteralContextModeling + } + return false +} + +var File_envoy_extensions_compression_brotli_compressor_v3_brotli_proto protoreflect.FileDescriptor + +var file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDesc = []byte{ + 0x0a, 0x3e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x62, + 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, + 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, + 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, + 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xab, 0x04, 0x0a, 0x06, + 0x42, 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x12, 0x3f, 0x0a, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x0b, 0x52, 0x07, + 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x72, 0x0a, 0x0c, 0x65, 0x6e, 0x63, 0x6f, 0x64, + 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x45, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x72, 0x6f, + 0x74, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, + 0x33, 0x2e, 0x42, 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, + 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, + 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x77, + 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, + 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0x18, 0x28, 0x0a, 0x52, 0x0a, 0x77, 0x69, 0x6e, 0x64, 0x6f, + 0x77, 0x42, 0x69, 0x74, 0x73, 0x12, 0x51, 0x0a, 0x10, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, 0xfa, + 0x42, 0x06, 0x2a, 0x04, 0x18, 0x18, 0x28, 0x10, 0x52, 0x0e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x69, 0x74, 0x73, 0x12, 0x49, 0x0a, 0x0a, 0x63, 0x68, 0x75, 0x6e, + 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, + 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x2a, + 0x07, 0x18, 0x80, 0x80, 0x04, 0x28, 0x80, 0x20, 0x52, 0x09, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x53, + 0x69, 0x7a, 0x65, 0x12, 0x47, 0x0a, 0x20, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6c, + 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x64, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x22, 0x3b, 0x0a, 0x0b, + 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, + 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x45, 0x4e, 0x45, + 0x52, 0x49, 0x43, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x45, 0x58, 0x54, 0x10, 0x02, 0x12, + 0x08, 0x0a, 0x04, 0x46, 0x4f, 0x4e, 0x54, 0x10, 0x03, 0x42, 0xbf, 0x01, 0x0a, 0x3f, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x42, + 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x65, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x2f, 0x62, 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, + 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDescOnce sync.Once + file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDescData = file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDesc +) + +func file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDescGZIP() []byte { + file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDescOnce.Do(func() { + file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDescData) + }) + return file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDescData +} + +var file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_goTypes = []interface{}{ + (Brotli_EncoderMode)(0), // 0: envoy.extensions.compression.brotli.compressor.v3.Brotli.EncoderMode + (*Brotli)(nil), // 1: envoy.extensions.compression.brotli.compressor.v3.Brotli + (*wrapperspb.UInt32Value)(nil), // 2: google.protobuf.UInt32Value +} +var file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.compression.brotli.compressor.v3.Brotli.quality:type_name -> google.protobuf.UInt32Value + 0, // 1: envoy.extensions.compression.brotli.compressor.v3.Brotli.encoder_mode:type_name -> envoy.extensions.compression.brotli.compressor.v3.Brotli.EncoderMode + 2, // 2: envoy.extensions.compression.brotli.compressor.v3.Brotli.window_bits:type_name -> google.protobuf.UInt32Value + 2, // 3: envoy.extensions.compression.brotli.compressor.v3.Brotli.input_block_bits:type_name -> google.protobuf.UInt32Value + 2, // 4: envoy.extensions.compression.brotli.compressor.v3.Brotli.chunk_size:type_name -> google.protobuf.UInt32Value + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_init() } +func file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_init() { + if File_envoy_extensions_compression_brotli_compressor_v3_brotli_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Brotli); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_goTypes, + DependencyIndexes: file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_depIdxs, + EnumInfos: file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_enumTypes, + MessageInfos: file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_msgTypes, + }.Build() + File_envoy_extensions_compression_brotli_compressor_v3_brotli_proto = out.File + file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_rawDesc = nil + file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_goTypes = nil + file_envoy_extensions_compression_brotli_compressor_v3_brotli_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/brotli/compressor/v3/brotli.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/brotli/compressor/v3/brotli.pb.validate.go new file mode 100644 index 0000000000000..cbf82a35d1dc0 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/brotli/compressor/v3/brotli.pb.validate.go @@ -0,0 +1,206 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/compression/brotli/compressor/v3/brotli.proto + +package compressorv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Brotli 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 *Brotli) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Brotli 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 BrotliMultiError, or nil if none found. +func (m *Brotli) ValidateAll() error { + return m.validate(true) +} + +func (m *Brotli) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if wrapper := m.GetQuality(); wrapper != nil { + + if wrapper.GetValue() > 11 { + err := BrotliValidationError{ + field: "Quality", + reason: "value must be less than or equal to 11", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if _, ok := Brotli_EncoderMode_name[int32(m.GetEncoderMode())]; !ok { + err := BrotliValidationError{ + field: "EncoderMode", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if wrapper := m.GetWindowBits(); wrapper != nil { + + if val := wrapper.GetValue(); val < 10 || val > 24 { + err := BrotliValidationError{ + field: "WindowBits", + reason: "value must be inside range [10, 24]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if wrapper := m.GetInputBlockBits(); wrapper != nil { + + if val := wrapper.GetValue(); val < 16 || val > 24 { + err := BrotliValidationError{ + field: "InputBlockBits", + reason: "value must be inside range [16, 24]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if wrapper := m.GetChunkSize(); wrapper != nil { + + if val := wrapper.GetValue(); val < 4096 || val > 65536 { + err := BrotliValidationError{ + field: "ChunkSize", + reason: "value must be inside range [4096, 65536]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + // no validation rules for DisableLiteralContextModeling + + if len(errors) > 0 { + return BrotliMultiError(errors) + } + return nil +} + +// BrotliMultiError is an error wrapping multiple validation errors returned by +// Brotli.ValidateAll() if the designated constraints aren't met. +type BrotliMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BrotliMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BrotliMultiError) AllErrors() []error { return m } + +// BrotliValidationError is the validation error returned by Brotli.Validate if +// the designated constraints aren't met. +type BrotliValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BrotliValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BrotliValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BrotliValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BrotliValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BrotliValidationError) ErrorName() string { return "BrotliValidationError" } + +// Error satisfies the builtin error interface +func (e BrotliValidationError) 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 %sBrotli.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BrotliValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BrotliValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/brotli/decompressor/v3/brotli.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/brotli/decompressor/v3/brotli.pb.go new file mode 100644 index 0000000000000..efd85b3598e7b --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/brotli/decompressor/v3/brotli.pb.go @@ -0,0 +1,193 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/compression/brotli/decompressor/v3/brotli.proto + +package decompressorv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Brotli struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If true, disables "canny" ring buffer allocation strategy. + // Ring buffer is allocated according to window size, despite the real size of the content. + DisableRingBufferReallocation bool `protobuf:"varint,1,opt,name=disable_ring_buffer_reallocation,json=disableRingBufferReallocation,proto3" json:"disable_ring_buffer_reallocation,omitempty"` + // Value for decompressor's next output buffer. If not set, defaults to 4096. + ChunkSize *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"` +} + +func (x *Brotli) Reset() { + *x = Brotli{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Brotli) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Brotli) ProtoMessage() {} + +func (x *Brotli) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Brotli.ProtoReflect.Descriptor instead. +func (*Brotli) Descriptor() ([]byte, []int) { + return file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDescGZIP(), []int{0} +} + +func (x *Brotli) GetDisableRingBufferReallocation() bool { + if x != nil { + return x.DisableRingBufferReallocation + } + return false +} + +func (x *Brotli) GetChunkSize() *wrapperspb.UInt32Value { + if x != nil { + return x.ChunkSize + } + return nil +} + +var File_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto protoreflect.FileDescriptor + +var file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDesc = []byte{ + 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x62, + 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x2f, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, + 0x6f, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x2e, 0x62, 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x2e, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 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, + 0x9c, 0x01, 0x0a, 0x06, 0x42, 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x12, 0x47, 0x0a, 0x20, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, + 0x72, 0x5f, 0x72, 0x65, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x69, 0x6e, + 0x67, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x52, 0x65, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x0a, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x2a, 0x07, 0x18, 0x80, 0x80, 0x04, + 0x28, 0x80, 0x20, 0x52, 0x09, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x42, 0xc5, + 0x01, 0x0a, 0x41, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x62, 0x72, + 0x6f, 0x74, 0x6c, 0x69, 0x2e, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, + 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x42, 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x69, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x62, 0x72, 0x6f, 0x74, 0x6c, 0x69, 0x2f, + 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x33, 0x3b, + 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDescOnce sync.Once + file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDescData = file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDesc +) + +func file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDescGZIP() []byte { + file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDescOnce.Do(func() { + file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDescData) + }) + return file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDescData +} + +var file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_goTypes = []interface{}{ + (*Brotli)(nil), // 0: envoy.extensions.compression.brotli.decompressor.v3.Brotli + (*wrapperspb.UInt32Value)(nil), // 1: google.protobuf.UInt32Value +} +var file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.compression.brotli.decompressor.v3.Brotli.chunk_size:type_name -> google.protobuf.UInt32Value + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_init() } +func file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_init() { + if File_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Brotli); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_goTypes, + DependencyIndexes: file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_depIdxs, + MessageInfos: file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_msgTypes, + }.Build() + File_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto = out.File + file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_rawDesc = nil + file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_goTypes = nil + file_envoy_extensions_compression_brotli_decompressor_v3_brotli_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/brotli/decompressor/v3/brotli.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/brotli/decompressor/v3/brotli.pb.validate.go new file mode 100644 index 0000000000000..0b40e4792d126 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/brotli/decompressor/v3/brotli.pb.validate.go @@ -0,0 +1,150 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/compression/brotli/decompressor/v3/brotli.proto + +package decompressorv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Brotli 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 *Brotli) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Brotli 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 BrotliMultiError, or nil if none found. +func (m *Brotli) ValidateAll() error { + return m.validate(true) +} + +func (m *Brotli) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for DisableRingBufferReallocation + + if wrapper := m.GetChunkSize(); wrapper != nil { + + if val := wrapper.GetValue(); val < 4096 || val > 65536 { + err := BrotliValidationError{ + field: "ChunkSize", + reason: "value must be inside range [4096, 65536]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if len(errors) > 0 { + return BrotliMultiError(errors) + } + return nil +} + +// BrotliMultiError is an error wrapping multiple validation errors returned by +// Brotli.ValidateAll() if the designated constraints aren't met. +type BrotliMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BrotliMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BrotliMultiError) AllErrors() []error { return m } + +// BrotliValidationError is the validation error returned by Brotli.Validate if +// the designated constraints aren't met. +type BrotliValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BrotliValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BrotliValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BrotliValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BrotliValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BrotliValidationError) ErrorName() string { return "BrotliValidationError" } + +// Error satisfies the builtin error interface +func (e BrotliValidationError) 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 %sBrotli.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BrotliValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BrotliValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/gzip/compressor/v3/gzip.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/gzip/compressor/v3/gzip.pb.go new file mode 100644 index 0000000000000..a898aad5096f9 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/gzip/compressor/v3/gzip.pb.go @@ -0,0 +1,424 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/compression/gzip/compressor/v3/gzip.proto + +package compressorv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// All the values of this enumeration translate directly to zlib's compression strategies. +// For more information about each strategy, please refer to zlib manual. +type Gzip_CompressionStrategy int32 + +const ( + Gzip_DEFAULT_STRATEGY Gzip_CompressionStrategy = 0 + Gzip_FILTERED Gzip_CompressionStrategy = 1 + Gzip_HUFFMAN_ONLY Gzip_CompressionStrategy = 2 + Gzip_RLE Gzip_CompressionStrategy = 3 + Gzip_FIXED Gzip_CompressionStrategy = 4 +) + +// Enum value maps for Gzip_CompressionStrategy. +var ( + Gzip_CompressionStrategy_name = map[int32]string{ + 0: "DEFAULT_STRATEGY", + 1: "FILTERED", + 2: "HUFFMAN_ONLY", + 3: "RLE", + 4: "FIXED", + } + Gzip_CompressionStrategy_value = map[string]int32{ + "DEFAULT_STRATEGY": 0, + "FILTERED": 1, + "HUFFMAN_ONLY": 2, + "RLE": 3, + "FIXED": 4, + } +) + +func (x Gzip_CompressionStrategy) Enum() *Gzip_CompressionStrategy { + p := new(Gzip_CompressionStrategy) + *p = x + return p +} + +func (x Gzip_CompressionStrategy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Gzip_CompressionStrategy) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_enumTypes[0].Descriptor() +} + +func (Gzip_CompressionStrategy) Type() protoreflect.EnumType { + return &file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_enumTypes[0] +} + +func (x Gzip_CompressionStrategy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Gzip_CompressionStrategy.Descriptor instead. +func (Gzip_CompressionStrategy) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_rawDescGZIP(), []int{0, 0} +} + +type Gzip_CompressionLevel int32 + +const ( + Gzip_DEFAULT_COMPRESSION Gzip_CompressionLevel = 0 + Gzip_BEST_SPEED Gzip_CompressionLevel = 1 + Gzip_COMPRESSION_LEVEL_1 Gzip_CompressionLevel = 1 + Gzip_COMPRESSION_LEVEL_2 Gzip_CompressionLevel = 2 + Gzip_COMPRESSION_LEVEL_3 Gzip_CompressionLevel = 3 + Gzip_COMPRESSION_LEVEL_4 Gzip_CompressionLevel = 4 + Gzip_COMPRESSION_LEVEL_5 Gzip_CompressionLevel = 5 + Gzip_COMPRESSION_LEVEL_6 Gzip_CompressionLevel = 6 + Gzip_COMPRESSION_LEVEL_7 Gzip_CompressionLevel = 7 + Gzip_COMPRESSION_LEVEL_8 Gzip_CompressionLevel = 8 + Gzip_COMPRESSION_LEVEL_9 Gzip_CompressionLevel = 9 + Gzip_BEST_COMPRESSION Gzip_CompressionLevel = 9 +) + +// Enum value maps for Gzip_CompressionLevel. +var ( + Gzip_CompressionLevel_name = map[int32]string{ + 0: "DEFAULT_COMPRESSION", + 1: "BEST_SPEED", + // Duplicate value: 1: "COMPRESSION_LEVEL_1", + 2: "COMPRESSION_LEVEL_2", + 3: "COMPRESSION_LEVEL_3", + 4: "COMPRESSION_LEVEL_4", + 5: "COMPRESSION_LEVEL_5", + 6: "COMPRESSION_LEVEL_6", + 7: "COMPRESSION_LEVEL_7", + 8: "COMPRESSION_LEVEL_8", + 9: "COMPRESSION_LEVEL_9", + // Duplicate value: 9: "BEST_COMPRESSION", + } + Gzip_CompressionLevel_value = map[string]int32{ + "DEFAULT_COMPRESSION": 0, + "BEST_SPEED": 1, + "COMPRESSION_LEVEL_1": 1, + "COMPRESSION_LEVEL_2": 2, + "COMPRESSION_LEVEL_3": 3, + "COMPRESSION_LEVEL_4": 4, + "COMPRESSION_LEVEL_5": 5, + "COMPRESSION_LEVEL_6": 6, + "COMPRESSION_LEVEL_7": 7, + "COMPRESSION_LEVEL_8": 8, + "COMPRESSION_LEVEL_9": 9, + "BEST_COMPRESSION": 9, + } +) + +func (x Gzip_CompressionLevel) Enum() *Gzip_CompressionLevel { + p := new(Gzip_CompressionLevel) + *p = x + return p +} + +func (x Gzip_CompressionLevel) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Gzip_CompressionLevel) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_enumTypes[1].Descriptor() +} + +func (Gzip_CompressionLevel) Type() protoreflect.EnumType { + return &file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_enumTypes[1] +} + +func (x Gzip_CompressionLevel) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Gzip_CompressionLevel.Descriptor instead. +func (Gzip_CompressionLevel) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_rawDescGZIP(), []int{0, 1} +} + +// [#next-free-field: 6] +type Gzip struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Value from 1 to 9 that controls the amount of internal memory used by zlib. Higher values + // use more memory, but are faster and produce better compression results. The default value is 5. + MemoryLevel *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=memory_level,json=memoryLevel,proto3" json:"memory_level,omitempty"` + // A value used for selecting the zlib compression level. This setting will affect speed and + // amount of compression applied to the content. "BEST_COMPRESSION" provides higher compression + // at the cost of higher latency and is equal to "COMPRESSION_LEVEL_9". "BEST_SPEED" provides + // lower compression with minimum impact on response time, the same as "COMPRESSION_LEVEL_1". + // "DEFAULT_COMPRESSION" provides an optimal result between speed and compression. According + // to zlib's manual this level gives the same result as "COMPRESSION_LEVEL_6". + // This field will be set to "DEFAULT_COMPRESSION" if not specified. + CompressionLevel Gzip_CompressionLevel `protobuf:"varint,2,opt,name=compression_level,json=compressionLevel,proto3,enum=envoy.extensions.compression.gzip.compressor.v3.Gzip_CompressionLevel" json:"compression_level,omitempty"` + // A value used for selecting the zlib compression strategy which is directly related to the + // characteristics of the content. Most of the time "DEFAULT_STRATEGY" will be the best choice, + // which is also the default value for the parameter, though there are situations when + // changing this parameter might produce better results. For example, run-length encoding (RLE) + // is typically used when the content is known for having sequences which same data occurs many + // consecutive times. For more information about each strategy, please refer to zlib manual. + CompressionStrategy Gzip_CompressionStrategy `protobuf:"varint,3,opt,name=compression_strategy,json=compressionStrategy,proto3,enum=envoy.extensions.compression.gzip.compressor.v3.Gzip_CompressionStrategy" json:"compression_strategy,omitempty"` + // Value from 9 to 15 that represents the base two logarithmic of the compressor's window size. + // Larger window results in better compression at the expense of memory usage. The default is 12 + // which will produce a 4096 bytes window. For more details about this parameter, please refer to + // zlib manual > deflateInit2. + WindowBits *wrapperspb.UInt32Value `protobuf:"bytes,4,opt,name=window_bits,json=windowBits,proto3" json:"window_bits,omitempty"` + // Value for Zlib's next output buffer. If not set, defaults to 4096. + // See https://www.zlib.net/manual.html for more details. Also see + // https://github.com/envoyproxy/envoy/issues/8448 for context on this filter's performance. + ChunkSize *wrapperspb.UInt32Value `protobuf:"bytes,5,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"` +} + +func (x *Gzip) Reset() { + *x = Gzip{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Gzip) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Gzip) ProtoMessage() {} + +func (x *Gzip) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Gzip.ProtoReflect.Descriptor instead. +func (*Gzip) Descriptor() ([]byte, []int) { + return file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_rawDescGZIP(), []int{0} +} + +func (x *Gzip) GetMemoryLevel() *wrapperspb.UInt32Value { + if x != nil { + return x.MemoryLevel + } + return nil +} + +func (x *Gzip) GetCompressionLevel() Gzip_CompressionLevel { + if x != nil { + return x.CompressionLevel + } + return Gzip_DEFAULT_COMPRESSION +} + +func (x *Gzip) GetCompressionStrategy() Gzip_CompressionStrategy { + if x != nil { + return x.CompressionStrategy + } + return Gzip_DEFAULT_STRATEGY +} + +func (x *Gzip) GetWindowBits() *wrapperspb.UInt32Value { + if x != nil { + return x.WindowBits + } + return nil +} + +func (x *Gzip) GetChunkSize() *wrapperspb.UInt32Value { + if x != nil { + return x.ChunkSize + } + return nil +} + +var File_envoy_extensions_compression_gzip_compressor_v3_gzip_proto protoreflect.FileDescriptor + +var file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_rawDesc = []byte{ + 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x67, + 0x7a, 0x69, 0x70, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2f, 0x76, + 0x33, 0x2f, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, + 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x89, 0x07, 0x0a, 0x04, 0x47, 0x7a, 0x69, 0x70, 0x12, 0x4a, + 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0x09, 0x28, 0x01, 0x52, 0x0b, 0x6d, + 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x7d, 0x0a, 0x11, 0x63, 0x6f, + 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x7a, 0x69, 0x70, 0x2e, 0x43, 0x6f, 0x6d, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x86, 0x01, 0x0a, 0x14, 0x63, 0x6f, + 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x67, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x49, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x7a, 0x69, 0x70, 0x2e, + 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, + 0x65, 0x67, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x63, + 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x67, 0x79, 0x12, 0x48, 0x0a, 0x0b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x62, 0x69, 0x74, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0x0f, 0x28, 0x09, + 0x52, 0x0a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x42, 0x69, 0x74, 0x73, 0x12, 0x49, 0x0a, 0x0a, + 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, + 0xfa, 0x42, 0x09, 0x2a, 0x07, 0x18, 0x80, 0x80, 0x04, 0x28, 0x80, 0x20, 0x52, 0x09, 0x63, 0x68, + 0x75, 0x6e, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x5f, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x14, + 0x0a, 0x10, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, + 0x47, 0x59, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x45, 0x44, + 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x48, 0x55, 0x46, 0x46, 0x4d, 0x41, 0x4e, 0x5f, 0x4f, 0x4e, + 0x4c, 0x59, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x52, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x09, 0x0a, + 0x05, 0x46, 0x49, 0x58, 0x45, 0x44, 0x10, 0x04, 0x22, 0xb6, 0x02, 0x0a, 0x10, 0x43, 0x6f, 0x6d, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, + 0x13, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, + 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x53, + 0x50, 0x45, 0x45, 0x44, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, + 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x31, 0x10, 0x01, 0x12, + 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, + 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x32, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, + 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x33, 0x10, + 0x03, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, + 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x34, 0x10, 0x04, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, + 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, + 0x35, 0x10, 0x05, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, + 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x36, 0x10, 0x06, 0x12, 0x17, 0x0a, 0x13, + 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, + 0x4c, 0x5f, 0x37, 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, + 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x38, 0x10, 0x08, 0x12, 0x17, + 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, + 0x56, 0x45, 0x4c, 0x5f, 0x39, 0x10, 0x09, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x45, 0x53, 0x54, 0x5f, + 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x09, 0x1a, 0x02, 0x10, + 0x01, 0x42, 0xb9, 0x01, 0x0a, 0x3d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, + 0x2e, 0x76, 0x33, 0x42, 0x09, 0x47, 0x7a, 0x69, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x63, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x7a, 0x69, 0x70, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_rawDescOnce sync.Once + file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_rawDescData = file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_rawDesc +) + +func file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_rawDescGZIP() []byte { + file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_rawDescOnce.Do(func() { + file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_rawDescData) + }) + return file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_rawDescData +} + +var file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_goTypes = []interface{}{ + (Gzip_CompressionStrategy)(0), // 0: envoy.extensions.compression.gzip.compressor.v3.Gzip.CompressionStrategy + (Gzip_CompressionLevel)(0), // 1: envoy.extensions.compression.gzip.compressor.v3.Gzip.CompressionLevel + (*Gzip)(nil), // 2: envoy.extensions.compression.gzip.compressor.v3.Gzip + (*wrapperspb.UInt32Value)(nil), // 3: google.protobuf.UInt32Value +} +var file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_depIdxs = []int32{ + 3, // 0: envoy.extensions.compression.gzip.compressor.v3.Gzip.memory_level:type_name -> google.protobuf.UInt32Value + 1, // 1: envoy.extensions.compression.gzip.compressor.v3.Gzip.compression_level:type_name -> envoy.extensions.compression.gzip.compressor.v3.Gzip.CompressionLevel + 0, // 2: envoy.extensions.compression.gzip.compressor.v3.Gzip.compression_strategy:type_name -> envoy.extensions.compression.gzip.compressor.v3.Gzip.CompressionStrategy + 3, // 3: envoy.extensions.compression.gzip.compressor.v3.Gzip.window_bits:type_name -> google.protobuf.UInt32Value + 3, // 4: envoy.extensions.compression.gzip.compressor.v3.Gzip.chunk_size:type_name -> google.protobuf.UInt32Value + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_init() } +func file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_init() { + if File_envoy_extensions_compression_gzip_compressor_v3_gzip_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Gzip); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_rawDesc, + NumEnums: 2, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_goTypes, + DependencyIndexes: file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_depIdxs, + EnumInfos: file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_enumTypes, + MessageInfos: file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_msgTypes, + }.Build() + File_envoy_extensions_compression_gzip_compressor_v3_gzip_proto = out.File + file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_rawDesc = nil + file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_goTypes = nil + file_envoy_extensions_compression_gzip_compressor_v3_gzip_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/gzip/compressor/v3/gzip.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/gzip/compressor/v3/gzip.pb.validate.go new file mode 100644 index 0000000000000..04728781e19f1 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/gzip/compressor/v3/gzip.pb.validate.go @@ -0,0 +1,200 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/compression/gzip/compressor/v3/gzip.proto + +package compressorv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Gzip 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 *Gzip) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Gzip 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 GzipMultiError, or nil if none found. +func (m *Gzip) ValidateAll() error { + return m.validate(true) +} + +func (m *Gzip) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if wrapper := m.GetMemoryLevel(); wrapper != nil { + + if val := wrapper.GetValue(); val < 1 || val > 9 { + err := GzipValidationError{ + field: "MemoryLevel", + reason: "value must be inside range [1, 9]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if _, ok := Gzip_CompressionLevel_name[int32(m.GetCompressionLevel())]; !ok { + err := GzipValidationError{ + field: "CompressionLevel", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := Gzip_CompressionStrategy_name[int32(m.GetCompressionStrategy())]; !ok { + err := GzipValidationError{ + field: "CompressionStrategy", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if wrapper := m.GetWindowBits(); wrapper != nil { + + if val := wrapper.GetValue(); val < 9 || val > 15 { + err := GzipValidationError{ + field: "WindowBits", + reason: "value must be inside range [9, 15]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if wrapper := m.GetChunkSize(); wrapper != nil { + + if val := wrapper.GetValue(); val < 4096 || val > 65536 { + err := GzipValidationError{ + field: "ChunkSize", + reason: "value must be inside range [4096, 65536]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if len(errors) > 0 { + return GzipMultiError(errors) + } + return nil +} + +// GzipMultiError is an error wrapping multiple validation errors returned by +// Gzip.ValidateAll() if the designated constraints aren't met. +type GzipMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GzipMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GzipMultiError) AllErrors() []error { return m } + +// GzipValidationError is the validation error returned by Gzip.Validate if the +// designated constraints aren't met. +type GzipValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GzipValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GzipValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GzipValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GzipValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GzipValidationError) ErrorName() string { return "GzipValidationError" } + +// Error satisfies the builtin error interface +func (e GzipValidationError) 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 %sGzip.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GzipValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GzipValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/gzip/decompressor/v3/gzip.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/gzip/decompressor/v3/gzip.pb.go new file mode 100644 index 0000000000000..81807df3126b6 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/gzip/decompressor/v3/gzip.pb.go @@ -0,0 +1,198 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/compression/gzip/decompressor/v3/gzip.proto + +package decompressorv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Gzip struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Value from 9 to 15 that represents the base two logarithmic of the decompressor's window size. + // The decompression window size needs to be equal or larger than the compression window size. + // The default window size is 15. + // This is so that the decompressor can decompress a response compressed by a compressor with any compression window size. + // For more details about this parameter, please refer to `zlib manual `_ > inflateInit2. + WindowBits *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=window_bits,json=windowBits,proto3" json:"window_bits,omitempty"` + // Value for zlib's decompressor output buffer. If not set, defaults to 4096. + // See https://www.zlib.net/manual.html for more details. + ChunkSize *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"` +} + +func (x *Gzip) Reset() { + *x = Gzip{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Gzip) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Gzip) ProtoMessage() {} + +func (x *Gzip) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Gzip.ProtoReflect.Descriptor instead. +func (*Gzip) Descriptor() ([]byte, []int) { + return file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_rawDescGZIP(), []int{0} +} + +func (x *Gzip) GetWindowBits() *wrapperspb.UInt32Value { + if x != nil { + return x.WindowBits + } + return nil +} + +func (x *Gzip) GetChunkSize() *wrapperspb.UInt32Value { + if x != nil { + return x.ChunkSize + } + return nil +} + +var File_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto protoreflect.FileDescriptor + +var file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_rawDesc = []byte{ + 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x67, + 0x7a, 0x69, 0x70, 0x2f, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, + 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x31, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x7a, 0x69, + 0x70, 0x2e, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, + 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x9b, 0x01, 0x0a, 0x04, 0x47, 0x7a, + 0x69, 0x70, 0x12, 0x48, 0x0a, 0x0b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x62, 0x69, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0x0f, 0x28, 0x09, + 0x52, 0x0a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x42, 0x69, 0x74, 0x73, 0x12, 0x49, 0x0a, 0x0a, + 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, + 0xfa, 0x42, 0x09, 0x2a, 0x07, 0x18, 0x80, 0x80, 0x04, 0x28, 0x80, 0x20, 0x52, 0x09, 0x63, 0x68, + 0x75, 0x6e, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x42, 0xbf, 0x01, 0x0a, 0x3f, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x64, 0x65, 0x63, 0x6f, + 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x47, 0x7a, 0x69, + 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x67, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x7a, + 0x69, 0x70, 0x2f, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2f, + 0x76, 0x33, 0x3b, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_rawDescOnce sync.Once + file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_rawDescData = file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_rawDesc +) + +func file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_rawDescGZIP() []byte { + file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_rawDescOnce.Do(func() { + file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_rawDescData) + }) + return file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_rawDescData +} + +var file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_goTypes = []interface{}{ + (*Gzip)(nil), // 0: envoy.extensions.compression.gzip.decompressor.v3.Gzip + (*wrapperspb.UInt32Value)(nil), // 1: google.protobuf.UInt32Value +} +var file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.compression.gzip.decompressor.v3.Gzip.window_bits:type_name -> google.protobuf.UInt32Value + 1, // 1: envoy.extensions.compression.gzip.decompressor.v3.Gzip.chunk_size:type_name -> google.protobuf.UInt32Value + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_init() } +func file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_init() { + if File_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Gzip); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_goTypes, + DependencyIndexes: file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_depIdxs, + MessageInfos: file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_msgTypes, + }.Build() + File_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto = out.File + file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_rawDesc = nil + file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_goTypes = nil + file_envoy_extensions_compression_gzip_decompressor_v3_gzip_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/gzip/decompressor/v3/gzip.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/gzip/decompressor/v3/gzip.pb.validate.go new file mode 100644 index 0000000000000..5bc745680616c --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/gzip/decompressor/v3/gzip.pb.validate.go @@ -0,0 +1,163 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/compression/gzip/decompressor/v3/gzip.proto + +package decompressorv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Gzip 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 *Gzip) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Gzip 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 GzipMultiError, or nil if none found. +func (m *Gzip) ValidateAll() error { + return m.validate(true) +} + +func (m *Gzip) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if wrapper := m.GetWindowBits(); wrapper != nil { + + if val := wrapper.GetValue(); val < 9 || val > 15 { + err := GzipValidationError{ + field: "WindowBits", + reason: "value must be inside range [9, 15]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if wrapper := m.GetChunkSize(); wrapper != nil { + + if val := wrapper.GetValue(); val < 4096 || val > 65536 { + err := GzipValidationError{ + field: "ChunkSize", + reason: "value must be inside range [4096, 65536]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if len(errors) > 0 { + return GzipMultiError(errors) + } + return nil +} + +// GzipMultiError is an error wrapping multiple validation errors returned by +// Gzip.ValidateAll() if the designated constraints aren't met. +type GzipMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GzipMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GzipMultiError) AllErrors() []error { return m } + +// GzipValidationError is the validation error returned by Gzip.Validate if the +// designated constraints aren't met. +type GzipValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GzipValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GzipValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GzipValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GzipValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GzipValidationError) ErrorName() string { return "GzipValidationError" } + +// Error satisfies the builtin error interface +func (e GzipValidationError) 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 %sGzip.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GzipValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GzipValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/zstd/compressor/v3/zstd.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/zstd/compressor/v3/zstd.pb.go new file mode 100644 index 0000000000000..a74c9bb8a8652 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/zstd/compressor/v3/zstd.pb.go @@ -0,0 +1,334 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/compression/zstd/compressor/v3/zstd.proto + +package compressorv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Reference to http://facebook.github.io/zstd/zstd_manual.html +type Zstd_Strategy int32 + +const ( + Zstd_DEFAULT Zstd_Strategy = 0 + Zstd_FAST Zstd_Strategy = 1 + Zstd_DFAST Zstd_Strategy = 2 + Zstd_GREEDY Zstd_Strategy = 3 + Zstd_LAZY Zstd_Strategy = 4 + Zstd_LAZY2 Zstd_Strategy = 5 + Zstd_BTLAZY2 Zstd_Strategy = 6 + Zstd_BTOPT Zstd_Strategy = 7 + Zstd_BTULTRA Zstd_Strategy = 8 + Zstd_BTULTRA2 Zstd_Strategy = 9 +) + +// Enum value maps for Zstd_Strategy. +var ( + Zstd_Strategy_name = map[int32]string{ + 0: "DEFAULT", + 1: "FAST", + 2: "DFAST", + 3: "GREEDY", + 4: "LAZY", + 5: "LAZY2", + 6: "BTLAZY2", + 7: "BTOPT", + 8: "BTULTRA", + 9: "BTULTRA2", + } + Zstd_Strategy_value = map[string]int32{ + "DEFAULT": 0, + "FAST": 1, + "DFAST": 2, + "GREEDY": 3, + "LAZY": 4, + "LAZY2": 5, + "BTLAZY2": 6, + "BTOPT": 7, + "BTULTRA": 8, + "BTULTRA2": 9, + } +) + +func (x Zstd_Strategy) Enum() *Zstd_Strategy { + p := new(Zstd_Strategy) + *p = x + return p +} + +func (x Zstd_Strategy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Zstd_Strategy) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_enumTypes[0].Descriptor() +} + +func (Zstd_Strategy) Type() protoreflect.EnumType { + return &file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_enumTypes[0] +} + +func (x Zstd_Strategy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Zstd_Strategy.Descriptor instead. +func (Zstd_Strategy) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDescGZIP(), []int{0, 0} +} + +// [#next-free-field: 6] +type Zstd struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Set compression parameters according to pre-defined compression level table. + // Note that exact compression parameters are dynamically determined, + // depending on both compression level and source content size (when known). + // Value 0 means default, and default level is 3. + // Setting a level does not automatically set all other compression parameters + // to default. Setting this will however eventually dynamically impact the compression + // parameters which have not been manually set. The manually set + // ones will 'stick'. + CompressionLevel *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=compression_level,json=compressionLevel,proto3" json:"compression_level,omitempty"` + // A 32-bits checksum of content is written at end of frame. If not set, defaults to false. + EnableChecksum bool `protobuf:"varint,2,opt,name=enable_checksum,json=enableChecksum,proto3" json:"enable_checksum,omitempty"` + // The higher the value of selected strategy, the more complex it is, + // resulting in stronger and slower compression. + // Special: value 0 means "use default strategy". + Strategy Zstd_Strategy `protobuf:"varint,3,opt,name=strategy,proto3,enum=envoy.extensions.compression.zstd.compressor.v3.Zstd_Strategy" json:"strategy,omitempty"` + // A dictionary for compression. Zstd offers dictionary compression, which greatly improves + // efficiency on small files and messages. Each dictionary will be generated with a dictionary ID + // that can be used to search the same dictionary during decompression. + // Please refer to `zstd manual `_ + // to train a specific dictionary for compression. + Dictionary *v3.DataSource `protobuf:"bytes,4,opt,name=dictionary,proto3" json:"dictionary,omitempty"` + // Value for compressor's next output buffer. If not set, defaults to 4096. + ChunkSize *wrapperspb.UInt32Value `protobuf:"bytes,5,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"` +} + +func (x *Zstd) Reset() { + *x = Zstd{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Zstd) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Zstd) ProtoMessage() {} + +func (x *Zstd) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Zstd.ProtoReflect.Descriptor instead. +func (*Zstd) Descriptor() ([]byte, []int) { + return file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDescGZIP(), []int{0} +} + +func (x *Zstd) GetCompressionLevel() *wrapperspb.UInt32Value { + if x != nil { + return x.CompressionLevel + } + return nil +} + +func (x *Zstd) GetEnableChecksum() bool { + if x != nil { + return x.EnableChecksum + } + return false +} + +func (x *Zstd) GetStrategy() Zstd_Strategy { + if x != nil { + return x.Strategy + } + return Zstd_DEFAULT +} + +func (x *Zstd) GetDictionary() *v3.DataSource { + if x != nil { + return x.Dictionary + } + return nil +} + +func (x *Zstd) GetChunkSize() *wrapperspb.UInt32Value { + if x != nil { + return x.ChunkSize + } + return nil +} + +var File_envoy_extensions_compression_zstd_compressor_v3_zstd_proto protoreflect.FileDescriptor + +var file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDesc = []byte{ + 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7a, + 0x73, 0x74, 0x64, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2f, 0x76, + 0x33, 0x2f, 0x7a, 0x73, 0x74, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x73, 0x74, 0x64, 0x2e, + 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xf0, 0x03, 0x0a, 0x04, 0x5a, 0x73, 0x74, 0x64, 0x12, + 0x49, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, + 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, + 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0e, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x73, 0x75, 0x6d, 0x12, 0x64, 0x0a, 0x08, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x73, 0x74, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x5a, 0x73, 0x74, 0x64, 0x2e, 0x53, 0x74, 0x72, + 0x61, 0x74, 0x65, 0x67, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x08, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x40, 0x0a, 0x0a, 0x64, 0x69, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, + 0x0a, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x49, 0x0a, 0x0a, 0x63, + 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0xfa, + 0x42, 0x09, 0x2a, 0x07, 0x18, 0x80, 0x80, 0x04, 0x28, 0x80, 0x20, 0x52, 0x09, 0x63, 0x68, 0x75, + 0x6e, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x80, 0x01, 0x0a, 0x08, 0x53, 0x74, 0x72, 0x61, 0x74, + 0x65, 0x67, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, + 0x12, 0x08, 0x0a, 0x04, 0x46, 0x41, 0x53, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x46, + 0x41, 0x53, 0x54, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x52, 0x45, 0x45, 0x44, 0x59, 0x10, + 0x03, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x41, 0x5a, 0x59, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x4c, + 0x41, 0x5a, 0x59, 0x32, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x54, 0x4c, 0x41, 0x5a, 0x59, + 0x32, 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05, 0x42, 0x54, 0x4f, 0x50, 0x54, 0x10, 0x07, 0x12, 0x0b, + 0x0a, 0x07, 0x42, 0x54, 0x55, 0x4c, 0x54, 0x52, 0x41, 0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08, 0x42, + 0x54, 0x55, 0x4c, 0x54, 0x52, 0x41, 0x32, 0x10, 0x09, 0x42, 0xb9, 0x01, 0x0a, 0x3d, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x73, 0x74, 0x64, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x5a, 0x73, 0x74, + 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x63, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7a, 0x73, + 0x74, 0x64, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x33, + 0x3b, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDescOnce sync.Once + file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDescData = file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDesc +) + +func file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDescGZIP() []byte { + file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDescOnce.Do(func() { + file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDescData) + }) + return file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDescData +} + +var file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_goTypes = []interface{}{ + (Zstd_Strategy)(0), // 0: envoy.extensions.compression.zstd.compressor.v3.Zstd.Strategy + (*Zstd)(nil), // 1: envoy.extensions.compression.zstd.compressor.v3.Zstd + (*wrapperspb.UInt32Value)(nil), // 2: google.protobuf.UInt32Value + (*v3.DataSource)(nil), // 3: envoy.config.core.v3.DataSource +} +var file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.compression.zstd.compressor.v3.Zstd.compression_level:type_name -> google.protobuf.UInt32Value + 0, // 1: envoy.extensions.compression.zstd.compressor.v3.Zstd.strategy:type_name -> envoy.extensions.compression.zstd.compressor.v3.Zstd.Strategy + 3, // 2: envoy.extensions.compression.zstd.compressor.v3.Zstd.dictionary:type_name -> envoy.config.core.v3.DataSource + 2, // 3: envoy.extensions.compression.zstd.compressor.v3.Zstd.chunk_size:type_name -> google.protobuf.UInt32Value + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_init() } +func file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_init() { + if File_envoy_extensions_compression_zstd_compressor_v3_zstd_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Zstd); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_goTypes, + DependencyIndexes: file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_depIdxs, + EnumInfos: file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_enumTypes, + MessageInfos: file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_msgTypes, + }.Build() + File_envoy_extensions_compression_zstd_compressor_v3_zstd_proto = out.File + file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_rawDesc = nil + file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_goTypes = nil + file_envoy_extensions_compression_zstd_compressor_v3_zstd_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/zstd/compressor/v3/zstd.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/zstd/compressor/v3/zstd.pb.validate.go new file mode 100644 index 0000000000000..f32ce22dd0a2c --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/zstd/compressor/v3/zstd.pb.validate.go @@ -0,0 +1,219 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/compression/zstd/compressor/v3/zstd.proto + +package compressorv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Zstd 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 *Zstd) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Zstd 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 ZstdMultiError, or nil if none found. +func (m *Zstd) ValidateAll() error { + return m.validate(true) +} + +func (m *Zstd) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetCompressionLevel()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ZstdValidationError{ + field: "CompressionLevel", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ZstdValidationError{ + field: "CompressionLevel", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCompressionLevel()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ZstdValidationError{ + field: "CompressionLevel", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for EnableChecksum + + if _, ok := Zstd_Strategy_name[int32(m.GetStrategy())]; !ok { + err := ZstdValidationError{ + field: "Strategy", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetDictionary()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ZstdValidationError{ + field: "Dictionary", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ZstdValidationError{ + field: "Dictionary", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDictionary()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ZstdValidationError{ + field: "Dictionary", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if wrapper := m.GetChunkSize(); wrapper != nil { + + if val := wrapper.GetValue(); val < 4096 || val > 65536 { + err := ZstdValidationError{ + field: "ChunkSize", + reason: "value must be inside range [4096, 65536]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if len(errors) > 0 { + return ZstdMultiError(errors) + } + return nil +} + +// ZstdMultiError is an error wrapping multiple validation errors returned by +// Zstd.ValidateAll() if the designated constraints aren't met. +type ZstdMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ZstdMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ZstdMultiError) AllErrors() []error { return m } + +// ZstdValidationError is the validation error returned by Zstd.Validate if the +// designated constraints aren't met. +type ZstdValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ZstdValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ZstdValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ZstdValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ZstdValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ZstdValidationError) ErrorName() string { return "ZstdValidationError" } + +// Error satisfies the builtin error interface +func (e ZstdValidationError) 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 %sZstd.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ZstdValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ZstdValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/zstd/decompressor/v3/zstd.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/zstd/decompressor/v3/zstd.pb.go new file mode 100644 index 0000000000000..0931fe7165edf --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/zstd/decompressor/v3/zstd.pb.go @@ -0,0 +1,202 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/compression/zstd/decompressor/v3/zstd.proto + +package decompressorv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Zstd struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Dictionaries for decompression. Zstd offers dictionary compression, which greatly improves + // efficiency on small files and messages. It is necessary to ensure that the dictionary used for + // decompression is the same as the compression dictionary. Multiple dictionaries can be set, and the + // dictionary will be automatically selected for decompression according to the dictionary ID in the + // source content. + // Please refer to `zstd manual `_ + // to train specific dictionaries for decompression. + Dictionaries []*v3.DataSource `protobuf:"bytes,1,rep,name=dictionaries,proto3" json:"dictionaries,omitempty"` + // Value for decompressor's next output buffer. If not set, defaults to 4096. + ChunkSize *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"` +} + +func (x *Zstd) Reset() { + *x = Zstd{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Zstd) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Zstd) ProtoMessage() {} + +func (x *Zstd) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Zstd.ProtoReflect.Descriptor instead. +func (*Zstd) Descriptor() ([]byte, []int) { + return file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDescGZIP(), []int{0} +} + +func (x *Zstd) GetDictionaries() []*v3.DataSource { + if x != nil { + return x.Dictionaries + } + return nil +} + +func (x *Zstd) GetChunkSize() *wrapperspb.UInt32Value { + if x != nil { + return x.ChunkSize + } + return nil +} + +var File_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto protoreflect.FileDescriptor + +var file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDesc = []byte{ + 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7a, + 0x73, 0x74, 0x64, 0x2f, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, + 0x2f, 0x76, 0x33, 0x2f, 0x7a, 0x73, 0x74, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x31, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x73, 0x74, + 0x64, 0x2e, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, + 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x97, 0x01, 0x0a, 0x04, 0x5a, + 0x73, 0x74, 0x64, 0x12, 0x44, 0x0a, 0x0c, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x72, + 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0c, 0x64, 0x69, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x0a, 0x63, 0x68, 0x75, + 0x6e, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0xfa, 0x42, 0x09, + 0x2a, 0x07, 0x18, 0x80, 0x80, 0x04, 0x28, 0x80, 0x20, 0x52, 0x09, 0x63, 0x68, 0x75, 0x6e, 0x6b, + 0x53, 0x69, 0x7a, 0x65, 0x42, 0xbf, 0x01, 0x0a, 0x3f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x2e, 0x7a, 0x73, 0x74, 0x64, 0x2e, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x5a, 0x73, 0x74, 0x64, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x67, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, + 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7a, 0x73, 0x74, 0x64, 0x2f, + 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x33, 0x3b, + 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDescOnce sync.Once + file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDescData = file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDesc +) + +func file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDescGZIP() []byte { + file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDescOnce.Do(func() { + file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDescData) + }) + return file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDescData +} + +var file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_goTypes = []interface{}{ + (*Zstd)(nil), // 0: envoy.extensions.compression.zstd.decompressor.v3.Zstd + (*v3.DataSource)(nil), // 1: envoy.config.core.v3.DataSource + (*wrapperspb.UInt32Value)(nil), // 2: google.protobuf.UInt32Value +} +var file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.compression.zstd.decompressor.v3.Zstd.dictionaries:type_name -> envoy.config.core.v3.DataSource + 2, // 1: envoy.extensions.compression.zstd.decompressor.v3.Zstd.chunk_size:type_name -> google.protobuf.UInt32Value + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_init() } +func file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_init() { + if File_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Zstd); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_goTypes, + DependencyIndexes: file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_depIdxs, + MessageInfos: file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_msgTypes, + }.Build() + File_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto = out.File + file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_rawDesc = nil + file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_goTypes = nil + file_envoy_extensions_compression_zstd_decompressor_v3_zstd_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/zstd/decompressor/v3/zstd.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/zstd/decompressor/v3/zstd.pb.validate.go new file mode 100644 index 0000000000000..2f4e111782bc3 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/compression/zstd/decompressor/v3/zstd.pb.validate.go @@ -0,0 +1,182 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/compression/zstd/decompressor/v3/zstd.proto + +package decompressorv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Zstd 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 *Zstd) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Zstd 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 ZstdMultiError, or nil if none found. +func (m *Zstd) ValidateAll() error { + return m.validate(true) +} + +func (m *Zstd) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetDictionaries() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ZstdValidationError{ + field: fmt.Sprintf("Dictionaries[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ZstdValidationError{ + field: fmt.Sprintf("Dictionaries[%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 ZstdValidationError{ + field: fmt.Sprintf("Dictionaries[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if wrapper := m.GetChunkSize(); wrapper != nil { + + if val := wrapper.GetValue(); val < 4096 || val > 65536 { + err := ZstdValidationError{ + field: "ChunkSize", + reason: "value must be inside range [4096, 65536]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if len(errors) > 0 { + return ZstdMultiError(errors) + } + return nil +} + +// ZstdMultiError is an error wrapping multiple validation errors returned by +// Zstd.ValidateAll() if the designated constraints aren't met. +type ZstdMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ZstdMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ZstdMultiError) AllErrors() []error { return m } + +// ZstdValidationError is the validation error returned by Zstd.Validate if the +// designated constraints aren't met. +type ZstdValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ZstdValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ZstdValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ZstdValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ZstdValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ZstdValidationError) ErrorName() string { return "ZstdValidationError" } + +// Error satisfies the builtin error interface +func (e ZstdValidationError) 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 %sZstd.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ZstdValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ZstdValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/config/validators/minimum_clusters/v3/minimum_clusters.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/config/validators/minimum_clusters/v3/minimum_clusters.pb.go new file mode 100644 index 0000000000000..a145bdf6cc1d6 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/config/validators/minimum_clusters/v3/minimum_clusters.pb.go @@ -0,0 +1,178 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/config/validators/minimum_clusters/v3/minimum_clusters.proto + +package minimum_clustersv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Validates a CDS config, and ensures that the number of clusters is above the +// set threshold. +type MinimumClustersValidator struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The minimal clusters threshold. Any CDS config update leading to less than + // this number will be rejected. + // Default value is 0. + MinClustersNum uint32 `protobuf:"varint,1,opt,name=min_clusters_num,json=minClustersNum,proto3" json:"min_clusters_num,omitempty"` +} + +func (x *MinimumClustersValidator) Reset() { + *x = MinimumClustersValidator{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MinimumClustersValidator) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MinimumClustersValidator) ProtoMessage() {} + +func (x *MinimumClustersValidator) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MinimumClustersValidator.ProtoReflect.Descriptor instead. +func (*MinimumClustersValidator) Descriptor() ([]byte, []int) { + return file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDescGZIP(), []int{0} +} + +func (x *MinimumClustersValidator) GetMinClustersNum() uint32 { + if x != nil { + return x.MinClustersNum + } + return 0 +} + +var File_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto protoreflect.FileDescriptor + +var file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDesc = []byte{ + 0x0a, 0x4d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, + 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x44, 0x0a, 0x18, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, + 0x6d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x6d, 0x69, + 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x4e, 0x75, 0x6d, 0x42, 0xd8, 0x01, 0x0a, + 0x44, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x14, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x70, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, + 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x69, 0x6e, + 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDescOnce sync.Once + file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDescData = file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDesc +) + +func file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDescGZIP() []byte { + file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDescOnce.Do(func() { + file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDescData) + }) + return file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDescData +} + +var file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_goTypes = []interface{}{ + (*MinimumClustersValidator)(nil), // 0: envoy.extensions.config.validators.minimum_clusters.v3.MinimumClustersValidator +} +var file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_init() +} +func file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_init() { + if File_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MinimumClustersValidator); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_goTypes, + DependencyIndexes: file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_depIdxs, + MessageInfos: file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_msgTypes, + }.Build() + File_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto = out.File + file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_rawDesc = nil + file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_goTypes = nil + file_envoy_extensions_config_validators_minimum_clusters_v3_minimum_clusters_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/config/validators/minimum_clusters/v3/minimum_clusters.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/config/validators/minimum_clusters/v3/minimum_clusters.pb.validate.go new file mode 100644 index 0000000000000..9aee70d3b5ffb --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/config/validators/minimum_clusters/v3/minimum_clusters.pb.validate.go @@ -0,0 +1,139 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/config/validators/minimum_clusters/v3/minimum_clusters.proto + +package minimum_clustersv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on MinimumClustersValidator 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 *MinimumClustersValidator) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MinimumClustersValidator 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 +// MinimumClustersValidatorMultiError, or nil if none found. +func (m *MinimumClustersValidator) ValidateAll() error { + return m.validate(true) +} + +func (m *MinimumClustersValidator) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for MinClustersNum + + if len(errors) > 0 { + return MinimumClustersValidatorMultiError(errors) + } + return nil +} + +// MinimumClustersValidatorMultiError is an error wrapping multiple validation +// errors returned by MinimumClustersValidator.ValidateAll() if the designated +// constraints aren't met. +type MinimumClustersValidatorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MinimumClustersValidatorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MinimumClustersValidatorMultiError) AllErrors() []error { return m } + +// MinimumClustersValidatorValidationError is the validation error returned by +// MinimumClustersValidator.Validate if the designated constraints aren't met. +type MinimumClustersValidatorValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MinimumClustersValidatorValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MinimumClustersValidatorValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MinimumClustersValidatorValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MinimumClustersValidatorValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MinimumClustersValidatorValidationError) ErrorName() string { + return "MinimumClustersValidatorValidationError" +} + +// Error satisfies the builtin error interface +func (e MinimumClustersValidatorValidationError) 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 %sMinimumClustersValidator.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MinimumClustersValidatorValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MinimumClustersValidatorValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/early_data/v3/default_early_data_policy.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/early_data/v3/default_early_data_policy.pb.go new file mode 100644 index 0000000000000..cb629cb561bac --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/early_data/v3/default_early_data_policy.pb.go @@ -0,0 +1,156 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/early_data/v3/default_early_data_policy.proto + +package early_datav3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// [#extension: envoy.route.early_data_policy.default] +// The default rule to allow/disallow a request to be sent as early data. It's an empty config now. Configuring it will disallow any request to be sent over early data. +type DefaultEarlyDataPolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DefaultEarlyDataPolicy) Reset() { + *x = DefaultEarlyDataPolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_early_data_v3_default_early_data_policy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DefaultEarlyDataPolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DefaultEarlyDataPolicy) ProtoMessage() {} + +func (x *DefaultEarlyDataPolicy) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_early_data_v3_default_early_data_policy_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DefaultEarlyDataPolicy.ProtoReflect.Descriptor instead. +func (*DefaultEarlyDataPolicy) Descriptor() ([]byte, []int) { + return file_envoy_extensions_early_data_v3_default_early_data_policy_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_early_data_v3_default_early_data_policy_proto protoreflect.FileDescriptor + +var file_envoy_extensions_early_data_v3_default_early_data_policy_proto_rawDesc = []byte{ + 0x0a, 0x3e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, + 0x2f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, + 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x18, 0x0a, 0x16, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x61, 0x72, 0x6c, 0x79, 0x44, + 0x61, 0x74, 0x61, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0xa9, 0x01, 0x0a, 0x2c, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x65, 0x61, 0x72, + 0x6c, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x42, 0x1b, 0x44, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x45, 0x61, 0x72, 0x6c, 0x79, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x52, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, + 0x3b, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_early_data_v3_default_early_data_policy_proto_rawDescOnce sync.Once + file_envoy_extensions_early_data_v3_default_early_data_policy_proto_rawDescData = file_envoy_extensions_early_data_v3_default_early_data_policy_proto_rawDesc +) + +func file_envoy_extensions_early_data_v3_default_early_data_policy_proto_rawDescGZIP() []byte { + file_envoy_extensions_early_data_v3_default_early_data_policy_proto_rawDescOnce.Do(func() { + file_envoy_extensions_early_data_v3_default_early_data_policy_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_early_data_v3_default_early_data_policy_proto_rawDescData) + }) + return file_envoy_extensions_early_data_v3_default_early_data_policy_proto_rawDescData +} + +var file_envoy_extensions_early_data_v3_default_early_data_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_early_data_v3_default_early_data_policy_proto_goTypes = []interface{}{ + (*DefaultEarlyDataPolicy)(nil), // 0: envoy.extensions.early_data.v3.DefaultEarlyDataPolicy +} +var file_envoy_extensions_early_data_v3_default_early_data_policy_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_early_data_v3_default_early_data_policy_proto_init() } +func file_envoy_extensions_early_data_v3_default_early_data_policy_proto_init() { + if File_envoy_extensions_early_data_v3_default_early_data_policy_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_early_data_v3_default_early_data_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DefaultEarlyDataPolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_early_data_v3_default_early_data_policy_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_early_data_v3_default_early_data_policy_proto_goTypes, + DependencyIndexes: file_envoy_extensions_early_data_v3_default_early_data_policy_proto_depIdxs, + MessageInfos: file_envoy_extensions_early_data_v3_default_early_data_policy_proto_msgTypes, + }.Build() + File_envoy_extensions_early_data_v3_default_early_data_policy_proto = out.File + file_envoy_extensions_early_data_v3_default_early_data_policy_proto_rawDesc = nil + file_envoy_extensions_early_data_v3_default_early_data_policy_proto_goTypes = nil + file_envoy_extensions_early_data_v3_default_early_data_policy_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/early_data/v3/default_early_data_policy.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/early_data/v3/default_early_data_policy.pb.validate.go new file mode 100644 index 0000000000000..0e943aa621e09 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/early_data/v3/default_early_data_policy.pb.validate.go @@ -0,0 +1,137 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/early_data/v3/default_early_data_policy.proto + +package early_datav3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on DefaultEarlyDataPolicy 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 *DefaultEarlyDataPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DefaultEarlyDataPolicy 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 +// DefaultEarlyDataPolicyMultiError, or nil if none found. +func (m *DefaultEarlyDataPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *DefaultEarlyDataPolicy) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return DefaultEarlyDataPolicyMultiError(errors) + } + return nil +} + +// DefaultEarlyDataPolicyMultiError is an error wrapping multiple validation +// errors returned by DefaultEarlyDataPolicy.ValidateAll() if the designated +// constraints aren't met. +type DefaultEarlyDataPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DefaultEarlyDataPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DefaultEarlyDataPolicyMultiError) AllErrors() []error { return m } + +// DefaultEarlyDataPolicyValidationError is the validation error returned by +// DefaultEarlyDataPolicy.Validate if the designated constraints aren't met. +type DefaultEarlyDataPolicyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DefaultEarlyDataPolicyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DefaultEarlyDataPolicyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DefaultEarlyDataPolicyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DefaultEarlyDataPolicyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DefaultEarlyDataPolicyValidationError) ErrorName() string { + return "DefaultEarlyDataPolicyValidationError" +} + +// Error satisfies the builtin error interface +func (e DefaultEarlyDataPolicyValidationError) 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 %sDefaultEarlyDataPolicy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DefaultEarlyDataPolicyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DefaultEarlyDataPolicyValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/common/dependency/v3/dependency.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/common/dependency/v3/dependency.pb.go new file mode 100644 index 0000000000000..e8fb79af1a1d9 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/common/dependency/v3/dependency.pb.go @@ -0,0 +1,505 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/common/dependency/v3/dependency.proto + +package dependencyv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Dependency_DependencyType int32 + +const ( + Dependency_HEADER Dependency_DependencyType = 0 + Dependency_FILTER_STATE_KEY Dependency_DependencyType = 1 + Dependency_DYNAMIC_METADATA Dependency_DependencyType = 2 +) + +// Enum value maps for Dependency_DependencyType. +var ( + Dependency_DependencyType_name = map[int32]string{ + 0: "HEADER", + 1: "FILTER_STATE_KEY", + 2: "DYNAMIC_METADATA", + } + Dependency_DependencyType_value = map[string]int32{ + "HEADER": 0, + "FILTER_STATE_KEY": 1, + "DYNAMIC_METADATA": 2, + } +) + +func (x Dependency_DependencyType) Enum() *Dependency_DependencyType { + p := new(Dependency_DependencyType) + *p = x + return p +} + +func (x Dependency_DependencyType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Dependency_DependencyType) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_common_dependency_v3_dependency_proto_enumTypes[0].Descriptor() +} + +func (Dependency_DependencyType) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_common_dependency_v3_dependency_proto_enumTypes[0] +} + +func (x Dependency_DependencyType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Dependency_DependencyType.Descriptor instead. +func (Dependency_DependencyType) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescGZIP(), []int{0, 0} +} + +// Dependency specification and string identifier. +type Dependency struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The kind of dependency. + Type Dependency_DependencyType `protobuf:"varint,1,opt,name=type,proto3,enum=envoy.extensions.filters.common.dependency.v3.Dependency_DependencyType" json:"type,omitempty"` + // The string identifier for the dependency. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *Dependency) Reset() { + *x = Dependency{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Dependency) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Dependency) ProtoMessage() {} + +func (x *Dependency) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Dependency.ProtoReflect.Descriptor instead. +func (*Dependency) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescGZIP(), []int{0} +} + +func (x *Dependency) GetType() Dependency_DependencyType { + if x != nil { + return x.Type + } + return Dependency_HEADER +} + +func (x *Dependency) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Dependency specification for a filter. For a filter chain to be valid, any +// dependency that is required must be provided by an earlier filter. +type FilterDependencies struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of dependencies required on the decode path. + DecodeRequired []*Dependency `protobuf:"bytes,1,rep,name=decode_required,json=decodeRequired,proto3" json:"decode_required,omitempty"` + // A list of dependencies provided on the encode path. + DecodeProvided []*Dependency `protobuf:"bytes,2,rep,name=decode_provided,json=decodeProvided,proto3" json:"decode_provided,omitempty"` + // A list of dependencies required on the decode path. + EncodeRequired []*Dependency `protobuf:"bytes,3,rep,name=encode_required,json=encodeRequired,proto3" json:"encode_required,omitempty"` + // A list of dependencies provided on the encode path. + EncodeProvided []*Dependency `protobuf:"bytes,4,rep,name=encode_provided,json=encodeProvided,proto3" json:"encode_provided,omitempty"` +} + +func (x *FilterDependencies) Reset() { + *x = FilterDependencies{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilterDependencies) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilterDependencies) ProtoMessage() {} + +func (x *FilterDependencies) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FilterDependencies.ProtoReflect.Descriptor instead. +func (*FilterDependencies) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescGZIP(), []int{1} +} + +func (x *FilterDependencies) GetDecodeRequired() []*Dependency { + if x != nil { + return x.DecodeRequired + } + return nil +} + +func (x *FilterDependencies) GetDecodeProvided() []*Dependency { + if x != nil { + return x.DecodeProvided + } + return nil +} + +func (x *FilterDependencies) GetEncodeRequired() []*Dependency { + if x != nil { + return x.EncodeRequired + } + return nil +} + +func (x *FilterDependencies) GetEncodeProvided() []*Dependency { + if x != nil { + return x.EncodeProvided + } + return nil +} + +// Matching requirements for a filter. For a match tree to be used with a filter, the match +// requirements must be satisfied. +// +// This protobuf is provided by the filter implementation as a way to communicate the matching +// requirements to the filter factories, allowing for config rejection if the requirements are +// not satisfied. +type MatchingRequirements struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DataInputAllowList *MatchingRequirements_DataInputAllowList `protobuf:"bytes,1,opt,name=data_input_allow_list,json=dataInputAllowList,proto3" json:"data_input_allow_list,omitempty"` +} + +func (x *MatchingRequirements) Reset() { + *x = MatchingRequirements{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MatchingRequirements) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MatchingRequirements) ProtoMessage() {} + +func (x *MatchingRequirements) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MatchingRequirements.ProtoReflect.Descriptor instead. +func (*MatchingRequirements) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescGZIP(), []int{2} +} + +func (x *MatchingRequirements) GetDataInputAllowList() *MatchingRequirements_DataInputAllowList { + if x != nil { + return x.DataInputAllowList + } + return nil +} + +type MatchingRequirements_DataInputAllowList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // An explicit list of data inputs that are allowed to be used with this filter. + TypeUrl []string `protobuf:"bytes,1,rep,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` +} + +func (x *MatchingRequirements_DataInputAllowList) Reset() { + *x = MatchingRequirements_DataInputAllowList{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MatchingRequirements_DataInputAllowList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MatchingRequirements_DataInputAllowList) ProtoMessage() {} + +func (x *MatchingRequirements_DataInputAllowList) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MatchingRequirements_DataInputAllowList.ProtoReflect.Descriptor instead. +func (*MatchingRequirements_DataInputAllowList) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *MatchingRequirements_DataInputAllowList) GetTypeUrl() []string { + if x != nil { + return x.TypeUrl + } + return nil +} + +var File_envoy_extensions_filters_common_dependency_v3_dependency_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDesc = []byte{ + 0x0a, 0x3e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x2f, 0x76, 0x33, 0x2f, + 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x33, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xd1, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x65, + 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x5c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x48, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, + 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x2e, + 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0x48, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x00, 0x12, + 0x14, 0x0a, 0x10, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x4b, 0x45, 0x59, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x59, 0x4e, 0x41, 0x4d, 0x49, 0x43, + 0x5f, 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, 0x54, 0x41, 0x10, 0x02, 0x22, 0xa4, 0x03, 0x0a, 0x12, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, + 0x65, 0x73, 0x12, 0x62, 0x0a, 0x0f, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x64, 0x65, + 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x70, 0x65, + 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x0e, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x62, 0x0a, 0x0f, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, + 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x33, 0x2e, + 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x0e, 0x64, 0x65, 0x63, 0x6f, + 0x64, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x12, 0x62, 0x0a, 0x0f, 0x65, 0x6e, + 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, + 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x0e, + 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x62, + 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, + 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, + 0x63, 0x79, 0x52, 0x0e, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x64, 0x22, 0xd3, 0x01, 0x0a, 0x14, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x89, 0x01, 0x0a, 0x15, + 0x64, 0x61, 0x74, 0x61, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x56, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x64, 0x65, + 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x12, 0x64, 0x61, 0x74, 0x61, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x41, 0x6c, + 0x6c, 0x6f, 0x77, 0x4c, 0x69, 0x73, 0x74, 0x1a, 0x2f, 0x0a, 0x12, 0x44, 0x61, 0x74, 0x61, 0x49, + 0x6e, 0x70, 0x75, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x19, 0x0a, + 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x07, 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x42, 0xbb, 0x01, 0x0a, 0x3b, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x64, 0x65, 0x70, 0x65, 0x6e, + 0x64, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, + 0x65, 0x6e, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x61, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x2f, 0x76, + 0x33, 0x3b, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescData = file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDesc +) + +func file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescData) + }) + return file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDescData +} + +var file_envoy_extensions_filters_common_dependency_v3_dependency_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_envoy_extensions_filters_common_dependency_v3_dependency_proto_goTypes = []interface{}{ + (Dependency_DependencyType)(0), // 0: envoy.extensions.filters.common.dependency.v3.Dependency.DependencyType + (*Dependency)(nil), // 1: envoy.extensions.filters.common.dependency.v3.Dependency + (*FilterDependencies)(nil), // 2: envoy.extensions.filters.common.dependency.v3.FilterDependencies + (*MatchingRequirements)(nil), // 3: envoy.extensions.filters.common.dependency.v3.MatchingRequirements + (*MatchingRequirements_DataInputAllowList)(nil), // 4: envoy.extensions.filters.common.dependency.v3.MatchingRequirements.DataInputAllowList +} +var file_envoy_extensions_filters_common_dependency_v3_dependency_proto_depIdxs = []int32{ + 0, // 0: envoy.extensions.filters.common.dependency.v3.Dependency.type:type_name -> envoy.extensions.filters.common.dependency.v3.Dependency.DependencyType + 1, // 1: envoy.extensions.filters.common.dependency.v3.FilterDependencies.decode_required:type_name -> envoy.extensions.filters.common.dependency.v3.Dependency + 1, // 2: envoy.extensions.filters.common.dependency.v3.FilterDependencies.decode_provided:type_name -> envoy.extensions.filters.common.dependency.v3.Dependency + 1, // 3: envoy.extensions.filters.common.dependency.v3.FilterDependencies.encode_required:type_name -> envoy.extensions.filters.common.dependency.v3.Dependency + 1, // 4: envoy.extensions.filters.common.dependency.v3.FilterDependencies.encode_provided:type_name -> envoy.extensions.filters.common.dependency.v3.Dependency + 4, // 5: envoy.extensions.filters.common.dependency.v3.MatchingRequirements.data_input_allow_list:type_name -> envoy.extensions.filters.common.dependency.v3.MatchingRequirements.DataInputAllowList + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_common_dependency_v3_dependency_proto_init() } +func file_envoy_extensions_filters_common_dependency_v3_dependency_proto_init() { + if File_envoy_extensions_filters_common_dependency_v3_dependency_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dependency); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FilterDependencies); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MatchingRequirements); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MatchingRequirements_DataInputAllowList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDesc, + NumEnums: 1, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_common_dependency_v3_dependency_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_common_dependency_v3_dependency_proto_depIdxs, + EnumInfos: file_envoy_extensions_filters_common_dependency_v3_dependency_proto_enumTypes, + MessageInfos: file_envoy_extensions_filters_common_dependency_v3_dependency_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_common_dependency_v3_dependency_proto = out.File + file_envoy_extensions_filters_common_dependency_v3_dependency_proto_rawDesc = nil + file_envoy_extensions_filters_common_dependency_v3_dependency_proto_goTypes = nil + file_envoy_extensions_filters_common_dependency_v3_dependency_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/common/dependency/v3/dependency.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/common/dependency/v3/dependency.pb.validate.go new file mode 100644 index 0000000000000..fbf2801803a0e --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/common/dependency/v3/dependency.pb.validate.go @@ -0,0 +1,619 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/common/dependency/v3/dependency.proto + +package dependencyv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Dependency 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 *Dependency) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Dependency 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 DependencyMultiError, or +// nil if none found. +func (m *Dependency) ValidateAll() error { + return m.validate(true) +} + +func (m *Dependency) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Type + + if utf8.RuneCountInString(m.GetName()) < 1 { + err := DependencyValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return DependencyMultiError(errors) + } + return nil +} + +// DependencyMultiError is an error wrapping multiple validation errors +// returned by Dependency.ValidateAll() if the designated constraints aren't met. +type DependencyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DependencyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DependencyMultiError) AllErrors() []error { return m } + +// DependencyValidationError is the validation error returned by +// Dependency.Validate if the designated constraints aren't met. +type DependencyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DependencyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DependencyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DependencyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DependencyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DependencyValidationError) ErrorName() string { return "DependencyValidationError" } + +// Error satisfies the builtin error interface +func (e DependencyValidationError) 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 %sDependency.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DependencyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DependencyValidationError{} + +// Validate checks the field values on FilterDependencies 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 *FilterDependencies) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterDependencies 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 +// FilterDependenciesMultiError, or nil if none found. +func (m *FilterDependencies) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterDependencies) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetDecodeRequired() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterDependenciesValidationError{ + field: fmt.Sprintf("DecodeRequired[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterDependenciesValidationError{ + field: fmt.Sprintf("DecodeRequired[%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 FilterDependenciesValidationError{ + field: fmt.Sprintf("DecodeRequired[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetDecodeProvided() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterDependenciesValidationError{ + field: fmt.Sprintf("DecodeProvided[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterDependenciesValidationError{ + field: fmt.Sprintf("DecodeProvided[%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 FilterDependenciesValidationError{ + field: fmt.Sprintf("DecodeProvided[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetEncodeRequired() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterDependenciesValidationError{ + field: fmt.Sprintf("EncodeRequired[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterDependenciesValidationError{ + field: fmt.Sprintf("EncodeRequired[%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 FilterDependenciesValidationError{ + field: fmt.Sprintf("EncodeRequired[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetEncodeProvided() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterDependenciesValidationError{ + field: fmt.Sprintf("EncodeProvided[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterDependenciesValidationError{ + field: fmt.Sprintf("EncodeProvided[%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 FilterDependenciesValidationError{ + field: fmt.Sprintf("EncodeProvided[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return FilterDependenciesMultiError(errors) + } + return nil +} + +// FilterDependenciesMultiError is an error wrapping multiple validation errors +// returned by FilterDependencies.ValidateAll() if the designated constraints +// aren't met. +type FilterDependenciesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterDependenciesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterDependenciesMultiError) AllErrors() []error { return m } + +// FilterDependenciesValidationError is the validation error returned by +// FilterDependencies.Validate if the designated constraints aren't met. +type FilterDependenciesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FilterDependenciesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FilterDependenciesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FilterDependenciesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FilterDependenciesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FilterDependenciesValidationError) ErrorName() string { + return "FilterDependenciesValidationError" +} + +// Error satisfies the builtin error interface +func (e FilterDependenciesValidationError) 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 %sFilterDependencies.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FilterDependenciesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FilterDependenciesValidationError{} + +// Validate checks the field values on MatchingRequirements 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 *MatchingRequirements) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MatchingRequirements 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 +// MatchingRequirementsMultiError, or nil if none found. +func (m *MatchingRequirements) ValidateAll() error { + return m.validate(true) +} + +func (m *MatchingRequirements) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetDataInputAllowList()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MatchingRequirementsValidationError{ + field: "DataInputAllowList", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MatchingRequirementsValidationError{ + field: "DataInputAllowList", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDataInputAllowList()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MatchingRequirementsValidationError{ + field: "DataInputAllowList", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return MatchingRequirementsMultiError(errors) + } + return nil +} + +// MatchingRequirementsMultiError is an error wrapping multiple validation +// errors returned by MatchingRequirements.ValidateAll() if the designated +// constraints aren't met. +type MatchingRequirementsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MatchingRequirementsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MatchingRequirementsMultiError) AllErrors() []error { return m } + +// MatchingRequirementsValidationError is the validation error returned by +// MatchingRequirements.Validate if the designated constraints aren't met. +type MatchingRequirementsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MatchingRequirementsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MatchingRequirementsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MatchingRequirementsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MatchingRequirementsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MatchingRequirementsValidationError) ErrorName() string { + return "MatchingRequirementsValidationError" +} + +// Error satisfies the builtin error interface +func (e MatchingRequirementsValidationError) 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 %sMatchingRequirements.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MatchingRequirementsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MatchingRequirementsValidationError{} + +// Validate checks the field values on MatchingRequirements_DataInputAllowList +// 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 *MatchingRequirements_DataInputAllowList) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// MatchingRequirements_DataInputAllowList 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 +// MatchingRequirements_DataInputAllowListMultiError, or nil if none found. +func (m *MatchingRequirements_DataInputAllowList) ValidateAll() error { + return m.validate(true) +} + +func (m *MatchingRequirements_DataInputAllowList) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return MatchingRequirements_DataInputAllowListMultiError(errors) + } + return nil +} + +// MatchingRequirements_DataInputAllowListMultiError is an error wrapping +// multiple validation errors returned by +// MatchingRequirements_DataInputAllowList.ValidateAll() if the designated +// constraints aren't met. +type MatchingRequirements_DataInputAllowListMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MatchingRequirements_DataInputAllowListMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MatchingRequirements_DataInputAllowListMultiError) AllErrors() []error { return m } + +// MatchingRequirements_DataInputAllowListValidationError is the validation +// error returned by MatchingRequirements_DataInputAllowList.Validate if the +// designated constraints aren't met. +type MatchingRequirements_DataInputAllowListValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MatchingRequirements_DataInputAllowListValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MatchingRequirements_DataInputAllowListValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MatchingRequirements_DataInputAllowListValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MatchingRequirements_DataInputAllowListValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MatchingRequirements_DataInputAllowListValidationError) ErrorName() string { + return "MatchingRequirements_DataInputAllowListValidationError" +} + +// Error satisfies the builtin error interface +func (e MatchingRequirements_DataInputAllowListValidationError) 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 %sMatchingRequirements_DataInputAllowList.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MatchingRequirements_DataInputAllowListValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MatchingRequirements_DataInputAllowListValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/common/matcher/action/v3/skip_action.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/common/matcher/action/v3/skip_action.pb.go new file mode 100644 index 0000000000000..4d87f1ce19dfb --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/common/matcher/action/v3/skip_action.pb.go @@ -0,0 +1,165 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/common/matcher/action/v3/skip_action.proto + +package actionv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for the SkipFilter match action. When matching results in this action, the +// associated filter will be ignored for all filter callbacks (e.g. “encodeHeaders“, “encodeData“, +// etc. for HTTP filters) after the matcher arrives at the match, including the callback that +// caused the match result. For example, when used with a HTTP filter and the match result was +// resolved after receiving the HTTP response headers, the HTTP filter will *not* receive the +// response header callback. +// +// As a result, if this match action is resolved before the first filter callback (e.g. HTTP request +// headers), the filter will be completely skipped. +type SkipFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SkipFilter) Reset() { + *x = SkipFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SkipFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SkipFilter) ProtoMessage() {} + +func (x *SkipFilter) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SkipFilter.ProtoReflect.Descriptor instead. +func (*SkipFilter) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_rawDesc = []byte{ + 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0c, 0x0a, 0x0a, 0x53, 0x6b, 0x69, 0x70, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0xbf, 0x01, 0x0a, 0x3f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x53, 0x6b, 0x69, 0x70, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x61, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_rawDescData = file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_rawDesc +) + +func file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_rawDescData) + }) + return file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_rawDescData +} + +var file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_goTypes = []interface{}{ + (*SkipFilter)(nil), // 0: envoy.extensions.filters.common.matcher.action.v3.SkipFilter +} +var file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_init() } +func file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_init() { + if File_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SkipFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto = out.File + file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_rawDesc = nil + file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_goTypes = nil + file_envoy_extensions_filters_common_matcher_action_v3_skip_action_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/common/matcher/action/v3/skip_action.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/common/matcher/action/v3/skip_action.pb.validate.go new file mode 100644 index 0000000000000..4e59f2a00cefd --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/common/matcher/action/v3/skip_action.pb.validate.go @@ -0,0 +1,134 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/common/matcher/action/v3/skip_action.proto + +package actionv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on SkipFilter 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 *SkipFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SkipFilter 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 SkipFilterMultiError, or +// nil if none found. +func (m *SkipFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *SkipFilter) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return SkipFilterMultiError(errors) + } + return nil +} + +// SkipFilterMultiError is an error wrapping multiple validation errors +// returned by SkipFilter.ValidateAll() if the designated constraints aren't met. +type SkipFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SkipFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SkipFilterMultiError) AllErrors() []error { return m } + +// SkipFilterValidationError is the validation error returned by +// SkipFilter.Validate if the designated constraints aren't met. +type SkipFilterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SkipFilterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SkipFilterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SkipFilterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SkipFilterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SkipFilterValidationError) ErrorName() string { return "SkipFilterValidationError" } + +// Error satisfies the builtin error interface +func (e SkipFilterValidationError) 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 %sSkipFilter.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SkipFilterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SkipFilterValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.pb.go new file mode 100644 index 0000000000000..3cd1c3e2907a1 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.pb.go @@ -0,0 +1,605 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.proto + +package adaptive_concurrencyv3 + +import ( + v31 "github.com/cilium/proxy/go/envoy/config/core/v3" + v3 "github.com/cilium/proxy/go/envoy/type/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration parameters for the gradient controller. +type GradientControllerConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The percentile to use when summarizing aggregated samples. Defaults to p50. + SampleAggregatePercentile *v3.Percent `protobuf:"bytes,1,opt,name=sample_aggregate_percentile,json=sampleAggregatePercentile,proto3" json:"sample_aggregate_percentile,omitempty"` + ConcurrencyLimitParams *GradientControllerConfig_ConcurrencyLimitCalculationParams `protobuf:"bytes,2,opt,name=concurrency_limit_params,json=concurrencyLimitParams,proto3" json:"concurrency_limit_params,omitempty"` + MinRttCalcParams *GradientControllerConfig_MinimumRTTCalculationParams `protobuf:"bytes,3,opt,name=min_rtt_calc_params,json=minRttCalcParams,proto3" json:"min_rtt_calc_params,omitempty"` +} + +func (x *GradientControllerConfig) Reset() { + *x = GradientControllerConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GradientControllerConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GradientControllerConfig) ProtoMessage() {} + +func (x *GradientControllerConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GradientControllerConfig.ProtoReflect.Descriptor instead. +func (*GradientControllerConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_rawDescGZIP(), []int{0} +} + +func (x *GradientControllerConfig) GetSampleAggregatePercentile() *v3.Percent { + if x != nil { + return x.SampleAggregatePercentile + } + return nil +} + +func (x *GradientControllerConfig) GetConcurrencyLimitParams() *GradientControllerConfig_ConcurrencyLimitCalculationParams { + if x != nil { + return x.ConcurrencyLimitParams + } + return nil +} + +func (x *GradientControllerConfig) GetMinRttCalcParams() *GradientControllerConfig_MinimumRTTCalculationParams { + if x != nil { + return x.MinRttCalcParams + } + return nil +} + +type AdaptiveConcurrency struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to ConcurrencyControllerConfig: + // + // *AdaptiveConcurrency_GradientControllerConfig + ConcurrencyControllerConfig isAdaptiveConcurrency_ConcurrencyControllerConfig `protobuf_oneof:"concurrency_controller_config"` + // If set to false, the adaptive concurrency filter will operate as a pass-through filter. If the + // message is unspecified, the filter will be enabled. + Enabled *v31.RuntimeFeatureFlag `protobuf:"bytes,2,opt,name=enabled,proto3" json:"enabled,omitempty"` +} + +func (x *AdaptiveConcurrency) Reset() { + *x = AdaptiveConcurrency{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AdaptiveConcurrency) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdaptiveConcurrency) ProtoMessage() {} + +func (x *AdaptiveConcurrency) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdaptiveConcurrency.ProtoReflect.Descriptor instead. +func (*AdaptiveConcurrency) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_rawDescGZIP(), []int{1} +} + +func (m *AdaptiveConcurrency) GetConcurrencyControllerConfig() isAdaptiveConcurrency_ConcurrencyControllerConfig { + if m != nil { + return m.ConcurrencyControllerConfig + } + return nil +} + +func (x *AdaptiveConcurrency) GetGradientControllerConfig() *GradientControllerConfig { + if x, ok := x.GetConcurrencyControllerConfig().(*AdaptiveConcurrency_GradientControllerConfig); ok { + return x.GradientControllerConfig + } + return nil +} + +func (x *AdaptiveConcurrency) GetEnabled() *v31.RuntimeFeatureFlag { + if x != nil { + return x.Enabled + } + return nil +} + +type isAdaptiveConcurrency_ConcurrencyControllerConfig interface { + isAdaptiveConcurrency_ConcurrencyControllerConfig() +} + +type AdaptiveConcurrency_GradientControllerConfig struct { + // Gradient concurrency control will be used. + GradientControllerConfig *GradientControllerConfig `protobuf:"bytes,1,opt,name=gradient_controller_config,json=gradientControllerConfig,proto3,oneof"` +} + +func (*AdaptiveConcurrency_GradientControllerConfig) isAdaptiveConcurrency_ConcurrencyControllerConfig() { +} + +// Parameters controlling the periodic recalculation of the concurrency limit from sampled request +// latencies. +type GradientControllerConfig_ConcurrencyLimitCalculationParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The allowed upper-bound on the calculated concurrency limit. Defaults to 1000. + MaxConcurrencyLimit *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=max_concurrency_limit,json=maxConcurrencyLimit,proto3" json:"max_concurrency_limit,omitempty"` + // The period of time samples are taken to recalculate the concurrency limit. + ConcurrencyUpdateInterval *durationpb.Duration `protobuf:"bytes,3,opt,name=concurrency_update_interval,json=concurrencyUpdateInterval,proto3" json:"concurrency_update_interval,omitempty"` +} + +func (x *GradientControllerConfig_ConcurrencyLimitCalculationParams) Reset() { + *x = GradientControllerConfig_ConcurrencyLimitCalculationParams{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GradientControllerConfig_ConcurrencyLimitCalculationParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GradientControllerConfig_ConcurrencyLimitCalculationParams) ProtoMessage() {} + +func (x *GradientControllerConfig_ConcurrencyLimitCalculationParams) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GradientControllerConfig_ConcurrencyLimitCalculationParams.ProtoReflect.Descriptor instead. +func (*GradientControllerConfig_ConcurrencyLimitCalculationParams) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *GradientControllerConfig_ConcurrencyLimitCalculationParams) GetMaxConcurrencyLimit() *wrapperspb.UInt32Value { + if x != nil { + return x.MaxConcurrencyLimit + } + return nil +} + +func (x *GradientControllerConfig_ConcurrencyLimitCalculationParams) GetConcurrencyUpdateInterval() *durationpb.Duration { + if x != nil { + return x.ConcurrencyUpdateInterval + } + return nil +} + +// Parameters controlling the periodic minRTT recalculation. +// [#next-free-field: 6] +type GradientControllerConfig_MinimumRTTCalculationParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The time interval between recalculating the minimum request round-trip time. Has to be + // positive. + Interval *durationpb.Duration `protobuf:"bytes,1,opt,name=interval,proto3" json:"interval,omitempty"` + // The number of requests to aggregate/sample during the minRTT recalculation window before + // updating. Defaults to 50. + RequestCount *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=request_count,json=requestCount,proto3" json:"request_count,omitempty"` + // Randomized time delta that will be introduced to the start of the minRTT calculation window. + // This is represented as a percentage of the interval duration. Defaults to 15%. + // + // Example: If the interval is 10s and the jitter is 15%, the next window will begin + // somewhere in the range (10s - 11.5s). + Jitter *v3.Percent `protobuf:"bytes,3,opt,name=jitter,proto3" json:"jitter,omitempty"` + // The concurrency limit set while measuring the minRTT. Defaults to 3. + MinConcurrency *wrapperspb.UInt32Value `protobuf:"bytes,4,opt,name=min_concurrency,json=minConcurrency,proto3" json:"min_concurrency,omitempty"` + // Amount added to the measured minRTT to add stability to the concurrency limit during natural + // variability in latency. This is expressed as a percentage of the measured value and can be + // adjusted to allow more or less tolerance to the sampled latency values. + // + // Defaults to 25%. + Buffer *v3.Percent `protobuf:"bytes,5,opt,name=buffer,proto3" json:"buffer,omitempty"` +} + +func (x *GradientControllerConfig_MinimumRTTCalculationParams) Reset() { + *x = GradientControllerConfig_MinimumRTTCalculationParams{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GradientControllerConfig_MinimumRTTCalculationParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GradientControllerConfig_MinimumRTTCalculationParams) ProtoMessage() {} + +func (x *GradientControllerConfig_MinimumRTTCalculationParams) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GradientControllerConfig_MinimumRTTCalculationParams.ProtoReflect.Descriptor instead. +func (*GradientControllerConfig_MinimumRTTCalculationParams) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *GradientControllerConfig_MinimumRTTCalculationParams) GetInterval() *durationpb.Duration { + if x != nil { + return x.Interval + } + return nil +} + +func (x *GradientControllerConfig_MinimumRTTCalculationParams) GetRequestCount() *wrapperspb.UInt32Value { + if x != nil { + return x.RequestCount + } + return nil +} + +func (x *GradientControllerConfig_MinimumRTTCalculationParams) GetJitter() *v3.Percent { + if x != nil { + return x.Jitter + } + return nil +} + +func (x *GradientControllerConfig_MinimumRTTCalculationParams) GetMinConcurrency() *wrapperspb.UInt32Value { + if x != nil { + return x.MinConcurrency + } + return nil +} + +func (x *GradientControllerConfig_MinimumRTTCalculationParams) GetBuffer() *v3.Percent { + if x != nil { + return x.Buffer + } + return nil +} + +var File_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_rawDesc = []byte{ + 0x0a, 0x50, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x61, 0x64, 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x63, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x61, 0x64, 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x69, 0x6e, 0x67, 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, 0xdf, 0x0a, 0x0a, 0x18, 0x47, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x56, 0x0a, 0x1b, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x19, 0x73, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, + 0x63, 0x65, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x12, 0xb5, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6e, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x71, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x61, 0x70, 0x74, + 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x2e, + 0x76, 0x33, 0x2e, 0x47, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x61, 0x6c, 0x63, + 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x16, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0xa4, 0x01, 0x0a, 0x13, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x74, 0x74, 0x5f, 0x63, 0x61, 0x6c, 0x63, + 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x6b, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, + 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x63, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4d, + 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x54, 0x54, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x6d, 0x69, 0x6e, 0x52, 0x74, 0x74, 0x43, 0x61, 0x6c, 0x63, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0xde, 0x02, 0x0a, 0x21, 0x43, 0x6f, 0x6e, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x61, 0x6c, 0x63, 0x75, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x59, 0x0a, 0x15, + 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, + 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, + 0x20, 0x00, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x63, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x65, 0x0a, 0x1b, 0x63, 0x6f, 0x6e, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x08, + 0x01, 0x2a, 0x00, 0x52, 0x19, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a, 0x77, + 0x9a, 0xc5, 0x88, 0x1e, 0x72, 0x0a, 0x70, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x61, 0x64, 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x61, + 0x64, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, + 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0xd3, 0x03, 0x0a, 0x1b, 0x4d, 0x69, 0x6e, 0x69, + 0x6d, 0x75, 0x6d, 0x52, 0x54, 0x54, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x45, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0xaa, 0x01, 0x08, 0x08, 0x01, 0x32, 0x04, + 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x4a, + 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x0c, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x06, 0x6a, 0x69, + 0x74, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, + 0x6e, 0x74, 0x52, 0x06, 0x6a, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x0f, 0x6d, 0x69, + 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x0e, 0x6d, 0x69, 0x6e, 0x43, + 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x2e, 0x0a, 0x06, 0x62, 0x75, + 0x66, 0x66, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, + 0x6e, 0x74, 0x52, 0x06, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x3a, 0x71, 0x9a, 0xc5, 0x88, 0x1e, + 0x6c, 0x0a, 0x6a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x61, 0x70, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, + 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x54, 0x54, 0x43, 0x61, 0x6c, 0x63, + 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x55, 0x9a, + 0xc5, 0x88, 0x1e, 0x50, 0x0a, 0x4e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, + 0x64, 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x72, 0x61, 0x64, + 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x22, 0xed, 0x02, 0x0a, 0x13, 0x41, 0x64, 0x61, 0x70, 0x74, 0x69, 0x76, + 0x65, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x99, 0x01, 0x0a, + 0x1a, 0x67, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x4f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x61, 0x64, 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x61, 0x64, 0x69, 0x65, + 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x18, + 0x67, 0x72, 0x61, 0x64, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, + 0x6c, 0x61, 0x67, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x50, 0x9a, 0xc5, + 0x88, 0x1e, 0x4b, 0x0a, 0x49, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, + 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x63, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x64, 0x61, 0x70, 0x74, + 0x69, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x42, 0x24, + 0x0a, 0x1d, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x03, 0xf8, 0x42, 0x01, 0x42, 0xde, 0x01, 0x0a, 0x43, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x18, 0x41, 0x64, + 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, + 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x73, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x61, + 0x64, 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x63, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x64, 0x61, 0x70, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_rawDescData = file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_rawDesc +) + +func file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_rawDescData +} + +var file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_goTypes = []interface{}{ + (*GradientControllerConfig)(nil), // 0: envoy.extensions.filters.http.adaptive_concurrency.v3.GradientControllerConfig + (*AdaptiveConcurrency)(nil), // 1: envoy.extensions.filters.http.adaptive_concurrency.v3.AdaptiveConcurrency + (*GradientControllerConfig_ConcurrencyLimitCalculationParams)(nil), // 2: envoy.extensions.filters.http.adaptive_concurrency.v3.GradientControllerConfig.ConcurrencyLimitCalculationParams + (*GradientControllerConfig_MinimumRTTCalculationParams)(nil), // 3: envoy.extensions.filters.http.adaptive_concurrency.v3.GradientControllerConfig.MinimumRTTCalculationParams + (*v3.Percent)(nil), // 4: envoy.type.v3.Percent + (*v31.RuntimeFeatureFlag)(nil), // 5: envoy.config.core.v3.RuntimeFeatureFlag + (*wrapperspb.UInt32Value)(nil), // 6: google.protobuf.UInt32Value + (*durationpb.Duration)(nil), // 7: google.protobuf.Duration +} +var file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_depIdxs = []int32{ + 4, // 0: envoy.extensions.filters.http.adaptive_concurrency.v3.GradientControllerConfig.sample_aggregate_percentile:type_name -> envoy.type.v3.Percent + 2, // 1: envoy.extensions.filters.http.adaptive_concurrency.v3.GradientControllerConfig.concurrency_limit_params:type_name -> envoy.extensions.filters.http.adaptive_concurrency.v3.GradientControllerConfig.ConcurrencyLimitCalculationParams + 3, // 2: envoy.extensions.filters.http.adaptive_concurrency.v3.GradientControllerConfig.min_rtt_calc_params:type_name -> envoy.extensions.filters.http.adaptive_concurrency.v3.GradientControllerConfig.MinimumRTTCalculationParams + 0, // 3: envoy.extensions.filters.http.adaptive_concurrency.v3.AdaptiveConcurrency.gradient_controller_config:type_name -> envoy.extensions.filters.http.adaptive_concurrency.v3.GradientControllerConfig + 5, // 4: envoy.extensions.filters.http.adaptive_concurrency.v3.AdaptiveConcurrency.enabled:type_name -> envoy.config.core.v3.RuntimeFeatureFlag + 6, // 5: envoy.extensions.filters.http.adaptive_concurrency.v3.GradientControllerConfig.ConcurrencyLimitCalculationParams.max_concurrency_limit:type_name -> google.protobuf.UInt32Value + 7, // 6: envoy.extensions.filters.http.adaptive_concurrency.v3.GradientControllerConfig.ConcurrencyLimitCalculationParams.concurrency_update_interval:type_name -> google.protobuf.Duration + 7, // 7: envoy.extensions.filters.http.adaptive_concurrency.v3.GradientControllerConfig.MinimumRTTCalculationParams.interval:type_name -> google.protobuf.Duration + 6, // 8: envoy.extensions.filters.http.adaptive_concurrency.v3.GradientControllerConfig.MinimumRTTCalculationParams.request_count:type_name -> google.protobuf.UInt32Value + 4, // 9: envoy.extensions.filters.http.adaptive_concurrency.v3.GradientControllerConfig.MinimumRTTCalculationParams.jitter:type_name -> envoy.type.v3.Percent + 6, // 10: envoy.extensions.filters.http.adaptive_concurrency.v3.GradientControllerConfig.MinimumRTTCalculationParams.min_concurrency:type_name -> google.protobuf.UInt32Value + 4, // 11: envoy.extensions.filters.http.adaptive_concurrency.v3.GradientControllerConfig.MinimumRTTCalculationParams.buffer:type_name -> envoy.type.v3.Percent + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_init() +} +func file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_init() { + if File_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GradientControllerConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AdaptiveConcurrency); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GradientControllerConfig_ConcurrencyLimitCalculationParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GradientControllerConfig_MinimumRTTCalculationParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*AdaptiveConcurrency_GradientControllerConfig)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto = out.File + file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_rawDesc = nil + file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_goTypes = nil + file_envoy_extensions_filters_http_adaptive_concurrency_v3_adaptive_concurrency_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.pb.validate.go new file mode 100644 index 0000000000000..5868fba3048b5 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.pb.validate.go @@ -0,0 +1,847 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/adaptive_concurrency/v3/adaptive_concurrency.proto + +package adaptive_concurrencyv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on GradientControllerConfig 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 *GradientControllerConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GradientControllerConfig 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 +// GradientControllerConfigMultiError, or nil if none found. +func (m *GradientControllerConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *GradientControllerConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetSampleAggregatePercentile()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GradientControllerConfigValidationError{ + field: "SampleAggregatePercentile", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GradientControllerConfigValidationError{ + field: "SampleAggregatePercentile", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSampleAggregatePercentile()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GradientControllerConfigValidationError{ + field: "SampleAggregatePercentile", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetConcurrencyLimitParams() == nil { + err := GradientControllerConfigValidationError{ + field: "ConcurrencyLimitParams", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetConcurrencyLimitParams()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GradientControllerConfigValidationError{ + field: "ConcurrencyLimitParams", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GradientControllerConfigValidationError{ + field: "ConcurrencyLimitParams", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConcurrencyLimitParams()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GradientControllerConfigValidationError{ + field: "ConcurrencyLimitParams", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetMinRttCalcParams() == nil { + err := GradientControllerConfigValidationError{ + field: "MinRttCalcParams", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetMinRttCalcParams()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GradientControllerConfigValidationError{ + field: "MinRttCalcParams", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GradientControllerConfigValidationError{ + field: "MinRttCalcParams", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMinRttCalcParams()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GradientControllerConfigValidationError{ + field: "MinRttCalcParams", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return GradientControllerConfigMultiError(errors) + } + return nil +} + +// GradientControllerConfigMultiError is an error wrapping multiple validation +// errors returned by GradientControllerConfig.ValidateAll() if the designated +// constraints aren't met. +type GradientControllerConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GradientControllerConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GradientControllerConfigMultiError) AllErrors() []error { return m } + +// GradientControllerConfigValidationError is the validation error returned by +// GradientControllerConfig.Validate if the designated constraints aren't met. +type GradientControllerConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GradientControllerConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GradientControllerConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GradientControllerConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GradientControllerConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GradientControllerConfigValidationError) ErrorName() string { + return "GradientControllerConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e GradientControllerConfigValidationError) 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 %sGradientControllerConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GradientControllerConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GradientControllerConfigValidationError{} + +// Validate checks the field values on AdaptiveConcurrency 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 *AdaptiveConcurrency) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AdaptiveConcurrency 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 +// AdaptiveConcurrencyMultiError, or nil if none found. +func (m *AdaptiveConcurrency) ValidateAll() error { + return m.validate(true) +} + +func (m *AdaptiveConcurrency) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdaptiveConcurrencyValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdaptiveConcurrencyValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AdaptiveConcurrencyValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.ConcurrencyControllerConfig.(type) { + + case *AdaptiveConcurrency_GradientControllerConfig: + + if m.GetGradientControllerConfig() == nil { + err := AdaptiveConcurrencyValidationError{ + field: "GradientControllerConfig", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetGradientControllerConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdaptiveConcurrencyValidationError{ + field: "GradientControllerConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdaptiveConcurrencyValidationError{ + field: "GradientControllerConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGradientControllerConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AdaptiveConcurrencyValidationError{ + field: "GradientControllerConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := AdaptiveConcurrencyValidationError{ + field: "ConcurrencyControllerConfig", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return AdaptiveConcurrencyMultiError(errors) + } + return nil +} + +// AdaptiveConcurrencyMultiError is an error wrapping multiple validation +// errors returned by AdaptiveConcurrency.ValidateAll() if the designated +// constraints aren't met. +type AdaptiveConcurrencyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AdaptiveConcurrencyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AdaptiveConcurrencyMultiError) AllErrors() []error { return m } + +// AdaptiveConcurrencyValidationError is the validation error returned by +// AdaptiveConcurrency.Validate if the designated constraints aren't met. +type AdaptiveConcurrencyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AdaptiveConcurrencyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AdaptiveConcurrencyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AdaptiveConcurrencyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AdaptiveConcurrencyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AdaptiveConcurrencyValidationError) ErrorName() string { + return "AdaptiveConcurrencyValidationError" +} + +// Error satisfies the builtin error interface +func (e AdaptiveConcurrencyValidationError) 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 %sAdaptiveConcurrency.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AdaptiveConcurrencyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AdaptiveConcurrencyValidationError{} + +// Validate checks the field values on +// GradientControllerConfig_ConcurrencyLimitCalculationParams 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 *GradientControllerConfig_ConcurrencyLimitCalculationParams) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// GradientControllerConfig_ConcurrencyLimitCalculationParams 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 +// GradientControllerConfig_ConcurrencyLimitCalculationParamsMultiError, or +// nil if none found. +func (m *GradientControllerConfig_ConcurrencyLimitCalculationParams) ValidateAll() error { + return m.validate(true) +} + +func (m *GradientControllerConfig_ConcurrencyLimitCalculationParams) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if wrapper := m.GetMaxConcurrencyLimit(); wrapper != nil { + + if wrapper.GetValue() <= 0 { + err := GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError{ + field: "MaxConcurrencyLimit", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if m.GetConcurrencyUpdateInterval() == nil { + err := GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError{ + field: "ConcurrencyUpdateInterval", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if d := m.GetConcurrencyUpdateInterval(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError{ + field: "ConcurrencyUpdateInterval", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError{ + field: "ConcurrencyUpdateInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if len(errors) > 0 { + return GradientControllerConfig_ConcurrencyLimitCalculationParamsMultiError(errors) + } + return nil +} + +// GradientControllerConfig_ConcurrencyLimitCalculationParamsMultiError is an +// error wrapping multiple validation errors returned by +// GradientControllerConfig_ConcurrencyLimitCalculationParams.ValidateAll() if +// the designated constraints aren't met. +type GradientControllerConfig_ConcurrencyLimitCalculationParamsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GradientControllerConfig_ConcurrencyLimitCalculationParamsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GradientControllerConfig_ConcurrencyLimitCalculationParamsMultiError) AllErrors() []error { + return m +} + +// GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError is +// the validation error returned by +// GradientControllerConfig_ConcurrencyLimitCalculationParams.Validate if the +// designated constraints aren't met. +type GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError) Field() string { + return e.field +} + +// Reason function returns reason value. +func (e GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError) Cause() error { + return e.cause +} + +// Key function returns key value. +func (e GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError) Key() bool { + return e.key +} + +// ErrorName returns error name. +func (e GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError) ErrorName() string { + return "GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError" +} + +// Error satisfies the builtin error interface +func (e GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError) 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 %sGradientControllerConfig_ConcurrencyLimitCalculationParams.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GradientControllerConfig_ConcurrencyLimitCalculationParamsValidationError{} + +// Validate checks the field values on +// GradientControllerConfig_MinimumRTTCalculationParams 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 *GradientControllerConfig_MinimumRTTCalculationParams) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// GradientControllerConfig_MinimumRTTCalculationParams 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 +// GradientControllerConfig_MinimumRTTCalculationParamsMultiError, or nil if +// none found. +func (m *GradientControllerConfig_MinimumRTTCalculationParams) ValidateAll() error { + return m.validate(true) +} + +func (m *GradientControllerConfig_MinimumRTTCalculationParams) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetInterval() == nil { + err := GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + field: "Interval", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if d := m.GetInterval(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + field: "Interval", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) + + if dur < gte { + err := GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + field: "Interval", + reason: "value must be greater than or equal to 1ms", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if wrapper := m.GetRequestCount(); wrapper != nil { + + if wrapper.GetValue() <= 0 { + err := GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + field: "RequestCount", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if all { + switch v := interface{}(m.GetJitter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + field: "Jitter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + field: "Jitter", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetJitter()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + field: "Jitter", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if wrapper := m.GetMinConcurrency(); wrapper != nil { + + if wrapper.GetValue() <= 0 { + err := GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + field: "MinConcurrency", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if all { + switch v := interface{}(m.GetBuffer()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + field: "Buffer", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + field: "Buffer", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBuffer()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GradientControllerConfig_MinimumRTTCalculationParamsValidationError{ + field: "Buffer", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return GradientControllerConfig_MinimumRTTCalculationParamsMultiError(errors) + } + return nil +} + +// GradientControllerConfig_MinimumRTTCalculationParamsMultiError is an error +// wrapping multiple validation errors returned by +// GradientControllerConfig_MinimumRTTCalculationParams.ValidateAll() if the +// designated constraints aren't met. +type GradientControllerConfig_MinimumRTTCalculationParamsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GradientControllerConfig_MinimumRTTCalculationParamsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GradientControllerConfig_MinimumRTTCalculationParamsMultiError) AllErrors() []error { return m } + +// GradientControllerConfig_MinimumRTTCalculationParamsValidationError is the +// validation error returned by +// GradientControllerConfig_MinimumRTTCalculationParams.Validate if the +// designated constraints aren't met. +type GradientControllerConfig_MinimumRTTCalculationParamsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GradientControllerConfig_MinimumRTTCalculationParamsValidationError) Field() string { + return e.field +} + +// Reason function returns reason value. +func (e GradientControllerConfig_MinimumRTTCalculationParamsValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e GradientControllerConfig_MinimumRTTCalculationParamsValidationError) Cause() error { + return e.cause +} + +// Key function returns key value. +func (e GradientControllerConfig_MinimumRTTCalculationParamsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GradientControllerConfig_MinimumRTTCalculationParamsValidationError) ErrorName() string { + return "GradientControllerConfig_MinimumRTTCalculationParamsValidationError" +} + +// Error satisfies the builtin error interface +func (e GradientControllerConfig_MinimumRTTCalculationParamsValidationError) 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 %sGradientControllerConfig_MinimumRTTCalculationParams.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GradientControllerConfig_MinimumRTTCalculationParamsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GradientControllerConfig_MinimumRTTCalculationParamsValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/admission_control/v3/admission_control.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/admission_control/v3/admission_control.pb.go new file mode 100644 index 0000000000000..cd9c22cce9195 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/admission_control/v3/admission_control.pb.go @@ -0,0 +1,570 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/admission_control/v3/admission_control.proto + +package admission_controlv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + v31 "github.com/cilium/proxy/go/envoy/type/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// [#next-free-field: 8] +type AdmissionControl struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If set to false, the admission control filter will operate as a pass-through filter. If the + // message is unspecified, the filter will be enabled. + Enabled *v3.RuntimeFeatureFlag `protobuf:"bytes,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + // Defines how a request is considered a success/failure. + // + // Types that are assignable to EvaluationCriteria: + // + // *AdmissionControl_SuccessCriteria_ + EvaluationCriteria isAdmissionControl_EvaluationCriteria `protobuf_oneof:"evaluation_criteria"` + // The sliding time window over which the success rate is calculated. The window is rounded to the + // nearest second. Defaults to 30s. + SamplingWindow *durationpb.Duration `protobuf:"bytes,3,opt,name=sampling_window,json=samplingWindow,proto3" json:"sampling_window,omitempty"` + // Rejection probability is defined by the formula:: + // + // max(0, (rq_count - rq_success_count / sr_threshold) / (rq_count + 1)) ^ (1 / aggression) + // + // The aggression dictates how heavily the admission controller will throttle requests upon SR + // dropping at or below the threshold. A value of 1 will result in a linear increase in + // rejection probability as SR drops. Any values less than 1.0, will be set to 1.0. If the + // message is unspecified, the aggression is 1.0. See `the admission control documentation + // `_ + // for a diagram illustrating this. + Aggression *v3.RuntimeDouble `protobuf:"bytes,4,opt,name=aggression,proto3" json:"aggression,omitempty"` + // Dictates the success rate at which the rejection probability is non-zero. As success rate drops + // below this threshold, rejection probability will increase. Any success rate above the threshold + // results in a rejection probability of 0. Defaults to 95%. + SrThreshold *v3.RuntimePercent `protobuf:"bytes,5,opt,name=sr_threshold,json=srThreshold,proto3" json:"sr_threshold,omitempty"` + // If the average RPS of the sampling window is below this threshold, the request + // will not be rejected, even if the success rate is lower than sr_threshold. + // Defaults to 0. + RpsThreshold *v3.RuntimeUInt32 `protobuf:"bytes,6,opt,name=rps_threshold,json=rpsThreshold,proto3" json:"rps_threshold,omitempty"` + // The probability of rejection will never exceed this value, even if the failure rate is rising. + // Defaults to 80%. + MaxRejectionProbability *v3.RuntimePercent `protobuf:"bytes,7,opt,name=max_rejection_probability,json=maxRejectionProbability,proto3" json:"max_rejection_probability,omitempty"` +} + +func (x *AdmissionControl) Reset() { + *x = AdmissionControl{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AdmissionControl) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdmissionControl) ProtoMessage() {} + +func (x *AdmissionControl) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdmissionControl.ProtoReflect.Descriptor instead. +func (*AdmissionControl) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDescGZIP(), []int{0} +} + +func (x *AdmissionControl) GetEnabled() *v3.RuntimeFeatureFlag { + if x != nil { + return x.Enabled + } + return nil +} + +func (m *AdmissionControl) GetEvaluationCriteria() isAdmissionControl_EvaluationCriteria { + if m != nil { + return m.EvaluationCriteria + } + return nil +} + +func (x *AdmissionControl) GetSuccessCriteria() *AdmissionControl_SuccessCriteria { + if x, ok := x.GetEvaluationCriteria().(*AdmissionControl_SuccessCriteria_); ok { + return x.SuccessCriteria + } + return nil +} + +func (x *AdmissionControl) GetSamplingWindow() *durationpb.Duration { + if x != nil { + return x.SamplingWindow + } + return nil +} + +func (x *AdmissionControl) GetAggression() *v3.RuntimeDouble { + if x != nil { + return x.Aggression + } + return nil +} + +func (x *AdmissionControl) GetSrThreshold() *v3.RuntimePercent { + if x != nil { + return x.SrThreshold + } + return nil +} + +func (x *AdmissionControl) GetRpsThreshold() *v3.RuntimeUInt32 { + if x != nil { + return x.RpsThreshold + } + return nil +} + +func (x *AdmissionControl) GetMaxRejectionProbability() *v3.RuntimePercent { + if x != nil { + return x.MaxRejectionProbability + } + return nil +} + +type isAdmissionControl_EvaluationCriteria interface { + isAdmissionControl_EvaluationCriteria() +} + +type AdmissionControl_SuccessCriteria_ struct { + SuccessCriteria *AdmissionControl_SuccessCriteria `protobuf:"bytes,2,opt,name=success_criteria,json=successCriteria,proto3,oneof"` +} + +func (*AdmissionControl_SuccessCriteria_) isAdmissionControl_EvaluationCriteria() {} + +// Default method of specifying what constitutes a successful request. All status codes that +// indicate a successful request must be explicitly specified if not relying on the default +// values. +type AdmissionControl_SuccessCriteria struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If HTTP criteria are unspecified, all HTTP status codes below 500 are treated as successful + // responses. + // + // .. note:: + // + // The default HTTP codes considered successful by the admission controller are done so due + // to the unlikelihood that sending fewer requests would change their behavior (for example: + // redirects, unauthorized access, or bad requests won't be alleviated by sending less + // traffic). + HttpCriteria *AdmissionControl_SuccessCriteria_HttpCriteria `protobuf:"bytes,1,opt,name=http_criteria,json=httpCriteria,proto3" json:"http_criteria,omitempty"` + // GRPC status codes to consider as request successes. If unspecified, defaults to: Ok, + // Cancelled, Unknown, InvalidArgument, NotFound, AlreadyExists, Unauthenticated, + // FailedPrecondition, OutOfRange, PermissionDenied, and Unimplemented. + // + // .. note:: + // + // The default gRPC codes that are considered successful by the admission controller are + // chosen because of the unlikelihood that sending fewer requests will change the behavior. + GrpcCriteria *AdmissionControl_SuccessCriteria_GrpcCriteria `protobuf:"bytes,2,opt,name=grpc_criteria,json=grpcCriteria,proto3" json:"grpc_criteria,omitempty"` +} + +func (x *AdmissionControl_SuccessCriteria) Reset() { + *x = AdmissionControl_SuccessCriteria{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AdmissionControl_SuccessCriteria) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdmissionControl_SuccessCriteria) ProtoMessage() {} + +func (x *AdmissionControl_SuccessCriteria) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdmissionControl_SuccessCriteria.ProtoReflect.Descriptor instead. +func (*AdmissionControl_SuccessCriteria) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *AdmissionControl_SuccessCriteria) GetHttpCriteria() *AdmissionControl_SuccessCriteria_HttpCriteria { + if x != nil { + return x.HttpCriteria + } + return nil +} + +func (x *AdmissionControl_SuccessCriteria) GetGrpcCriteria() *AdmissionControl_SuccessCriteria_GrpcCriteria { + if x != nil { + return x.GrpcCriteria + } + return nil +} + +type AdmissionControl_SuccessCriteria_HttpCriteria struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Status code ranges that constitute a successful request. Configurable codes are in the + // range [100, 600). + HttpSuccessStatus []*v31.Int32Range `protobuf:"bytes,1,rep,name=http_success_status,json=httpSuccessStatus,proto3" json:"http_success_status,omitempty"` +} + +func (x *AdmissionControl_SuccessCriteria_HttpCriteria) Reset() { + *x = AdmissionControl_SuccessCriteria_HttpCriteria{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AdmissionControl_SuccessCriteria_HttpCriteria) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdmissionControl_SuccessCriteria_HttpCriteria) ProtoMessage() {} + +func (x *AdmissionControl_SuccessCriteria_HttpCriteria) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdmissionControl_SuccessCriteria_HttpCriteria.ProtoReflect.Descriptor instead. +func (*AdmissionControl_SuccessCriteria_HttpCriteria) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDescGZIP(), []int{0, 0, 0} +} + +func (x *AdmissionControl_SuccessCriteria_HttpCriteria) GetHttpSuccessStatus() []*v31.Int32Range { + if x != nil { + return x.HttpSuccessStatus + } + return nil +} + +type AdmissionControl_SuccessCriteria_GrpcCriteria struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Status codes that constitute a successful request. + // Mappings can be found at: https://github.com/grpc/grpc/blob/master/doc/statuscodes.md. + GrpcSuccessStatus []uint32 `protobuf:"varint,1,rep,packed,name=grpc_success_status,json=grpcSuccessStatus,proto3" json:"grpc_success_status,omitempty"` +} + +func (x *AdmissionControl_SuccessCriteria_GrpcCriteria) Reset() { + *x = AdmissionControl_SuccessCriteria_GrpcCriteria{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AdmissionControl_SuccessCriteria_GrpcCriteria) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdmissionControl_SuccessCriteria_GrpcCriteria) ProtoMessage() {} + +func (x *AdmissionControl_SuccessCriteria_GrpcCriteria) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdmissionControl_SuccessCriteria_GrpcCriteria.ProtoReflect.Descriptor instead. +func (*AdmissionControl_SuccessCriteria_GrpcCriteria) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDescGZIP(), []int{0, 0, 1} +} + +func (x *AdmissionControl_SuccessCriteria_GrpcCriteria) GetGrpcSuccessStatus() []uint32 { + if x != nil { + return x.GrpcSuccessStatus + } + return nil +} + +var File_envoy_extensions_filters_http_admission_control_v3_admission_control_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDesc = []byte{ + 0x0a, 0x4a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x32, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x76, 0x33, + 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, + 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xc9, 0x08, 0x0a, 0x10, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x42, 0x0a, 0x07, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x46, 0x6c, 0x61, 0x67, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x81, 0x01, + 0x0a, 0x10, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x72, 0x69, 0x74, 0x65, 0x72, + 0x69, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x54, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x48, 0x00, + 0x52, 0x0f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, + 0x61, 0x12, 0x42, 0x0a, 0x0f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x77, 0x69, + 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x57, + 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x43, 0x0a, 0x0a, 0x61, 0x67, 0x67, 0x72, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x0a, + 0x61, 0x67, 0x67, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x0c, 0x73, 0x72, + 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x50, + 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x73, 0x72, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, + 0x6f, 0x6c, 0x64, 0x12, 0x48, 0x0a, 0x0d, 0x72, 0x70, 0x73, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, + 0x0c, 0x72, 0x70, 0x73, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x60, 0x0a, + 0x19, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, + 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x50, + 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x17, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x6a, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x1a, + 0xd2, 0x03, 0x0a, 0x0f, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x69, 0x74, 0x65, + 0x72, 0x69, 0x61, 0x12, 0x86, 0x01, 0x0a, 0x0d, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x72, 0x69, + 0x74, 0x65, 0x72, 0x69, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x61, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x76, 0x33, + 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, + 0x61, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x52, 0x0c, + 0x68, 0x74, 0x74, 0x70, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x12, 0x86, 0x01, 0x0a, + 0x0d, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x63, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x61, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x43, + 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x52, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x43, 0x72, 0x69, + 0x74, 0x65, 0x72, 0x69, 0x61, 0x1a, 0x63, 0x0a, 0x0c, 0x48, 0x74, 0x74, 0x70, 0x43, 0x72, 0x69, + 0x74, 0x65, 0x72, 0x69, 0x61, 0x12, 0x53, 0x0a, 0x13, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x11, 0x68, 0x74, 0x74, 0x70, 0x53, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x48, 0x0a, 0x0c, 0x47, 0x72, + 0x70, 0x63, 0x43, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x12, 0x38, 0x0a, 0x13, 0x67, 0x72, + 0x70, 0x63, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, + 0x01, 0x52, 0x11, 0x67, 0x72, 0x70, 0x63, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x42, 0x1a, 0x0a, 0x13, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x61, 0x12, 0x03, 0xf8, 0x42, 0x01, + 0x42, 0xd2, 0x01, 0x0a, 0x40, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2e, 0x76, 0x33, 0x42, 0x15, 0x41, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6d, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, + 0x68, 0x74, 0x74, 0x70, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDescData = file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDesc +) + +func file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDescData +} + +var file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_goTypes = []interface{}{ + (*AdmissionControl)(nil), // 0: envoy.extensions.filters.http.admission_control.v3.AdmissionControl + (*AdmissionControl_SuccessCriteria)(nil), // 1: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.SuccessCriteria + (*AdmissionControl_SuccessCriteria_HttpCriteria)(nil), // 2: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.SuccessCriteria.HttpCriteria + (*AdmissionControl_SuccessCriteria_GrpcCriteria)(nil), // 3: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.SuccessCriteria.GrpcCriteria + (*v3.RuntimeFeatureFlag)(nil), // 4: envoy.config.core.v3.RuntimeFeatureFlag + (*durationpb.Duration)(nil), // 5: google.protobuf.Duration + (*v3.RuntimeDouble)(nil), // 6: envoy.config.core.v3.RuntimeDouble + (*v3.RuntimePercent)(nil), // 7: envoy.config.core.v3.RuntimePercent + (*v3.RuntimeUInt32)(nil), // 8: envoy.config.core.v3.RuntimeUInt32 + (*v31.Int32Range)(nil), // 9: envoy.type.v3.Int32Range +} +var file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_depIdxs = []int32{ + 4, // 0: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.enabled:type_name -> envoy.config.core.v3.RuntimeFeatureFlag + 1, // 1: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.success_criteria:type_name -> envoy.extensions.filters.http.admission_control.v3.AdmissionControl.SuccessCriteria + 5, // 2: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.sampling_window:type_name -> google.protobuf.Duration + 6, // 3: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.aggression:type_name -> envoy.config.core.v3.RuntimeDouble + 7, // 4: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.sr_threshold:type_name -> envoy.config.core.v3.RuntimePercent + 8, // 5: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.rps_threshold:type_name -> envoy.config.core.v3.RuntimeUInt32 + 7, // 6: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.max_rejection_probability:type_name -> envoy.config.core.v3.RuntimePercent + 2, // 7: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.SuccessCriteria.http_criteria:type_name -> envoy.extensions.filters.http.admission_control.v3.AdmissionControl.SuccessCriteria.HttpCriteria + 3, // 8: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.SuccessCriteria.grpc_criteria:type_name -> envoy.extensions.filters.http.admission_control.v3.AdmissionControl.SuccessCriteria.GrpcCriteria + 9, // 9: envoy.extensions.filters.http.admission_control.v3.AdmissionControl.SuccessCriteria.HttpCriteria.http_success_status:type_name -> envoy.type.v3.Int32Range + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_init() } +func file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_init() { + if File_envoy_extensions_filters_http_admission_control_v3_admission_control_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AdmissionControl); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AdmissionControl_SuccessCriteria); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AdmissionControl_SuccessCriteria_HttpCriteria); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AdmissionControl_SuccessCriteria_GrpcCriteria); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*AdmissionControl_SuccessCriteria_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_admission_control_v3_admission_control_proto = out.File + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_rawDesc = nil + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_goTypes = nil + file_envoy_extensions_filters_http_admission_control_v3_admission_control_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/admission_control/v3/admission_control.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/admission_control/v3/admission_control.pb.validate.go new file mode 100644 index 0000000000000..d28824d6bcfe8 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/admission_control/v3/admission_control.pb.validate.go @@ -0,0 +1,788 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/admission_control/v3/admission_control.proto + +package admission_controlv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on AdmissionControl 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 *AdmissionControl) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AdmissionControl 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 +// AdmissionControlMultiError, or nil if none found. +func (m *AdmissionControl) ValidateAll() error { + return m.validate(true) +} + +func (m *AdmissionControl) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AdmissionControlValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetSamplingWindow()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "SamplingWindow", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "SamplingWindow", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSamplingWindow()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AdmissionControlValidationError{ + field: "SamplingWindow", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetAggression()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "Aggression", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "Aggression", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAggression()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AdmissionControlValidationError{ + field: "Aggression", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetSrThreshold()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "SrThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "SrThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSrThreshold()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AdmissionControlValidationError{ + field: "SrThreshold", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetRpsThreshold()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "RpsThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "RpsThreshold", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRpsThreshold()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AdmissionControlValidationError{ + field: "RpsThreshold", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetMaxRejectionProbability()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "MaxRejectionProbability", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "MaxRejectionProbability", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxRejectionProbability()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AdmissionControlValidationError{ + field: "MaxRejectionProbability", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.EvaluationCriteria.(type) { + + case *AdmissionControl_SuccessCriteria_: + + if all { + switch v := interface{}(m.GetSuccessCriteria()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "SuccessCriteria", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdmissionControlValidationError{ + field: "SuccessCriteria", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSuccessCriteria()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AdmissionControlValidationError{ + field: "SuccessCriteria", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := AdmissionControlValidationError{ + field: "EvaluationCriteria", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return AdmissionControlMultiError(errors) + } + return nil +} + +// AdmissionControlMultiError is an error wrapping multiple validation errors +// returned by AdmissionControl.ValidateAll() if the designated constraints +// aren't met. +type AdmissionControlMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AdmissionControlMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AdmissionControlMultiError) AllErrors() []error { return m } + +// AdmissionControlValidationError is the validation error returned by +// AdmissionControl.Validate if the designated constraints aren't met. +type AdmissionControlValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AdmissionControlValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AdmissionControlValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AdmissionControlValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AdmissionControlValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AdmissionControlValidationError) ErrorName() string { return "AdmissionControlValidationError" } + +// Error satisfies the builtin error interface +func (e AdmissionControlValidationError) 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 %sAdmissionControl.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AdmissionControlValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AdmissionControlValidationError{} + +// Validate checks the field values on AdmissionControl_SuccessCriteria 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 *AdmissionControl_SuccessCriteria) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AdmissionControl_SuccessCriteria 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 +// AdmissionControl_SuccessCriteriaMultiError, or nil if none found. +func (m *AdmissionControl_SuccessCriteria) ValidateAll() error { + return m.validate(true) +} + +func (m *AdmissionControl_SuccessCriteria) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetHttpCriteria()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdmissionControl_SuccessCriteriaValidationError{ + field: "HttpCriteria", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdmissionControl_SuccessCriteriaValidationError{ + field: "HttpCriteria", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpCriteria()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AdmissionControl_SuccessCriteriaValidationError{ + field: "HttpCriteria", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetGrpcCriteria()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdmissionControl_SuccessCriteriaValidationError{ + field: "GrpcCriteria", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdmissionControl_SuccessCriteriaValidationError{ + field: "GrpcCriteria", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcCriteria()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AdmissionControl_SuccessCriteriaValidationError{ + field: "GrpcCriteria", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return AdmissionControl_SuccessCriteriaMultiError(errors) + } + return nil +} + +// AdmissionControl_SuccessCriteriaMultiError is an error wrapping multiple +// validation errors returned by +// AdmissionControl_SuccessCriteria.ValidateAll() if the designated +// constraints aren't met. +type AdmissionControl_SuccessCriteriaMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AdmissionControl_SuccessCriteriaMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AdmissionControl_SuccessCriteriaMultiError) AllErrors() []error { return m } + +// AdmissionControl_SuccessCriteriaValidationError is the validation error +// returned by AdmissionControl_SuccessCriteria.Validate if the designated +// constraints aren't met. +type AdmissionControl_SuccessCriteriaValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AdmissionControl_SuccessCriteriaValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AdmissionControl_SuccessCriteriaValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AdmissionControl_SuccessCriteriaValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AdmissionControl_SuccessCriteriaValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AdmissionControl_SuccessCriteriaValidationError) ErrorName() string { + return "AdmissionControl_SuccessCriteriaValidationError" +} + +// Error satisfies the builtin error interface +func (e AdmissionControl_SuccessCriteriaValidationError) 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 %sAdmissionControl_SuccessCriteria.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AdmissionControl_SuccessCriteriaValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AdmissionControl_SuccessCriteriaValidationError{} + +// Validate checks the field values on +// AdmissionControl_SuccessCriteria_HttpCriteria 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 *AdmissionControl_SuccessCriteria_HttpCriteria) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// AdmissionControl_SuccessCriteria_HttpCriteria 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 +// AdmissionControl_SuccessCriteria_HttpCriteriaMultiError, or nil if none found. +func (m *AdmissionControl_SuccessCriteria_HttpCriteria) ValidateAll() error { + return m.validate(true) +} + +func (m *AdmissionControl_SuccessCriteria_HttpCriteria) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetHttpSuccessStatus()) < 1 { + err := AdmissionControl_SuccessCriteria_HttpCriteriaValidationError{ + field: "HttpSuccessStatus", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetHttpSuccessStatus() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AdmissionControl_SuccessCriteria_HttpCriteriaValidationError{ + field: fmt.Sprintf("HttpSuccessStatus[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AdmissionControl_SuccessCriteria_HttpCriteriaValidationError{ + field: fmt.Sprintf("HttpSuccessStatus[%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 AdmissionControl_SuccessCriteria_HttpCriteriaValidationError{ + field: fmt.Sprintf("HttpSuccessStatus[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return AdmissionControl_SuccessCriteria_HttpCriteriaMultiError(errors) + } + return nil +} + +// AdmissionControl_SuccessCriteria_HttpCriteriaMultiError is an error wrapping +// multiple validation errors returned by +// AdmissionControl_SuccessCriteria_HttpCriteria.ValidateAll() if the +// designated constraints aren't met. +type AdmissionControl_SuccessCriteria_HttpCriteriaMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AdmissionControl_SuccessCriteria_HttpCriteriaMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AdmissionControl_SuccessCriteria_HttpCriteriaMultiError) AllErrors() []error { return m } + +// AdmissionControl_SuccessCriteria_HttpCriteriaValidationError is the +// validation error returned by +// AdmissionControl_SuccessCriteria_HttpCriteria.Validate if the designated +// constraints aren't met. +type AdmissionControl_SuccessCriteria_HttpCriteriaValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AdmissionControl_SuccessCriteria_HttpCriteriaValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AdmissionControl_SuccessCriteria_HttpCriteriaValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e AdmissionControl_SuccessCriteria_HttpCriteriaValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AdmissionControl_SuccessCriteria_HttpCriteriaValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AdmissionControl_SuccessCriteria_HttpCriteriaValidationError) ErrorName() string { + return "AdmissionControl_SuccessCriteria_HttpCriteriaValidationError" +} + +// Error satisfies the builtin error interface +func (e AdmissionControl_SuccessCriteria_HttpCriteriaValidationError) 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 %sAdmissionControl_SuccessCriteria_HttpCriteria.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AdmissionControl_SuccessCriteria_HttpCriteriaValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AdmissionControl_SuccessCriteria_HttpCriteriaValidationError{} + +// Validate checks the field values on +// AdmissionControl_SuccessCriteria_GrpcCriteria 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 *AdmissionControl_SuccessCriteria_GrpcCriteria) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// AdmissionControl_SuccessCriteria_GrpcCriteria 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 +// AdmissionControl_SuccessCriteria_GrpcCriteriaMultiError, or nil if none found. +func (m *AdmissionControl_SuccessCriteria_GrpcCriteria) ValidateAll() error { + return m.validate(true) +} + +func (m *AdmissionControl_SuccessCriteria_GrpcCriteria) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetGrpcSuccessStatus()) < 1 { + err := AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError{ + field: "GrpcSuccessStatus", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return AdmissionControl_SuccessCriteria_GrpcCriteriaMultiError(errors) + } + return nil +} + +// AdmissionControl_SuccessCriteria_GrpcCriteriaMultiError is an error wrapping +// multiple validation errors returned by +// AdmissionControl_SuccessCriteria_GrpcCriteria.ValidateAll() if the +// designated constraints aren't met. +type AdmissionControl_SuccessCriteria_GrpcCriteriaMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AdmissionControl_SuccessCriteria_GrpcCriteriaMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AdmissionControl_SuccessCriteria_GrpcCriteriaMultiError) AllErrors() []error { return m } + +// AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError is the +// validation error returned by +// AdmissionControl_SuccessCriteria_GrpcCriteria.Validate if the designated +// constraints aren't met. +type AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError) ErrorName() string { + return "AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError" +} + +// Error satisfies the builtin error interface +func (e AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError) 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 %sAdmissionControl_SuccessCriteria_GrpcCriteria.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AdmissionControl_SuccessCriteria_GrpcCriteriaValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/alternate_protocols_cache/v3/alternate_protocols_cache.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/alternate_protocols_cache/v3/alternate_protocols_cache.pb.go new file mode 100644 index 0000000000000..f1dc0de5aac03 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/alternate_protocols_cache/v3/alternate_protocols_cache.pb.go @@ -0,0 +1,192 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/alternate_protocols_cache/v3/alternate_protocols_cache.proto + +package alternate_protocols_cachev3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for the alternate protocols cache HTTP filter. +// [#extension: envoy.filters.http.alternate_protocols_cache] +type FilterConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If set, causes the use of the alternate protocols cache, which is responsible for + // parsing and caching HTTP Alt-Svc headers. This enables the use of HTTP/3 for upstream + // servers that advertise supporting it. + // TODO(RyanTheOptimist): Make this field required when HTTP/3 is enabled via auto_http. + AlternateProtocolsCacheOptions *v3.AlternateProtocolsCacheOptions `protobuf:"bytes,1,opt,name=alternate_protocols_cache_options,json=alternateProtocolsCacheOptions,proto3" json:"alternate_protocols_cache_options,omitempty"` +} + +func (x *FilterConfig) Reset() { + *x = FilterConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilterConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilterConfig) ProtoMessage() {} + +func (x *FilterConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FilterConfig.ProtoReflect.Descriptor instead. +func (*FilterConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDescGZIP(), []int{0} +} + +func (x *FilterConfig) GetAlternateProtocolsCacheOptions() *v3.AlternateProtocolsCacheOptions { + if x != nil { + return x.AlternateProtocolsCacheOptions + } + return nil +} + +var File_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDesc = []byte{ + 0x0a, 0x5a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x73, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x6c, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, + 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3a, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x6c, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x5f, + 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8f, 0x01, 0x0a, + 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x7f, 0x0a, + 0x21, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x73, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x1e, + 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x73, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0xf1, + 0x01, 0x0a, 0x48, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, + 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x73, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x1c, 0x41, 0x6c, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x43, + 0x61, 0x63, 0x68, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x7d, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0x2f, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x61, + 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x73, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDescData = file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDesc +) + +func file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDescData +} + +var file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_goTypes = []interface{}{ + (*FilterConfig)(nil), // 0: envoy.extensions.filters.http.alternate_protocols_cache.v3.FilterConfig + (*v3.AlternateProtocolsCacheOptions)(nil), // 1: envoy.config.core.v3.AlternateProtocolsCacheOptions +} +var file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.http.alternate_protocols_cache.v3.FilterConfig.alternate_protocols_cache_options:type_name -> envoy.config.core.v3.AlternateProtocolsCacheOptions + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_init() +} +func file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_init() { + if File_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FilterConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto = out.File + file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_rawDesc = nil + file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_goTypes = nil + file_envoy_extensions_filters_http_alternate_protocols_cache_v3_alternate_protocols_cache_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/alternate_protocols_cache/v3/alternate_protocols_cache.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/alternate_protocols_cache/v3/alternate_protocols_cache.pb.validate.go new file mode 100644 index 0000000000000..d7906b239497d --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/alternate_protocols_cache/v3/alternate_protocols_cache.pb.validate.go @@ -0,0 +1,163 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/alternate_protocols_cache/v3/alternate_protocols_cache.proto + +package alternate_protocols_cachev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on FilterConfig 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 *FilterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterConfig 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 FilterConfigMultiError, or +// nil if none found. +func (m *FilterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetAlternateProtocolsCacheOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterConfigValidationError{ + field: "AlternateProtocolsCacheOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterConfigValidationError{ + field: "AlternateProtocolsCacheOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAlternateProtocolsCacheOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterConfigValidationError{ + field: "AlternateProtocolsCacheOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return FilterConfigMultiError(errors) + } + return nil +} + +// FilterConfigMultiError is an error wrapping multiple validation errors +// returned by FilterConfig.ValidateAll() if the designated constraints aren't met. +type FilterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterConfigMultiError) AllErrors() []error { return m } + +// FilterConfigValidationError is the validation error returned by +// FilterConfig.Validate if the designated constraints aren't met. +type FilterConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FilterConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FilterConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FilterConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FilterConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FilterConfigValidationError) ErrorName() string { return "FilterConfigValidationError" } + +// Error satisfies the builtin error interface +func (e FilterConfigValidationError) 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 %sFilterConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FilterConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FilterConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.pb.go new file mode 100644 index 0000000000000..73411eb1a77d3 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.pb.go @@ -0,0 +1,339 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.proto + +package aws_lambdav3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Config_InvocationMode int32 + +const ( + // This is the more common mode of invocation, in which Lambda responds after it has completed the function. In + // this mode the output of the Lambda function becomes the response of the HTTP request. + Config_SYNCHRONOUS Config_InvocationMode = 0 + // In this mode Lambda responds immediately but continues to process the function asynchronously. This mode can be + // used to signal events for example. In this mode, Lambda responds with an acknowledgment that it received the + // call which is translated to an HTTP 200 OK by the filter. + Config_ASYNCHRONOUS Config_InvocationMode = 1 +) + +// Enum value maps for Config_InvocationMode. +var ( + Config_InvocationMode_name = map[int32]string{ + 0: "SYNCHRONOUS", + 1: "ASYNCHRONOUS", + } + Config_InvocationMode_value = map[string]int32{ + "SYNCHRONOUS": 0, + "ASYNCHRONOUS": 1, + } +) + +func (x Config_InvocationMode) Enum() *Config_InvocationMode { + p := new(Config_InvocationMode) + *p = x + return p +} + +func (x Config_InvocationMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Config_InvocationMode) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_enumTypes[0].Descriptor() +} + +func (Config_InvocationMode) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_enumTypes[0] +} + +func (x Config_InvocationMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Config_InvocationMode.Descriptor instead. +func (Config_InvocationMode) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_rawDescGZIP(), []int{0, 0} +} + +// AWS Lambda filter config +type Config struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The ARN of the AWS Lambda to invoke when the filter is engaged + // Must be in the following format: + // arn::lambda:::function: + Arn string `protobuf:"bytes,1,opt,name=arn,proto3" json:"arn,omitempty"` + // Whether to transform the request (headers and body) to a JSON payload or pass it as is. + PayloadPassthrough bool `protobuf:"varint,2,opt,name=payload_passthrough,json=payloadPassthrough,proto3" json:"payload_passthrough,omitempty"` + // Determines the way to invoke the Lambda function. + InvocationMode Config_InvocationMode `protobuf:"varint,3,opt,name=invocation_mode,json=invocationMode,proto3,enum=envoy.extensions.filters.http.aws_lambda.v3.Config_InvocationMode" json:"invocation_mode,omitempty"` +} + +func (x *Config) Reset() { + *x = Config{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config) ProtoMessage() {} + +func (x *Config) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Config.ProtoReflect.Descriptor instead. +func (*Config) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_rawDescGZIP(), []int{0} +} + +func (x *Config) GetArn() string { + if x != nil { + return x.Arn + } + return "" +} + +func (x *Config) GetPayloadPassthrough() bool { + if x != nil { + return x.PayloadPassthrough + } + return false +} + +func (x *Config) GetInvocationMode() Config_InvocationMode { + if x != nil { + return x.InvocationMode + } + return Config_SYNCHRONOUS +} + +// Per-route configuration for AWS Lambda. This can be useful when invoking a different Lambda function or a different +// version of the same Lambda depending on the route. +type PerRouteConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InvokeConfig *Config `protobuf:"bytes,1,opt,name=invoke_config,json=invokeConfig,proto3" json:"invoke_config,omitempty"` +} + +func (x *PerRouteConfig) Reset() { + *x = PerRouteConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PerRouteConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PerRouteConfig) ProtoMessage() {} + +func (x *PerRouteConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PerRouteConfig.ProtoReflect.Descriptor instead. +func (*PerRouteConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_rawDescGZIP(), []int{1} +} + +func (x *PerRouteConfig) GetInvokeConfig() *Config { + if x != nil { + return x.InvokeConfig + } + return nil +} + +var File_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_rawDesc = []byte{ + 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x61, 0x77, 0x73, 0x5f, 0x6c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x77, + 0x73, 0x5f, 0x6c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x77, + 0x73, 0x5f, 0x6c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0xbb, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x19, 0x0a, 0x03, 0x61, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x03, 0x61, 0x72, 0x6e, 0x12, 0x2f, 0x0a, 0x13, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x74, 0x68, 0x72, 0x6f, + 0x75, 0x67, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x50, 0x61, 0x73, 0x73, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x12, 0x75, 0x0a, + 0x0f, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x77, 0x73, 0x5f, 0x6c, 0x61, 0x6d, 0x62, 0x64, + 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x49, 0x6e, 0x76, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x33, 0x0a, 0x0e, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x59, 0x4e, 0x43, 0x48, 0x52, + 0x4f, 0x4e, 0x4f, 0x55, 0x53, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x53, 0x59, 0x4e, 0x43, + 0x48, 0x52, 0x4f, 0x4e, 0x4f, 0x55, 0x53, 0x10, 0x01, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, + 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x77, 0x73, 0x5f, 0x6c, + 0x61, 0x6d, 0x62, 0x64, 0x61, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x22, 0xad, 0x01, 0x0a, 0x0e, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x58, 0x0a, 0x0d, 0x69, 0x6e, 0x76, 0x6f, 0x6b, + 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, + 0x77, 0x73, 0x5f, 0x6c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x0c, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x3a, 0x41, 0x9a, 0xc5, 0x88, 0x1e, 0x3c, 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x61, 0x77, 0x73, 0x5f, 0x6c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x42, 0xb6, 0x01, 0x0a, 0x39, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x77, 0x73, 0x5f, 0x6c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x2e, + 0x76, 0x33, 0x42, 0x0e, 0x41, 0x77, 0x73, 0x4c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x61, 0x77, 0x73, 0x5f, 0x6c, + 0x61, 0x6d, 0x62, 0x64, 0x61, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x77, 0x73, 0x5f, 0x6c, 0x61, 0x6d, + 0x62, 0x64, 0x61, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_rawDescData = file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_rawDesc +) + +func file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_rawDescData +} + +var file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_goTypes = []interface{}{ + (Config_InvocationMode)(0), // 0: envoy.extensions.filters.http.aws_lambda.v3.Config.InvocationMode + (*Config)(nil), // 1: envoy.extensions.filters.http.aws_lambda.v3.Config + (*PerRouteConfig)(nil), // 2: envoy.extensions.filters.http.aws_lambda.v3.PerRouteConfig +} +var file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_depIdxs = []int32{ + 0, // 0: envoy.extensions.filters.http.aws_lambda.v3.Config.invocation_mode:type_name -> envoy.extensions.filters.http.aws_lambda.v3.Config.InvocationMode + 1, // 1: envoy.extensions.filters.http.aws_lambda.v3.PerRouteConfig.invoke_config:type_name -> envoy.extensions.filters.http.aws_lambda.v3.Config + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_init() } +func file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_init() { + if File_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Config); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PerRouteConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_rawDesc, + NumEnums: 1, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_depIdxs, + EnumInfos: file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_enumTypes, + MessageInfos: file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto = out.File + file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_rawDesc = nil + file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_goTypes = nil + file_envoy_extensions_filters_http_aws_lambda_v3_aws_lambda_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.pb.validate.go new file mode 100644 index 0000000000000..a64c32b6c6ac5 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.pb.validate.go @@ -0,0 +1,285 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.proto + +package aws_lambdav3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Config 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 *Config) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config 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 ConfigMultiError, or nil if none found. +func (m *Config) ValidateAll() error { + return m.validate(true) +} + +func (m *Config) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetArn()) < 1 { + err := ConfigValidationError{ + field: "Arn", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for PayloadPassthrough + + if _, ok := Config_InvocationMode_name[int32(m.GetInvocationMode())]; !ok { + err := ConfigValidationError{ + field: "InvocationMode", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return ConfigMultiError(errors) + } + return nil +} + +// ConfigMultiError is an error wrapping multiple validation errors returned by +// Config.ValidateAll() if the designated constraints aren't met. +type ConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigMultiError) AllErrors() []error { return m } + +// ConfigValidationError is the validation error returned by Config.Validate if +// the designated constraints aren't met. +type ConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConfigValidationError) ErrorName() string { return "ConfigValidationError" } + +// Error satisfies the builtin error interface +func (e ConfigValidationError) 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 %sConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConfigValidationError{} + +// Validate checks the field values on PerRouteConfig 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 *PerRouteConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PerRouteConfig 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 PerRouteConfigMultiError, +// or nil if none found. +func (m *PerRouteConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *PerRouteConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetInvokeConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PerRouteConfigValidationError{ + field: "InvokeConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PerRouteConfigValidationError{ + field: "InvokeConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInvokeConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PerRouteConfigValidationError{ + field: "InvokeConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return PerRouteConfigMultiError(errors) + } + return nil +} + +// PerRouteConfigMultiError is an error wrapping multiple validation errors +// returned by PerRouteConfig.ValidateAll() if the designated constraints +// aren't met. +type PerRouteConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PerRouteConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PerRouteConfigMultiError) AllErrors() []error { return m } + +// PerRouteConfigValidationError is the validation error returned by +// PerRouteConfig.Validate if the designated constraints aren't met. +type PerRouteConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PerRouteConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PerRouteConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PerRouteConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PerRouteConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PerRouteConfigValidationError) ErrorName() string { return "PerRouteConfigValidationError" } + +// Error satisfies the builtin error interface +func (e PerRouteConfigValidationError) 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 %sPerRouteConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PerRouteConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PerRouteConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.pb.go new file mode 100644 index 0000000000000..39d3c28bc48f4 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.pb.go @@ -0,0 +1,265 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.proto + +package aws_request_signingv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/type/matcher/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Top level configuration for the AWS request signing filter. +// [#next-free-field: 6] +type AwsRequestSigning struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The `service namespace + // `_ + // of the HTTP endpoint. + // + // Example: s3 + ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` + // The `region `_ hosting the HTTP + // endpoint. + // + // Example: us-west-2 + Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` + // Indicates that before signing headers, the host header will be swapped with + // this value. If not set or empty, the original host header value + // will be used and no rewrite will happen. + // + // Note: this rewrite affects both signing and host header forwarding. However, this + // option shouldn't be used with + // :ref:`HCM host rewrite ` given that the + // value set here would be used for signing whereas the value set in the HCM would be used + // for host header forwarding which is not the desired outcome. + HostRewrite string `protobuf:"bytes,3,opt,name=host_rewrite,json=hostRewrite,proto3" json:"host_rewrite,omitempty"` + // Instead of buffering the request to calculate the payload hash, use the literal string “UNSIGNED-PAYLOAD“ + // to calculate the payload hash. Not all services support this option. See the `S3 + // `_ policy for details. + UseUnsignedPayload bool `protobuf:"varint,4,opt,name=use_unsigned_payload,json=useUnsignedPayload,proto3" json:"use_unsigned_payload,omitempty"` + // A list of request header string matchers that will be excluded from signing. The excluded header can be matched by + // any patterns defined in the StringMatcher proto (e.g. exact string, prefix, regex, etc). + // + // Example: + // match_excluded_headers: + // - prefix: x-envoy + // - exact: foo + // - exact: bar + // When applied, all headers that start with "x-envoy" and headers "foo" and "bar" will not be signed. + MatchExcludedHeaders []*v3.StringMatcher `protobuf:"bytes,5,rep,name=match_excluded_headers,json=matchExcludedHeaders,proto3" json:"match_excluded_headers,omitempty"` +} + +func (x *AwsRequestSigning) Reset() { + *x = AwsRequestSigning{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AwsRequestSigning) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AwsRequestSigning) ProtoMessage() {} + +func (x *AwsRequestSigning) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AwsRequestSigning.ProtoReflect.Descriptor instead. +func (*AwsRequestSigning) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_rawDescGZIP(), []int{0} +} + +func (x *AwsRequestSigning) GetServiceName() string { + if x != nil { + return x.ServiceName + } + return "" +} + +func (x *AwsRequestSigning) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +func (x *AwsRequestSigning) GetHostRewrite() string { + if x != nil { + return x.HostRewrite + } + return "" +} + +func (x *AwsRequestSigning) GetUseUnsignedPayload() bool { + if x != nil { + return x.UseUnsignedPayload + } + return false +} + +func (x *AwsRequestSigning) GetMatchExcludedHeaders() []*v3.StringMatcher { + if x != nil { + return x.MatchExcludedHeaders + } + return nil +} + +var File_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_rawDesc = []byte{ + 0x0a, 0x4e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x61, 0x77, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, + 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x77, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x61, 0x77, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0xe0, 0x02, 0x0a, 0x11, 0x41, 0x77, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x2a, 0x0a, 0x0c, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x6f, 0x73, 0x74, + 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x68, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x75, + 0x73, 0x65, 0x5f, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x75, 0x73, 0x65, 0x55, 0x6e, + 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x5a, 0x0a, + 0x16, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x5f, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x52, 0x14, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x3a, 0x4d, 0x9a, 0xc5, 0x88, 0x1e, 0x48, + 0x0a, 0x46, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x77, 0x73, 0x5f, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0xd9, 0x01, 0x0a, 0x42, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x61, 0x77, 0x73, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x42, + 0x16, 0x41, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x69, + 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x71, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x61, 0x77, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, + 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x77, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_rawDescData = file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_rawDesc +) + +func file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_rawDescData +} + +var file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_goTypes = []interface{}{ + (*AwsRequestSigning)(nil), // 0: envoy.extensions.filters.http.aws_request_signing.v3.AwsRequestSigning + (*v3.StringMatcher)(nil), // 1: envoy.type.matcher.v3.StringMatcher +} +var file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.http.aws_request_signing.v3.AwsRequestSigning.match_excluded_headers:type_name -> envoy.type.matcher.v3.StringMatcher + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_init() +} +func file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_init() { + if File_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AwsRequestSigning); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto = out.File + file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_rawDesc = nil + file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_goTypes = nil + file_envoy_extensions_filters_http_aws_request_signing_v3_aws_request_signing_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.pb.validate.go new file mode 100644 index 0000000000000..1980676c1c01a --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.pb.validate.go @@ -0,0 +1,197 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/aws_request_signing/v3/aws_request_signing.proto + +package aws_request_signingv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on AwsRequestSigning 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 *AwsRequestSigning) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AwsRequestSigning 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 +// AwsRequestSigningMultiError, or nil if none found. +func (m *AwsRequestSigning) ValidateAll() error { + return m.validate(true) +} + +func (m *AwsRequestSigning) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetServiceName()) < 1 { + err := AwsRequestSigningValidationError{ + field: "ServiceName", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if utf8.RuneCountInString(m.GetRegion()) < 1 { + err := AwsRequestSigningValidationError{ + field: "Region", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for HostRewrite + + // no validation rules for UseUnsignedPayload + + for idx, item := range m.GetMatchExcludedHeaders() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AwsRequestSigningValidationError{ + field: fmt.Sprintf("MatchExcludedHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AwsRequestSigningValidationError{ + field: fmt.Sprintf("MatchExcludedHeaders[%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 AwsRequestSigningValidationError{ + field: fmt.Sprintf("MatchExcludedHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return AwsRequestSigningMultiError(errors) + } + return nil +} + +// AwsRequestSigningMultiError is an error wrapping multiple validation errors +// returned by AwsRequestSigning.ValidateAll() if the designated constraints +// aren't met. +type AwsRequestSigningMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AwsRequestSigningMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AwsRequestSigningMultiError) AllErrors() []error { return m } + +// AwsRequestSigningValidationError is the validation error returned by +// AwsRequestSigning.Validate if the designated constraints aren't met. +type AwsRequestSigningValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AwsRequestSigningValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AwsRequestSigningValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AwsRequestSigningValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AwsRequestSigningValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AwsRequestSigningValidationError) ErrorName() string { + return "AwsRequestSigningValidationError" +} + +// Error satisfies the builtin error interface +func (e AwsRequestSigningValidationError) 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 %sAwsRequestSigning.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AwsRequestSigningValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AwsRequestSigningValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.pb.go new file mode 100644 index 0000000000000..8a0252f11f36d --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.pb.go @@ -0,0 +1,361 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.proto + +package bandwidth_limitv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Defines the mode for the bandwidth limit filter. +// Values represent bitmask. +type BandwidthLimit_EnableMode int32 + +const ( + // Filter is disabled. + BandwidthLimit_DISABLED BandwidthLimit_EnableMode = 0 + // Filter enabled only for incoming traffic. + BandwidthLimit_REQUEST BandwidthLimit_EnableMode = 1 + // Filter enabled only for outgoing traffic. + BandwidthLimit_RESPONSE BandwidthLimit_EnableMode = 2 + // Filter enabled for both incoming and outgoing traffic. + BandwidthLimit_REQUEST_AND_RESPONSE BandwidthLimit_EnableMode = 3 +) + +// Enum value maps for BandwidthLimit_EnableMode. +var ( + BandwidthLimit_EnableMode_name = map[int32]string{ + 0: "DISABLED", + 1: "REQUEST", + 2: "RESPONSE", + 3: "REQUEST_AND_RESPONSE", + } + BandwidthLimit_EnableMode_value = map[string]int32{ + "DISABLED": 0, + "REQUEST": 1, + "RESPONSE": 2, + "REQUEST_AND_RESPONSE": 3, + } +) + +func (x BandwidthLimit_EnableMode) Enum() *BandwidthLimit_EnableMode { + p := new(BandwidthLimit_EnableMode) + *p = x + return p +} + +func (x BandwidthLimit_EnableMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BandwidthLimit_EnableMode) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_enumTypes[0].Descriptor() +} + +func (BandwidthLimit_EnableMode) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_enumTypes[0] +} + +func (x BandwidthLimit_EnableMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BandwidthLimit_EnableMode.Descriptor instead. +func (BandwidthLimit_EnableMode) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescGZIP(), []int{0, 0} +} + +// [#next-free-field: 8] +type BandwidthLimit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The human readable prefix to use when emitting stats. + StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` + // The enable mode for the bandwidth limit filter. + // Default is Disabled. + EnableMode BandwidthLimit_EnableMode `protobuf:"varint,2,opt,name=enable_mode,json=enableMode,proto3,enum=envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit_EnableMode" json:"enable_mode,omitempty"` + // The limit supplied in KiB/s. + // + // .. note:: + // + // It's fine for the limit to be unset for the global configuration since the bandwidth limit + // can be applied at a the virtual host or route level. Thus, the limit must be set for the + // per route configuration otherwise the config will be rejected. + // + // .. note:: + // + // When using per route configuration, the limit becomes unique to that route. + LimitKbps *wrapperspb.UInt64Value `protobuf:"bytes,3,opt,name=limit_kbps,json=limitKbps,proto3" json:"limit_kbps,omitempty"` + // Optional Fill interval in milliseconds for the token refills. Defaults to 50ms. + // It must be at least 20ms to avoid too aggressive refills. + FillInterval *durationpb.Duration `protobuf:"bytes,4,opt,name=fill_interval,json=fillInterval,proto3" json:"fill_interval,omitempty"` + // Runtime flag that controls whether the filter is enabled or not. If not specified, defaults + // to enabled. + RuntimeEnabled *v3.RuntimeFeatureFlag `protobuf:"bytes,5,opt,name=runtime_enabled,json=runtimeEnabled,proto3" json:"runtime_enabled,omitempty"` + // Enable response trailers. + // + // .. note:: + // + // - If set true, the response trailers “bandwidth-request-delay-ms“ and “bandwidth-response-delay-ms“ will be added, prefixed by “response_trailer_prefix“. + // - bandwidth-request-delay-ms: delay time in milliseconds it took for the request stream transfer. + // - bandwidth-response-delay-ms: delay time in milliseconds it took for the response stream transfer. + // - If :ref:`enable_mode ` is “DISABLED“ or “REQUEST“, the trailers will not be set. + // - If both the request and response delay time is 0, the trailers will not be set. + EnableResponseTrailers bool `protobuf:"varint,6,opt,name=enable_response_trailers,json=enableResponseTrailers,proto3" json:"enable_response_trailers,omitempty"` + // Optional The prefix for the response trailers. + ResponseTrailerPrefix string `protobuf:"bytes,7,opt,name=response_trailer_prefix,json=responseTrailerPrefix,proto3" json:"response_trailer_prefix,omitempty"` +} + +func (x *BandwidthLimit) Reset() { + *x = BandwidthLimit{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BandwidthLimit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BandwidthLimit) ProtoMessage() {} + +func (x *BandwidthLimit) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BandwidthLimit.ProtoReflect.Descriptor instead. +func (*BandwidthLimit) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescGZIP(), []int{0} +} + +func (x *BandwidthLimit) GetStatPrefix() string { + if x != nil { + return x.StatPrefix + } + return "" +} + +func (x *BandwidthLimit) GetEnableMode() BandwidthLimit_EnableMode { + if x != nil { + return x.EnableMode + } + return BandwidthLimit_DISABLED +} + +func (x *BandwidthLimit) GetLimitKbps() *wrapperspb.UInt64Value { + if x != nil { + return x.LimitKbps + } + return nil +} + +func (x *BandwidthLimit) GetFillInterval() *durationpb.Duration { + if x != nil { + return x.FillInterval + } + return nil +} + +func (x *BandwidthLimit) GetRuntimeEnabled() *v3.RuntimeFeatureFlag { + if x != nil { + return x.RuntimeEnabled + } + return nil +} + +func (x *BandwidthLimit) GetEnableResponseTrailers() bool { + if x != nil { + return x.EnableResponseTrailers + } + return false +} + +func (x *BandwidthLimit) GetResponseTrailerPrefix() string { + if x != nil { + return x.ResponseTrailerPrefix + } + return "" +} + +var File_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDesc = []byte{ + 0x0a, 0x46, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, + 0x76, 0x33, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, + 0x68, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, + 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, + 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 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, 0xee, 0x04, 0x0a, 0x0e, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, + 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x12, 0x76, 0x0a, 0x0b, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, + 0x74, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x6f, + 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x5f, 0x6b, 0x62, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, + 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, + 0x02, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x4b, 0x62, 0x70, 0x73, 0x12, 0x51, + 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x11, 0xfa, 0x42, 0x0e, 0xaa, 0x01, 0x0b, 0x22, 0x02, 0x08, 0x01, 0x32, 0x05, 0x10, 0x80, + 0xda, 0xc4, 0x09, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x12, 0x51, 0x0a, 0x0f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x46, 0x6c, 0x61, 0x67, 0x52, 0x0e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x18, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x43, + 0x0a, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, + 0x65, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x15, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x50, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x22, 0x4f, 0x0a, 0x0a, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x6f, 0x64, + 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, + 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x45, + 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, + 0x53, 0x45, 0x10, 0x03, 0x42, 0xca, 0x01, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x13, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, + 0x74, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x69, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, + 0x68, 0x74, 0x74, 0x70, 0x2f, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x5f, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x62, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, + 0x68, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescData = file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDesc +) + +func file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDescData +} + +var file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_goTypes = []interface{}{ + (BandwidthLimit_EnableMode)(0), // 0: envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.EnableMode + (*BandwidthLimit)(nil), // 1: envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit + (*wrapperspb.UInt64Value)(nil), // 2: google.protobuf.UInt64Value + (*durationpb.Duration)(nil), // 3: google.protobuf.Duration + (*v3.RuntimeFeatureFlag)(nil), // 4: envoy.config.core.v3.RuntimeFeatureFlag +} +var file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_depIdxs = []int32{ + 0, // 0: envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.enable_mode:type_name -> envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.EnableMode + 2, // 1: envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.limit_kbps:type_name -> google.protobuf.UInt64Value + 3, // 2: envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.fill_interval:type_name -> google.protobuf.Duration + 4, // 3: envoy.extensions.filters.http.bandwidth_limit.v3.BandwidthLimit.runtime_enabled:type_name -> envoy.config.core.v3.RuntimeFeatureFlag + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_init() } +func file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_init() { + if File_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BandwidthLimit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_depIdxs, + EnumInfos: file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_enumTypes, + MessageInfos: file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto = out.File + file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_rawDesc = nil + file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_goTypes = nil + file_envoy_extensions_filters_http_bandwidth_limit_v3_bandwidth_limit_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.pb.validate.go new file mode 100644 index 0000000000000..6336aaee32d7a --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.pb.validate.go @@ -0,0 +1,247 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/bandwidth_limit/v3/bandwidth_limit.proto + +package bandwidth_limitv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on BandwidthLimit 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 *BandwidthLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BandwidthLimit 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 BandwidthLimitMultiError, +// or nil if none found. +func (m *BandwidthLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *BandwidthLimit) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { + err := BandwidthLimitValidationError{ + field: "StatPrefix", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := BandwidthLimit_EnableMode_name[int32(m.GetEnableMode())]; !ok { + err := BandwidthLimitValidationError{ + field: "EnableMode", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if wrapper := m.GetLimitKbps(); wrapper != nil { + + if wrapper.GetValue() < 1 { + err := BandwidthLimitValidationError{ + field: "LimitKbps", + reason: "value must be greater than or equal to 1", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if d := m.GetFillInterval(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = BandwidthLimitValidationError{ + field: "FillInterval", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + lte := time.Duration(1*time.Second + 0*time.Nanosecond) + gte := time.Duration(0*time.Second + 20000000*time.Nanosecond) + + if dur < gte || dur > lte { + err := BandwidthLimitValidationError{ + field: "FillInterval", + reason: "value must be inside range [20ms, 1s]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if all { + switch v := interface{}(m.GetRuntimeEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BandwidthLimitValidationError{ + field: "RuntimeEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BandwidthLimitValidationError{ + field: "RuntimeEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRuntimeEnabled()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BandwidthLimitValidationError{ + field: "RuntimeEnabled", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for EnableResponseTrailers + + if !_BandwidthLimit_ResponseTrailerPrefix_Pattern.MatchString(m.GetResponseTrailerPrefix()) { + err := BandwidthLimitValidationError{ + field: "ResponseTrailerPrefix", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return BandwidthLimitMultiError(errors) + } + return nil +} + +// BandwidthLimitMultiError is an error wrapping multiple validation errors +// returned by BandwidthLimit.ValidateAll() if the designated constraints +// aren't met. +type BandwidthLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BandwidthLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BandwidthLimitMultiError) AllErrors() []error { return m } + +// BandwidthLimitValidationError is the validation error returned by +// BandwidthLimit.Validate if the designated constraints aren't met. +type BandwidthLimitValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BandwidthLimitValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BandwidthLimitValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BandwidthLimitValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BandwidthLimitValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BandwidthLimitValidationError) ErrorName() string { return "BandwidthLimitValidationError" } + +// Error satisfies the builtin error interface +func (e BandwidthLimitValidationError) 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 %sBandwidthLimit.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BandwidthLimitValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BandwidthLimitValidationError{} + +var _BandwidthLimit_ResponseTrailerPrefix_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/buffer/v3/buffer.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/buffer/v3/buffer.pb.go new file mode 100644 index 0000000000000..4209ce3af5313 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/buffer/v3/buffer.pb.go @@ -0,0 +1,298 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/buffer/v3/buffer.proto + +package bufferv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Buffer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The maximum request size that the filter will buffer before the connection + // manager will stop buffering and return a 413 response. + MaxRequestBytes *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=max_request_bytes,json=maxRequestBytes,proto3" json:"max_request_bytes,omitempty"` +} + +func (x *Buffer) Reset() { + *x = Buffer{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_buffer_v3_buffer_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Buffer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Buffer) ProtoMessage() {} + +func (x *Buffer) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_buffer_v3_buffer_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Buffer.ProtoReflect.Descriptor instead. +func (*Buffer) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_buffer_v3_buffer_proto_rawDescGZIP(), []int{0} +} + +func (x *Buffer) GetMaxRequestBytes() *wrapperspb.UInt32Value { + if x != nil { + return x.MaxRequestBytes + } + return nil +} + +type BufferPerRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Override: + // + // *BufferPerRoute_Disabled + // *BufferPerRoute_Buffer + Override isBufferPerRoute_Override `protobuf_oneof:"override"` +} + +func (x *BufferPerRoute) Reset() { + *x = BufferPerRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_buffer_v3_buffer_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BufferPerRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BufferPerRoute) ProtoMessage() {} + +func (x *BufferPerRoute) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_buffer_v3_buffer_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BufferPerRoute.ProtoReflect.Descriptor instead. +func (*BufferPerRoute) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_buffer_v3_buffer_proto_rawDescGZIP(), []int{1} +} + +func (m *BufferPerRoute) GetOverride() isBufferPerRoute_Override { + if m != nil { + return m.Override + } + return nil +} + +func (x *BufferPerRoute) GetDisabled() bool { + if x, ok := x.GetOverride().(*BufferPerRoute_Disabled); ok { + return x.Disabled + } + return false +} + +func (x *BufferPerRoute) GetBuffer() *Buffer { + if x, ok := x.GetOverride().(*BufferPerRoute_Buffer); ok { + return x.Buffer + } + return nil +} + +type isBufferPerRoute_Override interface { + isBufferPerRoute_Override() +} + +type BufferPerRoute_Disabled struct { + // Disable the buffer filter for this particular vhost or route. + Disabled bool `protobuf:"varint,1,opt,name=disabled,proto3,oneof"` +} + +type BufferPerRoute_Buffer struct { + // Override the global configuration of the filter with this new config. + Buffer *Buffer `protobuf:"bytes,2,opt,name=buffer,proto3,oneof"` +} + +func (*BufferPerRoute_Disabled) isBufferPerRoute_Override() {} + +func (*BufferPerRoute_Buffer) isBufferPerRoute_Override() {} + +var File_envoy_extensions_filters_http_buffer_v3_buffer_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_buffer_v3_buffer_proto_rawDesc = []byte{ + 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, + 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0x9b, 0x01, 0x0a, 0x06, 0x42, + 0x75, 0x66, 0x66, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0f, + 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x0f, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, + 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x66, 0x66, + 0x65, 0x72, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0xd7, 0x01, 0x0a, 0x0e, 0x42, 0x75, 0x66, + 0x66, 0x65, 0x72, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x08, 0x64, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x12, 0x53, 0x0a, 0x06, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x75, 0x66, + 0x66, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, + 0x06, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, + 0x76, 0x32, 0x2e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x42, 0x0f, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x03, 0xf8, + 0x42, 0x01, 0x42, 0xa7, 0x01, 0x0a, 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x42, 0x75, + 0x66, 0x66, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x57, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0x2f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x62, 0x75, 0x66, 0x66, + 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_buffer_v3_buffer_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_buffer_v3_buffer_proto_rawDescData = file_envoy_extensions_filters_http_buffer_v3_buffer_proto_rawDesc +) + +func file_envoy_extensions_filters_http_buffer_v3_buffer_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_buffer_v3_buffer_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_buffer_v3_buffer_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_buffer_v3_buffer_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_buffer_v3_buffer_proto_rawDescData +} + +var file_envoy_extensions_filters_http_buffer_v3_buffer_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_filters_http_buffer_v3_buffer_proto_goTypes = []interface{}{ + (*Buffer)(nil), // 0: envoy.extensions.filters.http.buffer.v3.Buffer + (*BufferPerRoute)(nil), // 1: envoy.extensions.filters.http.buffer.v3.BufferPerRoute + (*wrapperspb.UInt32Value)(nil), // 2: google.protobuf.UInt32Value +} +var file_envoy_extensions_filters_http_buffer_v3_buffer_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.filters.http.buffer.v3.Buffer.max_request_bytes:type_name -> google.protobuf.UInt32Value + 0, // 1: envoy.extensions.filters.http.buffer.v3.BufferPerRoute.buffer:type_name -> envoy.extensions.filters.http.buffer.v3.Buffer + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_buffer_v3_buffer_proto_init() } +func file_envoy_extensions_filters_http_buffer_v3_buffer_proto_init() { + if File_envoy_extensions_filters_http_buffer_v3_buffer_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_buffer_v3_buffer_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Buffer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_buffer_v3_buffer_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BufferPerRoute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_http_buffer_v3_buffer_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*BufferPerRoute_Disabled)(nil), + (*BufferPerRoute_Buffer)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_buffer_v3_buffer_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_buffer_v3_buffer_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_buffer_v3_buffer_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_buffer_v3_buffer_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_buffer_v3_buffer_proto = out.File + file_envoy_extensions_filters_http_buffer_v3_buffer_proto_rawDesc = nil + file_envoy_extensions_filters_http_buffer_v3_buffer_proto_goTypes = nil + file_envoy_extensions_filters_http_buffer_v3_buffer_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/buffer/v3/buffer.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/buffer/v3/buffer.pb.validate.go new file mode 100644 index 0000000000000..0932aae198903 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/buffer/v3/buffer.pb.validate.go @@ -0,0 +1,325 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/buffer/v3/buffer.proto + +package bufferv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Buffer 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 *Buffer) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Buffer 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 BufferMultiError, or nil if none found. +func (m *Buffer) ValidateAll() error { + return m.validate(true) +} + +func (m *Buffer) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if wrapper := m.GetMaxRequestBytes(); wrapper != nil { + + if wrapper.GetValue() <= 0 { + err := BufferValidationError{ + field: "MaxRequestBytes", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + } else { + err := BufferValidationError{ + field: "MaxRequestBytes", + reason: "value is required and must not be nil.", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return BufferMultiError(errors) + } + return nil +} + +// BufferMultiError is an error wrapping multiple validation errors returned by +// Buffer.ValidateAll() if the designated constraints aren't met. +type BufferMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BufferMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BufferMultiError) AllErrors() []error { return m } + +// BufferValidationError is the validation error returned by Buffer.Validate if +// the designated constraints aren't met. +type BufferValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BufferValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BufferValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BufferValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BufferValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BufferValidationError) ErrorName() string { return "BufferValidationError" } + +// Error satisfies the builtin error interface +func (e BufferValidationError) 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 %sBuffer.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BufferValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BufferValidationError{} + +// Validate checks the field values on BufferPerRoute 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 *BufferPerRoute) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BufferPerRoute 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 BufferPerRouteMultiError, +// or nil if none found. +func (m *BufferPerRoute) ValidateAll() error { + return m.validate(true) +} + +func (m *BufferPerRoute) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.Override.(type) { + + case *BufferPerRoute_Disabled: + + if m.GetDisabled() != true { + err := BufferPerRouteValidationError{ + field: "Disabled", + reason: "value must equal true", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *BufferPerRoute_Buffer: + + if m.GetBuffer() == nil { + err := BufferPerRouteValidationError{ + field: "Buffer", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetBuffer()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BufferPerRouteValidationError{ + field: "Buffer", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BufferPerRouteValidationError{ + field: "Buffer", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBuffer()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BufferPerRouteValidationError{ + field: "Buffer", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := BufferPerRouteValidationError{ + field: "Override", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return BufferPerRouteMultiError(errors) + } + return nil +} + +// BufferPerRouteMultiError is an error wrapping multiple validation errors +// returned by BufferPerRoute.ValidateAll() if the designated constraints +// aren't met. +type BufferPerRouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BufferPerRouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BufferPerRouteMultiError) AllErrors() []error { return m } + +// BufferPerRouteValidationError is the validation error returned by +// BufferPerRoute.Validate if the designated constraints aren't met. +type BufferPerRouteValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BufferPerRouteValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BufferPerRouteValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BufferPerRouteValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BufferPerRouteValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BufferPerRouteValidationError) ErrorName() string { return "BufferPerRouteValidationError" } + +// Error satisfies the builtin error interface +func (e BufferPerRouteValidationError) 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 %sBufferPerRoute.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BufferPerRouteValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BufferPerRouteValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/cache/v3/cache.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/cache/v3/cache.pb.go new file mode 100644 index 0000000000000..8c5a59da37e97 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/cache/v3/cache.pb.go @@ -0,0 +1,376 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/cache/v3/cache.proto + +package cachev3 + +import ( + v31 "github.com/cilium/proxy/go/envoy/config/route/v3" + v3 "github.com/cilium/proxy/go/envoy/type/matcher/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// [#extension: envoy.filters.http.cache] +type CacheConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Config specific to the cache storage implementation. + // [#extension-category: envoy.http.cache] + TypedConfig *anypb.Any `protobuf:"bytes,1,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` + // List of matching rules that defines allowed “Vary“ headers. + // + // The “vary“ response header holds a list of header names that affect the + // contents of a response, as described by + // https://httpwg.org/specs/rfc7234.html#caching.negotiated.responses. + // + // During insertion, “allowed_vary_headers“ acts as a allowlist: if a + // response's “vary“ header mentions any header names that aren't matched by any rules in + // “allowed_vary_headers“, that response will not be cached. + // + // During lookup, “allowed_vary_headers“ controls what request headers will be + // sent to the cache storage implementation. + AllowedVaryHeaders []*v3.StringMatcher `protobuf:"bytes,2,rep,name=allowed_vary_headers,json=allowedVaryHeaders,proto3" json:"allowed_vary_headers,omitempty"` + // [#not-implemented-hide:] + // + // + // Modifies cache key creation by restricting which parts of the URL are included. + KeyCreatorParams *CacheConfig_KeyCreatorParams `protobuf:"bytes,3,opt,name=key_creator_params,json=keyCreatorParams,proto3" json:"key_creator_params,omitempty"` + // [#not-implemented-hide:] + // + // + // Max body size the cache filter will insert into a cache. 0 means unlimited (though the cache + // storage implementation may have its own limit beyond which it will reject insertions). + MaxBodyBytes uint32 `protobuf:"varint,4,opt,name=max_body_bytes,json=maxBodyBytes,proto3" json:"max_body_bytes,omitempty"` +} + +func (x *CacheConfig) Reset() { + *x = CacheConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_cache_v3_cache_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CacheConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CacheConfig) ProtoMessage() {} + +func (x *CacheConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_cache_v3_cache_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CacheConfig.ProtoReflect.Descriptor instead. +func (*CacheConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescGZIP(), []int{0} +} + +func (x *CacheConfig) GetTypedConfig() *anypb.Any { + if x != nil { + return x.TypedConfig + } + return nil +} + +func (x *CacheConfig) GetAllowedVaryHeaders() []*v3.StringMatcher { + if x != nil { + return x.AllowedVaryHeaders + } + return nil +} + +func (x *CacheConfig) GetKeyCreatorParams() *CacheConfig_KeyCreatorParams { + if x != nil { + return x.KeyCreatorParams + } + return nil +} + +func (x *CacheConfig) GetMaxBodyBytes() uint32 { + if x != nil { + return x.MaxBodyBytes + } + return 0 +} + +// [#not-implemented-hide:] +// Modifies cache key creation by restricting which parts of the URL are included. +type CacheConfig_KeyCreatorParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If true, exclude the URL scheme from the cache key. Set to true if your origins always + // produce the same response for http and https requests. + ExcludeScheme bool `protobuf:"varint,1,opt,name=exclude_scheme,json=excludeScheme,proto3" json:"exclude_scheme,omitempty"` + // If true, exclude the host from the cache key. Set to true if your origins' responses don't + // ever depend on host. + ExcludeHost bool `protobuf:"varint,2,opt,name=exclude_host,json=excludeHost,proto3" json:"exclude_host,omitempty"` + // If “query_parameters_included“ is nonempty, only query parameters matched + // by one or more of its matchers are included in the cache key. Any other + // query params will not affect cache lookup. + QueryParametersIncluded []*v31.QueryParameterMatcher `protobuf:"bytes,3,rep,name=query_parameters_included,json=queryParametersIncluded,proto3" json:"query_parameters_included,omitempty"` + // If “query_parameters_excluded“ is nonempty, query parameters matched by one + // or more of its matchers are excluded from the cache key (even if also + // matched by “query_parameters_included“), and will not affect cache lookup. + QueryParametersExcluded []*v31.QueryParameterMatcher `protobuf:"bytes,4,rep,name=query_parameters_excluded,json=queryParametersExcluded,proto3" json:"query_parameters_excluded,omitempty"` +} + +func (x *CacheConfig_KeyCreatorParams) Reset() { + *x = CacheConfig_KeyCreatorParams{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_cache_v3_cache_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CacheConfig_KeyCreatorParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CacheConfig_KeyCreatorParams) ProtoMessage() {} + +func (x *CacheConfig_KeyCreatorParams) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_cache_v3_cache_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CacheConfig_KeyCreatorParams.ProtoReflect.Descriptor instead. +func (*CacheConfig_KeyCreatorParams) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *CacheConfig_KeyCreatorParams) GetExcludeScheme() bool { + if x != nil { + return x.ExcludeScheme + } + return false +} + +func (x *CacheConfig_KeyCreatorParams) GetExcludeHost() bool { + if x != nil { + return x.ExcludeHost + } + return false +} + +func (x *CacheConfig_KeyCreatorParams) GetQueryParametersIncluded() []*v31.QueryParameterMatcher { + if x != nil { + return x.QueryParametersIncluded + } + return nil +} + +func (x *CacheConfig_KeyCreatorParams) GetQueryParametersExcluded() []*v31.QueryParameterMatcher { + if x != nil { + return x.QueryParametersExcluded + } + return nil +} + +var File_envoy_extensions_filters_http_cache_v3_cache_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDesc = []byte{ + 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x63, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x2c, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, + 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 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, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0xfc, 0x05, 0x0a, 0x0b, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x41, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, + 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x56, 0x0a, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x65, 0x64, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x12, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x65, 0x64, 0x56, 0x61, 0x72, 0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, + 0x72, 0x0a, 0x12, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x61, 0x63, 0x68, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x4b, 0x65, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x10, 0x6b, 0x65, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6d, 0x61, 0x78, + 0x42, 0x6f, 0x64, 0x79, 0x42, 0x79, 0x74, 0x65, 0x73, 0x1a, 0xfc, 0x02, 0x0a, 0x10, 0x4b, 0x65, + 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x25, + 0x0a, 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x65, 0x78, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x68, 0x0a, 0x19, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x69, 0x6e, 0x63, + 0x6c, 0x75, 0x64, 0x65, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x17, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x64, 0x12, 0x68, 0x0a, 0x19, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x52, 0x17, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x3a, 0x4a, 0x9a, 0xc5, + 0x88, 0x1e, 0x45, 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x61, + 0x63, 0x68, 0x65, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x61, 0x63, 0x68, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4b, 0x65, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, + 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, + 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x42, 0xa3, 0x01, 0x0a, 0x34, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x55, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, + 0x2f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x61, 0x63, 0x68, 0x65, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescData = file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDesc +) + +func file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDescData +} + +var file_envoy_extensions_filters_http_cache_v3_cache_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_filters_http_cache_v3_cache_proto_goTypes = []interface{}{ + (*CacheConfig)(nil), // 0: envoy.extensions.filters.http.cache.v3.CacheConfig + (*CacheConfig_KeyCreatorParams)(nil), // 1: envoy.extensions.filters.http.cache.v3.CacheConfig.KeyCreatorParams + (*anypb.Any)(nil), // 2: google.protobuf.Any + (*v3.StringMatcher)(nil), // 3: envoy.type.matcher.v3.StringMatcher + (*v31.QueryParameterMatcher)(nil), // 4: envoy.config.route.v3.QueryParameterMatcher +} +var file_envoy_extensions_filters_http_cache_v3_cache_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.filters.http.cache.v3.CacheConfig.typed_config:type_name -> google.protobuf.Any + 3, // 1: envoy.extensions.filters.http.cache.v3.CacheConfig.allowed_vary_headers:type_name -> envoy.type.matcher.v3.StringMatcher + 1, // 2: envoy.extensions.filters.http.cache.v3.CacheConfig.key_creator_params:type_name -> envoy.extensions.filters.http.cache.v3.CacheConfig.KeyCreatorParams + 4, // 3: envoy.extensions.filters.http.cache.v3.CacheConfig.KeyCreatorParams.query_parameters_included:type_name -> envoy.config.route.v3.QueryParameterMatcher + 4, // 4: envoy.extensions.filters.http.cache.v3.CacheConfig.KeyCreatorParams.query_parameters_excluded:type_name -> envoy.config.route.v3.QueryParameterMatcher + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_cache_v3_cache_proto_init() } +func file_envoy_extensions_filters_http_cache_v3_cache_proto_init() { + if File_envoy_extensions_filters_http_cache_v3_cache_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_cache_v3_cache_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CacheConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_cache_v3_cache_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CacheConfig_KeyCreatorParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_cache_v3_cache_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_cache_v3_cache_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_cache_v3_cache_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_cache_v3_cache_proto = out.File + file_envoy_extensions_filters_http_cache_v3_cache_proto_rawDesc = nil + file_envoy_extensions_filters_http_cache_v3_cache_proto_goTypes = nil + file_envoy_extensions_filters_http_cache_v3_cache_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/cache/v3/cache.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/cache/v3/cache.pb.validate.go new file mode 100644 index 0000000000000..8101980f4a689 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/cache/v3/cache.pb.validate.go @@ -0,0 +1,388 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/cache/v3/cache.proto + +package cachev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on CacheConfig 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 *CacheConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CacheConfig 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 CacheConfigMultiError, or +// nil if none found. +func (m *CacheConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *CacheConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetTypedConfig() == nil { + err := CacheConfigValidationError{ + field: "TypedConfig", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if a := m.GetTypedConfig(); a != nil { + + } + + for idx, item := range m.GetAllowedVaryHeaders() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CacheConfigValidationError{ + field: fmt.Sprintf("AllowedVaryHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CacheConfigValidationError{ + field: fmt.Sprintf("AllowedVaryHeaders[%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 CacheConfigValidationError{ + field: fmt.Sprintf("AllowedVaryHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetKeyCreatorParams()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CacheConfigValidationError{ + field: "KeyCreatorParams", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CacheConfigValidationError{ + field: "KeyCreatorParams", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetKeyCreatorParams()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CacheConfigValidationError{ + field: "KeyCreatorParams", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for MaxBodyBytes + + if len(errors) > 0 { + return CacheConfigMultiError(errors) + } + return nil +} + +// CacheConfigMultiError is an error wrapping multiple validation errors +// returned by CacheConfig.ValidateAll() if the designated constraints aren't met. +type CacheConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CacheConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CacheConfigMultiError) AllErrors() []error { return m } + +// CacheConfigValidationError is the validation error returned by +// CacheConfig.Validate if the designated constraints aren't met. +type CacheConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CacheConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CacheConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CacheConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CacheConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CacheConfigValidationError) ErrorName() string { return "CacheConfigValidationError" } + +// Error satisfies the builtin error interface +func (e CacheConfigValidationError) 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 %sCacheConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CacheConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CacheConfigValidationError{} + +// Validate checks the field values on CacheConfig_KeyCreatorParams 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 *CacheConfig_KeyCreatorParams) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CacheConfig_KeyCreatorParams 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 +// CacheConfig_KeyCreatorParamsMultiError, or nil if none found. +func (m *CacheConfig_KeyCreatorParams) ValidateAll() error { + return m.validate(true) +} + +func (m *CacheConfig_KeyCreatorParams) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for ExcludeScheme + + // no validation rules for ExcludeHost + + for idx, item := range m.GetQueryParametersIncluded() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CacheConfig_KeyCreatorParamsValidationError{ + field: fmt.Sprintf("QueryParametersIncluded[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CacheConfig_KeyCreatorParamsValidationError{ + field: fmt.Sprintf("QueryParametersIncluded[%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 CacheConfig_KeyCreatorParamsValidationError{ + field: fmt.Sprintf("QueryParametersIncluded[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetQueryParametersExcluded() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CacheConfig_KeyCreatorParamsValidationError{ + field: fmt.Sprintf("QueryParametersExcluded[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CacheConfig_KeyCreatorParamsValidationError{ + field: fmt.Sprintf("QueryParametersExcluded[%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 CacheConfig_KeyCreatorParamsValidationError{ + field: fmt.Sprintf("QueryParametersExcluded[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return CacheConfig_KeyCreatorParamsMultiError(errors) + } + return nil +} + +// CacheConfig_KeyCreatorParamsMultiError is an error wrapping multiple +// validation errors returned by CacheConfig_KeyCreatorParams.ValidateAll() if +// the designated constraints aren't met. +type CacheConfig_KeyCreatorParamsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CacheConfig_KeyCreatorParamsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CacheConfig_KeyCreatorParamsMultiError) AllErrors() []error { return m } + +// CacheConfig_KeyCreatorParamsValidationError is the validation error returned +// by CacheConfig_KeyCreatorParams.Validate if the designated constraints +// aren't met. +type CacheConfig_KeyCreatorParamsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CacheConfig_KeyCreatorParamsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CacheConfig_KeyCreatorParamsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CacheConfig_KeyCreatorParamsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CacheConfig_KeyCreatorParamsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CacheConfig_KeyCreatorParamsValidationError) ErrorName() string { + return "CacheConfig_KeyCreatorParamsValidationError" +} + +// Error satisfies the builtin error interface +func (e CacheConfig_KeyCreatorParamsValidationError) 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 %sCacheConfig_KeyCreatorParams.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CacheConfig_KeyCreatorParamsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CacheConfig_KeyCreatorParamsValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/cdn_loop/v3/cdn_loop.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/cdn_loop/v3/cdn_loop.pb.go new file mode 100644 index 0000000000000..d58952f8a100f --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/cdn_loop/v3/cdn_loop.pb.go @@ -0,0 +1,194 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/cdn_loop/v3/cdn_loop.proto + +package cdn_loopv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// CDN-Loop Header filter config. See the :ref:`configuration overview +// ` for more information. +type CdnLoopConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The CDN identifier to use for loop checks and to append to the + // CDN-Loop header. + // + // RFC 8586 calls this the cdn-id. The cdn-id can either be a + // pseudonym or hostname the CDN is in control of. + // + // cdn_id must not be empty. + CdnId string `protobuf:"bytes,1,opt,name=cdn_id,json=cdnId,proto3" json:"cdn_id,omitempty"` + // The maximum allowed count of cdn_id in the downstream CDN-Loop + // request header. + // + // The default of 0 means a request can transit the CdnLoopFilter + // once. A value of 1 means that a request can transit the + // CdnLoopFilter twice and so on. + MaxAllowedOccurrences uint32 `protobuf:"varint,2,opt,name=max_allowed_occurrences,json=maxAllowedOccurrences,proto3" json:"max_allowed_occurrences,omitempty"` +} + +func (x *CdnLoopConfig) Reset() { + *x = CdnLoopConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CdnLoopConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CdnLoopConfig) ProtoMessage() {} + +func (x *CdnLoopConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CdnLoopConfig.ProtoReflect.Descriptor instead. +func (*CdnLoopConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDescGZIP(), []int{0} +} + +func (x *CdnLoopConfig) GetCdnId() string { + if x != nil { + return x.CdnId + } + return "" +} + +func (x *CdnLoopConfig) GetMaxAllowedOccurrences() uint32 { + if x != nil { + return x.MaxAllowedOccurrences + } + return 0 +} + +var File_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDesc = []byte{ + 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x63, 0x64, 0x6e, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x64, 0x6e, 0x5f, + 0x6c, 0x6f, 0x6f, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x64, 0x6e, 0x5f, 0x6c, 0x6f, + 0x6f, 0x70, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x67, 0x0a, + 0x0d, 0x43, 0x64, 0x6e, 0x4c, 0x6f, 0x6f, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, + 0x0a, 0x06, 0x63, 0x64, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x63, 0x64, 0x6e, 0x49, 0x64, 0x12, 0x36, + 0x0a, 0x17, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x6f, 0x63, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x15, 0x6d, 0x61, 0x78, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x4f, 0x63, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x42, 0xae, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x64, 0x6e, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x2e, + 0x76, 0x33, 0x42, 0x0c, 0x43, 0x64, 0x6e, 0x4c, 0x6f, 0x6f, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x63, 0x64, 0x6e, 0x5f, 0x6c, 0x6f, 0x6f, + 0x70, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x64, 0x6e, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDescData = file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDesc +) + +func file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDescData +} + +var file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_goTypes = []interface{}{ + (*CdnLoopConfig)(nil), // 0: envoy.extensions.filters.http.cdn_loop.v3.CdnLoopConfig +} +var file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_init() } +func file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_init() { + if File_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CdnLoopConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto = out.File + file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_rawDesc = nil + file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_goTypes = nil + file_envoy_extensions_filters_http_cdn_loop_v3_cdn_loop_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/cdn_loop/v3/cdn_loop.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/cdn_loop/v3/cdn_loop.pb.validate.go new file mode 100644 index 0000000000000..baf6dfcbb9f5e --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/cdn_loop/v3/cdn_loop.pb.validate.go @@ -0,0 +1,148 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/cdn_loop/v3/cdn_loop.proto + +package cdn_loopv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on CdnLoopConfig 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 *CdnLoopConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CdnLoopConfig 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 CdnLoopConfigMultiError, or +// nil if none found. +func (m *CdnLoopConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *CdnLoopConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetCdnId()) < 1 { + err := CdnLoopConfigValidationError{ + field: "CdnId", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for MaxAllowedOccurrences + + if len(errors) > 0 { + return CdnLoopConfigMultiError(errors) + } + return nil +} + +// CdnLoopConfigMultiError is an error wrapping multiple validation errors +// returned by CdnLoopConfig.ValidateAll() if the designated constraints +// aren't met. +type CdnLoopConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CdnLoopConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CdnLoopConfigMultiError) AllErrors() []error { return m } + +// CdnLoopConfigValidationError is the validation error returned by +// CdnLoopConfig.Validate if the designated constraints aren't met. +type CdnLoopConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CdnLoopConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CdnLoopConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CdnLoopConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CdnLoopConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CdnLoopConfigValidationError) ErrorName() string { return "CdnLoopConfigValidationError" } + +// Error satisfies the builtin error interface +func (e CdnLoopConfigValidationError) 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 %sCdnLoopConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CdnLoopConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CdnLoopConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/composite/v3/composite.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/composite/v3/composite.pb.go new file mode 100644 index 0000000000000..d7dc8d740f3c5 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/composite/v3/composite.pb.go @@ -0,0 +1,242 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/composite/v3/composite.proto + +package compositev3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// :ref:`Composite filter ` config. The composite filter config +// allows delegating filter handling to another filter as determined by matching on the request +// headers. This makes it possible to use different filters or filter configurations based on the +// incoming request. +// +// This is intended to be used with +// :ref:`ExtensionWithMatcher ` +// where a match tree is specified that indicates (via +// :ref:`ExecuteFilterAction `) +// which filter configuration to create and delegate to. +type Composite struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Composite) Reset() { + *x = Composite{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_composite_v3_composite_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Composite) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Composite) ProtoMessage() {} + +func (x *Composite) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_composite_v3_composite_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Composite.ProtoReflect.Descriptor instead. +func (*Composite) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDescGZIP(), []int{0} +} + +// Composite match action (see :ref:`matching docs ` for more info on match actions). +// This specifies the filter configuration of the filter that the composite filter should delegate filter interactions to. +type ExecuteFilterAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TypedConfig *v3.TypedExtensionConfig `protobuf:"bytes,1,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"` +} + +func (x *ExecuteFilterAction) Reset() { + *x = ExecuteFilterAction{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_composite_v3_composite_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecuteFilterAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecuteFilterAction) ProtoMessage() {} + +func (x *ExecuteFilterAction) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_composite_v3_composite_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExecuteFilterAction.ProtoReflect.Descriptor instead. +func (*ExecuteFilterAction) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDescGZIP(), []int{1} +} + +func (x *ExecuteFilterAction) GetTypedConfig() *v3.TypedExtensionConfig { + if x != nil { + return x.TypedConfig + } + return nil +} + +var File_envoy_extensions_filters_http_composite_v3_composite_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDesc = []byte{ + 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, + 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x15, + 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x3a, 0x08, 0xd2, 0xc6, 0xa4, + 0xe1, 0x06, 0x02, 0x08, 0x01, 0x22, 0x64, 0x0a, 0x13, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x0c, + 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, + 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xb3, 0x01, 0x0a, 0x38, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5d, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, + 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDescData = file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDesc +) + +func file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDescData +} + +var file_envoy_extensions_filters_http_composite_v3_composite_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_filters_http_composite_v3_composite_proto_goTypes = []interface{}{ + (*Composite)(nil), // 0: envoy.extensions.filters.http.composite.v3.Composite + (*ExecuteFilterAction)(nil), // 1: envoy.extensions.filters.http.composite.v3.ExecuteFilterAction + (*v3.TypedExtensionConfig)(nil), // 2: envoy.config.core.v3.TypedExtensionConfig +} +var file_envoy_extensions_filters_http_composite_v3_composite_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.filters.http.composite.v3.ExecuteFilterAction.typed_config:type_name -> envoy.config.core.v3.TypedExtensionConfig + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_composite_v3_composite_proto_init() } +func file_envoy_extensions_filters_http_composite_v3_composite_proto_init() { + if File_envoy_extensions_filters_http_composite_v3_composite_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_composite_v3_composite_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Composite); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_composite_v3_composite_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecuteFilterAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_composite_v3_composite_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_composite_v3_composite_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_composite_v3_composite_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_composite_v3_composite_proto = out.File + file_envoy_extensions_filters_http_composite_v3_composite_proto_rawDesc = nil + file_envoy_extensions_filters_http_composite_v3_composite_proto_goTypes = nil + file_envoy_extensions_filters_http_composite_v3_composite_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/composite/v3/composite.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/composite/v3/composite.pb.validate.go new file mode 100644 index 0000000000000..a6de159a73a64 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/composite/v3/composite.pb.validate.go @@ -0,0 +1,264 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/composite/v3/composite.proto + +package compositev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Composite 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 *Composite) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Composite 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 CompositeMultiError, or nil +// if none found. +func (m *Composite) ValidateAll() error { + return m.validate(true) +} + +func (m *Composite) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return CompositeMultiError(errors) + } + return nil +} + +// CompositeMultiError is an error wrapping multiple validation errors returned +// by Composite.ValidateAll() if the designated constraints aren't met. +type CompositeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CompositeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CompositeMultiError) AllErrors() []error { return m } + +// CompositeValidationError is the validation error returned by +// Composite.Validate if the designated constraints aren't met. +type CompositeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CompositeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CompositeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CompositeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CompositeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CompositeValidationError) ErrorName() string { return "CompositeValidationError" } + +// Error satisfies the builtin error interface +func (e CompositeValidationError) 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 %sComposite.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CompositeValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CompositeValidationError{} + +// Validate checks the field values on ExecuteFilterAction 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 *ExecuteFilterAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExecuteFilterAction 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 +// ExecuteFilterActionMultiError, or nil if none found. +func (m *ExecuteFilterAction) ValidateAll() error { + return m.validate(true) +} + +func (m *ExecuteFilterAction) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExecuteFilterActionValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExecuteFilterActionValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExecuteFilterActionValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ExecuteFilterActionMultiError(errors) + } + return nil +} + +// ExecuteFilterActionMultiError is an error wrapping multiple validation +// errors returned by ExecuteFilterAction.ValidateAll() if the designated +// constraints aren't met. +type ExecuteFilterActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExecuteFilterActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExecuteFilterActionMultiError) AllErrors() []error { return m } + +// ExecuteFilterActionValidationError is the validation error returned by +// ExecuteFilterAction.Validate if the designated constraints aren't met. +type ExecuteFilterActionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExecuteFilterActionValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExecuteFilterActionValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExecuteFilterActionValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExecuteFilterActionValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExecuteFilterActionValidationError) ErrorName() string { + return "ExecuteFilterActionValidationError" +} + +// Error satisfies the builtin error interface +func (e ExecuteFilterActionValidationError) 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 %sExecuteFilterAction.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExecuteFilterActionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExecuteFilterActionValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/compressor/v3/compressor.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/compressor/v3/compressor.pb.go new file mode 100644 index 0000000000000..154face371799 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/compressor/v3/compressor.pb.go @@ -0,0 +1,621 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/compressor/v3/compressor.proto + +package compressorv3 + +import ( + _ "github.com/cilium/proxy/go/envoy/annotations" + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// [#next-free-field: 9] +type Compressor struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Minimum response length, in bytes, which will trigger compression. The default value is 30. + // + // Deprecated: Do not use. + ContentLength *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=content_length,json=contentLength,proto3" json:"content_length,omitempty"` + // Set of strings that allows specifying which mime-types yield compression; e.g., + // application/json, text/html, etc. When this field is not defined, compression will be applied + // to the following mime-types: "application/javascript", "application/json", + // "application/xhtml+xml", "image/svg+xml", "text/css", "text/html", "text/plain", "text/xml" + // and their synonyms. + // + // Deprecated: Do not use. + ContentType []string `protobuf:"bytes,2,rep,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` + // If true, disables compression when the response contains an etag header. When it is false, the + // filter will preserve weak etags and remove the ones that require strong validation. + // + // Deprecated: Do not use. + DisableOnEtagHeader bool `protobuf:"varint,3,opt,name=disable_on_etag_header,json=disableOnEtagHeader,proto3" json:"disable_on_etag_header,omitempty"` + // If true, removes accept-encoding from the request headers before dispatching it to the upstream + // so that responses do not get compressed before reaching the filter. + // + // .. attention:: + // + // To avoid interfering with other compression filters in the same chain use this option in + // the filter closest to the upstream. + // + // Deprecated: Do not use. + RemoveAcceptEncodingHeader bool `protobuf:"varint,4,opt,name=remove_accept_encoding_header,json=removeAcceptEncodingHeader,proto3" json:"remove_accept_encoding_header,omitempty"` + // Runtime flag that controls whether the filter is enabled or not. If set to false, the + // filter will operate as a pass-through filter. If not specified, defaults to enabled. + // + // Deprecated: Do not use. + RuntimeEnabled *v3.RuntimeFeatureFlag `protobuf:"bytes,5,opt,name=runtime_enabled,json=runtimeEnabled,proto3" json:"runtime_enabled,omitempty"` + // A compressor library to use for compression. Currently only + // :ref:`envoy.compression.gzip.compressor` + // is included in Envoy. + // [#extension-category: envoy.compression.compressor] + CompressorLibrary *v3.TypedExtensionConfig `protobuf:"bytes,6,opt,name=compressor_library,json=compressorLibrary,proto3" json:"compressor_library,omitempty"` + // Configuration for request compression. Compression is disabled by default if left empty. + RequestDirectionConfig *Compressor_RequestDirectionConfig `protobuf:"bytes,7,opt,name=request_direction_config,json=requestDirectionConfig,proto3" json:"request_direction_config,omitempty"` + // Configuration for response compression. Compression is enabled by default if left empty. + // + // .. attention:: + // + // If the field is not empty then the duplicate deprecated fields of the ``Compressor`` message, + // such as ``content_length``, ``content_type``, ``disable_on_etag_header``, + // ``remove_accept_encoding_header`` and ``runtime_enabled``, are ignored. + // + // Also all the statistics related to response compression will be rooted in + // ``.compressor...response.*`` + // instead of + // ``.compressor...*``. + ResponseDirectionConfig *Compressor_ResponseDirectionConfig `protobuf:"bytes,8,opt,name=response_direction_config,json=responseDirectionConfig,proto3" json:"response_direction_config,omitempty"` +} + +func (x *Compressor) Reset() { + *x = Compressor{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_compressor_v3_compressor_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Compressor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Compressor) ProtoMessage() {} + +func (x *Compressor) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_compressor_v3_compressor_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Compressor.ProtoReflect.Descriptor instead. +func (*Compressor) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_compressor_v3_compressor_proto_rawDescGZIP(), []int{0} +} + +// Deprecated: Do not use. +func (x *Compressor) GetContentLength() *wrapperspb.UInt32Value { + if x != nil { + return x.ContentLength + } + return nil +} + +// Deprecated: Do not use. +func (x *Compressor) GetContentType() []string { + if x != nil { + return x.ContentType + } + return nil +} + +// Deprecated: Do not use. +func (x *Compressor) GetDisableOnEtagHeader() bool { + if x != nil { + return x.DisableOnEtagHeader + } + return false +} + +// Deprecated: Do not use. +func (x *Compressor) GetRemoveAcceptEncodingHeader() bool { + if x != nil { + return x.RemoveAcceptEncodingHeader + } + return false +} + +// Deprecated: Do not use. +func (x *Compressor) GetRuntimeEnabled() *v3.RuntimeFeatureFlag { + if x != nil { + return x.RuntimeEnabled + } + return nil +} + +func (x *Compressor) GetCompressorLibrary() *v3.TypedExtensionConfig { + if x != nil { + return x.CompressorLibrary + } + return nil +} + +func (x *Compressor) GetRequestDirectionConfig() *Compressor_RequestDirectionConfig { + if x != nil { + return x.RequestDirectionConfig + } + return nil +} + +func (x *Compressor) GetResponseDirectionConfig() *Compressor_ResponseDirectionConfig { + if x != nil { + return x.ResponseDirectionConfig + } + return nil +} + +type Compressor_CommonDirectionConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Runtime flag that controls whether compression is enabled or not for the direction this + // common config is put in. If set to false, the filter will operate as a pass-through filter + // in the chosen direction. If the field is omitted, the filter will be enabled. + Enabled *v3.RuntimeFeatureFlag `protobuf:"bytes,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + // Minimum value of Content-Length header of request or response messages (depending on the direction + // this common config is put in), in bytes, which will trigger compression. The default value is 30. + MinContentLength *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=min_content_length,json=minContentLength,proto3" json:"min_content_length,omitempty"` + // Set of strings that allows specifying which mime-types yield compression; e.g., + // application/json, text/html, etc. When this field is not defined, compression will be applied + // to the following mime-types: "application/javascript", "application/json", + // "application/xhtml+xml", "image/svg+xml", "text/css", "text/html", "text/plain", "text/xml" + // and their synonyms. + ContentType []string `protobuf:"bytes,3,rep,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` +} + +func (x *Compressor_CommonDirectionConfig) Reset() { + *x = Compressor_CommonDirectionConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_compressor_v3_compressor_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Compressor_CommonDirectionConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Compressor_CommonDirectionConfig) ProtoMessage() {} + +func (x *Compressor_CommonDirectionConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_compressor_v3_compressor_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Compressor_CommonDirectionConfig.ProtoReflect.Descriptor instead. +func (*Compressor_CommonDirectionConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_compressor_v3_compressor_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Compressor_CommonDirectionConfig) GetEnabled() *v3.RuntimeFeatureFlag { + if x != nil { + return x.Enabled + } + return nil +} + +func (x *Compressor_CommonDirectionConfig) GetMinContentLength() *wrapperspb.UInt32Value { + if x != nil { + return x.MinContentLength + } + return nil +} + +func (x *Compressor_CommonDirectionConfig) GetContentType() []string { + if x != nil { + return x.ContentType + } + return nil +} + +// Configuration for filter behavior on the request direction. +type Compressor_RequestDirectionConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CommonConfig *Compressor_CommonDirectionConfig `protobuf:"bytes,1,opt,name=common_config,json=commonConfig,proto3" json:"common_config,omitempty"` +} + +func (x *Compressor_RequestDirectionConfig) Reset() { + *x = Compressor_RequestDirectionConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_compressor_v3_compressor_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Compressor_RequestDirectionConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Compressor_RequestDirectionConfig) ProtoMessage() {} + +func (x *Compressor_RequestDirectionConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_compressor_v3_compressor_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Compressor_RequestDirectionConfig.ProtoReflect.Descriptor instead. +func (*Compressor_RequestDirectionConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_compressor_v3_compressor_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *Compressor_RequestDirectionConfig) GetCommonConfig() *Compressor_CommonDirectionConfig { + if x != nil { + return x.CommonConfig + } + return nil +} + +// Configuration for filter behavior on the response direction. +type Compressor_ResponseDirectionConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CommonConfig *Compressor_CommonDirectionConfig `protobuf:"bytes,1,opt,name=common_config,json=commonConfig,proto3" json:"common_config,omitempty"` + // If true, disables compression when the response contains an etag header. When it is false, the + // filter will preserve weak etags and remove the ones that require strong validation. + DisableOnEtagHeader bool `protobuf:"varint,2,opt,name=disable_on_etag_header,json=disableOnEtagHeader,proto3" json:"disable_on_etag_header,omitempty"` + // If true, removes accept-encoding from the request headers before dispatching it to the upstream + // so that responses do not get compressed before reaching the filter. + // + // .. attention:: + // + // To avoid interfering with other compression filters in the same chain use this option in + // the filter closest to the upstream. + RemoveAcceptEncodingHeader bool `protobuf:"varint,3,opt,name=remove_accept_encoding_header,json=removeAcceptEncodingHeader,proto3" json:"remove_accept_encoding_header,omitempty"` +} + +func (x *Compressor_ResponseDirectionConfig) Reset() { + *x = Compressor_ResponseDirectionConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_compressor_v3_compressor_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Compressor_ResponseDirectionConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Compressor_ResponseDirectionConfig) ProtoMessage() {} + +func (x *Compressor_ResponseDirectionConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_compressor_v3_compressor_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Compressor_ResponseDirectionConfig.ProtoReflect.Descriptor instead. +func (*Compressor_ResponseDirectionConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_compressor_v3_compressor_proto_rawDescGZIP(), []int{0, 2} +} + +func (x *Compressor_ResponseDirectionConfig) GetCommonConfig() *Compressor_CommonDirectionConfig { + if x != nil { + return x.CommonConfig + } + return nil +} + +func (x *Compressor_ResponseDirectionConfig) GetDisableOnEtagHeader() bool { + if x != nil { + return x.DisableOnEtagHeader + } + return false +} + +func (x *Compressor_ResponseDirectionConfig) GetRemoveAcceptEncodingHeader() bool { + if x != nil { + return x.RemoveAcceptEncodingHeader + } + return false +} + +var File_envoy_extensions_filters_http_compressor_v3_compressor_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_compressor_v3_compressor_proto_rawDesc = []byte{ + 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, + 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, + 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x69, 0x6e, 0x67, 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, 0x9c, 0x0b, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, + 0x72, 0x12, 0x50, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, + 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, + 0x03, 0x33, 0x2e, 0x30, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x12, 0x2e, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, + 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x40, 0x0a, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6f, + 0x6e, 0x5f, 0x65, 0x74, 0x61, 0x67, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, + 0x52, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x6e, 0x45, 0x74, 0x61, 0x67, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x1d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, + 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x5f, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x0b, 0x18, 0x01, + 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x1a, 0x72, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x5e, 0x0a, 0x0f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, + 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x0e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x63, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x5f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x12, 0x88, 0x01, 0x0a, 0x18, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4e, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x70, + 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x16, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x8b, 0x01, 0x0a, 0x19, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, + 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x17, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x1a, 0xca, 0x01, 0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, + 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x12, 0x4a, 0x0a, 0x12, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x6d, 0x69, 0x6e, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x21, 0x0a, + 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x1a, 0x8c, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x72, 0x0a, 0x0d, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, + 0x85, 0x02, 0x0a, 0x17, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x72, 0x0a, 0x0d, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x33, 0x0a, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x65, 0x74, + 0x61, 0x67, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x6e, 0x45, 0x74, 0x61, 0x67, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x1d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x61, + 0x63, 0x63, 0x65, 0x70, 0x74, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x72, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, + 0x67, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, + 0x72, 0x42, 0xb7, 0x01, 0x0a, 0x39, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x42, + 0x0f, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x5f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, + 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_compressor_v3_compressor_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_compressor_v3_compressor_proto_rawDescData = file_envoy_extensions_filters_http_compressor_v3_compressor_proto_rawDesc +) + +func file_envoy_extensions_filters_http_compressor_v3_compressor_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_compressor_v3_compressor_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_compressor_v3_compressor_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_compressor_v3_compressor_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_compressor_v3_compressor_proto_rawDescData +} + +var file_envoy_extensions_filters_http_compressor_v3_compressor_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_envoy_extensions_filters_http_compressor_v3_compressor_proto_goTypes = []interface{}{ + (*Compressor)(nil), // 0: envoy.extensions.filters.http.compressor.v3.Compressor + (*Compressor_CommonDirectionConfig)(nil), // 1: envoy.extensions.filters.http.compressor.v3.Compressor.CommonDirectionConfig + (*Compressor_RequestDirectionConfig)(nil), // 2: envoy.extensions.filters.http.compressor.v3.Compressor.RequestDirectionConfig + (*Compressor_ResponseDirectionConfig)(nil), // 3: envoy.extensions.filters.http.compressor.v3.Compressor.ResponseDirectionConfig + (*wrapperspb.UInt32Value)(nil), // 4: google.protobuf.UInt32Value + (*v3.RuntimeFeatureFlag)(nil), // 5: envoy.config.core.v3.RuntimeFeatureFlag + (*v3.TypedExtensionConfig)(nil), // 6: envoy.config.core.v3.TypedExtensionConfig +} +var file_envoy_extensions_filters_http_compressor_v3_compressor_proto_depIdxs = []int32{ + 4, // 0: envoy.extensions.filters.http.compressor.v3.Compressor.content_length:type_name -> google.protobuf.UInt32Value + 5, // 1: envoy.extensions.filters.http.compressor.v3.Compressor.runtime_enabled:type_name -> envoy.config.core.v3.RuntimeFeatureFlag + 6, // 2: envoy.extensions.filters.http.compressor.v3.Compressor.compressor_library:type_name -> envoy.config.core.v3.TypedExtensionConfig + 2, // 3: envoy.extensions.filters.http.compressor.v3.Compressor.request_direction_config:type_name -> envoy.extensions.filters.http.compressor.v3.Compressor.RequestDirectionConfig + 3, // 4: envoy.extensions.filters.http.compressor.v3.Compressor.response_direction_config:type_name -> envoy.extensions.filters.http.compressor.v3.Compressor.ResponseDirectionConfig + 5, // 5: envoy.extensions.filters.http.compressor.v3.Compressor.CommonDirectionConfig.enabled:type_name -> envoy.config.core.v3.RuntimeFeatureFlag + 4, // 6: envoy.extensions.filters.http.compressor.v3.Compressor.CommonDirectionConfig.min_content_length:type_name -> google.protobuf.UInt32Value + 1, // 7: envoy.extensions.filters.http.compressor.v3.Compressor.RequestDirectionConfig.common_config:type_name -> envoy.extensions.filters.http.compressor.v3.Compressor.CommonDirectionConfig + 1, // 8: envoy.extensions.filters.http.compressor.v3.Compressor.ResponseDirectionConfig.common_config:type_name -> envoy.extensions.filters.http.compressor.v3.Compressor.CommonDirectionConfig + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_compressor_v3_compressor_proto_init() } +func file_envoy_extensions_filters_http_compressor_v3_compressor_proto_init() { + if File_envoy_extensions_filters_http_compressor_v3_compressor_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_compressor_v3_compressor_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Compressor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_compressor_v3_compressor_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Compressor_CommonDirectionConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_compressor_v3_compressor_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Compressor_RequestDirectionConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_compressor_v3_compressor_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Compressor_ResponseDirectionConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_compressor_v3_compressor_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_compressor_v3_compressor_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_compressor_v3_compressor_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_compressor_v3_compressor_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_compressor_v3_compressor_proto = out.File + file_envoy_extensions_filters_http_compressor_v3_compressor_proto_rawDesc = nil + file_envoy_extensions_filters_http_compressor_v3_compressor_proto_goTypes = nil + file_envoy_extensions_filters_http_compressor_v3_compressor_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/compressor/v3/compressor.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/compressor/v3/compressor.pb.validate.go new file mode 100644 index 0000000000000..b3bedebd72ef9 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/compressor/v3/compressor.pb.validate.go @@ -0,0 +1,726 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/compressor/v3/compressor.proto + +package compressorv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Compressor 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 *Compressor) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Compressor 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 CompressorMultiError, or +// nil if none found. +func (m *Compressor) ValidateAll() error { + return m.validate(true) +} + +func (m *Compressor) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetContentLength()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "ContentLength", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "ContentLength", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetContentLength()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CompressorValidationError{ + field: "ContentLength", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for DisableOnEtagHeader + + // no validation rules for RemoveAcceptEncodingHeader + + if all { + switch v := interface{}(m.GetRuntimeEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "RuntimeEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "RuntimeEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRuntimeEnabled()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CompressorValidationError{ + field: "RuntimeEnabled", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetCompressorLibrary() == nil { + err := CompressorValidationError{ + field: "CompressorLibrary", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetCompressorLibrary()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "CompressorLibrary", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "CompressorLibrary", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCompressorLibrary()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CompressorValidationError{ + field: "CompressorLibrary", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetRequestDirectionConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "RequestDirectionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "RequestDirectionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestDirectionConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CompressorValidationError{ + field: "RequestDirectionConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetResponseDirectionConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "ResponseDirectionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CompressorValidationError{ + field: "ResponseDirectionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseDirectionConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CompressorValidationError{ + field: "ResponseDirectionConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return CompressorMultiError(errors) + } + return nil +} + +// CompressorMultiError is an error wrapping multiple validation errors +// returned by Compressor.ValidateAll() if the designated constraints aren't met. +type CompressorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CompressorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CompressorMultiError) AllErrors() []error { return m } + +// CompressorValidationError is the validation error returned by +// Compressor.Validate if the designated constraints aren't met. +type CompressorValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CompressorValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CompressorValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CompressorValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CompressorValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CompressorValidationError) ErrorName() string { return "CompressorValidationError" } + +// Error satisfies the builtin error interface +func (e CompressorValidationError) 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 %sCompressor.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CompressorValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CompressorValidationError{} + +// Validate checks the field values on Compressor_CommonDirectionConfig 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 *Compressor_CommonDirectionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Compressor_CommonDirectionConfig 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 +// Compressor_CommonDirectionConfigMultiError, or nil if none found. +func (m *Compressor_CommonDirectionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Compressor_CommonDirectionConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Compressor_CommonDirectionConfigValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Compressor_CommonDirectionConfigValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Compressor_CommonDirectionConfigValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetMinContentLength()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Compressor_CommonDirectionConfigValidationError{ + field: "MinContentLength", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Compressor_CommonDirectionConfigValidationError{ + field: "MinContentLength", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMinContentLength()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Compressor_CommonDirectionConfigValidationError{ + field: "MinContentLength", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return Compressor_CommonDirectionConfigMultiError(errors) + } + return nil +} + +// Compressor_CommonDirectionConfigMultiError is an error wrapping multiple +// validation errors returned by +// Compressor_CommonDirectionConfig.ValidateAll() if the designated +// constraints aren't met. +type Compressor_CommonDirectionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Compressor_CommonDirectionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Compressor_CommonDirectionConfigMultiError) AllErrors() []error { return m } + +// Compressor_CommonDirectionConfigValidationError is the validation error +// returned by Compressor_CommonDirectionConfig.Validate if the designated +// constraints aren't met. +type Compressor_CommonDirectionConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Compressor_CommonDirectionConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Compressor_CommonDirectionConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Compressor_CommonDirectionConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Compressor_CommonDirectionConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Compressor_CommonDirectionConfigValidationError) ErrorName() string { + return "Compressor_CommonDirectionConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e Compressor_CommonDirectionConfigValidationError) 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 %sCompressor_CommonDirectionConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Compressor_CommonDirectionConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Compressor_CommonDirectionConfigValidationError{} + +// Validate checks the field values on Compressor_RequestDirectionConfig 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 *Compressor_RequestDirectionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Compressor_RequestDirectionConfig +// 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 +// Compressor_RequestDirectionConfigMultiError, or nil if none found. +func (m *Compressor_RequestDirectionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Compressor_RequestDirectionConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetCommonConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Compressor_RequestDirectionConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Compressor_RequestDirectionConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Compressor_RequestDirectionConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return Compressor_RequestDirectionConfigMultiError(errors) + } + return nil +} + +// Compressor_RequestDirectionConfigMultiError is an error wrapping multiple +// validation errors returned by +// Compressor_RequestDirectionConfig.ValidateAll() if the designated +// constraints aren't met. +type Compressor_RequestDirectionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Compressor_RequestDirectionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Compressor_RequestDirectionConfigMultiError) AllErrors() []error { return m } + +// Compressor_RequestDirectionConfigValidationError is the validation error +// returned by Compressor_RequestDirectionConfig.Validate if the designated +// constraints aren't met. +type Compressor_RequestDirectionConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Compressor_RequestDirectionConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Compressor_RequestDirectionConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Compressor_RequestDirectionConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Compressor_RequestDirectionConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Compressor_RequestDirectionConfigValidationError) ErrorName() string { + return "Compressor_RequestDirectionConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e Compressor_RequestDirectionConfigValidationError) 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 %sCompressor_RequestDirectionConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Compressor_RequestDirectionConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Compressor_RequestDirectionConfigValidationError{} + +// Validate checks the field values on Compressor_ResponseDirectionConfig 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 *Compressor_ResponseDirectionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Compressor_ResponseDirectionConfig +// 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 +// Compressor_ResponseDirectionConfigMultiError, or nil if none found. +func (m *Compressor_ResponseDirectionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Compressor_ResponseDirectionConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetCommonConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Compressor_ResponseDirectionConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Compressor_ResponseDirectionConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Compressor_ResponseDirectionConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for DisableOnEtagHeader + + // no validation rules for RemoveAcceptEncodingHeader + + if len(errors) > 0 { + return Compressor_ResponseDirectionConfigMultiError(errors) + } + return nil +} + +// Compressor_ResponseDirectionConfigMultiError is an error wrapping multiple +// validation errors returned by +// Compressor_ResponseDirectionConfig.ValidateAll() if the designated +// constraints aren't met. +type Compressor_ResponseDirectionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Compressor_ResponseDirectionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Compressor_ResponseDirectionConfigMultiError) AllErrors() []error { return m } + +// Compressor_ResponseDirectionConfigValidationError is the validation error +// returned by Compressor_ResponseDirectionConfig.Validate if the designated +// constraints aren't met. +type Compressor_ResponseDirectionConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Compressor_ResponseDirectionConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Compressor_ResponseDirectionConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Compressor_ResponseDirectionConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Compressor_ResponseDirectionConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Compressor_ResponseDirectionConfigValidationError) ErrorName() string { + return "Compressor_ResponseDirectionConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e Compressor_ResponseDirectionConfigValidationError) 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 %sCompressor_ResponseDirectionConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Compressor_ResponseDirectionConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Compressor_ResponseDirectionConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/cors/v3/cors.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/cors/v3/cors.pb.go new file mode 100644 index 0000000000000..e5e84f5bb134e --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/cors/v3/cors.pb.go @@ -0,0 +1,158 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/cors/v3/cors.proto + +package corsv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Cors filter config. +type Cors struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Cors) Reset() { + *x = Cors{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_cors_v3_cors_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Cors) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Cors) ProtoMessage() {} + +func (x *Cors) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_cors_v3_cors_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Cors.ProtoReflect.Descriptor instead. +func (*Cors) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_cors_v3_cors_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_filters_http_cors_v3_cors_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_cors_v3_cors_proto_rawDesc = []byte{ + 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x63, 0x6f, 0x72, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x63, 0x6f, 0x72, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x34, 0x0a, 0x04, 0x43, + 0x6f, 0x72, 0x73, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, 0x72, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x72, + 0x73, 0x42, 0x9f, 0x01, 0x0a, 0x33, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x63, 0x6f, 0x72, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x43, 0x6f, 0x72, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x63, 0x6f, 0x72, + 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x72, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_cors_v3_cors_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_cors_v3_cors_proto_rawDescData = file_envoy_extensions_filters_http_cors_v3_cors_proto_rawDesc +) + +func file_envoy_extensions_filters_http_cors_v3_cors_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_cors_v3_cors_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_cors_v3_cors_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_cors_v3_cors_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_cors_v3_cors_proto_rawDescData +} + +var file_envoy_extensions_filters_http_cors_v3_cors_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_http_cors_v3_cors_proto_goTypes = []interface{}{ + (*Cors)(nil), // 0: envoy.extensions.filters.http.cors.v3.Cors +} +var file_envoy_extensions_filters_http_cors_v3_cors_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_cors_v3_cors_proto_init() } +func file_envoy_extensions_filters_http_cors_v3_cors_proto_init() { + if File_envoy_extensions_filters_http_cors_v3_cors_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_cors_v3_cors_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Cors); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_cors_v3_cors_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_cors_v3_cors_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_cors_v3_cors_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_cors_v3_cors_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_cors_v3_cors_proto = out.File + file_envoy_extensions_filters_http_cors_v3_cors_proto_rawDesc = nil + file_envoy_extensions_filters_http_cors_v3_cors_proto_goTypes = nil + file_envoy_extensions_filters_http_cors_v3_cors_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/cors/v3/cors.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/cors/v3/cors.pb.validate.go new file mode 100644 index 0000000000000..a172d0d5d70d5 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/cors/v3/cors.pb.validate.go @@ -0,0 +1,133 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/cors/v3/cors.proto + +package corsv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Cors 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 *Cors) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Cors 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 CorsMultiError, or nil if none found. +func (m *Cors) ValidateAll() error { + return m.validate(true) +} + +func (m *Cors) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return CorsMultiError(errors) + } + return nil +} + +// CorsMultiError is an error wrapping multiple validation errors returned by +// Cors.ValidateAll() if the designated constraints aren't met. +type CorsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CorsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CorsMultiError) AllErrors() []error { return m } + +// CorsValidationError is the validation error returned by Cors.Validate if the +// designated constraints aren't met. +type CorsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CorsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CorsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CorsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CorsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CorsValidationError) ErrorName() string { return "CorsValidationError" } + +// Error satisfies the builtin error interface +func (e CorsValidationError) 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 %sCors.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CorsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CorsValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/csrf/v3/csrf.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/csrf/v3/csrf.pb.go new file mode 100644 index 0000000000000..8b29aa719e8cd --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/csrf/v3/csrf.pb.go @@ -0,0 +1,237 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/csrf/v3/csrf.proto + +package csrfv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + v31 "github.com/cilium/proxy/go/envoy/type/matcher/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// CSRF filter config. +type CsrfPolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies the % of requests for which the CSRF filter is enabled. + // + // If :ref:`runtime_key ` is specified, + // Envoy will lookup the runtime key to get the percentage of requests to filter. + // + // .. note:: + // + // This field defaults to 100/:ref:`HUNDRED + // `. + FilterEnabled *v3.RuntimeFractionalPercent `protobuf:"bytes,1,opt,name=filter_enabled,json=filterEnabled,proto3" json:"filter_enabled,omitempty"` + // Specifies that CSRF policies will be evaluated and tracked, but not enforced. + // + // This is intended to be used when “filter_enabled“ is off and will be ignored otherwise. + // + // If :ref:`runtime_key ` is specified, + // Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate + // and track the request's “Origin“ and “Destination“ to determine if it's valid, but will not + // enforce any policies. + ShadowEnabled *v3.RuntimeFractionalPercent `protobuf:"bytes,2,opt,name=shadow_enabled,json=shadowEnabled,proto3" json:"shadow_enabled,omitempty"` + // Specifies additional source origins that will be allowed in addition to + // the destination origin. + // + // More information on how this can be configured via runtime can be found + // :ref:`here `. + AdditionalOrigins []*v31.StringMatcher `protobuf:"bytes,3,rep,name=additional_origins,json=additionalOrigins,proto3" json:"additional_origins,omitempty"` +} + +func (x *CsrfPolicy) Reset() { + *x = CsrfPolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_csrf_v3_csrf_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CsrfPolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CsrfPolicy) ProtoMessage() {} + +func (x *CsrfPolicy) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_csrf_v3_csrf_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CsrfPolicy.ProtoReflect.Descriptor instead. +func (*CsrfPolicy) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDescGZIP(), []int{0} +} + +func (x *CsrfPolicy) GetFilterEnabled() *v3.RuntimeFractionalPercent { + if x != nil { + return x.FilterEnabled + } + return nil +} + +func (x *CsrfPolicy) GetShadowEnabled() *v3.RuntimeFractionalPercent { + if x != nil { + return x.ShadowEnabled + } + return nil +} + +func (x *CsrfPolicy) GetAdditionalOrigins() []*v31.StringMatcher { + if x != nil { + return x.AdditionalOrigins + } + return nil +} + +var File_envoy_extensions_filters_http_csrf_v3_csrf_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDesc = []byte{ + 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x63, 0x73, 0x72, 0x66, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x73, 0x72, 0x66, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x63, 0x73, 0x72, 0x66, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, + 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0xcd, 0x02, 0x0a, 0x0a, 0x43, 0x73, + 0x72, 0x66, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x5f, 0x0a, 0x0e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, + 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x55, 0x0a, 0x0e, 0x73, 0x68, 0x61, + 0x64, 0x6f, 0x77, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, + 0x74, 0x52, 0x0d, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x12, 0x53, 0x0a, 0x12, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x52, 0x11, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x73, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x73, 0x72, 0x66, 0x2e, 0x76, 0x32, 0x2e, 0x43, + 0x73, 0x72, 0x66, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x9f, 0x01, 0x0a, 0x33, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x73, 0x72, 0x66, 0x2e, 0x76, + 0x33, 0x42, 0x09, 0x43, 0x73, 0x72, 0x66, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, + 0x68, 0x74, 0x74, 0x70, 0x2f, 0x63, 0x73, 0x72, 0x66, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x73, 0x72, + 0x66, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDescData = file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDesc +) + +func file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDescData +} + +var file_envoy_extensions_filters_http_csrf_v3_csrf_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_http_csrf_v3_csrf_proto_goTypes = []interface{}{ + (*CsrfPolicy)(nil), // 0: envoy.extensions.filters.http.csrf.v3.CsrfPolicy + (*v3.RuntimeFractionalPercent)(nil), // 1: envoy.config.core.v3.RuntimeFractionalPercent + (*v31.StringMatcher)(nil), // 2: envoy.type.matcher.v3.StringMatcher +} +var file_envoy_extensions_filters_http_csrf_v3_csrf_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.http.csrf.v3.CsrfPolicy.filter_enabled:type_name -> envoy.config.core.v3.RuntimeFractionalPercent + 1, // 1: envoy.extensions.filters.http.csrf.v3.CsrfPolicy.shadow_enabled:type_name -> envoy.config.core.v3.RuntimeFractionalPercent + 2, // 2: envoy.extensions.filters.http.csrf.v3.CsrfPolicy.additional_origins:type_name -> envoy.type.matcher.v3.StringMatcher + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_csrf_v3_csrf_proto_init() } +func file_envoy_extensions_filters_http_csrf_v3_csrf_proto_init() { + if File_envoy_extensions_filters_http_csrf_v3_csrf_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_csrf_v3_csrf_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CsrfPolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_csrf_v3_csrf_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_csrf_v3_csrf_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_csrf_v3_csrf_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_csrf_v3_csrf_proto = out.File + file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDesc = nil + file_envoy_extensions_filters_http_csrf_v3_csrf_proto_goTypes = nil + file_envoy_extensions_filters_http_csrf_v3_csrf_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/csrf/v3/csrf.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/csrf/v3/csrf.pb.validate.go new file mode 100644 index 0000000000000..51a8ba035d5a8 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/csrf/v3/csrf.pb.validate.go @@ -0,0 +1,237 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/csrf/v3/csrf.proto + +package csrfv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on CsrfPolicy 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 *CsrfPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CsrfPolicy 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 CsrfPolicyMultiError, or +// nil if none found. +func (m *CsrfPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *CsrfPolicy) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetFilterEnabled() == nil { + err := CsrfPolicyValidationError{ + field: "FilterEnabled", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetFilterEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CsrfPolicyValidationError{ + field: "FilterEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CsrfPolicyValidationError{ + field: "FilterEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterEnabled()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CsrfPolicyValidationError{ + field: "FilterEnabled", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetShadowEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CsrfPolicyValidationError{ + field: "ShadowEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CsrfPolicyValidationError{ + field: "ShadowEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetShadowEnabled()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CsrfPolicyValidationError{ + field: "ShadowEnabled", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetAdditionalOrigins() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CsrfPolicyValidationError{ + field: fmt.Sprintf("AdditionalOrigins[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CsrfPolicyValidationError{ + field: fmt.Sprintf("AdditionalOrigins[%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 CsrfPolicyValidationError{ + field: fmt.Sprintf("AdditionalOrigins[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return CsrfPolicyMultiError(errors) + } + return nil +} + +// CsrfPolicyMultiError is an error wrapping multiple validation errors +// returned by CsrfPolicy.ValidateAll() if the designated constraints aren't met. +type CsrfPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CsrfPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CsrfPolicyMultiError) AllErrors() []error { return m } + +// CsrfPolicyValidationError is the validation error returned by +// CsrfPolicy.Validate if the designated constraints aren't met. +type CsrfPolicyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CsrfPolicyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CsrfPolicyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CsrfPolicyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CsrfPolicyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CsrfPolicyValidationError) ErrorName() string { return "CsrfPolicyValidationError" } + +// Error satisfies the builtin error interface +func (e CsrfPolicyValidationError) 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 %sCsrfPolicy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CsrfPolicyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CsrfPolicyValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/decompressor/v3/decompressor.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/decompressor/v3/decompressor.pb.go new file mode 100644 index 0000000000000..3be32570d4a23 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/decompressor/v3/decompressor.pb.go @@ -0,0 +1,470 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/decompressor/v3/decompressor.proto + +package decompressorv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Decompressor struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A decompressor library to use for both request and response decompression. Currently only + // :ref:`envoy.compression.gzip.compressor` + // is included in Envoy. + // [#extension-category: envoy.compression.decompressor] + DecompressorLibrary *v3.TypedExtensionConfig `protobuf:"bytes,1,opt,name=decompressor_library,json=decompressorLibrary,proto3" json:"decompressor_library,omitempty"` + // Configuration for request decompression. Decompression is enabled by default if left empty. + RequestDirectionConfig *Decompressor_RequestDirectionConfig `protobuf:"bytes,2,opt,name=request_direction_config,json=requestDirectionConfig,proto3" json:"request_direction_config,omitempty"` + // Configuration for response decompression. Decompression is enabled by default if left empty. + ResponseDirectionConfig *Decompressor_ResponseDirectionConfig `protobuf:"bytes,3,opt,name=response_direction_config,json=responseDirectionConfig,proto3" json:"response_direction_config,omitempty"` +} + +func (x *Decompressor) Reset() { + *x = Decompressor{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Decompressor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Decompressor) ProtoMessage() {} + +func (x *Decompressor) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Decompressor.ProtoReflect.Descriptor instead. +func (*Decompressor) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_rawDescGZIP(), []int{0} +} + +func (x *Decompressor) GetDecompressorLibrary() *v3.TypedExtensionConfig { + if x != nil { + return x.DecompressorLibrary + } + return nil +} + +func (x *Decompressor) GetRequestDirectionConfig() *Decompressor_RequestDirectionConfig { + if x != nil { + return x.RequestDirectionConfig + } + return nil +} + +func (x *Decompressor) GetResponseDirectionConfig() *Decompressor_ResponseDirectionConfig { + if x != nil { + return x.ResponseDirectionConfig + } + return nil +} + +// Common configuration for filter behavior on both the request and response direction. +type Decompressor_CommonDirectionConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Runtime flag that controls whether the filter is enabled for decompression or not. If set to false, the + // filter will operate as a pass-through filter. If the message is unspecified, the filter will be enabled. + Enabled *v3.RuntimeFeatureFlag `protobuf:"bytes,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + // If set to true, will decompress response even if a “no-transform“ cache control header is set. + IgnoreNoTransformHeader bool `protobuf:"varint,2,opt,name=ignore_no_transform_header,json=ignoreNoTransformHeader,proto3" json:"ignore_no_transform_header,omitempty"` +} + +func (x *Decompressor_CommonDirectionConfig) Reset() { + *x = Decompressor_CommonDirectionConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Decompressor_CommonDirectionConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Decompressor_CommonDirectionConfig) ProtoMessage() {} + +func (x *Decompressor_CommonDirectionConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Decompressor_CommonDirectionConfig.ProtoReflect.Descriptor instead. +func (*Decompressor_CommonDirectionConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Decompressor_CommonDirectionConfig) GetEnabled() *v3.RuntimeFeatureFlag { + if x != nil { + return x.Enabled + } + return nil +} + +func (x *Decompressor_CommonDirectionConfig) GetIgnoreNoTransformHeader() bool { + if x != nil { + return x.IgnoreNoTransformHeader + } + return false +} + +// Configuration for filter behavior on the request direction. +type Decompressor_RequestDirectionConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CommonConfig *Decompressor_CommonDirectionConfig `protobuf:"bytes,1,opt,name=common_config,json=commonConfig,proto3" json:"common_config,omitempty"` + // If set to true, and response decompression is enabled, the filter modifies the Accept-Encoding + // request header by appending the decompressor_library's encoding. Defaults to true. + AdvertiseAcceptEncoding *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=advertise_accept_encoding,json=advertiseAcceptEncoding,proto3" json:"advertise_accept_encoding,omitempty"` +} + +func (x *Decompressor_RequestDirectionConfig) Reset() { + *x = Decompressor_RequestDirectionConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Decompressor_RequestDirectionConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Decompressor_RequestDirectionConfig) ProtoMessage() {} + +func (x *Decompressor_RequestDirectionConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Decompressor_RequestDirectionConfig.ProtoReflect.Descriptor instead. +func (*Decompressor_RequestDirectionConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *Decompressor_RequestDirectionConfig) GetCommonConfig() *Decompressor_CommonDirectionConfig { + if x != nil { + return x.CommonConfig + } + return nil +} + +func (x *Decompressor_RequestDirectionConfig) GetAdvertiseAcceptEncoding() *wrapperspb.BoolValue { + if x != nil { + return x.AdvertiseAcceptEncoding + } + return nil +} + +// Configuration for filter behavior on the response direction. +type Decompressor_ResponseDirectionConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CommonConfig *Decompressor_CommonDirectionConfig `protobuf:"bytes,1,opt,name=common_config,json=commonConfig,proto3" json:"common_config,omitempty"` +} + +func (x *Decompressor_ResponseDirectionConfig) Reset() { + *x = Decompressor_ResponseDirectionConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Decompressor_ResponseDirectionConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Decompressor_ResponseDirectionConfig) ProtoMessage() {} + +func (x *Decompressor_ResponseDirectionConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Decompressor_ResponseDirectionConfig.ProtoReflect.Descriptor instead. +func (*Decompressor_ResponseDirectionConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_rawDescGZIP(), []int{0, 2} +} + +func (x *Decompressor_ResponseDirectionConfig) GetCommonConfig() *Decompressor_CommonDirectionConfig { + if x != nil { + return x.CommonConfig + } + return nil +} + +var File_envoy_extensions_filters_http_decompressor_v3_decompressor_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_rawDesc = []byte{ + 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x33, 0x2f, + 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, + 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, + 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 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, 0xb2, 0x07, 0x0a, 0x0c, 0x44, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, + 0x72, 0x12, 0x67, 0x0a, 0x14, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, + 0x72, 0x5f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x12, 0x8c, 0x01, 0x0a, 0x18, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x52, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x8f, 0x01, 0x0a, 0x19, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x53, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, + 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x98, 0x01, 0x0a, 0x15, + 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, + 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x1a, 0x69, 0x67, 0x6e, + 0x6f, 0x72, 0x65, 0x5f, 0x6e, 0x6f, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x69, + 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x4e, 0x6f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x1a, 0xe8, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x76, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x51, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x44, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x56, 0x0a, 0x19, 0x61, 0x64, 0x76, + 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x5f, 0x65, 0x6e, + 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 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, 0x42, + 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x17, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, + 0x69, 0x73, 0x65, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, + 0x67, 0x1a, 0x91, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x44, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x76, 0x0a, + 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x51, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, + 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xbf, 0x01, 0x0a, 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, + 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x11, 0x44, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x63, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, + 0x2f, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x33, + 0x3b, 0x64, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_rawDescData = file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_rawDesc +) + +func file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_rawDescData +} + +var file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_goTypes = []interface{}{ + (*Decompressor)(nil), // 0: envoy.extensions.filters.http.decompressor.v3.Decompressor + (*Decompressor_CommonDirectionConfig)(nil), // 1: envoy.extensions.filters.http.decompressor.v3.Decompressor.CommonDirectionConfig + (*Decompressor_RequestDirectionConfig)(nil), // 2: envoy.extensions.filters.http.decompressor.v3.Decompressor.RequestDirectionConfig + (*Decompressor_ResponseDirectionConfig)(nil), // 3: envoy.extensions.filters.http.decompressor.v3.Decompressor.ResponseDirectionConfig + (*v3.TypedExtensionConfig)(nil), // 4: envoy.config.core.v3.TypedExtensionConfig + (*v3.RuntimeFeatureFlag)(nil), // 5: envoy.config.core.v3.RuntimeFeatureFlag + (*wrapperspb.BoolValue)(nil), // 6: google.protobuf.BoolValue +} +var file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_depIdxs = []int32{ + 4, // 0: envoy.extensions.filters.http.decompressor.v3.Decompressor.decompressor_library:type_name -> envoy.config.core.v3.TypedExtensionConfig + 2, // 1: envoy.extensions.filters.http.decompressor.v3.Decompressor.request_direction_config:type_name -> envoy.extensions.filters.http.decompressor.v3.Decompressor.RequestDirectionConfig + 3, // 2: envoy.extensions.filters.http.decompressor.v3.Decompressor.response_direction_config:type_name -> envoy.extensions.filters.http.decompressor.v3.Decompressor.ResponseDirectionConfig + 5, // 3: envoy.extensions.filters.http.decompressor.v3.Decompressor.CommonDirectionConfig.enabled:type_name -> envoy.config.core.v3.RuntimeFeatureFlag + 1, // 4: envoy.extensions.filters.http.decompressor.v3.Decompressor.RequestDirectionConfig.common_config:type_name -> envoy.extensions.filters.http.decompressor.v3.Decompressor.CommonDirectionConfig + 6, // 5: envoy.extensions.filters.http.decompressor.v3.Decompressor.RequestDirectionConfig.advertise_accept_encoding:type_name -> google.protobuf.BoolValue + 1, // 6: envoy.extensions.filters.http.decompressor.v3.Decompressor.ResponseDirectionConfig.common_config:type_name -> envoy.extensions.filters.http.decompressor.v3.Decompressor.CommonDirectionConfig + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_init() } +func file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_init() { + if File_envoy_extensions_filters_http_decompressor_v3_decompressor_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Decompressor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Decompressor_CommonDirectionConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Decompressor_RequestDirectionConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Decompressor_ResponseDirectionConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_decompressor_v3_decompressor_proto = out.File + file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_rawDesc = nil + file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_goTypes = nil + file_envoy_extensions_filters_http_decompressor_v3_decompressor_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/decompressor/v3/decompressor.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/decompressor/v3/decompressor.pb.validate.go new file mode 100644 index 0000000000000..fa72a79205b1c --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/decompressor/v3/decompressor.pb.validate.go @@ -0,0 +1,662 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/decompressor/v3/decompressor.proto + +package decompressorv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Decompressor 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 *Decompressor) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Decompressor 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 DecompressorMultiError, or +// nil if none found. +func (m *Decompressor) ValidateAll() error { + return m.validate(true) +} + +func (m *Decompressor) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetDecompressorLibrary() == nil { + err := DecompressorValidationError{ + field: "DecompressorLibrary", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetDecompressorLibrary()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DecompressorValidationError{ + field: "DecompressorLibrary", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DecompressorValidationError{ + field: "DecompressorLibrary", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDecompressorLibrary()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DecompressorValidationError{ + field: "DecompressorLibrary", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetRequestDirectionConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DecompressorValidationError{ + field: "RequestDirectionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DecompressorValidationError{ + field: "RequestDirectionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestDirectionConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DecompressorValidationError{ + field: "RequestDirectionConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetResponseDirectionConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DecompressorValidationError{ + field: "ResponseDirectionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DecompressorValidationError{ + field: "ResponseDirectionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseDirectionConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DecompressorValidationError{ + field: "ResponseDirectionConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return DecompressorMultiError(errors) + } + return nil +} + +// DecompressorMultiError is an error wrapping multiple validation errors +// returned by Decompressor.ValidateAll() if the designated constraints aren't met. +type DecompressorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DecompressorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DecompressorMultiError) AllErrors() []error { return m } + +// DecompressorValidationError is the validation error returned by +// Decompressor.Validate if the designated constraints aren't met. +type DecompressorValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DecompressorValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DecompressorValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DecompressorValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DecompressorValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DecompressorValidationError) ErrorName() string { return "DecompressorValidationError" } + +// Error satisfies the builtin error interface +func (e DecompressorValidationError) 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 %sDecompressor.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DecompressorValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DecompressorValidationError{} + +// Validate checks the field values on Decompressor_CommonDirectionConfig 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 *Decompressor_CommonDirectionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Decompressor_CommonDirectionConfig +// 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 +// Decompressor_CommonDirectionConfigMultiError, or nil if none found. +func (m *Decompressor_CommonDirectionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Decompressor_CommonDirectionConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Decompressor_CommonDirectionConfigValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Decompressor_CommonDirectionConfigValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Decompressor_CommonDirectionConfigValidationError{ + field: "Enabled", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for IgnoreNoTransformHeader + + if len(errors) > 0 { + return Decompressor_CommonDirectionConfigMultiError(errors) + } + return nil +} + +// Decompressor_CommonDirectionConfigMultiError is an error wrapping multiple +// validation errors returned by +// Decompressor_CommonDirectionConfig.ValidateAll() if the designated +// constraints aren't met. +type Decompressor_CommonDirectionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Decompressor_CommonDirectionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Decompressor_CommonDirectionConfigMultiError) AllErrors() []error { return m } + +// Decompressor_CommonDirectionConfigValidationError is the validation error +// returned by Decompressor_CommonDirectionConfig.Validate if the designated +// constraints aren't met. +type Decompressor_CommonDirectionConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Decompressor_CommonDirectionConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Decompressor_CommonDirectionConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Decompressor_CommonDirectionConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Decompressor_CommonDirectionConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Decompressor_CommonDirectionConfigValidationError) ErrorName() string { + return "Decompressor_CommonDirectionConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e Decompressor_CommonDirectionConfigValidationError) 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 %sDecompressor_CommonDirectionConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Decompressor_CommonDirectionConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Decompressor_CommonDirectionConfigValidationError{} + +// Validate checks the field values on Decompressor_RequestDirectionConfig 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 *Decompressor_RequestDirectionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Decompressor_RequestDirectionConfig +// 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 +// Decompressor_RequestDirectionConfigMultiError, or nil if none found. +func (m *Decompressor_RequestDirectionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Decompressor_RequestDirectionConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetCommonConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Decompressor_RequestDirectionConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Decompressor_RequestDirectionConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Decompressor_RequestDirectionConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetAdvertiseAcceptEncoding()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Decompressor_RequestDirectionConfigValidationError{ + field: "AdvertiseAcceptEncoding", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Decompressor_RequestDirectionConfigValidationError{ + field: "AdvertiseAcceptEncoding", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAdvertiseAcceptEncoding()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Decompressor_RequestDirectionConfigValidationError{ + field: "AdvertiseAcceptEncoding", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return Decompressor_RequestDirectionConfigMultiError(errors) + } + return nil +} + +// Decompressor_RequestDirectionConfigMultiError is an error wrapping multiple +// validation errors returned by +// Decompressor_RequestDirectionConfig.ValidateAll() if the designated +// constraints aren't met. +type Decompressor_RequestDirectionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Decompressor_RequestDirectionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Decompressor_RequestDirectionConfigMultiError) AllErrors() []error { return m } + +// Decompressor_RequestDirectionConfigValidationError is the validation error +// returned by Decompressor_RequestDirectionConfig.Validate if the designated +// constraints aren't met. +type Decompressor_RequestDirectionConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Decompressor_RequestDirectionConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Decompressor_RequestDirectionConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Decompressor_RequestDirectionConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Decompressor_RequestDirectionConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Decompressor_RequestDirectionConfigValidationError) ErrorName() string { + return "Decompressor_RequestDirectionConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e Decompressor_RequestDirectionConfigValidationError) 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 %sDecompressor_RequestDirectionConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Decompressor_RequestDirectionConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Decompressor_RequestDirectionConfigValidationError{} + +// Validate checks the field values on Decompressor_ResponseDirectionConfig +// 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 *Decompressor_ResponseDirectionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Decompressor_ResponseDirectionConfig +// 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 +// Decompressor_ResponseDirectionConfigMultiError, or nil if none found. +func (m *Decompressor_ResponseDirectionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *Decompressor_ResponseDirectionConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetCommonConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Decompressor_ResponseDirectionConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Decompressor_ResponseDirectionConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Decompressor_ResponseDirectionConfigValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return Decompressor_ResponseDirectionConfigMultiError(errors) + } + return nil +} + +// Decompressor_ResponseDirectionConfigMultiError is an error wrapping multiple +// validation errors returned by +// Decompressor_ResponseDirectionConfig.ValidateAll() if the designated +// constraints aren't met. +type Decompressor_ResponseDirectionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Decompressor_ResponseDirectionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Decompressor_ResponseDirectionConfigMultiError) AllErrors() []error { return m } + +// Decompressor_ResponseDirectionConfigValidationError is the validation error +// returned by Decompressor_ResponseDirectionConfig.Validate if the designated +// constraints aren't met. +type Decompressor_ResponseDirectionConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Decompressor_ResponseDirectionConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Decompressor_ResponseDirectionConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Decompressor_ResponseDirectionConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Decompressor_ResponseDirectionConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Decompressor_ResponseDirectionConfigValidationError) ErrorName() string { + return "Decompressor_ResponseDirectionConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e Decompressor_ResponseDirectionConfigValidationError) 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 %sDecompressor_ResponseDirectionConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Decompressor_ResponseDirectionConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Decompressor_ResponseDirectionConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/ext_proc/v3/ext_proc.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/ext_proc/v3/ext_proc.pb.go new file mode 100644 index 0000000000000..f64a96230eda9 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/ext_proc/v3/ext_proc.pb.go @@ -0,0 +1,580 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/ext_proc/v3/ext_proc.proto + +package ext_procv3 + +import ( + v31 "github.com/cilium/proxy/go/envoy/config/common/mutation_rules/v3" + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// [#next-free-field: 10] +type ExternalProcessor struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Configuration for the gRPC service that the filter will communicate with. + // The filter supports both the "Envoy" and "Google" gRPC clients. + GrpcService *v3.GrpcService `protobuf:"bytes,1,opt,name=grpc_service,json=grpcService,proto3" json:"grpc_service,omitempty"` + // By default, if the gRPC stream cannot be established, or if it is closed + // prematurely with an error, the filter will fail. Specifically, if the + // response headers have not yet been delivered, then it will return a 500 + // error downstream. If they have been delivered, then instead the HTTP stream to the + // downstream client will be reset. + // With this parameter set to true, however, then if the gRPC stream is prematurely closed + // or could not be opened, processing continues without error. + FailureModeAllow bool `protobuf:"varint,2,opt,name=failure_mode_allow,json=failureModeAllow,proto3" json:"failure_mode_allow,omitempty"` + // Specifies default options for how HTTP headers, trailers, and bodies are + // sent. See ProcessingMode for details. + ProcessingMode *ProcessingMode `protobuf:"bytes,3,opt,name=processing_mode,json=processingMode,proto3" json:"processing_mode,omitempty"` + // [#not-implemented-hide:] + // If true, send each part of the HTTP request or response specified by ProcessingMode + // asynchronously -- in other words, send the message on the gRPC stream and then continue + // filter processing. If false, which is the default, suspend filter execution after + // each message is sent to the remote service and wait up to "message_timeout" + // for a reply. + AsyncMode bool `protobuf:"varint,4,opt,name=async_mode,json=asyncMode,proto3" json:"async_mode,omitempty"` + // [#not-implemented-hide:] + // Envoy provides a number of :ref:`attributes ` + // for expressive policies. Each attribute name provided in this field will be + // matched against that list and populated in the request_headers message. + // See the :ref:`attribute documentation ` + // for the list of supported attributes and their types. + RequestAttributes []string `protobuf:"bytes,5,rep,name=request_attributes,json=requestAttributes,proto3" json:"request_attributes,omitempty"` + // [#not-implemented-hide:] + // Envoy provides a number of :ref:`attributes ` + // for expressive policies. Each attribute name provided in this field will be + // matched against that list and populated in the response_headers message. + // See the :ref:`attribute documentation ` + // for the list of supported attributes and their types. + ResponseAttributes []string `protobuf:"bytes,6,rep,name=response_attributes,json=responseAttributes,proto3" json:"response_attributes,omitempty"` + // Specifies the timeout for each individual message sent on the stream and + // when the filter is running in synchronous mode. Whenever + // the proxy sends a message on the stream that requires a response, it will + // reset this timer, and will stop processing and return an error (subject + // to the processing mode) if the timer expires before a matching response. + // is received. There is no timeout when the filter is running in asynchronous + // mode. Default is 200 milliseconds. + MessageTimeout *durationpb.Duration `protobuf:"bytes,7,opt,name=message_timeout,json=messageTimeout,proto3" json:"message_timeout,omitempty"` + // Optional additional prefix to use when emitting statistics. This allows to distinguish + // emitted statistics between configured *ext_proc* filters in an HTTP filter chain. + StatPrefix string `protobuf:"bytes,8,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` + // Rules that determine what modifications an external processing server may + // make to message headers. If not set, all headers may be modified except + // for "host", ":authority", ":scheme", ":method", and headers that start + // with the header prefix set via + // :ref:`header_prefix ` + // (which is usually "x-envoy"). + MutationRules *v31.HeaderMutationRules `protobuf:"bytes,9,opt,name=mutation_rules,json=mutationRules,proto3" json:"mutation_rules,omitempty"` +} + +func (x *ExternalProcessor) Reset() { + *x = ExternalProcessor{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExternalProcessor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExternalProcessor) ProtoMessage() {} + +func (x *ExternalProcessor) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExternalProcessor.ProtoReflect.Descriptor instead. +func (*ExternalProcessor) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDescGZIP(), []int{0} +} + +func (x *ExternalProcessor) GetGrpcService() *v3.GrpcService { + if x != nil { + return x.GrpcService + } + return nil +} + +func (x *ExternalProcessor) GetFailureModeAllow() bool { + if x != nil { + return x.FailureModeAllow + } + return false +} + +func (x *ExternalProcessor) GetProcessingMode() *ProcessingMode { + if x != nil { + return x.ProcessingMode + } + return nil +} + +func (x *ExternalProcessor) GetAsyncMode() bool { + if x != nil { + return x.AsyncMode + } + return false +} + +func (x *ExternalProcessor) GetRequestAttributes() []string { + if x != nil { + return x.RequestAttributes + } + return nil +} + +func (x *ExternalProcessor) GetResponseAttributes() []string { + if x != nil { + return x.ResponseAttributes + } + return nil +} + +func (x *ExternalProcessor) GetMessageTimeout() *durationpb.Duration { + if x != nil { + return x.MessageTimeout + } + return nil +} + +func (x *ExternalProcessor) GetStatPrefix() string { + if x != nil { + return x.StatPrefix + } + return "" +} + +func (x *ExternalProcessor) GetMutationRules() *v31.HeaderMutationRules { + if x != nil { + return x.MutationRules + } + return nil +} + +// Extra settings that may be added to per-route configuration for a +// virtual host or cluster. +type ExtProcPerRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Override: + // + // *ExtProcPerRoute_Disabled + // *ExtProcPerRoute_Overrides + Override isExtProcPerRoute_Override `protobuf_oneof:"override"` +} + +func (x *ExtProcPerRoute) Reset() { + *x = ExtProcPerRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExtProcPerRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExtProcPerRoute) ProtoMessage() {} + +func (x *ExtProcPerRoute) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExtProcPerRoute.ProtoReflect.Descriptor instead. +func (*ExtProcPerRoute) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDescGZIP(), []int{1} +} + +func (m *ExtProcPerRoute) GetOverride() isExtProcPerRoute_Override { + if m != nil { + return m.Override + } + return nil +} + +func (x *ExtProcPerRoute) GetDisabled() bool { + if x, ok := x.GetOverride().(*ExtProcPerRoute_Disabled); ok { + return x.Disabled + } + return false +} + +func (x *ExtProcPerRoute) GetOverrides() *ExtProcOverrides { + if x, ok := x.GetOverride().(*ExtProcPerRoute_Overrides); ok { + return x.Overrides + } + return nil +} + +type isExtProcPerRoute_Override interface { + isExtProcPerRoute_Override() +} + +type ExtProcPerRoute_Disabled struct { + // Disable the filter for this particular vhost or route. + // If disabled is specified in multiple per-filter-configs, the most specific one will be used. + Disabled bool `protobuf:"varint,1,opt,name=disabled,proto3,oneof"` +} + +type ExtProcPerRoute_Overrides struct { + // Override aspects of the configuration for this route. A set of + // overrides in a more specific configuration will override a "disabled" + // flag set in a less-specific one. + Overrides *ExtProcOverrides `protobuf:"bytes,2,opt,name=overrides,proto3,oneof"` +} + +func (*ExtProcPerRoute_Disabled) isExtProcPerRoute_Override() {} + +func (*ExtProcPerRoute_Overrides) isExtProcPerRoute_Override() {} + +// Overrides that may be set on a per-route basis +// [#next-free-field: 6] +type ExtProcOverrides struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Set a different processing mode for this route than the default. + ProcessingMode *ProcessingMode `protobuf:"bytes,1,opt,name=processing_mode,json=processingMode,proto3" json:"processing_mode,omitempty"` + // [#not-implemented-hide:] + // Set a different asynchronous processing option than the default. + AsyncMode bool `protobuf:"varint,2,opt,name=async_mode,json=asyncMode,proto3" json:"async_mode,omitempty"` + // [#not-implemented-hide:] + // Set different optional attributes than the default setting of the + // “request_attributes“ field. + RequestAttributes []string `protobuf:"bytes,3,rep,name=request_attributes,json=requestAttributes,proto3" json:"request_attributes,omitempty"` + // [#not-implemented-hide:] + // Set different optional properties than the default setting of the + // “response_attributes“ field. + ResponseAttributes []string `protobuf:"bytes,4,rep,name=response_attributes,json=responseAttributes,proto3" json:"response_attributes,omitempty"` + // Set a different gRPC service for this route than the default. + GrpcService *v3.GrpcService `protobuf:"bytes,5,opt,name=grpc_service,json=grpcService,proto3" json:"grpc_service,omitempty"` +} + +func (x *ExtProcOverrides) Reset() { + *x = ExtProcOverrides{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExtProcOverrides) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExtProcOverrides) ProtoMessage() {} + +func (x *ExtProcOverrides) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExtProcOverrides.ProtoReflect.Descriptor instead. +func (*ExtProcOverrides) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDescGZIP(), []int{2} +} + +func (x *ExtProcOverrides) GetProcessingMode() *ProcessingMode { + if x != nil { + return x.ProcessingMode + } + return nil +} + +func (x *ExtProcOverrides) GetAsyncMode() bool { + if x != nil { + return x.AsyncMode + } + return false +} + +func (x *ExtProcOverrides) GetRequestAttributes() []string { + if x != nil { + return x.RequestAttributes + } + return nil +} + +func (x *ExtProcOverrides) GetResponseAttributes() []string { + if x != nil { + return x.ResponseAttributes + } + return nil +} + +func (x *ExtProcOverrides) GetGrpcService() *v3.GrpcService { + if x != nil { + return x.GrpcService + } + return nil +} + +var File_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDesc = []byte{ + 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x5f, + 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, + 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x1a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6d, 0x75, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x75, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, + 0x6f, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xb2, 0x04, 0x0a, 0x11, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x44, 0x0a, 0x0c, 0x67, 0x72, + 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x2c, 0x0a, 0x12, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, + 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x66, 0x61, + 0x69, 0x6c, 0x75, 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x12, 0x62, + 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x6f, 0x64, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, + 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, + 0x64, 0x65, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, + 0x64, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x6d, 0x6f, 0x64, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x4d, 0x6f, 0x64, + 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x12, 0x2f, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x12, 0x42, 0x0a, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, + 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x61, 0x0a, 0x0e, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x0d, 0x6d, 0x75, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x22, 0xa6, 0x01, 0x0a, 0x0f, 0x45, 0x78, + 0x74, 0x50, 0x72, 0x6f, 0x63, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x25, 0x0a, + 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x12, 0x5b, 0x0a, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, + 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x4f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x73, 0x48, 0x00, 0x52, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, + 0x73, 0x42, 0x0f, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x03, 0xf8, + 0x42, 0x01, 0x22, 0xbb, 0x02, 0x0a, 0x10, 0x45, 0x78, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x4f, 0x76, + 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x12, 0x62, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0e, 0x70, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, + 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x09, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x0c, 0x67, 0x72, + 0x70, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x42, 0xb6, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x45, 0x78, + 0x74, 0x50, 0x72, 0x6f, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, + 0x74, 0x70, 0x2f, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x65, + 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x02, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDescData = file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDesc +) + +func file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDescData +} + +var file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_goTypes = []interface{}{ + (*ExternalProcessor)(nil), // 0: envoy.extensions.filters.http.ext_proc.v3.ExternalProcessor + (*ExtProcPerRoute)(nil), // 1: envoy.extensions.filters.http.ext_proc.v3.ExtProcPerRoute + (*ExtProcOverrides)(nil), // 2: envoy.extensions.filters.http.ext_proc.v3.ExtProcOverrides + (*v3.GrpcService)(nil), // 3: envoy.config.core.v3.GrpcService + (*ProcessingMode)(nil), // 4: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode + (*durationpb.Duration)(nil), // 5: google.protobuf.Duration + (*v31.HeaderMutationRules)(nil), // 6: envoy.config.common.mutation_rules.v3.HeaderMutationRules +} +var file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_depIdxs = []int32{ + 3, // 0: envoy.extensions.filters.http.ext_proc.v3.ExternalProcessor.grpc_service:type_name -> envoy.config.core.v3.GrpcService + 4, // 1: envoy.extensions.filters.http.ext_proc.v3.ExternalProcessor.processing_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode + 5, // 2: envoy.extensions.filters.http.ext_proc.v3.ExternalProcessor.message_timeout:type_name -> google.protobuf.Duration + 6, // 3: envoy.extensions.filters.http.ext_proc.v3.ExternalProcessor.mutation_rules:type_name -> envoy.config.common.mutation_rules.v3.HeaderMutationRules + 2, // 4: envoy.extensions.filters.http.ext_proc.v3.ExtProcPerRoute.overrides:type_name -> envoy.extensions.filters.http.ext_proc.v3.ExtProcOverrides + 4, // 5: envoy.extensions.filters.http.ext_proc.v3.ExtProcOverrides.processing_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode + 3, // 6: envoy.extensions.filters.http.ext_proc.v3.ExtProcOverrides.grpc_service:type_name -> envoy.config.core.v3.GrpcService + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_init() } +func file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_init() { + if File_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto != nil { + return + } + file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_init() + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExternalProcessor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExtProcPerRoute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExtProcOverrides); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*ExtProcPerRoute_Disabled)(nil), + (*ExtProcPerRoute_Overrides)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto = out.File + file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_rawDesc = nil + file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_goTypes = nil + file_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/ext_proc/v3/ext_proc.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/ext_proc/v3/ext_proc.pb.validate.go new file mode 100644 index 0000000000000..cc8ff31c2a562 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/ext_proc/v3/ext_proc.pb.validate.go @@ -0,0 +1,575 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/ext_proc/v3/ext_proc.proto + +package ext_procv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ExternalProcessor 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 *ExternalProcessor) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExternalProcessor 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 +// ExternalProcessorMultiError, or nil if none found. +func (m *ExternalProcessor) ValidateAll() error { + return m.validate(true) +} + +func (m *ExternalProcessor) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExternalProcessorValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExternalProcessorValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExternalProcessorValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for FailureModeAllow + + if all { + switch v := interface{}(m.GetProcessingMode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExternalProcessorValidationError{ + field: "ProcessingMode", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExternalProcessorValidationError{ + field: "ProcessingMode", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProcessingMode()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExternalProcessorValidationError{ + field: "ProcessingMode", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for AsyncMode + + if all { + switch v := interface{}(m.GetMessageTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExternalProcessorValidationError{ + field: "MessageTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExternalProcessorValidationError{ + field: "MessageTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMessageTimeout()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExternalProcessorValidationError{ + field: "MessageTimeout", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for StatPrefix + + if all { + switch v := interface{}(m.GetMutationRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExternalProcessorValidationError{ + field: "MutationRules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExternalProcessorValidationError{ + field: "MutationRules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMutationRules()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExternalProcessorValidationError{ + field: "MutationRules", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ExternalProcessorMultiError(errors) + } + return nil +} + +// ExternalProcessorMultiError is an error wrapping multiple validation errors +// returned by ExternalProcessor.ValidateAll() if the designated constraints +// aren't met. +type ExternalProcessorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExternalProcessorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExternalProcessorMultiError) AllErrors() []error { return m } + +// ExternalProcessorValidationError is the validation error returned by +// ExternalProcessor.Validate if the designated constraints aren't met. +type ExternalProcessorValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExternalProcessorValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExternalProcessorValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExternalProcessorValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExternalProcessorValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExternalProcessorValidationError) ErrorName() string { + return "ExternalProcessorValidationError" +} + +// Error satisfies the builtin error interface +func (e ExternalProcessorValidationError) 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 %sExternalProcessor.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExternalProcessorValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExternalProcessorValidationError{} + +// Validate checks the field values on ExtProcPerRoute 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 *ExtProcPerRoute) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExtProcPerRoute 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 +// ExtProcPerRouteMultiError, or nil if none found. +func (m *ExtProcPerRoute) ValidateAll() error { + return m.validate(true) +} + +func (m *ExtProcPerRoute) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.Override.(type) { + + case *ExtProcPerRoute_Disabled: + + if m.GetDisabled() != true { + err := ExtProcPerRouteValidationError{ + field: "Disabled", + reason: "value must equal true", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *ExtProcPerRoute_Overrides: + + if all { + switch v := interface{}(m.GetOverrides()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtProcPerRouteValidationError{ + field: "Overrides", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtProcPerRouteValidationError{ + field: "Overrides", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOverrides()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExtProcPerRouteValidationError{ + field: "Overrides", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := ExtProcPerRouteValidationError{ + field: "Override", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return ExtProcPerRouteMultiError(errors) + } + return nil +} + +// ExtProcPerRouteMultiError is an error wrapping multiple validation errors +// returned by ExtProcPerRoute.ValidateAll() if the designated constraints +// aren't met. +type ExtProcPerRouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExtProcPerRouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExtProcPerRouteMultiError) AllErrors() []error { return m } + +// ExtProcPerRouteValidationError is the validation error returned by +// ExtProcPerRoute.Validate if the designated constraints aren't met. +type ExtProcPerRouteValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExtProcPerRouteValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExtProcPerRouteValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExtProcPerRouteValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExtProcPerRouteValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExtProcPerRouteValidationError) ErrorName() string { return "ExtProcPerRouteValidationError" } + +// Error satisfies the builtin error interface +func (e ExtProcPerRouteValidationError) 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 %sExtProcPerRoute.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExtProcPerRouteValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExtProcPerRouteValidationError{} + +// Validate checks the field values on ExtProcOverrides 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 *ExtProcOverrides) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExtProcOverrides 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 +// ExtProcOverridesMultiError, or nil if none found. +func (m *ExtProcOverrides) ValidateAll() error { + return m.validate(true) +} + +func (m *ExtProcOverrides) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetProcessingMode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtProcOverridesValidationError{ + field: "ProcessingMode", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtProcOverridesValidationError{ + field: "ProcessingMode", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProcessingMode()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExtProcOverridesValidationError{ + field: "ProcessingMode", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for AsyncMode + + if all { + switch v := interface{}(m.GetGrpcService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExtProcOverridesValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExtProcOverridesValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcService()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExtProcOverridesValidationError{ + field: "GrpcService", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ExtProcOverridesMultiError(errors) + } + return nil +} + +// ExtProcOverridesMultiError is an error wrapping multiple validation errors +// returned by ExtProcOverrides.ValidateAll() if the designated constraints +// aren't met. +type ExtProcOverridesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExtProcOverridesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExtProcOverridesMultiError) AllErrors() []error { return m } + +// ExtProcOverridesValidationError is the validation error returned by +// ExtProcOverrides.Validate if the designated constraints aren't met. +type ExtProcOverridesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExtProcOverridesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExtProcOverridesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExtProcOverridesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExtProcOverridesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExtProcOverridesValidationError) ErrorName() string { return "ExtProcOverridesValidationError" } + +// Error satisfies the builtin error interface +func (e ExtProcOverridesValidationError) 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 %sExtProcOverrides.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExtProcOverridesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExtProcOverridesValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/ext_proc/v3/processing_mode.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/ext_proc/v3/processing_mode.pb.go new file mode 100644 index 0000000000000..64ecdbc3997c2 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/ext_proc/v3/processing_mode.pb.go @@ -0,0 +1,402 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/ext_proc/v3/processing_mode.proto + +package ext_procv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Control how headers and trailers are handled +type ProcessingMode_HeaderSendMode int32 + +const ( + // The default HeaderSendMode depends on which part of the message is being + // processed. By default, request and response headers are sent, + // while trailers are skipped. + ProcessingMode_DEFAULT ProcessingMode_HeaderSendMode = 0 + // Send the header or trailer. + ProcessingMode_SEND ProcessingMode_HeaderSendMode = 1 + // Do not send the header or trailer. + ProcessingMode_SKIP ProcessingMode_HeaderSendMode = 2 +) + +// Enum value maps for ProcessingMode_HeaderSendMode. +var ( + ProcessingMode_HeaderSendMode_name = map[int32]string{ + 0: "DEFAULT", + 1: "SEND", + 2: "SKIP", + } + ProcessingMode_HeaderSendMode_value = map[string]int32{ + "DEFAULT": 0, + "SEND": 1, + "SKIP": 2, + } +) + +func (x ProcessingMode_HeaderSendMode) Enum() *ProcessingMode_HeaderSendMode { + p := new(ProcessingMode_HeaderSendMode) + *p = x + return p +} + +func (x ProcessingMode_HeaderSendMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ProcessingMode_HeaderSendMode) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_enumTypes[0].Descriptor() +} + +func (ProcessingMode_HeaderSendMode) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_enumTypes[0] +} + +func (x ProcessingMode_HeaderSendMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ProcessingMode_HeaderSendMode.Descriptor instead. +func (ProcessingMode_HeaderSendMode) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescGZIP(), []int{0, 0} +} + +// Control how the request and response bodies are handled +type ProcessingMode_BodySendMode int32 + +const ( + // Do not send the body at all. This is the default. + ProcessingMode_NONE ProcessingMode_BodySendMode = 0 + // Stream the body to the server in pieces as they arrive at the + // proxy. + ProcessingMode_STREAMED ProcessingMode_BodySendMode = 1 + // Buffer the message body in memory and send the entire body at once. + // If the body exceeds the configured buffer limit, then the + // downstream system will receive an error. + ProcessingMode_BUFFERED ProcessingMode_BodySendMode = 2 + // Buffer the message body in memory and send the entire body in one + // chunk. If the body exceeds the configured buffer limit, then the body contents + // up to the buffer limit will be sent. + ProcessingMode_BUFFERED_PARTIAL ProcessingMode_BodySendMode = 3 +) + +// Enum value maps for ProcessingMode_BodySendMode. +var ( + ProcessingMode_BodySendMode_name = map[int32]string{ + 0: "NONE", + 1: "STREAMED", + 2: "BUFFERED", + 3: "BUFFERED_PARTIAL", + } + ProcessingMode_BodySendMode_value = map[string]int32{ + "NONE": 0, + "STREAMED": 1, + "BUFFERED": 2, + "BUFFERED_PARTIAL": 3, + } +) + +func (x ProcessingMode_BodySendMode) Enum() *ProcessingMode_BodySendMode { + p := new(ProcessingMode_BodySendMode) + *p = x + return p +} + +func (x ProcessingMode_BodySendMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ProcessingMode_BodySendMode) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_enumTypes[1].Descriptor() +} + +func (ProcessingMode_BodySendMode) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_enumTypes[1] +} + +func (x ProcessingMode_BodySendMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ProcessingMode_BodySendMode.Descriptor instead. +func (ProcessingMode_BodySendMode) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescGZIP(), []int{0, 1} +} + +// [#next-free-field: 7] +type ProcessingMode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // How to handle the request header. Default is "SEND". + RequestHeaderMode ProcessingMode_HeaderSendMode `protobuf:"varint,1,opt,name=request_header_mode,json=requestHeaderMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3.ProcessingMode_HeaderSendMode" json:"request_header_mode,omitempty"` + // How to handle the response header. Default is "SEND". + ResponseHeaderMode ProcessingMode_HeaderSendMode `protobuf:"varint,2,opt,name=response_header_mode,json=responseHeaderMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3.ProcessingMode_HeaderSendMode" json:"response_header_mode,omitempty"` + // How to handle the request body. Default is "NONE". + RequestBodyMode ProcessingMode_BodySendMode `protobuf:"varint,3,opt,name=request_body_mode,json=requestBodyMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3.ProcessingMode_BodySendMode" json:"request_body_mode,omitempty"` + // How do handle the response body. Default is "NONE". + ResponseBodyMode ProcessingMode_BodySendMode `protobuf:"varint,4,opt,name=response_body_mode,json=responseBodyMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3.ProcessingMode_BodySendMode" json:"response_body_mode,omitempty"` + // How to handle the request trailers. Default is "SKIP". + RequestTrailerMode ProcessingMode_HeaderSendMode `protobuf:"varint,5,opt,name=request_trailer_mode,json=requestTrailerMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3.ProcessingMode_HeaderSendMode" json:"request_trailer_mode,omitempty"` + // How to handle the response trailers. Default is "SKIP". + ResponseTrailerMode ProcessingMode_HeaderSendMode `protobuf:"varint,6,opt,name=response_trailer_mode,json=responseTrailerMode,proto3,enum=envoy.extensions.filters.http.ext_proc.v3.ProcessingMode_HeaderSendMode" json:"response_trailer_mode,omitempty"` +} + +func (x *ProcessingMode) Reset() { + *x = ProcessingMode{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProcessingMode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProcessingMode) ProtoMessage() {} + +func (x *ProcessingMode) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProcessingMode.ProtoReflect.Descriptor instead. +func (*ProcessingMode) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescGZIP(), []int{0} +} + +func (x *ProcessingMode) GetRequestHeaderMode() ProcessingMode_HeaderSendMode { + if x != nil { + return x.RequestHeaderMode + } + return ProcessingMode_DEFAULT +} + +func (x *ProcessingMode) GetResponseHeaderMode() ProcessingMode_HeaderSendMode { + if x != nil { + return x.ResponseHeaderMode + } + return ProcessingMode_DEFAULT +} + +func (x *ProcessingMode) GetRequestBodyMode() ProcessingMode_BodySendMode { + if x != nil { + return x.RequestBodyMode + } + return ProcessingMode_NONE +} + +func (x *ProcessingMode) GetResponseBodyMode() ProcessingMode_BodySendMode { + if x != nil { + return x.ResponseBodyMode + } + return ProcessingMode_NONE +} + +func (x *ProcessingMode) GetRequestTrailerMode() ProcessingMode_HeaderSendMode { + if x != nil { + return x.RequestTrailerMode + } + return ProcessingMode_DEFAULT +} + +func (x *ProcessingMode) GetResponseTrailerMode() ProcessingMode_HeaderSendMode { + if x != nil { + return x.ResponseTrailerMode + } + return ProcessingMode_DEFAULT +} + +var File_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDesc = []byte{ + 0x0a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, + 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xa9, 0x07, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x13, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x48, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, + 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, + 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x11, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x84, 0x01, + 0x0a, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x48, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, + 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, + 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, + 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, + 0x52, 0x12, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x7c, 0x0a, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x53, + 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x6f, + 0x64, 0x65, 0x12, 0x7e, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x62, + 0x6f, 0x64, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x46, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, + 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x53, 0x65, + 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, + 0x52, 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x6f, + 0x64, 0x65, 0x12, 0x84, 0x01, 0x0a, 0x14, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, + 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x48, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x72, + 0x61, 0x69, 0x6c, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x86, 0x01, 0x0a, 0x15, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x6d, + 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x48, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, + 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, + 0x4d, 0x6f, 0x64, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x4d, + 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x4d, 0x6f, + 0x64, 0x65, 0x22, 0x31, 0x0a, 0x0e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, + 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, + 0x00, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x45, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x53, + 0x4b, 0x49, 0x50, 0x10, 0x02, 0x22, 0x4a, 0x0a, 0x0c, 0x42, 0x6f, 0x64, 0x79, 0x53, 0x65, 0x6e, + 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, + 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x52, 0x45, 0x41, 0x4d, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, + 0x08, 0x42, 0x55, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x42, + 0x55, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x49, 0x41, 0x4c, 0x10, + 0x03, 0x42, 0xbd, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x13, 0x50, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x65, 0x78, 0x74, 0x5f, 0x70, + 0x72, 0x6f, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, + 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescData = file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDesc +) + +func file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDescData +} + +var file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_goTypes = []interface{}{ + (ProcessingMode_HeaderSendMode)(0), // 0: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode + (ProcessingMode_BodySendMode)(0), // 1: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.BodySendMode + (*ProcessingMode)(nil), // 2: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode +} +var file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_depIdxs = []int32{ + 0, // 0: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.request_header_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode + 0, // 1: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.response_header_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode + 1, // 2: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.request_body_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.BodySendMode + 1, // 3: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.response_body_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.BodySendMode + 0, // 4: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.request_trailer_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode + 0, // 5: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.response_trailer_mode:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode.HeaderSendMode + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_init() } +func file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_init() { + if File_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProcessingMode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDesc, + NumEnums: 2, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_depIdxs, + EnumInfos: file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_enumTypes, + MessageInfos: file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto = out.File + file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_rawDesc = nil + file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_goTypes = nil + file_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/ext_proc/v3/processing_mode.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/ext_proc/v3/processing_mode.pb.validate.go new file mode 100644 index 0000000000000..c4d237a8825cb --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/ext_proc/v3/processing_mode.pb.validate.go @@ -0,0 +1,201 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/ext_proc/v3/processing_mode.proto + +package ext_procv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ProcessingMode 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 *ProcessingMode) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ProcessingMode 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 ProcessingModeMultiError, +// or nil if none found. +func (m *ProcessingMode) ValidateAll() error { + return m.validate(true) +} + +func (m *ProcessingMode) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if _, ok := ProcessingMode_HeaderSendMode_name[int32(m.GetRequestHeaderMode())]; !ok { + err := ProcessingModeValidationError{ + field: "RequestHeaderMode", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := ProcessingMode_HeaderSendMode_name[int32(m.GetResponseHeaderMode())]; !ok { + err := ProcessingModeValidationError{ + field: "ResponseHeaderMode", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := ProcessingMode_BodySendMode_name[int32(m.GetRequestBodyMode())]; !ok { + err := ProcessingModeValidationError{ + field: "RequestBodyMode", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := ProcessingMode_BodySendMode_name[int32(m.GetResponseBodyMode())]; !ok { + err := ProcessingModeValidationError{ + field: "ResponseBodyMode", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := ProcessingMode_HeaderSendMode_name[int32(m.GetRequestTrailerMode())]; !ok { + err := ProcessingModeValidationError{ + field: "RequestTrailerMode", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := ProcessingMode_HeaderSendMode_name[int32(m.GetResponseTrailerMode())]; !ok { + err := ProcessingModeValidationError{ + field: "ResponseTrailerMode", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return ProcessingModeMultiError(errors) + } + return nil +} + +// ProcessingModeMultiError is an error wrapping multiple validation errors +// returned by ProcessingMode.ValidateAll() if the designated constraints +// aren't met. +type ProcessingModeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ProcessingModeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ProcessingModeMultiError) AllErrors() []error { return m } + +// ProcessingModeValidationError is the validation error returned by +// ProcessingMode.Validate if the designated constraints aren't met. +type ProcessingModeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ProcessingModeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ProcessingModeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ProcessingModeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ProcessingModeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ProcessingModeValidationError) ErrorName() string { return "ProcessingModeValidationError" } + +// Error satisfies the builtin error interface +func (e ProcessingModeValidationError) 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 %sProcessingMode.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ProcessingModeValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ProcessingModeValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/fault/v3/fault.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/fault/v3/fault.pb.go new file mode 100644 index 0000000000000..1c1e345d5c3cf --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/fault/v3/fault.pb.go @@ -0,0 +1,638 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/fault/v3/fault.proto + +package faultv3 + +import ( + v32 "github.com/cilium/proxy/go/envoy/config/route/v3" + v31 "github.com/cilium/proxy/go/envoy/extensions/filters/common/fault/v3" + v3 "github.com/cilium/proxy/go/envoy/type/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// [#next-free-field: 6] +type FaultAbort struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to ErrorType: + // + // *FaultAbort_HttpStatus + // *FaultAbort_GrpcStatus + // *FaultAbort_HeaderAbort_ + ErrorType isFaultAbort_ErrorType `protobuf_oneof:"error_type"` + // The percentage of requests/operations/connections that will be aborted with the error code + // provided. + Percentage *v3.FractionalPercent `protobuf:"bytes,3,opt,name=percentage,proto3" json:"percentage,omitempty"` +} + +func (x *FaultAbort) Reset() { + *x = FaultAbort{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_fault_v3_fault_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FaultAbort) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FaultAbort) ProtoMessage() {} + +func (x *FaultAbort) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_fault_v3_fault_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FaultAbort.ProtoReflect.Descriptor instead. +func (*FaultAbort) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_fault_v3_fault_proto_rawDescGZIP(), []int{0} +} + +func (m *FaultAbort) GetErrorType() isFaultAbort_ErrorType { + if m != nil { + return m.ErrorType + } + return nil +} + +func (x *FaultAbort) GetHttpStatus() uint32 { + if x, ok := x.GetErrorType().(*FaultAbort_HttpStatus); ok { + return x.HttpStatus + } + return 0 +} + +func (x *FaultAbort) GetGrpcStatus() uint32 { + if x, ok := x.GetErrorType().(*FaultAbort_GrpcStatus); ok { + return x.GrpcStatus + } + return 0 +} + +func (x *FaultAbort) GetHeaderAbort() *FaultAbort_HeaderAbort { + if x, ok := x.GetErrorType().(*FaultAbort_HeaderAbort_); ok { + return x.HeaderAbort + } + return nil +} + +func (x *FaultAbort) GetPercentage() *v3.FractionalPercent { + if x != nil { + return x.Percentage + } + return nil +} + +type isFaultAbort_ErrorType interface { + isFaultAbort_ErrorType() +} + +type FaultAbort_HttpStatus struct { + // HTTP status code to use to abort the HTTP request. + HttpStatus uint32 `protobuf:"varint,2,opt,name=http_status,json=httpStatus,proto3,oneof"` +} + +type FaultAbort_GrpcStatus struct { + // gRPC status code to use to abort the gRPC request. + GrpcStatus uint32 `protobuf:"varint,5,opt,name=grpc_status,json=grpcStatus,proto3,oneof"` +} + +type FaultAbort_HeaderAbort_ struct { + // Fault aborts are controlled via an HTTP header (if applicable). + HeaderAbort *FaultAbort_HeaderAbort `protobuf:"bytes,4,opt,name=header_abort,json=headerAbort,proto3,oneof"` +} + +func (*FaultAbort_HttpStatus) isFaultAbort_ErrorType() {} + +func (*FaultAbort_GrpcStatus) isFaultAbort_ErrorType() {} + +func (*FaultAbort_HeaderAbort_) isFaultAbort_ErrorType() {} + +// [#next-free-field: 16] +type HTTPFault struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If specified, the filter will inject delays based on the values in the + // object. + Delay *v31.FaultDelay `protobuf:"bytes,1,opt,name=delay,proto3" json:"delay,omitempty"` + // If specified, the filter will abort requests based on the values in + // the object. At least “abort“ or “delay“ must be specified. + Abort *FaultAbort `protobuf:"bytes,2,opt,name=abort,proto3" json:"abort,omitempty"` + // Specifies the name of the (destination) upstream cluster that the + // filter should match on. Fault injection will be restricted to requests + // bound to the specific upstream cluster. + UpstreamCluster string `protobuf:"bytes,3,opt,name=upstream_cluster,json=upstreamCluster,proto3" json:"upstream_cluster,omitempty"` + // Specifies a set of headers that the filter should match on. The fault + // injection filter can be applied selectively to requests that match a set of + // headers specified in the fault filter config. The chances of actual fault + // injection further depend on the value of the :ref:`percentage + // ` field. + // The filter will check the request's headers against all the specified + // headers in the filter config. A match will happen if all the headers in the + // config are present in the request with the same values (or based on + // presence if the “value“ field is not in the config). + Headers []*v32.HeaderMatcher `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty"` + // Faults are injected for the specified list of downstream hosts. If this + // setting is not set, faults are injected for all downstream nodes. + // Downstream node name is taken from :ref:`the HTTP + // x-envoy-downstream-service-node + // ` header and compared + // against downstream_nodes list. + DownstreamNodes []string `protobuf:"bytes,5,rep,name=downstream_nodes,json=downstreamNodes,proto3" json:"downstream_nodes,omitempty"` + // The maximum number of faults that can be active at a single time via the configured fault + // filter. Note that because this setting can be overridden at the route level, it's possible + // for the number of active faults to be greater than this value (if injected via a different + // route). If not specified, defaults to unlimited. This setting can be overridden via + // “runtime “ and any faults that are not injected + // due to overflow will be indicated via the “faults_overflow + // “ stat. + // + // .. attention:: + // + // Like other :ref:`circuit breakers ` in Envoy, this is a fuzzy + // limit. It's possible for the number of active faults to rise slightly above the configured + // amount due to the implementation details. + MaxActiveFaults *wrapperspb.UInt32Value `protobuf:"bytes,6,opt,name=max_active_faults,json=maxActiveFaults,proto3" json:"max_active_faults,omitempty"` + // The response rate limit to be applied to the response body of the stream. When configured, + // the percentage can be overridden by the :ref:`fault.http.rate_limit.response_percent + // ` runtime key. + // + // .. attention:: + // + // This is a per-stream limit versus a connection level limit. This means that concurrent streams + // will each get an independent limit. + ResponseRateLimit *v31.FaultRateLimit `protobuf:"bytes,7,opt,name=response_rate_limit,json=responseRateLimit,proto3" json:"response_rate_limit,omitempty"` + // The runtime key to override the :ref:`default ` + // runtime. The default is: fault.http.delay.fixed_delay_percent + DelayPercentRuntime string `protobuf:"bytes,8,opt,name=delay_percent_runtime,json=delayPercentRuntime,proto3" json:"delay_percent_runtime,omitempty"` + // The runtime key to override the :ref:`default ` + // runtime. The default is: fault.http.abort.abort_percent + AbortPercentRuntime string `protobuf:"bytes,9,opt,name=abort_percent_runtime,json=abortPercentRuntime,proto3" json:"abort_percent_runtime,omitempty"` + // The runtime key to override the :ref:`default ` + // runtime. The default is: fault.http.delay.fixed_duration_ms + DelayDurationRuntime string `protobuf:"bytes,10,opt,name=delay_duration_runtime,json=delayDurationRuntime,proto3" json:"delay_duration_runtime,omitempty"` + // The runtime key to override the :ref:`default ` + // runtime. The default is: fault.http.abort.http_status + AbortHttpStatusRuntime string `protobuf:"bytes,11,opt,name=abort_http_status_runtime,json=abortHttpStatusRuntime,proto3" json:"abort_http_status_runtime,omitempty"` + // The runtime key to override the :ref:`default ` + // runtime. The default is: fault.http.max_active_faults + MaxActiveFaultsRuntime string `protobuf:"bytes,12,opt,name=max_active_faults_runtime,json=maxActiveFaultsRuntime,proto3" json:"max_active_faults_runtime,omitempty"` + // The runtime key to override the :ref:`default ` + // runtime. The default is: fault.http.rate_limit.response_percent + ResponseRateLimitPercentRuntime string `protobuf:"bytes,13,opt,name=response_rate_limit_percent_runtime,json=responseRateLimitPercentRuntime,proto3" json:"response_rate_limit_percent_runtime,omitempty"` + // The runtime key to override the :ref:`default ` + // runtime. The default is: fault.http.abort.grpc_status + AbortGrpcStatusRuntime string `protobuf:"bytes,14,opt,name=abort_grpc_status_runtime,json=abortGrpcStatusRuntime,proto3" json:"abort_grpc_status_runtime,omitempty"` + // To control whether stats storage is allocated dynamically for each downstream server. + // If set to true, "x-envoy-downstream-service-cluster" field of header will be ignored by this filter. + // If set to false, dynamic stats storage will be allocated for the downstream cluster name. + // Default value is false. + DisableDownstreamClusterStats bool `protobuf:"varint,15,opt,name=disable_downstream_cluster_stats,json=disableDownstreamClusterStats,proto3" json:"disable_downstream_cluster_stats,omitempty"` +} + +func (x *HTTPFault) Reset() { + *x = HTTPFault{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_fault_v3_fault_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HTTPFault) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTTPFault) ProtoMessage() {} + +func (x *HTTPFault) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_fault_v3_fault_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HTTPFault.ProtoReflect.Descriptor instead. +func (*HTTPFault) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_fault_v3_fault_proto_rawDescGZIP(), []int{1} +} + +func (x *HTTPFault) GetDelay() *v31.FaultDelay { + if x != nil { + return x.Delay + } + return nil +} + +func (x *HTTPFault) GetAbort() *FaultAbort { + if x != nil { + return x.Abort + } + return nil +} + +func (x *HTTPFault) GetUpstreamCluster() string { + if x != nil { + return x.UpstreamCluster + } + return "" +} + +func (x *HTTPFault) GetHeaders() []*v32.HeaderMatcher { + if x != nil { + return x.Headers + } + return nil +} + +func (x *HTTPFault) GetDownstreamNodes() []string { + if x != nil { + return x.DownstreamNodes + } + return nil +} + +func (x *HTTPFault) GetMaxActiveFaults() *wrapperspb.UInt32Value { + if x != nil { + return x.MaxActiveFaults + } + return nil +} + +func (x *HTTPFault) GetResponseRateLimit() *v31.FaultRateLimit { + if x != nil { + return x.ResponseRateLimit + } + return nil +} + +func (x *HTTPFault) GetDelayPercentRuntime() string { + if x != nil { + return x.DelayPercentRuntime + } + return "" +} + +func (x *HTTPFault) GetAbortPercentRuntime() string { + if x != nil { + return x.AbortPercentRuntime + } + return "" +} + +func (x *HTTPFault) GetDelayDurationRuntime() string { + if x != nil { + return x.DelayDurationRuntime + } + return "" +} + +func (x *HTTPFault) GetAbortHttpStatusRuntime() string { + if x != nil { + return x.AbortHttpStatusRuntime + } + return "" +} + +func (x *HTTPFault) GetMaxActiveFaultsRuntime() string { + if x != nil { + return x.MaxActiveFaultsRuntime + } + return "" +} + +func (x *HTTPFault) GetResponseRateLimitPercentRuntime() string { + if x != nil { + return x.ResponseRateLimitPercentRuntime + } + return "" +} + +func (x *HTTPFault) GetAbortGrpcStatusRuntime() string { + if x != nil { + return x.AbortGrpcStatusRuntime + } + return "" +} + +func (x *HTTPFault) GetDisableDownstreamClusterStats() bool { + if x != nil { + return x.DisableDownstreamClusterStats + } + return false +} + +// Fault aborts are controlled via an HTTP header (if applicable). See the +// :ref:`HTTP fault filter ` documentation for +// more information. +type FaultAbort_HeaderAbort struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *FaultAbort_HeaderAbort) Reset() { + *x = FaultAbort_HeaderAbort{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_fault_v3_fault_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FaultAbort_HeaderAbort) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FaultAbort_HeaderAbort) ProtoMessage() {} + +func (x *FaultAbort_HeaderAbort) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_fault_v3_fault_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FaultAbort_HeaderAbort.ProtoReflect.Descriptor instead. +func (*FaultAbort_HeaderAbort) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_fault_v3_fault_proto_rawDescGZIP(), []int{0, 0} +} + +var File_envoy_extensions_filters_http_fault_v3_fault_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_fault_v3_fault_proto_rawDesc = []byte{ + 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x33, 0x1a, 0x2c, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x34, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, + 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, + 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0xa4, 0x03, 0x0a, 0x0a, 0x46, 0x61, 0x75, + 0x6c, 0x74, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x12, 0x2e, 0x0a, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0b, 0xfa, 0x42, + 0x08, 0x2a, 0x06, 0x10, 0xd8, 0x04, 0x28, 0xc8, 0x01, 0x48, 0x00, 0x52, 0x0a, 0x68, 0x74, 0x74, + 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0a, + 0x67, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x63, 0x0a, 0x0c, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x41, + 0x62, 0x6f, 0x72, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x41, 0x62, 0x6f, 0x72, 0x74, + 0x48, 0x00, 0x52, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x12, + 0x40, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, + 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, + 0x65, 0x1a, 0x4e, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x41, 0x62, 0x6f, 0x72, 0x74, + 0x3a, 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, + 0x41, 0x62, 0x6f, 0x72, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x41, 0x62, 0x6f, 0x72, + 0x74, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x46, 0x61, 0x75, 0x6c, + 0x74, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x42, 0x11, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, + 0x85, 0x08, 0x0a, 0x09, 0x48, 0x54, 0x54, 0x50, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x4a, 0x0a, + 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x44, 0x65, 0x6c, + 0x61, 0x79, 0x52, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x48, 0x0a, 0x05, 0x61, 0x62, 0x6f, + 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, + 0x33, 0x2e, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x52, 0x05, 0x61, 0x62, + 0x6f, 0x72, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x75, + 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x3e, + 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x29, + 0x0a, 0x10, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x6e, 0x6f, 0x64, + 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x11, 0x6d, 0x61, 0x78, + 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x61, 0x75, + 0x6c, 0x74, 0x73, 0x12, 0x68, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, + 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x61, 0x75, 0x6c, + 0x74, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x11, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x32, 0x0a, + 0x15, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x5f, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x64, 0x65, + 0x6c, 0x61, 0x79, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x12, 0x32, 0x0a, 0x15, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, + 0x6e, 0x74, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x13, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x64, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x19, 0x61, + 0x62, 0x6f, 0x72, 0x74, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, + 0x61, 0x62, 0x6f, 0x72, 0x74, 0x48, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x19, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x5f, 0x72, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x6d, 0x61, 0x78, 0x41, 0x63, + 0x74, 0x69, 0x76, 0x65, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x12, 0x4c, 0x0a, 0x23, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x72, 0x61, + 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, + 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1f, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, + 0x39, 0x0a, 0x19, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x5f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x16, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x20, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x0f, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x6f, 0x77, + 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x54, + 0x54, 0x50, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x42, 0xa3, 0x01, 0x0a, 0x34, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x33, + 0x42, 0x0a, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x55, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, + 0x68, 0x74, 0x74, 0x70, 0x2f, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_fault_v3_fault_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_fault_v3_fault_proto_rawDescData = file_envoy_extensions_filters_http_fault_v3_fault_proto_rawDesc +) + +func file_envoy_extensions_filters_http_fault_v3_fault_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_fault_v3_fault_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_fault_v3_fault_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_fault_v3_fault_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_fault_v3_fault_proto_rawDescData +} + +var file_envoy_extensions_filters_http_fault_v3_fault_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_filters_http_fault_v3_fault_proto_goTypes = []interface{}{ + (*FaultAbort)(nil), // 0: envoy.extensions.filters.http.fault.v3.FaultAbort + (*HTTPFault)(nil), // 1: envoy.extensions.filters.http.fault.v3.HTTPFault + (*FaultAbort_HeaderAbort)(nil), // 2: envoy.extensions.filters.http.fault.v3.FaultAbort.HeaderAbort + (*v3.FractionalPercent)(nil), // 3: envoy.type.v3.FractionalPercent + (*v31.FaultDelay)(nil), // 4: envoy.extensions.filters.common.fault.v3.FaultDelay + (*v32.HeaderMatcher)(nil), // 5: envoy.config.route.v3.HeaderMatcher + (*wrapperspb.UInt32Value)(nil), // 6: google.protobuf.UInt32Value + (*v31.FaultRateLimit)(nil), // 7: envoy.extensions.filters.common.fault.v3.FaultRateLimit +} +var file_envoy_extensions_filters_http_fault_v3_fault_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.filters.http.fault.v3.FaultAbort.header_abort:type_name -> envoy.extensions.filters.http.fault.v3.FaultAbort.HeaderAbort + 3, // 1: envoy.extensions.filters.http.fault.v3.FaultAbort.percentage:type_name -> envoy.type.v3.FractionalPercent + 4, // 2: envoy.extensions.filters.http.fault.v3.HTTPFault.delay:type_name -> envoy.extensions.filters.common.fault.v3.FaultDelay + 0, // 3: envoy.extensions.filters.http.fault.v3.HTTPFault.abort:type_name -> envoy.extensions.filters.http.fault.v3.FaultAbort + 5, // 4: envoy.extensions.filters.http.fault.v3.HTTPFault.headers:type_name -> envoy.config.route.v3.HeaderMatcher + 6, // 5: envoy.extensions.filters.http.fault.v3.HTTPFault.max_active_faults:type_name -> google.protobuf.UInt32Value + 7, // 6: envoy.extensions.filters.http.fault.v3.HTTPFault.response_rate_limit:type_name -> envoy.extensions.filters.common.fault.v3.FaultRateLimit + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_fault_v3_fault_proto_init() } +func file_envoy_extensions_filters_http_fault_v3_fault_proto_init() { + if File_envoy_extensions_filters_http_fault_v3_fault_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_fault_v3_fault_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FaultAbort); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_fault_v3_fault_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HTTPFault); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_fault_v3_fault_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FaultAbort_HeaderAbort); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_http_fault_v3_fault_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*FaultAbort_HttpStatus)(nil), + (*FaultAbort_GrpcStatus)(nil), + (*FaultAbort_HeaderAbort_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_fault_v3_fault_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_fault_v3_fault_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_fault_v3_fault_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_fault_v3_fault_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_fault_v3_fault_proto = out.File + file_envoy_extensions_filters_http_fault_v3_fault_proto_rawDesc = nil + file_envoy_extensions_filters_http_fault_v3_fault_proto_goTypes = nil + file_envoy_extensions_filters_http_fault_v3_fault_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/fault/v3/fault.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/fault/v3/fault.pb.validate.go new file mode 100644 index 0000000000000..fca421663357c --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/fault/v3/fault.pb.validate.go @@ -0,0 +1,591 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/fault/v3/fault.proto + +package faultv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on FaultAbort 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 *FaultAbort) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FaultAbort 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 FaultAbortMultiError, or +// nil if none found. +func (m *FaultAbort) ValidateAll() error { + return m.validate(true) +} + +func (m *FaultAbort) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetPercentage()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FaultAbortValidationError{ + field: "Percentage", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FaultAbortValidationError{ + field: "Percentage", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPercentage()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FaultAbortValidationError{ + field: "Percentage", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.ErrorType.(type) { + + case *FaultAbort_HttpStatus: + + if val := m.GetHttpStatus(); val < 200 || val >= 600 { + err := FaultAbortValidationError{ + field: "HttpStatus", + reason: "value must be inside range [200, 600)", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *FaultAbort_GrpcStatus: + // no validation rules for GrpcStatus + + case *FaultAbort_HeaderAbort_: + + if all { + switch v := interface{}(m.GetHeaderAbort()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FaultAbortValidationError{ + field: "HeaderAbort", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FaultAbortValidationError{ + field: "HeaderAbort", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaderAbort()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FaultAbortValidationError{ + field: "HeaderAbort", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := FaultAbortValidationError{ + field: "ErrorType", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return FaultAbortMultiError(errors) + } + return nil +} + +// FaultAbortMultiError is an error wrapping multiple validation errors +// returned by FaultAbort.ValidateAll() if the designated constraints aren't met. +type FaultAbortMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FaultAbortMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FaultAbortMultiError) AllErrors() []error { return m } + +// FaultAbortValidationError is the validation error returned by +// FaultAbort.Validate if the designated constraints aren't met. +type FaultAbortValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FaultAbortValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FaultAbortValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FaultAbortValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FaultAbortValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FaultAbortValidationError) ErrorName() string { return "FaultAbortValidationError" } + +// Error satisfies the builtin error interface +func (e FaultAbortValidationError) 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 %sFaultAbort.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FaultAbortValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FaultAbortValidationError{} + +// Validate checks the field values on HTTPFault 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 *HTTPFault) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HTTPFault 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 HTTPFaultMultiError, or nil +// if none found. +func (m *HTTPFault) ValidateAll() error { + return m.validate(true) +} + +func (m *HTTPFault) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetDelay()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "Delay", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "Delay", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDelay()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HTTPFaultValidationError{ + field: "Delay", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetAbort()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "Abort", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "Abort", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAbort()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HTTPFaultValidationError{ + field: "Abort", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for UpstreamCluster + + for idx, item := range m.GetHeaders() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: fmt.Sprintf("Headers[%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 HTTPFaultValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetMaxActiveFaults()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "MaxActiveFaults", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "MaxActiveFaults", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxActiveFaults()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HTTPFaultValidationError{ + field: "MaxActiveFaults", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetResponseRateLimit()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "ResponseRateLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HTTPFaultValidationError{ + field: "ResponseRateLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseRateLimit()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HTTPFaultValidationError{ + field: "ResponseRateLimit", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for DelayPercentRuntime + + // no validation rules for AbortPercentRuntime + + // no validation rules for DelayDurationRuntime + + // no validation rules for AbortHttpStatusRuntime + + // no validation rules for MaxActiveFaultsRuntime + + // no validation rules for ResponseRateLimitPercentRuntime + + // no validation rules for AbortGrpcStatusRuntime + + // no validation rules for DisableDownstreamClusterStats + + if len(errors) > 0 { + return HTTPFaultMultiError(errors) + } + return nil +} + +// HTTPFaultMultiError is an error wrapping multiple validation errors returned +// by HTTPFault.ValidateAll() if the designated constraints aren't met. +type HTTPFaultMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HTTPFaultMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HTTPFaultMultiError) AllErrors() []error { return m } + +// HTTPFaultValidationError is the validation error returned by +// HTTPFault.Validate if the designated constraints aren't met. +type HTTPFaultValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HTTPFaultValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HTTPFaultValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HTTPFaultValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HTTPFaultValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HTTPFaultValidationError) ErrorName() string { return "HTTPFaultValidationError" } + +// Error satisfies the builtin error interface +func (e HTTPFaultValidationError) 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 %sHTTPFault.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HTTPFaultValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HTTPFaultValidationError{} + +// Validate checks the field values on FaultAbort_HeaderAbort 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 *FaultAbort_HeaderAbort) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FaultAbort_HeaderAbort 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 +// FaultAbort_HeaderAbortMultiError, or nil if none found. +func (m *FaultAbort_HeaderAbort) ValidateAll() error { + return m.validate(true) +} + +func (m *FaultAbort_HeaderAbort) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return FaultAbort_HeaderAbortMultiError(errors) + } + return nil +} + +// FaultAbort_HeaderAbortMultiError is an error wrapping multiple validation +// errors returned by FaultAbort_HeaderAbort.ValidateAll() if the designated +// constraints aren't met. +type FaultAbort_HeaderAbortMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FaultAbort_HeaderAbortMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FaultAbort_HeaderAbortMultiError) AllErrors() []error { return m } + +// FaultAbort_HeaderAbortValidationError is the validation error returned by +// FaultAbort_HeaderAbort.Validate if the designated constraints aren't met. +type FaultAbort_HeaderAbortValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FaultAbort_HeaderAbortValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FaultAbort_HeaderAbortValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FaultAbort_HeaderAbortValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FaultAbort_HeaderAbortValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FaultAbort_HeaderAbortValidationError) ErrorName() string { + return "FaultAbort_HeaderAbortValidationError" +} + +// Error satisfies the builtin error interface +func (e FaultAbort_HeaderAbortValidationError) 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 %sFaultAbort_HeaderAbort.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FaultAbort_HeaderAbortValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FaultAbort_HeaderAbortValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/file_system_buffer/v3/file_system_buffer.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/file_system_buffer/v3/file_system_buffer.pb.go new file mode 100644 index 0000000000000..d7184b828da1a --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/file_system_buffer/v3/file_system_buffer.pb.go @@ -0,0 +1,871 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/file_system_buffer/v3/file_system_buffer.proto + +package file_system_bufferv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/extensions/common/async_files/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// The behavior of the filter for a stream. +// [#next-free-field: 6] +type BufferBehavior struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Behavior: + // + // *BufferBehavior_StreamWhenPossible_ + // *BufferBehavior_Bypass_ + // *BufferBehavior_InjectContentLengthIfNecessary_ + // *BufferBehavior_FullyBufferAndAlwaysInjectContentLength_ + // *BufferBehavior_FullyBuffer_ + Behavior isBufferBehavior_Behavior `protobuf_oneof:"behavior"` +} + +func (x *BufferBehavior) Reset() { + *x = BufferBehavior{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BufferBehavior) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BufferBehavior) ProtoMessage() {} + +func (x *BufferBehavior) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BufferBehavior.ProtoReflect.Descriptor instead. +func (*BufferBehavior) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_rawDescGZIP(), []int{0} +} + +func (m *BufferBehavior) GetBehavior() isBufferBehavior_Behavior { + if m != nil { + return m.Behavior + } + return nil +} + +func (x *BufferBehavior) GetStreamWhenPossible() *BufferBehavior_StreamWhenPossible { + if x, ok := x.GetBehavior().(*BufferBehavior_StreamWhenPossible_); ok { + return x.StreamWhenPossible + } + return nil +} + +func (x *BufferBehavior) GetBypass() *BufferBehavior_Bypass { + if x, ok := x.GetBehavior().(*BufferBehavior_Bypass_); ok { + return x.Bypass + } + return nil +} + +func (x *BufferBehavior) GetInjectContentLengthIfNecessary() *BufferBehavior_InjectContentLengthIfNecessary { + if x, ok := x.GetBehavior().(*BufferBehavior_InjectContentLengthIfNecessary_); ok { + return x.InjectContentLengthIfNecessary + } + return nil +} + +func (x *BufferBehavior) GetFullyBufferAndAlwaysInjectContentLength() *BufferBehavior_FullyBufferAndAlwaysInjectContentLength { + if x, ok := x.GetBehavior().(*BufferBehavior_FullyBufferAndAlwaysInjectContentLength_); ok { + return x.FullyBufferAndAlwaysInjectContentLength + } + return nil +} + +func (x *BufferBehavior) GetFullyBuffer() *BufferBehavior_FullyBuffer { + if x, ok := x.GetBehavior().(*BufferBehavior_FullyBuffer_); ok { + return x.FullyBuffer + } + return nil +} + +type isBufferBehavior_Behavior interface { + isBufferBehavior_Behavior() +} + +type BufferBehavior_StreamWhenPossible_ struct { + // Don't inject “content-length“ header. + // Output immediately, buffer only if output is slower than input. + StreamWhenPossible *BufferBehavior_StreamWhenPossible `protobuf:"bytes,1,opt,name=stream_when_possible,json=streamWhenPossible,proto3,oneof"` +} + +type BufferBehavior_Bypass_ struct { + // Never buffer, do nothing. + Bypass *BufferBehavior_Bypass `protobuf:"bytes,2,opt,name=bypass,proto3,oneof"` +} + +type BufferBehavior_InjectContentLengthIfNecessary_ struct { + // If “content-length“ is not present, buffer the entire input, + // inject “content-length“ header, then output. + // If “content-length“ is already present, act like “stream_when_possible“. + InjectContentLengthIfNecessary *BufferBehavior_InjectContentLengthIfNecessary `protobuf:"bytes,3,opt,name=inject_content_length_if_necessary,json=injectContentLengthIfNecessary,proto3,oneof"` +} + +type BufferBehavior_FullyBufferAndAlwaysInjectContentLength_ struct { + // Always buffer the entire input, and inject “content-length“, + // overwriting any provided content-length header. + FullyBufferAndAlwaysInjectContentLength *BufferBehavior_FullyBufferAndAlwaysInjectContentLength `protobuf:"bytes,4,opt,name=fully_buffer_and_always_inject_content_length,json=fullyBufferAndAlwaysInjectContentLength,proto3,oneof"` +} + +type BufferBehavior_FullyBuffer_ struct { + // Always buffer the entire input, do not modify “content-length“. + FullyBuffer *BufferBehavior_FullyBuffer `protobuf:"bytes,5,opt,name=fully_buffer,json=fullyBuffer,proto3,oneof"` +} + +func (*BufferBehavior_StreamWhenPossible_) isBufferBehavior_Behavior() {} + +func (*BufferBehavior_Bypass_) isBufferBehavior_Behavior() {} + +func (*BufferBehavior_InjectContentLengthIfNecessary_) isBufferBehavior_Behavior() {} + +func (*BufferBehavior_FullyBufferAndAlwaysInjectContentLength_) isBufferBehavior_Behavior() {} + +func (*BufferBehavior_FullyBuffer_) isBufferBehavior_Behavior() {} + +// The configuration for one direction of the filter behavior. +type StreamConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Whether to bypass / stream / fully buffer / etc. + // If unset in route, vhost and listener config, the default is “stream_when_possible“. + Behavior *BufferBehavior `protobuf:"bytes,1,opt,name=behavior,proto3" json:"behavior,omitempty"` + // The amount stored in the memory buffer before buffering to disk. + // If unset in route, vhost and listener config, defaults to a hardcoded value of 1MiB + MemoryBufferBytesLimit *wrapperspb.UInt64Value `protobuf:"bytes,2,opt,name=memory_buffer_bytes_limit,json=memoryBufferBytesLimit,proto3" json:"memory_buffer_bytes_limit,omitempty"` + // The maximum storage (excluding memory) to be buffered in this filter. + // If unset in route, vhost and listener config, defaults to a hardcoded value of 32MiB + StorageBufferBytesLimit *wrapperspb.UInt64Value `protobuf:"bytes,3,opt,name=storage_buffer_bytes_limit,json=storageBufferBytesLimit,proto3" json:"storage_buffer_bytes_limit,omitempty"` + // The maximum amount that can be queued for writing to storage, above which the + // source is requested to pause. If unset, defaults to the same value as + // “memory_buffer_bytes_limit“. + // + // For example, assuming the recipient is not consuming data at all, if + // “memory_buffer_bytes_limit“ was 32MiB, and “storage_buffer_queue_high_watermark_bytes“ + // was 64MiB, and the filesystem is backed up so writes are not occurring promptly, + // then: + // + // - Any request less than 32MiB will eventually pass through without ever attempting + // to write to disk. + // - Any request with over 32MiB buffered will start trying to write to disk. + // If it reaches (32+64)MiB buffered in memory (write to disk isn't keeping up), a high + // watermark signal is sent to the source. + // - Any stream whose total size exceeds + // “memory_buffer_bytes_limit + storage_buffer_bytes_limit“ will provoke an error. + // (Note, if the recipient *is* consuming data then it is possible for such an + // oversized request to pass through the buffer filter, provided the recipient + // isn't consuming data too slowly.) + // + // The low watermark signal is sent when the memory buffer is at size + // “memory_buffer_bytes_limit + (storage_buffer_queue_high_watermark_bytes / 2)“. + StorageBufferQueueHighWatermarkBytes *wrapperspb.UInt64Value `protobuf:"bytes,4,opt,name=storage_buffer_queue_high_watermark_bytes,json=storageBufferQueueHighWatermarkBytes,proto3" json:"storage_buffer_queue_high_watermark_bytes,omitempty"` +} + +func (x *StreamConfig) Reset() { + *x = StreamConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamConfig) ProtoMessage() {} + +func (x *StreamConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamConfig.ProtoReflect.Descriptor instead. +func (*StreamConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_rawDescGZIP(), []int{1} +} + +func (x *StreamConfig) GetBehavior() *BufferBehavior { + if x != nil { + return x.Behavior + } + return nil +} + +func (x *StreamConfig) GetMemoryBufferBytesLimit() *wrapperspb.UInt64Value { + if x != nil { + return x.MemoryBufferBytesLimit + } + return nil +} + +func (x *StreamConfig) GetStorageBufferBytesLimit() *wrapperspb.UInt64Value { + if x != nil { + return x.StorageBufferBytesLimit + } + return nil +} + +func (x *StreamConfig) GetStorageBufferQueueHighWatermarkBytes() *wrapperspb.UInt64Value { + if x != nil { + return x.StorageBufferQueueHighWatermarkBytes + } + return nil +} + +// A :ref:`file system buffer ` filter configuration. +// +// Route-specific configs override only the fields they explicitly include; unset +// fields inherit from the vhost or listener-level config, or, if never set, +// and not required, use a default value. +type FileSystemBufferFilterConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A configuration for an AsyncFileManager. + // + // If unset in route, vhost and listener, and the behavior is not “bypass“ + // in both directions, an Internal Server Error response will be sent. + ManagerConfig *v3.AsyncFileManagerConfig `protobuf:"bytes,1,opt,name=manager_config,json=managerConfig,proto3" json:"manager_config,omitempty"` + // An optional path to which the unlinked files should be written - this may + // determine which physical storage device will be used. + // + // If unset in route, vhost and listener, will use the environment variable + // “TMPDIR“, or, if that's also unset, will use “/tmp“. + StorageBufferPath *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=storage_buffer_path,json=storageBufferPath,proto3" json:"storage_buffer_path,omitempty"` + // Optional configuration for how to buffer (or not) requests. + // If unset in route, vhost and listener, “StreamConfig“ default values will be used + // (with behavior “stream_when_possible“) + Request *StreamConfig `protobuf:"bytes,3,opt,name=request,proto3" json:"request,omitempty"` + // Optional configuration for how to buffer (or not) responses. + // If unset in route, vhost and listener, “StreamConfig“ default values will be used + // (with behavior “stream_when_possible“) + Response *StreamConfig `protobuf:"bytes,4,opt,name=response,proto3" json:"response,omitempty"` +} + +func (x *FileSystemBufferFilterConfig) Reset() { + *x = FileSystemBufferFilterConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FileSystemBufferFilterConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FileSystemBufferFilterConfig) ProtoMessage() {} + +func (x *FileSystemBufferFilterConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FileSystemBufferFilterConfig.ProtoReflect.Descriptor instead. +func (*FileSystemBufferFilterConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_rawDescGZIP(), []int{2} +} + +func (x *FileSystemBufferFilterConfig) GetManagerConfig() *v3.AsyncFileManagerConfig { + if x != nil { + return x.ManagerConfig + } + return nil +} + +func (x *FileSystemBufferFilterConfig) GetStorageBufferPath() *wrapperspb.StringValue { + if x != nil { + return x.StorageBufferPath + } + return nil +} + +func (x *FileSystemBufferFilterConfig) GetRequest() *StreamConfig { + if x != nil { + return x.Request + } + return nil +} + +func (x *FileSystemBufferFilterConfig) GetResponse() *StreamConfig { + if x != nil { + return x.Response + } + return nil +} + +type BufferBehavior_StreamWhenPossible struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BufferBehavior_StreamWhenPossible) Reset() { + *x = BufferBehavior_StreamWhenPossible{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BufferBehavior_StreamWhenPossible) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BufferBehavior_StreamWhenPossible) ProtoMessage() {} + +func (x *BufferBehavior_StreamWhenPossible) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BufferBehavior_StreamWhenPossible.ProtoReflect.Descriptor instead. +func (*BufferBehavior_StreamWhenPossible) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_rawDescGZIP(), []int{0, 0} +} + +type BufferBehavior_Bypass struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BufferBehavior_Bypass) Reset() { + *x = BufferBehavior_Bypass{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BufferBehavior_Bypass) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BufferBehavior_Bypass) ProtoMessage() {} + +func (x *BufferBehavior_Bypass) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BufferBehavior_Bypass.ProtoReflect.Descriptor instead. +func (*BufferBehavior_Bypass) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_rawDescGZIP(), []int{0, 1} +} + +type BufferBehavior_InjectContentLengthIfNecessary struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BufferBehavior_InjectContentLengthIfNecessary) Reset() { + *x = BufferBehavior_InjectContentLengthIfNecessary{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BufferBehavior_InjectContentLengthIfNecessary) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BufferBehavior_InjectContentLengthIfNecessary) ProtoMessage() {} + +func (x *BufferBehavior_InjectContentLengthIfNecessary) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BufferBehavior_InjectContentLengthIfNecessary.ProtoReflect.Descriptor instead. +func (*BufferBehavior_InjectContentLengthIfNecessary) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_rawDescGZIP(), []int{0, 2} +} + +type BufferBehavior_FullyBufferAndAlwaysInjectContentLength struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BufferBehavior_FullyBufferAndAlwaysInjectContentLength) Reset() { + *x = BufferBehavior_FullyBufferAndAlwaysInjectContentLength{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BufferBehavior_FullyBufferAndAlwaysInjectContentLength) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BufferBehavior_FullyBufferAndAlwaysInjectContentLength) ProtoMessage() {} + +func (x *BufferBehavior_FullyBufferAndAlwaysInjectContentLength) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BufferBehavior_FullyBufferAndAlwaysInjectContentLength.ProtoReflect.Descriptor instead. +func (*BufferBehavior_FullyBufferAndAlwaysInjectContentLength) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_rawDescGZIP(), []int{0, 3} +} + +type BufferBehavior_FullyBuffer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BufferBehavior_FullyBuffer) Reset() { + *x = BufferBehavior_FullyBuffer{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BufferBehavior_FullyBuffer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BufferBehavior_FullyBuffer) ProtoMessage() {} + +func (x *BufferBehavior_FullyBuffer) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BufferBehavior_FullyBuffer.ProtoReflect.Descriptor instead. +func (*BufferBehavior_FullyBuffer) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_rawDescGZIP(), []int{0, 4} +} + +var File_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_rawDesc = []byte{ + 0x0a, 0x4c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x62, 0x75, 0x66, 0x66, + 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x33, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x66, 0x69, + 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x1a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x61, 0x73, 0x79, + 0x6e, 0x63, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x73, 0x79, 0x6e, + 0x63, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x89, 0x07, + 0x0a, 0x0e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, + 0x12, 0x8a, 0x01, 0x0a, 0x14, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x77, 0x68, 0x65, 0x6e, + 0x5f, 0x70, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x56, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x62, 0x75, 0x66, 0x66, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x42, 0x65, 0x68, 0x61, + 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x57, 0x68, 0x65, 0x6e, 0x50, + 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x12, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x57, 0x68, 0x65, 0x6e, 0x50, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x64, 0x0a, + 0x06, 0x62, 0x79, 0x70, 0x61, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4a, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x66, 0x69, + 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, + 0x6f, 0x72, 0x2e, 0x42, 0x79, 0x70, 0x61, 0x73, 0x73, 0x48, 0x00, 0x52, 0x06, 0x62, 0x79, 0x70, + 0x61, 0x73, 0x73, 0x12, 0xb0, 0x01, 0x0a, 0x22, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x5f, 0x69, 0x66, + 0x5f, 0x6e, 0x65, 0x63, 0x65, 0x73, 0x73, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x62, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x62, 0x75, 0x66, + 0x66, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x42, 0x65, 0x68, + 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x49, 0x66, 0x4e, 0x65, 0x63, 0x65, 0x73, + 0x73, 0x61, 0x72, 0x79, 0x48, 0x00, 0x52, 0x1e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x49, 0x66, 0x4e, 0x65, 0x63, + 0x65, 0x73, 0x73, 0x61, 0x72, 0x79, 0x12, 0xcd, 0x01, 0x0a, 0x2d, 0x66, 0x75, 0x6c, 0x6c, 0x79, + 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x61, 0x6c, 0x77, 0x61, + 0x79, 0x73, 0x5f, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x6b, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x66, + 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x42, 0x65, 0x68, 0x61, 0x76, + 0x69, 0x6f, 0x72, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x79, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x41, + 0x6e, 0x64, 0x41, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x48, 0x00, 0x52, 0x27, 0x66, + 0x75, 0x6c, 0x6c, 0x79, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x41, 0x6e, 0x64, 0x41, 0x6c, 0x77, + 0x61, 0x79, 0x73, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x74, 0x0a, 0x0c, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x5f, + 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x66, 0x69, 0x6c, + 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, + 0x72, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x79, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, + 0x0b, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x1a, 0x14, 0x0a, 0x12, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x57, 0x68, 0x65, 0x6e, 0x50, 0x6f, 0x73, 0x73, 0x69, 0x62, + 0x6c, 0x65, 0x1a, 0x08, 0x0a, 0x06, 0x42, 0x79, 0x70, 0x61, 0x73, 0x73, 0x1a, 0x20, 0x0a, 0x1e, + 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x49, 0x66, 0x4e, 0x65, 0x63, 0x65, 0x73, 0x73, 0x61, 0x72, 0x79, 0x1a, 0x29, + 0x0a, 0x27, 0x46, 0x75, 0x6c, 0x6c, 0x79, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x41, 0x6e, 0x64, + 0x41, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x1a, 0x0d, 0x0a, 0x0b, 0x46, 0x75, 0x6c, + 0x6c, 0x79, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x42, 0x0f, 0x0a, 0x08, 0x62, 0x65, 0x68, 0x61, + 0x76, 0x69, 0x6f, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xa3, 0x03, 0x0a, 0x0c, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5f, 0x0a, 0x08, 0x62, 0x65, + 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x66, 0x69, 0x6c, + 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, + 0x72, 0x52, 0x08, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x12, 0x60, 0x0a, 0x19, 0x6d, + 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x32, 0x02, 0x20, 0x00, 0x52, 0x16, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x42, 0x75, 0x66, + 0x66, 0x65, 0x72, 0x42, 0x79, 0x74, 0x65, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x59, 0x0a, + 0x1a, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x17, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x42, 0x79, + 0x74, 0x65, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x75, 0x0a, 0x29, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, + 0x5f, 0x68, 0x69, 0x67, 0x68, 0x5f, 0x77, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x5f, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, + 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x24, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x51, 0x75, 0x65, 0x75, 0x65, 0x48, 0x69, 0x67, + 0x68, 0x57, 0x61, 0x74, 0x65, 0x72, 0x6d, 0x61, 0x72, 0x6b, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, + 0x8f, 0x03, 0x0a, 0x1c, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x42, 0x75, + 0x66, 0x66, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x65, 0x0a, 0x0e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x76, + 0x33, 0x2e, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4c, 0x0a, 0x13, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x11, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x75, 0x66, 0x66, 0x65, + 0x72, 0x50, 0x61, 0x74, 0x68, 0x12, 0x5b, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x5d, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0xdd, 0x01, 0x0a, 0x41, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x62, 0x75, + 0x66, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x15, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x6f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x66, 0x69, 0x6c, + 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, + 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_rawDescData = file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_rawDesc +) + +func file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_rawDescData +} + +var file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_goTypes = []interface{}{ + (*BufferBehavior)(nil), // 0: envoy.extensions.filters.http.file_system_buffer.v3.BufferBehavior + (*StreamConfig)(nil), // 1: envoy.extensions.filters.http.file_system_buffer.v3.StreamConfig + (*FileSystemBufferFilterConfig)(nil), // 2: envoy.extensions.filters.http.file_system_buffer.v3.FileSystemBufferFilterConfig + (*BufferBehavior_StreamWhenPossible)(nil), // 3: envoy.extensions.filters.http.file_system_buffer.v3.BufferBehavior.StreamWhenPossible + (*BufferBehavior_Bypass)(nil), // 4: envoy.extensions.filters.http.file_system_buffer.v3.BufferBehavior.Bypass + (*BufferBehavior_InjectContentLengthIfNecessary)(nil), // 5: envoy.extensions.filters.http.file_system_buffer.v3.BufferBehavior.InjectContentLengthIfNecessary + (*BufferBehavior_FullyBufferAndAlwaysInjectContentLength)(nil), // 6: envoy.extensions.filters.http.file_system_buffer.v3.BufferBehavior.FullyBufferAndAlwaysInjectContentLength + (*BufferBehavior_FullyBuffer)(nil), // 7: envoy.extensions.filters.http.file_system_buffer.v3.BufferBehavior.FullyBuffer + (*wrapperspb.UInt64Value)(nil), // 8: google.protobuf.UInt64Value + (*v3.AsyncFileManagerConfig)(nil), // 9: envoy.extensions.common.async_files.v3.AsyncFileManagerConfig + (*wrapperspb.StringValue)(nil), // 10: google.protobuf.StringValue +} +var file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_depIdxs = []int32{ + 3, // 0: envoy.extensions.filters.http.file_system_buffer.v3.BufferBehavior.stream_when_possible:type_name -> envoy.extensions.filters.http.file_system_buffer.v3.BufferBehavior.StreamWhenPossible + 4, // 1: envoy.extensions.filters.http.file_system_buffer.v3.BufferBehavior.bypass:type_name -> envoy.extensions.filters.http.file_system_buffer.v3.BufferBehavior.Bypass + 5, // 2: envoy.extensions.filters.http.file_system_buffer.v3.BufferBehavior.inject_content_length_if_necessary:type_name -> envoy.extensions.filters.http.file_system_buffer.v3.BufferBehavior.InjectContentLengthIfNecessary + 6, // 3: envoy.extensions.filters.http.file_system_buffer.v3.BufferBehavior.fully_buffer_and_always_inject_content_length:type_name -> envoy.extensions.filters.http.file_system_buffer.v3.BufferBehavior.FullyBufferAndAlwaysInjectContentLength + 7, // 4: envoy.extensions.filters.http.file_system_buffer.v3.BufferBehavior.fully_buffer:type_name -> envoy.extensions.filters.http.file_system_buffer.v3.BufferBehavior.FullyBuffer + 0, // 5: envoy.extensions.filters.http.file_system_buffer.v3.StreamConfig.behavior:type_name -> envoy.extensions.filters.http.file_system_buffer.v3.BufferBehavior + 8, // 6: envoy.extensions.filters.http.file_system_buffer.v3.StreamConfig.memory_buffer_bytes_limit:type_name -> google.protobuf.UInt64Value + 8, // 7: envoy.extensions.filters.http.file_system_buffer.v3.StreamConfig.storage_buffer_bytes_limit:type_name -> google.protobuf.UInt64Value + 8, // 8: envoy.extensions.filters.http.file_system_buffer.v3.StreamConfig.storage_buffer_queue_high_watermark_bytes:type_name -> google.protobuf.UInt64Value + 9, // 9: envoy.extensions.filters.http.file_system_buffer.v3.FileSystemBufferFilterConfig.manager_config:type_name -> envoy.extensions.common.async_files.v3.AsyncFileManagerConfig + 10, // 10: envoy.extensions.filters.http.file_system_buffer.v3.FileSystemBufferFilterConfig.storage_buffer_path:type_name -> google.protobuf.StringValue + 1, // 11: envoy.extensions.filters.http.file_system_buffer.v3.FileSystemBufferFilterConfig.request:type_name -> envoy.extensions.filters.http.file_system_buffer.v3.StreamConfig + 1, // 12: envoy.extensions.filters.http.file_system_buffer.v3.FileSystemBufferFilterConfig.response:type_name -> envoy.extensions.filters.http.file_system_buffer.v3.StreamConfig + 13, // [13:13] is the sub-list for method output_type + 13, // [13:13] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_init() } +func file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_init() { + if File_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BufferBehavior); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FileSystemBufferFilterConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BufferBehavior_StreamWhenPossible); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BufferBehavior_Bypass); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BufferBehavior_InjectContentLengthIfNecessary); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BufferBehavior_FullyBufferAndAlwaysInjectContentLength); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BufferBehavior_FullyBuffer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*BufferBehavior_StreamWhenPossible_)(nil), + (*BufferBehavior_Bypass_)(nil), + (*BufferBehavior_InjectContentLengthIfNecessary_)(nil), + (*BufferBehavior_FullyBufferAndAlwaysInjectContentLength_)(nil), + (*BufferBehavior_FullyBuffer_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto = out.File + file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_rawDesc = nil + file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_goTypes = nil + file_envoy_extensions_filters_http_file_system_buffer_v3_file_system_buffer_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/file_system_buffer/v3/file_system_buffer.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/file_system_buffer/v3/file_system_buffer.pb.validate.go new file mode 100644 index 0000000000000..dc61f15b58bac --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/file_system_buffer/v3/file_system_buffer.pb.validate.go @@ -0,0 +1,1253 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/file_system_buffer/v3/file_system_buffer.proto + +package file_system_bufferv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on BufferBehavior 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 *BufferBehavior) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BufferBehavior 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 BufferBehaviorMultiError, +// or nil if none found. +func (m *BufferBehavior) ValidateAll() error { + return m.validate(true) +} + +func (m *BufferBehavior) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.Behavior.(type) { + + case *BufferBehavior_StreamWhenPossible_: + + if all { + switch v := interface{}(m.GetStreamWhenPossible()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BufferBehaviorValidationError{ + field: "StreamWhenPossible", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BufferBehaviorValidationError{ + field: "StreamWhenPossible", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStreamWhenPossible()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BufferBehaviorValidationError{ + field: "StreamWhenPossible", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *BufferBehavior_Bypass_: + + if all { + switch v := interface{}(m.GetBypass()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BufferBehaviorValidationError{ + field: "Bypass", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BufferBehaviorValidationError{ + field: "Bypass", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBypass()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BufferBehaviorValidationError{ + field: "Bypass", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *BufferBehavior_InjectContentLengthIfNecessary_: + + if all { + switch v := interface{}(m.GetInjectContentLengthIfNecessary()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BufferBehaviorValidationError{ + field: "InjectContentLengthIfNecessary", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BufferBehaviorValidationError{ + field: "InjectContentLengthIfNecessary", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInjectContentLengthIfNecessary()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BufferBehaviorValidationError{ + field: "InjectContentLengthIfNecessary", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *BufferBehavior_FullyBufferAndAlwaysInjectContentLength_: + + if all { + switch v := interface{}(m.GetFullyBufferAndAlwaysInjectContentLength()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BufferBehaviorValidationError{ + field: "FullyBufferAndAlwaysInjectContentLength", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BufferBehaviorValidationError{ + field: "FullyBufferAndAlwaysInjectContentLength", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFullyBufferAndAlwaysInjectContentLength()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BufferBehaviorValidationError{ + field: "FullyBufferAndAlwaysInjectContentLength", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *BufferBehavior_FullyBuffer_: + + if all { + switch v := interface{}(m.GetFullyBuffer()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BufferBehaviorValidationError{ + field: "FullyBuffer", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BufferBehaviorValidationError{ + field: "FullyBuffer", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFullyBuffer()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BufferBehaviorValidationError{ + field: "FullyBuffer", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := BufferBehaviorValidationError{ + field: "Behavior", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return BufferBehaviorMultiError(errors) + } + return nil +} + +// BufferBehaviorMultiError is an error wrapping multiple validation errors +// returned by BufferBehavior.ValidateAll() if the designated constraints +// aren't met. +type BufferBehaviorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BufferBehaviorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BufferBehaviorMultiError) AllErrors() []error { return m } + +// BufferBehaviorValidationError is the validation error returned by +// BufferBehavior.Validate if the designated constraints aren't met. +type BufferBehaviorValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BufferBehaviorValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BufferBehaviorValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BufferBehaviorValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BufferBehaviorValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BufferBehaviorValidationError) ErrorName() string { return "BufferBehaviorValidationError" } + +// Error satisfies the builtin error interface +func (e BufferBehaviorValidationError) 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 %sBufferBehavior.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BufferBehaviorValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BufferBehaviorValidationError{} + +// Validate checks the field values on StreamConfig 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 *StreamConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamConfig 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 StreamConfigMultiError, or +// nil if none found. +func (m *StreamConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetBehavior()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamConfigValidationError{ + field: "Behavior", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamConfigValidationError{ + field: "Behavior", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBehavior()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StreamConfigValidationError{ + field: "Behavior", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if wrapper := m.GetMemoryBufferBytesLimit(); wrapper != nil { + + if wrapper.GetValue() <= 0 { + err := StreamConfigValidationError{ + field: "MemoryBufferBytesLimit", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if all { + switch v := interface{}(m.GetStorageBufferBytesLimit()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamConfigValidationError{ + field: "StorageBufferBytesLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamConfigValidationError{ + field: "StorageBufferBytesLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStorageBufferBytesLimit()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StreamConfigValidationError{ + field: "StorageBufferBytesLimit", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetStorageBufferQueueHighWatermarkBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamConfigValidationError{ + field: "StorageBufferQueueHighWatermarkBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamConfigValidationError{ + field: "StorageBufferQueueHighWatermarkBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStorageBufferQueueHighWatermarkBytes()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StreamConfigValidationError{ + field: "StorageBufferQueueHighWatermarkBytes", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return StreamConfigMultiError(errors) + } + return nil +} + +// StreamConfigMultiError is an error wrapping multiple validation errors +// returned by StreamConfig.ValidateAll() if the designated constraints aren't met. +type StreamConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamConfigMultiError) AllErrors() []error { return m } + +// StreamConfigValidationError is the validation error returned by +// StreamConfig.Validate if the designated constraints aren't met. +type StreamConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StreamConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StreamConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StreamConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StreamConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StreamConfigValidationError) ErrorName() string { return "StreamConfigValidationError" } + +// Error satisfies the builtin error interface +func (e StreamConfigValidationError) 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 %sStreamConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StreamConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StreamConfigValidationError{} + +// Validate checks the field values on FileSystemBufferFilterConfig 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 *FileSystemBufferFilterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FileSystemBufferFilterConfig 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 +// FileSystemBufferFilterConfigMultiError, or nil if none found. +func (m *FileSystemBufferFilterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *FileSystemBufferFilterConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetManagerConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FileSystemBufferFilterConfigValidationError{ + field: "ManagerConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FileSystemBufferFilterConfigValidationError{ + field: "ManagerConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetManagerConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FileSystemBufferFilterConfigValidationError{ + field: "ManagerConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetStorageBufferPath()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FileSystemBufferFilterConfigValidationError{ + field: "StorageBufferPath", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FileSystemBufferFilterConfigValidationError{ + field: "StorageBufferPath", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStorageBufferPath()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FileSystemBufferFilterConfigValidationError{ + field: "StorageBufferPath", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetRequest()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FileSystemBufferFilterConfigValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FileSystemBufferFilterConfigValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FileSystemBufferFilterConfigValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FileSystemBufferFilterConfigValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FileSystemBufferFilterConfigValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FileSystemBufferFilterConfigValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return FileSystemBufferFilterConfigMultiError(errors) + } + return nil +} + +// FileSystemBufferFilterConfigMultiError is an error wrapping multiple +// validation errors returned by FileSystemBufferFilterConfig.ValidateAll() if +// the designated constraints aren't met. +type FileSystemBufferFilterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FileSystemBufferFilterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FileSystemBufferFilterConfigMultiError) AllErrors() []error { return m } + +// FileSystemBufferFilterConfigValidationError is the validation error returned +// by FileSystemBufferFilterConfig.Validate if the designated constraints +// aren't met. +type FileSystemBufferFilterConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FileSystemBufferFilterConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FileSystemBufferFilterConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FileSystemBufferFilterConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FileSystemBufferFilterConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FileSystemBufferFilterConfigValidationError) ErrorName() string { + return "FileSystemBufferFilterConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e FileSystemBufferFilterConfigValidationError) 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 %sFileSystemBufferFilterConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FileSystemBufferFilterConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FileSystemBufferFilterConfigValidationError{} + +// Validate checks the field values on BufferBehavior_StreamWhenPossible 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 *BufferBehavior_StreamWhenPossible) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BufferBehavior_StreamWhenPossible +// 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 +// BufferBehavior_StreamWhenPossibleMultiError, or nil if none found. +func (m *BufferBehavior_StreamWhenPossible) ValidateAll() error { + return m.validate(true) +} + +func (m *BufferBehavior_StreamWhenPossible) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return BufferBehavior_StreamWhenPossibleMultiError(errors) + } + return nil +} + +// BufferBehavior_StreamWhenPossibleMultiError is an error wrapping multiple +// validation errors returned by +// BufferBehavior_StreamWhenPossible.ValidateAll() if the designated +// constraints aren't met. +type BufferBehavior_StreamWhenPossibleMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BufferBehavior_StreamWhenPossibleMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BufferBehavior_StreamWhenPossibleMultiError) AllErrors() []error { return m } + +// BufferBehavior_StreamWhenPossibleValidationError is the validation error +// returned by BufferBehavior_StreamWhenPossible.Validate if the designated +// constraints aren't met. +type BufferBehavior_StreamWhenPossibleValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BufferBehavior_StreamWhenPossibleValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BufferBehavior_StreamWhenPossibleValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BufferBehavior_StreamWhenPossibleValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BufferBehavior_StreamWhenPossibleValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BufferBehavior_StreamWhenPossibleValidationError) ErrorName() string { + return "BufferBehavior_StreamWhenPossibleValidationError" +} + +// Error satisfies the builtin error interface +func (e BufferBehavior_StreamWhenPossibleValidationError) 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 %sBufferBehavior_StreamWhenPossible.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BufferBehavior_StreamWhenPossibleValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BufferBehavior_StreamWhenPossibleValidationError{} + +// Validate checks the field values on BufferBehavior_Bypass 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 *BufferBehavior_Bypass) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BufferBehavior_Bypass 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 +// BufferBehavior_BypassMultiError, or nil if none found. +func (m *BufferBehavior_Bypass) ValidateAll() error { + return m.validate(true) +} + +func (m *BufferBehavior_Bypass) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return BufferBehavior_BypassMultiError(errors) + } + return nil +} + +// BufferBehavior_BypassMultiError is an error wrapping multiple validation +// errors returned by BufferBehavior_Bypass.ValidateAll() if the designated +// constraints aren't met. +type BufferBehavior_BypassMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BufferBehavior_BypassMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BufferBehavior_BypassMultiError) AllErrors() []error { return m } + +// BufferBehavior_BypassValidationError is the validation error returned by +// BufferBehavior_Bypass.Validate if the designated constraints aren't met. +type BufferBehavior_BypassValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BufferBehavior_BypassValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BufferBehavior_BypassValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BufferBehavior_BypassValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BufferBehavior_BypassValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BufferBehavior_BypassValidationError) ErrorName() string { + return "BufferBehavior_BypassValidationError" +} + +// Error satisfies the builtin error interface +func (e BufferBehavior_BypassValidationError) 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 %sBufferBehavior_Bypass.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BufferBehavior_BypassValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BufferBehavior_BypassValidationError{} + +// Validate checks the field values on +// BufferBehavior_InjectContentLengthIfNecessary 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 *BufferBehavior_InjectContentLengthIfNecessary) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// BufferBehavior_InjectContentLengthIfNecessary 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 +// BufferBehavior_InjectContentLengthIfNecessaryMultiError, or nil if none found. +func (m *BufferBehavior_InjectContentLengthIfNecessary) ValidateAll() error { + return m.validate(true) +} + +func (m *BufferBehavior_InjectContentLengthIfNecessary) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return BufferBehavior_InjectContentLengthIfNecessaryMultiError(errors) + } + return nil +} + +// BufferBehavior_InjectContentLengthIfNecessaryMultiError is an error wrapping +// multiple validation errors returned by +// BufferBehavior_InjectContentLengthIfNecessary.ValidateAll() if the +// designated constraints aren't met. +type BufferBehavior_InjectContentLengthIfNecessaryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BufferBehavior_InjectContentLengthIfNecessaryMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BufferBehavior_InjectContentLengthIfNecessaryMultiError) AllErrors() []error { return m } + +// BufferBehavior_InjectContentLengthIfNecessaryValidationError is the +// validation error returned by +// BufferBehavior_InjectContentLengthIfNecessary.Validate if the designated +// constraints aren't met. +type BufferBehavior_InjectContentLengthIfNecessaryValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BufferBehavior_InjectContentLengthIfNecessaryValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BufferBehavior_InjectContentLengthIfNecessaryValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e BufferBehavior_InjectContentLengthIfNecessaryValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BufferBehavior_InjectContentLengthIfNecessaryValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BufferBehavior_InjectContentLengthIfNecessaryValidationError) ErrorName() string { + return "BufferBehavior_InjectContentLengthIfNecessaryValidationError" +} + +// Error satisfies the builtin error interface +func (e BufferBehavior_InjectContentLengthIfNecessaryValidationError) 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 %sBufferBehavior_InjectContentLengthIfNecessary.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BufferBehavior_InjectContentLengthIfNecessaryValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BufferBehavior_InjectContentLengthIfNecessaryValidationError{} + +// Validate checks the field values on +// BufferBehavior_FullyBufferAndAlwaysInjectContentLength 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 *BufferBehavior_FullyBufferAndAlwaysInjectContentLength) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// BufferBehavior_FullyBufferAndAlwaysInjectContentLength 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 +// BufferBehavior_FullyBufferAndAlwaysInjectContentLengthMultiError, or nil if +// none found. +func (m *BufferBehavior_FullyBufferAndAlwaysInjectContentLength) ValidateAll() error { + return m.validate(true) +} + +func (m *BufferBehavior_FullyBufferAndAlwaysInjectContentLength) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return BufferBehavior_FullyBufferAndAlwaysInjectContentLengthMultiError(errors) + } + return nil +} + +// BufferBehavior_FullyBufferAndAlwaysInjectContentLengthMultiError is an error +// wrapping multiple validation errors returned by +// BufferBehavior_FullyBufferAndAlwaysInjectContentLength.ValidateAll() if the +// designated constraints aren't met. +type BufferBehavior_FullyBufferAndAlwaysInjectContentLengthMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BufferBehavior_FullyBufferAndAlwaysInjectContentLengthMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BufferBehavior_FullyBufferAndAlwaysInjectContentLengthMultiError) AllErrors() []error { + return m +} + +// BufferBehavior_FullyBufferAndAlwaysInjectContentLengthValidationError is the +// validation error returned by +// BufferBehavior_FullyBufferAndAlwaysInjectContentLength.Validate if the +// designated constraints aren't met. +type BufferBehavior_FullyBufferAndAlwaysInjectContentLengthValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BufferBehavior_FullyBufferAndAlwaysInjectContentLengthValidationError) Field() string { + return e.field +} + +// Reason function returns reason value. +func (e BufferBehavior_FullyBufferAndAlwaysInjectContentLengthValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e BufferBehavior_FullyBufferAndAlwaysInjectContentLengthValidationError) Cause() error { + return e.cause +} + +// Key function returns key value. +func (e BufferBehavior_FullyBufferAndAlwaysInjectContentLengthValidationError) Key() bool { + return e.key +} + +// ErrorName returns error name. +func (e BufferBehavior_FullyBufferAndAlwaysInjectContentLengthValidationError) ErrorName() string { + return "BufferBehavior_FullyBufferAndAlwaysInjectContentLengthValidationError" +} + +// Error satisfies the builtin error interface +func (e BufferBehavior_FullyBufferAndAlwaysInjectContentLengthValidationError) 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 %sBufferBehavior_FullyBufferAndAlwaysInjectContentLength.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BufferBehavior_FullyBufferAndAlwaysInjectContentLengthValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BufferBehavior_FullyBufferAndAlwaysInjectContentLengthValidationError{} + +// Validate checks the field values on BufferBehavior_FullyBuffer 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 *BufferBehavior_FullyBuffer) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BufferBehavior_FullyBuffer 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 +// BufferBehavior_FullyBufferMultiError, or nil if none found. +func (m *BufferBehavior_FullyBuffer) ValidateAll() error { + return m.validate(true) +} + +func (m *BufferBehavior_FullyBuffer) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return BufferBehavior_FullyBufferMultiError(errors) + } + return nil +} + +// BufferBehavior_FullyBufferMultiError is an error wrapping multiple +// validation errors returned by BufferBehavior_FullyBuffer.ValidateAll() if +// the designated constraints aren't met. +type BufferBehavior_FullyBufferMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BufferBehavior_FullyBufferMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BufferBehavior_FullyBufferMultiError) AllErrors() []error { return m } + +// BufferBehavior_FullyBufferValidationError is the validation error returned +// by BufferBehavior_FullyBuffer.Validate if the designated constraints aren't met. +type BufferBehavior_FullyBufferValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BufferBehavior_FullyBufferValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BufferBehavior_FullyBufferValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BufferBehavior_FullyBufferValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BufferBehavior_FullyBufferValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BufferBehavior_FullyBufferValidationError) ErrorName() string { + return "BufferBehavior_FullyBufferValidationError" +} + +// Error satisfies the builtin error interface +func (e BufferBehavior_FullyBufferValidationError) 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 %sBufferBehavior_FullyBuffer.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BufferBehavior_FullyBufferValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BufferBehavior_FullyBufferValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.pb.go new file mode 100644 index 0000000000000..1a336439fc902 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.pb.go @@ -0,0 +1,352 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.proto + +package gcp_authnv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Filter configuration. +type GcpAuthnFilterConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The HTTP URI to fetch tokens from GCE Metadata Server(https://cloud.google.com/compute/docs/metadata/overview). + // The URL format is "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/identity?audience=[AUDIENCE]" + HttpUri *v3.HttpUri `protobuf:"bytes,1,opt,name=http_uri,json=httpUri,proto3" json:"http_uri,omitempty"` + // Retry policy for fetching tokens. + // This field is optional. If it is not configured, the filter will be fail-closed (i.e., reject the requests). + RetryPolicy *v3.RetryPolicy `protobuf:"bytes,2,opt,name=retry_policy,json=retryPolicy,proto3" json:"retry_policy,omitempty"` + // Token cache configuration. This field is optional. + CacheConfig *TokenCacheConfig `protobuf:"bytes,3,opt,name=cache_config,json=cacheConfig,proto3" json:"cache_config,omitempty"` +} + +func (x *GcpAuthnFilterConfig) Reset() { + *x = GcpAuthnFilterConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GcpAuthnFilterConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GcpAuthnFilterConfig) ProtoMessage() {} + +func (x *GcpAuthnFilterConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GcpAuthnFilterConfig.ProtoReflect.Descriptor instead. +func (*GcpAuthnFilterConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDescGZIP(), []int{0} +} + +func (x *GcpAuthnFilterConfig) GetHttpUri() *v3.HttpUri { + if x != nil { + return x.HttpUri + } + return nil +} + +func (x *GcpAuthnFilterConfig) GetRetryPolicy() *v3.RetryPolicy { + if x != nil { + return x.RetryPolicy + } + return nil +} + +func (x *GcpAuthnFilterConfig) GetCacheConfig() *TokenCacheConfig { + if x != nil { + return x.CacheConfig + } + return nil +} + +// Audience is the URL of the receiving service that performs token authentication. +// It will be provided to the filter through cluster's typed_filter_metadata. +type Audience struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *Audience) Reset() { + *x = Audience{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Audience) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Audience) ProtoMessage() {} + +func (x *Audience) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Audience.ProtoReflect.Descriptor instead. +func (*Audience) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDescGZIP(), []int{1} +} + +func (x *Audience) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +// Token Cache configuration. +type TokenCacheConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The number of cache entries. The maximum number of entries is INT64_MAX as it is constrained by underlying cache implementation. + // Default value 0 (i.e., proto3 defaults) disables the cache by default. Other default values will enable the cache. + CacheSize *wrapperspb.UInt64Value `protobuf:"bytes,1,opt,name=cache_size,json=cacheSize,proto3" json:"cache_size,omitempty"` +} + +func (x *TokenCacheConfig) Reset() { + *x = TokenCacheConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TokenCacheConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenCacheConfig) ProtoMessage() {} + +func (x *TokenCacheConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenCacheConfig.ProtoReflect.Descriptor instead. +func (*TokenCacheConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDescGZIP(), []int{2} +} + +func (x *TokenCacheConfig) GetCacheSize() *wrapperspb.UInt64Value { + if x != nil { + return x.CacheSize + } + return nil +} + +var File_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDesc = []byte{ + 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x67, 0x63, 0x70, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x63, 0x70, + 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x63, 0x70, 0x5f, + 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, + 0x68, 0x74, 0x74, 0x70, 0x5f, 0x75, 0x72, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x81, 0x02, 0x0a, 0x14, 0x47, 0x63, 0x70, 0x41, 0x75, + 0x74, 0x68, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x42, 0x0a, 0x08, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x55, 0x72, 0x69, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x68, 0x74, 0x74, 0x70, + 0x55, 0x72, 0x69, 0x12, 0x44, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x72, 0x65, + 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x5f, 0x0a, 0x0c, 0x63, 0x61, 0x63, + 0x68, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x67, 0x63, 0x70, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x63, + 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x25, 0x0a, 0x08, 0x41, 0x75, + 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x19, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x03, 0x75, 0x72, + 0x6c, 0x22, 0x60, 0x0a, 0x10, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4c, 0x0a, 0x0a, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, + 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0f, 0xfa, 0x42, 0x0c, 0x32, 0x0a, 0x18, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x52, 0x09, 0x63, 0x61, 0x63, 0x68, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x42, 0xb2, 0x01, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x67, 0x63, 0x70, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, + 0x42, 0x0d, 0x47, 0x63, 0x70, 0x41, 0x75, 0x74, 0x68, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x5d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x67, 0x63, 0x70, 0x5f, 0x61, 0x75, 0x74, 0x68, + 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x67, 0x63, 0x70, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDescData = file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDesc +) + +func file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDescData +} + +var file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_goTypes = []interface{}{ + (*GcpAuthnFilterConfig)(nil), // 0: envoy.extensions.filters.http.gcp_authn.v3.GcpAuthnFilterConfig + (*Audience)(nil), // 1: envoy.extensions.filters.http.gcp_authn.v3.Audience + (*TokenCacheConfig)(nil), // 2: envoy.extensions.filters.http.gcp_authn.v3.TokenCacheConfig + (*v3.HttpUri)(nil), // 3: envoy.config.core.v3.HttpUri + (*v3.RetryPolicy)(nil), // 4: envoy.config.core.v3.RetryPolicy + (*wrapperspb.UInt64Value)(nil), // 5: google.protobuf.UInt64Value +} +var file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_depIdxs = []int32{ + 3, // 0: envoy.extensions.filters.http.gcp_authn.v3.GcpAuthnFilterConfig.http_uri:type_name -> envoy.config.core.v3.HttpUri + 4, // 1: envoy.extensions.filters.http.gcp_authn.v3.GcpAuthnFilterConfig.retry_policy:type_name -> envoy.config.core.v3.RetryPolicy + 2, // 2: envoy.extensions.filters.http.gcp_authn.v3.GcpAuthnFilterConfig.cache_config:type_name -> envoy.extensions.filters.http.gcp_authn.v3.TokenCacheConfig + 5, // 3: envoy.extensions.filters.http.gcp_authn.v3.TokenCacheConfig.cache_size:type_name -> google.protobuf.UInt64Value + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_init() } +func file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_init() { + if File_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GcpAuthnFilterConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Audience); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TokenCacheConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto = out.File + file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_rawDesc = nil + file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_goTypes = nil + file_envoy_extensions_filters_http_gcp_authn_v3_gcp_authn_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.pb.validate.go new file mode 100644 index 0000000000000..f50508f9762e3 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.pb.validate.go @@ -0,0 +1,458 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.proto + +package gcp_authnv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on GcpAuthnFilterConfig 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 *GcpAuthnFilterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GcpAuthnFilterConfig 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 +// GcpAuthnFilterConfigMultiError, or nil if none found. +func (m *GcpAuthnFilterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *GcpAuthnFilterConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetHttpUri() == nil { + err := GcpAuthnFilterConfigValidationError{ + field: "HttpUri", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetHttpUri()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GcpAuthnFilterConfigValidationError{ + field: "HttpUri", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GcpAuthnFilterConfigValidationError{ + field: "HttpUri", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpUri()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GcpAuthnFilterConfigValidationError{ + field: "HttpUri", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetRetryPolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GcpAuthnFilterConfigValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GcpAuthnFilterConfigValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRetryPolicy()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GcpAuthnFilterConfigValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetCacheConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GcpAuthnFilterConfigValidationError{ + field: "CacheConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GcpAuthnFilterConfigValidationError{ + field: "CacheConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCacheConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GcpAuthnFilterConfigValidationError{ + field: "CacheConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return GcpAuthnFilterConfigMultiError(errors) + } + return nil +} + +// GcpAuthnFilterConfigMultiError is an error wrapping multiple validation +// errors returned by GcpAuthnFilterConfig.ValidateAll() if the designated +// constraints aren't met. +type GcpAuthnFilterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GcpAuthnFilterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GcpAuthnFilterConfigMultiError) AllErrors() []error { return m } + +// GcpAuthnFilterConfigValidationError is the validation error returned by +// GcpAuthnFilterConfig.Validate if the designated constraints aren't met. +type GcpAuthnFilterConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GcpAuthnFilterConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GcpAuthnFilterConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GcpAuthnFilterConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GcpAuthnFilterConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GcpAuthnFilterConfigValidationError) ErrorName() string { + return "GcpAuthnFilterConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e GcpAuthnFilterConfigValidationError) 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 %sGcpAuthnFilterConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GcpAuthnFilterConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GcpAuthnFilterConfigValidationError{} + +// Validate checks the field values on Audience 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 *Audience) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Audience 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 AudienceMultiError, or nil +// if none found. +func (m *Audience) ValidateAll() error { + return m.validate(true) +} + +func (m *Audience) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetUrl()) < 1 { + err := AudienceValidationError{ + field: "Url", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return AudienceMultiError(errors) + } + return nil +} + +// AudienceMultiError is an error wrapping multiple validation errors returned +// by Audience.ValidateAll() if the designated constraints aren't met. +type AudienceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AudienceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AudienceMultiError) AllErrors() []error { return m } + +// AudienceValidationError is the validation error returned by +// Audience.Validate if the designated constraints aren't met. +type AudienceValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AudienceValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AudienceValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AudienceValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AudienceValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AudienceValidationError) ErrorName() string { return "AudienceValidationError" } + +// Error satisfies the builtin error interface +func (e AudienceValidationError) 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 %sAudience.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AudienceValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AudienceValidationError{} + +// Validate checks the field values on TokenCacheConfig 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 *TokenCacheConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TokenCacheConfig 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 +// TokenCacheConfigMultiError, or nil if none found. +func (m *TokenCacheConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *TokenCacheConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if wrapper := m.GetCacheSize(); wrapper != nil { + + if wrapper.GetValue() > 9223372036854775807 { + err := TokenCacheConfigValidationError{ + field: "CacheSize", + reason: "value must be less than or equal to 9223372036854775807", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if len(errors) > 0 { + return TokenCacheConfigMultiError(errors) + } + return nil +} + +// TokenCacheConfigMultiError is an error wrapping multiple validation errors +// returned by TokenCacheConfig.ValidateAll() if the designated constraints +// aren't met. +type TokenCacheConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TokenCacheConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TokenCacheConfigMultiError) AllErrors() []error { return m } + +// TokenCacheConfigValidationError is the validation error returned by +// TokenCacheConfig.Validate if the designated constraints aren't met. +type TokenCacheConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TokenCacheConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TokenCacheConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TokenCacheConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TokenCacheConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TokenCacheConfigValidationError) ErrorName() string { return "TokenCacheConfigValidationError" } + +// Error satisfies the builtin error interface +func (e TokenCacheConfigValidationError) 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 %sTokenCacheConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TokenCacheConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TokenCacheConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_http1_bridge/v3/config.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_http1_bridge/v3/config.pb.go new file mode 100644 index 0000000000000..c902e344e0250 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_http1_bridge/v3/config.pb.go @@ -0,0 +1,181 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/grpc_http1_bridge/v3/config.proto + +package grpc_http1_bridgev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// gRPC HTTP/1.1 Bridge filter config. +type Config struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If true then requests with content type set to “application/x-protobuf“ will be automatically converted to gRPC. + // This works by prepending the payload data with the gRPC header frame, as defined by the wiring format, and + // Content-Type will be updated accordingly before sending the request. + // For the requests that went through this upgrade the filter will also strip the frame before forwarding the + // response to the client. + UpgradeProtobufToGrpc bool `protobuf:"varint,1,opt,name=upgrade_protobuf_to_grpc,json=upgradeProtobufToGrpc,proto3" json:"upgrade_protobuf_to_grpc,omitempty"` +} + +func (x *Config) Reset() { + *x = Config{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config) ProtoMessage() {} + +func (x *Config) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Config.ProtoReflect.Descriptor instead. +func (*Config) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_rawDescGZIP(), []int{0} +} + +func (x *Config) GetUpgradeProtobufToGrpc() bool { + if x != nil { + return x.UpgradeProtobufToGrpc + } + return false +} + +var File_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_rawDesc = []byte{ + 0x0a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, + 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x62, 0x72, 0x69, 0x64, + 0x67, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, + 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7e, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x37, 0x0a, 0x18, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x6f, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x15, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x54, 0x6f, 0x47, 0x72, 0x70, 0x63, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, + 0x36, 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x76, 0x32, + 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xc8, 0x01, 0x0a, 0x40, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, + 0x70, 0x31, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6d, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x62, 0x72, 0x69, + 0x64, 0x67, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, + 0x31, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_rawDescData = file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_rawDesc +) + +func file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_rawDescData +} + +var file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_goTypes = []interface{}{ + (*Config)(nil), // 0: envoy.extensions.filters.http.grpc_http1_bridge.v3.Config +} +var file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_init() } +func file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_init() { + if File_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Config); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto = out.File + file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_rawDesc = nil + file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_goTypes = nil + file_envoy_extensions_filters_http_grpc_http1_bridge_v3_config_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_http1_bridge/v3/config.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_http1_bridge/v3/config.pb.validate.go new file mode 100644 index 0000000000000..68a32d4b867bd --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_http1_bridge/v3/config.pb.validate.go @@ -0,0 +1,135 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/grpc_http1_bridge/v3/config.proto + +package grpc_http1_bridgev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Config 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 *Config) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config 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 ConfigMultiError, or nil if none found. +func (m *Config) ValidateAll() error { + return m.validate(true) +} + +func (m *Config) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for UpgradeProtobufToGrpc + + if len(errors) > 0 { + return ConfigMultiError(errors) + } + return nil +} + +// ConfigMultiError is an error wrapping multiple validation errors returned by +// Config.ValidateAll() if the designated constraints aren't met. +type ConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigMultiError) AllErrors() []error { return m } + +// ConfigValidationError is the validation error returned by Config.Validate if +// the designated constraints aren't met. +type ConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConfigValidationError) ErrorName() string { return "ConfigValidationError" } + +// Error satisfies the builtin error interface +func (e ConfigValidationError) 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 %sConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.pb.go new file mode 100644 index 0000000000000..c5d5fd2f4ab55 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.pb.go @@ -0,0 +1,298 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.proto + +package grpc_http1_reverse_bridgev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// gRPC reverse bridge filter configuration +type FilterConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The content-type to pass to the upstream when the gRPC bridge filter is applied. + // The filter will also validate that the upstream responds with the same content type. + ContentType string `protobuf:"bytes,1,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` + // If true, Envoy will assume that the upstream doesn't understand gRPC frames and + // strip the gRPC frame from the request, and add it back in to the response. This will + // hide the gRPC semantics from the upstream, allowing it to receive and respond with a + // simple binary encoded protobuf. In order to calculate the “Content-Length“ header value, Envoy + // will buffer the upstream response unless :ref:`response_size_header + // ` + // is set, in which case Envoy will use the value of an upstream header to calculate the content + // length. + WithholdGrpcFrames bool `protobuf:"varint,2,opt,name=withhold_grpc_frames,json=withholdGrpcFrames,proto3" json:"withhold_grpc_frames,omitempty"` + // When :ref:`withhold_grpc_frames + // ` + // is true, this option controls how Envoy calculates the “Content-Length“. When + // “response_size_header“ is empty, Envoy will buffer the upstream response to calculate its + // size. When “response_size_header“ is set to a non-empty string, Envoy will stream the response + // to the downstream and it will use the value of the response header with this name to set the + // “Content-Length“ header and gRPC frame size. If the header with this name is repeated, only + // the first value will be used. + // + // Envoy will treat the upstream response as an error if this option is specified and the header + // is missing or if the value does not match the actual response body size. + ResponseSizeHeader string `protobuf:"bytes,3,opt,name=response_size_header,json=responseSizeHeader,proto3" json:"response_size_header,omitempty"` +} + +func (x *FilterConfig) Reset() { + *x = FilterConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilterConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilterConfig) ProtoMessage() {} + +func (x *FilterConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FilterConfig.ProtoReflect.Descriptor instead. +func (*FilterConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_rawDescGZIP(), []int{0} +} + +func (x *FilterConfig) GetContentType() string { + if x != nil { + return x.ContentType + } + return "" +} + +func (x *FilterConfig) GetWithholdGrpcFrames() bool { + if x != nil { + return x.WithholdGrpcFrames + } + return false +} + +func (x *FilterConfig) GetResponseSizeHeader() string { + if x != nil { + return x.ResponseSizeHeader + } + return "" +} + +// gRPC reverse bridge filter configuration per virtualhost/route/weighted-cluster level. +type FilterConfigPerRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If true, disables gRPC reverse bridge filter for this particular vhost or route. + // If disabled is specified in multiple per-filter-configs, the most specific one will be used. + Disabled bool `protobuf:"varint,1,opt,name=disabled,proto3" json:"disabled,omitempty"` +} + +func (x *FilterConfigPerRoute) Reset() { + *x = FilterConfigPerRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilterConfigPerRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilterConfigPerRoute) ProtoMessage() {} + +func (x *FilterConfigPerRoute) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FilterConfigPerRoute.ProtoReflect.Descriptor instead. +func (*FilterConfigPerRoute) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_rawDescGZIP(), []int{1} +} + +func (x *FilterConfigPerRoute) GetDisabled() bool { + if x != nil { + return x.Disabled + } + return false +} + +var File_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_rawDesc = []byte{ + 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, + 0x74, 0x70, 0x31, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x5f, 0x62, 0x72, 0x69, 0x64, + 0x67, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, + 0x67, 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, 0xfc, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x2a, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, + 0x14, 0x77, 0x69, 0x74, 0x68, 0x68, 0x6f, 0x6c, 0x64, 0x5f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x66, + 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x77, 0x69, 0x74, + 0x68, 0x68, 0x6f, 0x6c, 0x64, 0x47, 0x72, 0x70, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, + 0x3d, 0x0a, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, + 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x12, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x3a, 0x4f, + 0x9a, 0xc5, 0x88, 0x1e, 0x4a, 0x0a, 0x48, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, + 0x8b, 0x01, 0x0a, 0x14, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x57, 0x9a, 0xc5, 0x88, 0x1e, 0x52, 0x0a, 0x50, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, + 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, + 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x42, 0xe0, 0x01, + 0x0a, 0x48, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, + 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x7d, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x67, 0x72, 0x70, 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x5f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x67, 0x72, 0x70, + 0x63, 0x5f, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x5f, + 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_rawDescData = file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_rawDesc +) + +func file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_rawDescData +} + +var file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_goTypes = []interface{}{ + (*FilterConfig)(nil), // 0: envoy.extensions.filters.http.grpc_http1_reverse_bridge.v3.FilterConfig + (*FilterConfigPerRoute)(nil), // 1: envoy.extensions.filters.http.grpc_http1_reverse_bridge.v3.FilterConfigPerRoute +} +var file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_init() } +func file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_init() { + if File_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FilterConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FilterConfigPerRoute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto = out.File + file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_rawDesc = nil + file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_goTypes = nil + file_envoy_extensions_filters_http_grpc_http1_reverse_bridge_v3_config_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.pb.validate.go new file mode 100644 index 0000000000000..f169363fb06c2 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.pb.validate.go @@ -0,0 +1,263 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3/config.proto + +package grpc_http1_reverse_bridgev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on FilterConfig 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 *FilterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterConfig 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 FilterConfigMultiError, or +// nil if none found. +func (m *FilterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetContentType()) < 1 { + err := FilterConfigValidationError{ + field: "ContentType", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for WithholdGrpcFrames + + if !_FilterConfig_ResponseSizeHeader_Pattern.MatchString(m.GetResponseSizeHeader()) { + err := FilterConfigValidationError{ + field: "ResponseSizeHeader", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return FilterConfigMultiError(errors) + } + return nil +} + +// FilterConfigMultiError is an error wrapping multiple validation errors +// returned by FilterConfig.ValidateAll() if the designated constraints aren't met. +type FilterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterConfigMultiError) AllErrors() []error { return m } + +// FilterConfigValidationError is the validation error returned by +// FilterConfig.Validate if the designated constraints aren't met. +type FilterConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FilterConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FilterConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FilterConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FilterConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FilterConfigValidationError) ErrorName() string { return "FilterConfigValidationError" } + +// Error satisfies the builtin error interface +func (e FilterConfigValidationError) 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 %sFilterConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FilterConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FilterConfigValidationError{} + +var _FilterConfig_ResponseSizeHeader_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") + +// Validate checks the field values on FilterConfigPerRoute 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 *FilterConfigPerRoute) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterConfigPerRoute 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 +// FilterConfigPerRouteMultiError, or nil if none found. +func (m *FilterConfigPerRoute) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterConfigPerRoute) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Disabled + + if len(errors) > 0 { + return FilterConfigPerRouteMultiError(errors) + } + return nil +} + +// FilterConfigPerRouteMultiError is an error wrapping multiple validation +// errors returned by FilterConfigPerRoute.ValidateAll() if the designated +// constraints aren't met. +type FilterConfigPerRouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterConfigPerRouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterConfigPerRouteMultiError) AllErrors() []error { return m } + +// FilterConfigPerRouteValidationError is the validation error returned by +// FilterConfigPerRoute.Validate if the designated constraints aren't met. +type FilterConfigPerRouteValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FilterConfigPerRouteValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FilterConfigPerRouteValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FilterConfigPerRouteValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FilterConfigPerRouteValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FilterConfigPerRouteValidationError) ErrorName() string { + return "FilterConfigPerRouteValidationError" +} + +// Error satisfies the builtin error interface +func (e FilterConfigPerRouteValidationError) 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 %sFilterConfigPerRoute.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FilterConfigPerRouteValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FilterConfigPerRouteValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.pb.go new file mode 100644 index 0000000000000..16cbcff677d92 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.pb.go @@ -0,0 +1,797 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.proto + +package grpc_json_transcoderv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type GrpcJsonTranscoder_UrlUnescapeSpec int32 + +const ( + // URL path parameters will not decode RFC 6570 reserved characters. + // For example, segment “%2f%23/%20%2523“ is unescaped to “%2f%23/ %23“. + GrpcJsonTranscoder_ALL_CHARACTERS_EXCEPT_RESERVED GrpcJsonTranscoder_UrlUnescapeSpec = 0 + // URL path parameters will be fully URI-decoded except in + // cases of single segment matches in reserved expansion, where “%2F“ will be + // left encoded. + // For example, segment “%2f%23/%20%2523“ is unescaped to “%2f#/ %23“. + GrpcJsonTranscoder_ALL_CHARACTERS_EXCEPT_SLASH GrpcJsonTranscoder_UrlUnescapeSpec = 1 + // URL path parameters will be fully URI-decoded. + // For example, segment “%2f%23/%20%2523“ is unescaped to “/#/ %23“. + GrpcJsonTranscoder_ALL_CHARACTERS GrpcJsonTranscoder_UrlUnescapeSpec = 2 +) + +// Enum value maps for GrpcJsonTranscoder_UrlUnescapeSpec. +var ( + GrpcJsonTranscoder_UrlUnescapeSpec_name = map[int32]string{ + 0: "ALL_CHARACTERS_EXCEPT_RESERVED", + 1: "ALL_CHARACTERS_EXCEPT_SLASH", + 2: "ALL_CHARACTERS", + } + GrpcJsonTranscoder_UrlUnescapeSpec_value = map[string]int32{ + "ALL_CHARACTERS_EXCEPT_RESERVED": 0, + "ALL_CHARACTERS_EXCEPT_SLASH": 1, + "ALL_CHARACTERS": 2, + } +) + +func (x GrpcJsonTranscoder_UrlUnescapeSpec) Enum() *GrpcJsonTranscoder_UrlUnescapeSpec { + p := new(GrpcJsonTranscoder_UrlUnescapeSpec) + *p = x + return p +} + +func (x GrpcJsonTranscoder_UrlUnescapeSpec) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GrpcJsonTranscoder_UrlUnescapeSpec) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_enumTypes[0].Descriptor() +} + +func (GrpcJsonTranscoder_UrlUnescapeSpec) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_enumTypes[0] +} + +func (x GrpcJsonTranscoder_UrlUnescapeSpec) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GrpcJsonTranscoder_UrlUnescapeSpec.Descriptor instead. +func (GrpcJsonTranscoder_UrlUnescapeSpec) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_rawDescGZIP(), []int{0, 0} +} + +// [#next-free-field: 14] +// GrpcJsonTranscoder filter configuration. +// The filter itself can be used per route / per virtual host or on the general level. The most +// specific one is being used for a given route. If the list of services is empty - filter +// is considered to be disabled. +// Note that if specifying the filter per route, first the route is matched, and then transcoding +// filter is applied. It matters when specifying the route configuration and paths to match the +// request - for per-route grpc transcoder configs, the original path should be matched, while +// in other cases, the grpc-like path is expected (the one AFTER the filter is applied). +type GrpcJsonTranscoder struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to DescriptorSet: + // + // *GrpcJsonTranscoder_ProtoDescriptor + // *GrpcJsonTranscoder_ProtoDescriptorBin + DescriptorSet isGrpcJsonTranscoder_DescriptorSet `protobuf_oneof:"descriptor_set"` + // A list of strings that + // supplies the fully qualified service names (i.e. "package_name.service_name") that + // the transcoder will translate. If the service name doesn't exist in “proto_descriptor“, + // Envoy will fail at startup. The “proto_descriptor“ may contain more services than + // the service names specified here, but they won't be translated. + // + // By default, the filter will pass through requests that do not map to any specified services. + // If the list of services is empty, filter is considered disabled. + // However, this behavior changes if + // :ref:`reject_unknown_method ` + // is enabled. + Services []string `protobuf:"bytes,2,rep,name=services,proto3" json:"services,omitempty"` + // Control options for response JSON. These options are passed directly to + // `JsonPrintOptions `_. + PrintOptions *GrpcJsonTranscoder_PrintOptions `protobuf:"bytes,3,opt,name=print_options,json=printOptions,proto3" json:"print_options,omitempty"` + // Whether to keep the incoming request route after the outgoing headers have been transformed to + // the match the upstream gRPC service. Note: This means that routes for gRPC services that are + // not transcoded cannot be used in combination with “match_incoming_request_route“. + MatchIncomingRequestRoute bool `protobuf:"varint,5,opt,name=match_incoming_request_route,json=matchIncomingRequestRoute,proto3" json:"match_incoming_request_route,omitempty"` + // A list of query parameters to be ignored for transcoding method mapping. + // By default, the transcoder filter will not transcode a request if there are any + // unknown/invalid query parameters. + // + // Example : + // + // .. code-block:: proto + // + // service Bookstore { + // rpc GetShelf(GetShelfRequest) returns (Shelf) { + // option (google.api.http) = { + // get: "/shelves/{shelf}" + // }; + // } + // } + // + // message GetShelfRequest { + // int64 shelf = 1; + // } + // + // message Shelf {} + // + // The request “/shelves/100?foo=bar“ will not be mapped to “GetShelf``` because variable + // binding for “foo“ is not defined. Adding “foo“ to “ignored_query_parameters“ will allow + // the same request to be mapped to “GetShelf“. + IgnoredQueryParameters []string `protobuf:"bytes,6,rep,name=ignored_query_parameters,json=ignoredQueryParameters,proto3" json:"ignored_query_parameters,omitempty"` + // Whether to route methods without the “google.api.http“ option. + // + // Example : + // + // .. code-block:: proto + // + // package bookstore; + // + // service Bookstore { + // rpc GetShelf(GetShelfRequest) returns (Shelf) {} + // } + // + // message GetShelfRequest { + // int64 shelf = 1; + // } + // + // message Shelf {} + // + // The client could “post“ a json body “{"shelf": 1234}“ with the path of + // “/bookstore.Bookstore/GetShelfRequest“ to call “GetShelfRequest“. + AutoMapping bool `protobuf:"varint,7,opt,name=auto_mapping,json=autoMapping,proto3" json:"auto_mapping,omitempty"` + // Whether to ignore query parameters that cannot be mapped to a corresponding + // protobuf field. Use this if you cannot control the query parameters and do + // not know them beforehand. Otherwise use “ignored_query_parameters“. + // Defaults to false. + IgnoreUnknownQueryParameters bool `protobuf:"varint,8,opt,name=ignore_unknown_query_parameters,json=ignoreUnknownQueryParameters,proto3" json:"ignore_unknown_query_parameters,omitempty"` + // Whether to convert gRPC status headers to JSON. + // When trailer indicates a gRPC error and there was no HTTP body, take “google.rpc.Status“ + // from the “grpc-status-details-bin“ header and use it as JSON body. + // If there was no such header, make “google.rpc.Status“ out of the “grpc-status“ and + // “grpc-message“ headers. + // The error details types must be present in the “proto_descriptor“. + // + // For example, if an upstream server replies with headers: + // + // .. code-block:: none + // + // grpc-status: 5 + // grpc-status-details-bin: + // CAUaMwoqdHlwZS5nb29nbGVhcGlzLmNvbS9nb29nbGUucnBjLlJlcXVlc3RJbmZvEgUKA3ItMQ + // + // The “grpc-status-details-bin“ header contains a base64-encoded protobuf message + // “google.rpc.Status“. It will be transcoded into: + // + // .. code-block:: none + // + // HTTP/1.1 404 Not Found + // content-type: application/json + // + // {"code":5,"details":[{"@type":"type.googleapis.com/google.rpc.RequestInfo","requestId":"r-1"}]} + // + // In order to transcode the message, the “google.rpc.RequestInfo“ type from + // the “google/rpc/error_details.proto“ should be included in the configured + // :ref:`proto descriptor set `. + ConvertGrpcStatus bool `protobuf:"varint,9,opt,name=convert_grpc_status,json=convertGrpcStatus,proto3" json:"convert_grpc_status,omitempty"` + // URL unescaping policy. + // This spec is only applied when extracting variable with multiple segments in the URL path. + // For example, in case of “/foo/{x=*}/bar/{y=prefix/*}/{z=**}“ “x“ variable is single segment and “y“ and “z“ are multiple segments. + // For a path with “/foo/first/bar/prefix/second/third/fourth“, “x=first“, “y=prefix/second“, “z=third/fourth“. + // If this setting is not specified, the value defaults to :ref:`ALL_CHARACTERS_EXCEPT_RESERVED`. + UrlUnescapeSpec GrpcJsonTranscoder_UrlUnescapeSpec `protobuf:"varint,10,opt,name=url_unescape_spec,json=urlUnescapeSpec,proto3,enum=envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder_UrlUnescapeSpec" json:"url_unescape_spec,omitempty"` + // If true, unescape '+' to space when extracting variables in query parameters. + // This is to support `HTML 2.0 `_ + QueryParamUnescapePlus bool `protobuf:"varint,12,opt,name=query_param_unescape_plus,json=queryParamUnescapePlus,proto3" json:"query_param_unescape_plus,omitempty"` + // If true, try to match the custom verb even if it is unregistered. By + // default, only match when it is registered. + // + // According to the http template `syntax `_, + // the custom verb is **":" LITERAL** at the end of http template. + // + // For a request with “/foo/bar:baz“ and “:baz“ is not registered in any url_template, here is the behavior change + // - if the field is not set, “:baz“ will not be treated as custom verb, so it will match “/foo/{x=*}“. + // - if the field is set, “:baz“ is treated as custom verb, so it will NOT match “/foo/{x=*}“ since the template doesn't use any custom verb. + MatchUnregisteredCustomVerb bool `protobuf:"varint,13,opt,name=match_unregistered_custom_verb,json=matchUnregisteredCustomVerb,proto3" json:"match_unregistered_custom_verb,omitempty"` + // Configure the behavior when handling requests that cannot be transcoded. + // + // By default, the transcoder will silently pass through HTTP requests that are malformed. + // This includes requests with unknown query parameters, unregister paths, etc. + // + // Set these options to enable strict HTTP request validation, resulting in the transcoder rejecting + // such requests with a “HTTP 4xx“. See each individual option for more details on the validation. + // gRPC requests will still silently pass through without transcoding. + // + // The benefit is a proper error message to the downstream. + // If the upstream is a gRPC server, it cannot handle the passed-through HTTP requests and will reset + // the TCP connection. The downstream will then + // receive a “HTTP 503 Service Unavailable“ due to the upstream connection reset. + // This incorrect error message may conflict with other Envoy components, such as retry policies. + RequestValidationOptions *GrpcJsonTranscoder_RequestValidationOptions `protobuf:"bytes,11,opt,name=request_validation_options,json=requestValidationOptions,proto3" json:"request_validation_options,omitempty"` +} + +func (x *GrpcJsonTranscoder) Reset() { + *x = GrpcJsonTranscoder{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GrpcJsonTranscoder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GrpcJsonTranscoder) ProtoMessage() {} + +func (x *GrpcJsonTranscoder) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GrpcJsonTranscoder.ProtoReflect.Descriptor instead. +func (*GrpcJsonTranscoder) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_rawDescGZIP(), []int{0} +} + +func (m *GrpcJsonTranscoder) GetDescriptorSet() isGrpcJsonTranscoder_DescriptorSet { + if m != nil { + return m.DescriptorSet + } + return nil +} + +func (x *GrpcJsonTranscoder) GetProtoDescriptor() string { + if x, ok := x.GetDescriptorSet().(*GrpcJsonTranscoder_ProtoDescriptor); ok { + return x.ProtoDescriptor + } + return "" +} + +func (x *GrpcJsonTranscoder) GetProtoDescriptorBin() []byte { + if x, ok := x.GetDescriptorSet().(*GrpcJsonTranscoder_ProtoDescriptorBin); ok { + return x.ProtoDescriptorBin + } + return nil +} + +func (x *GrpcJsonTranscoder) GetServices() []string { + if x != nil { + return x.Services + } + return nil +} + +func (x *GrpcJsonTranscoder) GetPrintOptions() *GrpcJsonTranscoder_PrintOptions { + if x != nil { + return x.PrintOptions + } + return nil +} + +func (x *GrpcJsonTranscoder) GetMatchIncomingRequestRoute() bool { + if x != nil { + return x.MatchIncomingRequestRoute + } + return false +} + +func (x *GrpcJsonTranscoder) GetIgnoredQueryParameters() []string { + if x != nil { + return x.IgnoredQueryParameters + } + return nil +} + +func (x *GrpcJsonTranscoder) GetAutoMapping() bool { + if x != nil { + return x.AutoMapping + } + return false +} + +func (x *GrpcJsonTranscoder) GetIgnoreUnknownQueryParameters() bool { + if x != nil { + return x.IgnoreUnknownQueryParameters + } + return false +} + +func (x *GrpcJsonTranscoder) GetConvertGrpcStatus() bool { + if x != nil { + return x.ConvertGrpcStatus + } + return false +} + +func (x *GrpcJsonTranscoder) GetUrlUnescapeSpec() GrpcJsonTranscoder_UrlUnescapeSpec { + if x != nil { + return x.UrlUnescapeSpec + } + return GrpcJsonTranscoder_ALL_CHARACTERS_EXCEPT_RESERVED +} + +func (x *GrpcJsonTranscoder) GetQueryParamUnescapePlus() bool { + if x != nil { + return x.QueryParamUnescapePlus + } + return false +} + +func (x *GrpcJsonTranscoder) GetMatchUnregisteredCustomVerb() bool { + if x != nil { + return x.MatchUnregisteredCustomVerb + } + return false +} + +func (x *GrpcJsonTranscoder) GetRequestValidationOptions() *GrpcJsonTranscoder_RequestValidationOptions { + if x != nil { + return x.RequestValidationOptions + } + return nil +} + +type isGrpcJsonTranscoder_DescriptorSet interface { + isGrpcJsonTranscoder_DescriptorSet() +} + +type GrpcJsonTranscoder_ProtoDescriptor struct { + // Supplies the filename of + // :ref:`the proto descriptor set ` for the gRPC + // services. + ProtoDescriptor string `protobuf:"bytes,1,opt,name=proto_descriptor,json=protoDescriptor,proto3,oneof"` +} + +type GrpcJsonTranscoder_ProtoDescriptorBin struct { + // Supplies the binary content of + // :ref:`the proto descriptor set ` for the gRPC + // services. + ProtoDescriptorBin []byte `protobuf:"bytes,4,opt,name=proto_descriptor_bin,json=protoDescriptorBin,proto3,oneof"` +} + +func (*GrpcJsonTranscoder_ProtoDescriptor) isGrpcJsonTranscoder_DescriptorSet() {} + +func (*GrpcJsonTranscoder_ProtoDescriptorBin) isGrpcJsonTranscoder_DescriptorSet() {} + +type GrpcJsonTranscoder_PrintOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Whether to add spaces, line breaks and indentation to make the JSON + // output easy to read. Defaults to false. + AddWhitespace bool `protobuf:"varint,1,opt,name=add_whitespace,json=addWhitespace,proto3" json:"add_whitespace,omitempty"` + // Whether to always print primitive fields. By default primitive + // fields with default values will be omitted in JSON output. For + // example, an int32 field set to 0 will be omitted. Setting this flag to + // true will override the default behavior and print primitive fields + // regardless of their values. Defaults to false. + AlwaysPrintPrimitiveFields bool `protobuf:"varint,2,opt,name=always_print_primitive_fields,json=alwaysPrintPrimitiveFields,proto3" json:"always_print_primitive_fields,omitempty"` + // Whether to always print enums as ints. By default they are rendered + // as strings. Defaults to false. + AlwaysPrintEnumsAsInts bool `protobuf:"varint,3,opt,name=always_print_enums_as_ints,json=alwaysPrintEnumsAsInts,proto3" json:"always_print_enums_as_ints,omitempty"` + // Whether to preserve proto field names. By default protobuf will + // generate JSON field names using the “json_name“ option, or lower camel case, + // in that order. Setting this flag will preserve the original field names. Defaults to false. + PreserveProtoFieldNames bool `protobuf:"varint,4,opt,name=preserve_proto_field_names,json=preserveProtoFieldNames,proto3" json:"preserve_proto_field_names,omitempty"` +} + +func (x *GrpcJsonTranscoder_PrintOptions) Reset() { + *x = GrpcJsonTranscoder_PrintOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GrpcJsonTranscoder_PrintOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GrpcJsonTranscoder_PrintOptions) ProtoMessage() {} + +func (x *GrpcJsonTranscoder_PrintOptions) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GrpcJsonTranscoder_PrintOptions.ProtoReflect.Descriptor instead. +func (*GrpcJsonTranscoder_PrintOptions) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *GrpcJsonTranscoder_PrintOptions) GetAddWhitespace() bool { + if x != nil { + return x.AddWhitespace + } + return false +} + +func (x *GrpcJsonTranscoder_PrintOptions) GetAlwaysPrintPrimitiveFields() bool { + if x != nil { + return x.AlwaysPrintPrimitiveFields + } + return false +} + +func (x *GrpcJsonTranscoder_PrintOptions) GetAlwaysPrintEnumsAsInts() bool { + if x != nil { + return x.AlwaysPrintEnumsAsInts + } + return false +} + +func (x *GrpcJsonTranscoder_PrintOptions) GetPreserveProtoFieldNames() bool { + if x != nil { + return x.PreserveProtoFieldNames + } + return false +} + +type GrpcJsonTranscoder_RequestValidationOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // By default, a request that cannot be mapped to any specified gRPC + // :ref:`services ` + // will pass-through this filter. + // When set to true, the request will be rejected with a “HTTP 404 Not Found“. + RejectUnknownMethod bool `protobuf:"varint,1,opt,name=reject_unknown_method,json=rejectUnknownMethod,proto3" json:"reject_unknown_method,omitempty"` + // By default, a request with query parameters that cannot be mapped to the gRPC request message + // will pass-through this filter. + // When set to true, the request will be rejected with a “HTTP 400 Bad Request“. + // + // The fields + // :ref:`ignore_unknown_query_parameters ` + // and + // :ref:`ignored_query_parameters ` + // have priority over this strict validation behavior. + RejectUnknownQueryParameters bool `protobuf:"varint,2,opt,name=reject_unknown_query_parameters,json=rejectUnknownQueryParameters,proto3" json:"reject_unknown_query_parameters,omitempty"` + // "id: 456" in the body will override "id=123" in the binding. + // + // If this field is set to true, the request will be rejected if the binding + // value is different from the body value. + RejectBindingBodyFieldCollisions bool `protobuf:"varint,3,opt,name=reject_binding_body_field_collisions,json=rejectBindingBodyFieldCollisions,proto3" json:"reject_binding_body_field_collisions,omitempty"` +} + +func (x *GrpcJsonTranscoder_RequestValidationOptions) Reset() { + *x = GrpcJsonTranscoder_RequestValidationOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GrpcJsonTranscoder_RequestValidationOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GrpcJsonTranscoder_RequestValidationOptions) ProtoMessage() {} + +func (x *GrpcJsonTranscoder_RequestValidationOptions) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GrpcJsonTranscoder_RequestValidationOptions.ProtoReflect.Descriptor instead. +func (*GrpcJsonTranscoder_RequestValidationOptions) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *GrpcJsonTranscoder_RequestValidationOptions) GetRejectUnknownMethod() bool { + if x != nil { + return x.RejectUnknownMethod + } + return false +} + +func (x *GrpcJsonTranscoder_RequestValidationOptions) GetRejectUnknownQueryParameters() bool { + if x != nil { + return x.RejectUnknownQueryParameters + } + return false +} + +func (x *GrpcJsonTranscoder_RequestValidationOptions) GetRejectBindingBodyFieldCollisions() bool { + if x != nil { + return x.RejectBindingBodyFieldCollisions + } + return false +} + +var File_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_rawDesc = []byte{ + 0x0a, 0x46, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x67, 0x72, 0x70, 0x63, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, + 0x6f, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, + 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x6a, 0x73, 0x6f, + 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0xc8, 0x0d, 0x0a, 0x12, 0x47, + 0x72, 0x70, 0x63, 0x4a, 0x73, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, + 0x72, 0x12, 0x2b, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x32, + 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x5f, 0x62, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x12, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x42, + 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x7b, + 0x0a, 0x0d, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x56, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, + 0x70, 0x63, 0x4a, 0x73, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, + 0x2e, 0x50, 0x72, 0x69, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0c, 0x70, + 0x72, 0x69, 0x6e, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3f, 0x0a, 0x1c, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x19, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x38, 0x0a, 0x18, + 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x16, + 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x6d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x61, 0x75, + 0x74, 0x6f, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x45, 0x0a, 0x1f, 0x69, 0x67, 0x6e, + 0x6f, 0x72, 0x65, 0x5f, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x1c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, + 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x67, 0x72, 0x70, 0x63, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x63, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x8f, 0x01, 0x0a, 0x11, 0x75, 0x72, 0x6c, 0x5f, 0x75, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, + 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x59, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x4a, 0x73, 0x6f, 0x6e, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x55, 0x72, 0x6c, 0x55, 0x6e, 0x65, 0x73, 0x63, + 0x61, 0x70, 0x65, 0x53, 0x70, 0x65, 0x63, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x0f, 0x75, 0x72, 0x6c, 0x55, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x53, 0x70, + 0x65, 0x63, 0x12, 0x39, 0x0a, 0x19, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x5f, 0x75, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x5f, 0x70, 0x6c, 0x75, 0x73, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x55, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x50, 0x6c, 0x75, 0x73, 0x12, 0x43, 0x0a, + 0x1e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x75, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x65, 0x64, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x62, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x55, 0x6e, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x56, 0x65, + 0x72, 0x62, 0x12, 0xa0, 0x01, 0x0a, 0x1a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x62, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x6a, 0x73, 0x6f, + 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, + 0x47, 0x72, 0x70, 0x63, 0x4a, 0x73, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, + 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x18, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xc0, 0x02, 0x0a, 0x0c, 0x50, 0x72, 0x69, 0x6e, 0x74, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x64, 0x64, 0x5f, 0x77, 0x68, + 0x69, 0x74, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, + 0x61, 0x64, 0x64, 0x57, 0x68, 0x69, 0x74, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x41, 0x0a, + 0x1d, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x5f, 0x70, 0x72, + 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x50, 0x72, 0x69, 0x6e, + 0x74, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, + 0x12, 0x3a, 0x0a, 0x1a, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6e, 0x74, + 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x5f, 0x61, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x50, 0x72, 0x69, 0x6e, + 0x74, 0x45, 0x6e, 0x75, 0x6d, 0x73, 0x41, 0x73, 0x49, 0x6e, 0x74, 0x73, 0x12, 0x3b, 0x0a, 0x1a, + 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x17, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x3a, 0x4d, 0x9a, 0xc5, 0x88, 0x1e, 0x48, + 0x0a, 0x46, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x4a, 0x73, 0x6f, + 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x69, 0x6e, + 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xe5, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, 0x6b, 0x6e, + 0x6f, 0x77, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x45, 0x0a, 0x1f, 0x72, 0x65, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x1c, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, + 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x12, 0x4e, 0x0a, 0x24, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, + 0x6c, 0x6c, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x20, + 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x6f, 0x64, + 0x79, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6c, 0x6c, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0x6a, 0x0a, 0x0f, 0x55, 0x72, 0x6c, 0x55, 0x6e, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x53, + 0x70, 0x65, 0x63, 0x12, 0x22, 0x0a, 0x1e, 0x41, 0x4c, 0x4c, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x41, + 0x43, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x50, 0x54, 0x5f, 0x52, 0x45, 0x53, + 0x45, 0x52, 0x56, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x4c, 0x4c, 0x5f, 0x43, + 0x48, 0x41, 0x52, 0x41, 0x43, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x50, 0x54, + 0x5f, 0x53, 0x4c, 0x41, 0x53, 0x48, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x4c, 0x4c, 0x5f, + 0x43, 0x48, 0x41, 0x52, 0x41, 0x43, 0x54, 0x45, 0x52, 0x53, 0x10, 0x02, 0x3a, 0x40, 0x9a, 0xc5, + 0x88, 0x1e, 0x3b, 0x0a, 0x39, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x70, 0x63, + 0x4a, 0x73, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x42, 0x15, + 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x65, 0x74, + 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0xd5, 0x01, 0x0a, 0x43, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x73, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, + 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x67, + 0x72, 0x70, 0x63, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x63, 0x6f, + 0x64, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_rawDescData = file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_rawDesc +) + +func file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_rawDescData +} + +var file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_goTypes = []interface{}{ + (GrpcJsonTranscoder_UrlUnescapeSpec)(0), // 0: envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder.UrlUnescapeSpec + (*GrpcJsonTranscoder)(nil), // 1: envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder + (*GrpcJsonTranscoder_PrintOptions)(nil), // 2: envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder.PrintOptions + (*GrpcJsonTranscoder_RequestValidationOptions)(nil), // 3: envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder.RequestValidationOptions +} +var file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder.print_options:type_name -> envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder.PrintOptions + 0, // 1: envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder.url_unescape_spec:type_name -> envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder.UrlUnescapeSpec + 3, // 2: envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder.request_validation_options:type_name -> envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder.RequestValidationOptions + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_init() } +func file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_init() { + if File_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GrpcJsonTranscoder); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GrpcJsonTranscoder_PrintOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GrpcJsonTranscoder_RequestValidationOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*GrpcJsonTranscoder_ProtoDescriptor)(nil), + (*GrpcJsonTranscoder_ProtoDescriptorBin)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_rawDesc, + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_depIdxs, + EnumInfos: file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_enumTypes, + MessageInfos: file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto = out.File + file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_rawDesc = nil + file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_goTypes = nil + file_envoy_extensions_filters_http_grpc_json_transcoder_v3_transcoder_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.pb.validate.go new file mode 100644 index 0000000000000..88ae7f04df308 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.pb.validate.go @@ -0,0 +1,459 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/grpc_json_transcoder/v3/transcoder.proto + +package grpc_json_transcoderv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on GrpcJsonTranscoder 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 *GrpcJsonTranscoder) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcJsonTranscoder 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 +// GrpcJsonTranscoderMultiError, or nil if none found. +func (m *GrpcJsonTranscoder) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcJsonTranscoder) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetPrintOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcJsonTranscoderValidationError{ + field: "PrintOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcJsonTranscoderValidationError{ + field: "PrintOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPrintOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GrpcJsonTranscoderValidationError{ + field: "PrintOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for MatchIncomingRequestRoute + + // no validation rules for AutoMapping + + // no validation rules for IgnoreUnknownQueryParameters + + // no validation rules for ConvertGrpcStatus + + if _, ok := GrpcJsonTranscoder_UrlUnescapeSpec_name[int32(m.GetUrlUnescapeSpec())]; !ok { + err := GrpcJsonTranscoderValidationError{ + field: "UrlUnescapeSpec", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for QueryParamUnescapePlus + + // no validation rules for MatchUnregisteredCustomVerb + + if all { + switch v := interface{}(m.GetRequestValidationOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrpcJsonTranscoderValidationError{ + field: "RequestValidationOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrpcJsonTranscoderValidationError{ + field: "RequestValidationOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestValidationOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GrpcJsonTranscoderValidationError{ + field: "RequestValidationOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.DescriptorSet.(type) { + + case *GrpcJsonTranscoder_ProtoDescriptor: + // no validation rules for ProtoDescriptor + + case *GrpcJsonTranscoder_ProtoDescriptorBin: + // no validation rules for ProtoDescriptorBin + + default: + err := GrpcJsonTranscoderValidationError{ + field: "DescriptorSet", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return GrpcJsonTranscoderMultiError(errors) + } + return nil +} + +// GrpcJsonTranscoderMultiError is an error wrapping multiple validation errors +// returned by GrpcJsonTranscoder.ValidateAll() if the designated constraints +// aren't met. +type GrpcJsonTranscoderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcJsonTranscoderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcJsonTranscoderMultiError) AllErrors() []error { return m } + +// GrpcJsonTranscoderValidationError is the validation error returned by +// GrpcJsonTranscoder.Validate if the designated constraints aren't met. +type GrpcJsonTranscoderValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GrpcJsonTranscoderValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GrpcJsonTranscoderValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GrpcJsonTranscoderValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GrpcJsonTranscoderValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GrpcJsonTranscoderValidationError) ErrorName() string { + return "GrpcJsonTranscoderValidationError" +} + +// Error satisfies the builtin error interface +func (e GrpcJsonTranscoderValidationError) 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 %sGrpcJsonTranscoder.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GrpcJsonTranscoderValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GrpcJsonTranscoderValidationError{} + +// Validate checks the field values on GrpcJsonTranscoder_PrintOptions 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 *GrpcJsonTranscoder_PrintOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcJsonTranscoder_PrintOptions 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 +// GrpcJsonTranscoder_PrintOptionsMultiError, or nil if none found. +func (m *GrpcJsonTranscoder_PrintOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcJsonTranscoder_PrintOptions) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for AddWhitespace + + // no validation rules for AlwaysPrintPrimitiveFields + + // no validation rules for AlwaysPrintEnumsAsInts + + // no validation rules for PreserveProtoFieldNames + + if len(errors) > 0 { + return GrpcJsonTranscoder_PrintOptionsMultiError(errors) + } + return nil +} + +// GrpcJsonTranscoder_PrintOptionsMultiError is an error wrapping multiple +// validation errors returned by GrpcJsonTranscoder_PrintOptions.ValidateAll() +// if the designated constraints aren't met. +type GrpcJsonTranscoder_PrintOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcJsonTranscoder_PrintOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcJsonTranscoder_PrintOptionsMultiError) AllErrors() []error { return m } + +// GrpcJsonTranscoder_PrintOptionsValidationError is the validation error +// returned by GrpcJsonTranscoder_PrintOptions.Validate if the designated +// constraints aren't met. +type GrpcJsonTranscoder_PrintOptionsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GrpcJsonTranscoder_PrintOptionsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GrpcJsonTranscoder_PrintOptionsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GrpcJsonTranscoder_PrintOptionsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GrpcJsonTranscoder_PrintOptionsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GrpcJsonTranscoder_PrintOptionsValidationError) ErrorName() string { + return "GrpcJsonTranscoder_PrintOptionsValidationError" +} + +// Error satisfies the builtin error interface +func (e GrpcJsonTranscoder_PrintOptionsValidationError) 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 %sGrpcJsonTranscoder_PrintOptions.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GrpcJsonTranscoder_PrintOptionsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GrpcJsonTranscoder_PrintOptionsValidationError{} + +// Validate checks the field values on +// GrpcJsonTranscoder_RequestValidationOptions 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 *GrpcJsonTranscoder_RequestValidationOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// GrpcJsonTranscoder_RequestValidationOptions 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 +// GrpcJsonTranscoder_RequestValidationOptionsMultiError, or nil if none found. +func (m *GrpcJsonTranscoder_RequestValidationOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcJsonTranscoder_RequestValidationOptions) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for RejectUnknownMethod + + // no validation rules for RejectUnknownQueryParameters + + // no validation rules for RejectBindingBodyFieldCollisions + + if len(errors) > 0 { + return GrpcJsonTranscoder_RequestValidationOptionsMultiError(errors) + } + return nil +} + +// GrpcJsonTranscoder_RequestValidationOptionsMultiError is an error wrapping +// multiple validation errors returned by +// GrpcJsonTranscoder_RequestValidationOptions.ValidateAll() if the designated +// constraints aren't met. +type GrpcJsonTranscoder_RequestValidationOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcJsonTranscoder_RequestValidationOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcJsonTranscoder_RequestValidationOptionsMultiError) AllErrors() []error { return m } + +// GrpcJsonTranscoder_RequestValidationOptionsValidationError is the validation +// error returned by GrpcJsonTranscoder_RequestValidationOptions.Validate if +// the designated constraints aren't met. +type GrpcJsonTranscoder_RequestValidationOptionsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GrpcJsonTranscoder_RequestValidationOptionsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GrpcJsonTranscoder_RequestValidationOptionsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GrpcJsonTranscoder_RequestValidationOptionsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GrpcJsonTranscoder_RequestValidationOptionsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GrpcJsonTranscoder_RequestValidationOptionsValidationError) ErrorName() string { + return "GrpcJsonTranscoder_RequestValidationOptionsValidationError" +} + +// Error satisfies the builtin error interface +func (e GrpcJsonTranscoder_RequestValidationOptionsValidationError) 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 %sGrpcJsonTranscoder_RequestValidationOptions.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GrpcJsonTranscoder_RequestValidationOptionsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GrpcJsonTranscoder_RequestValidationOptionsValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_stats/v3/config.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_stats/v3/config.pb.go new file mode 100644 index 0000000000000..4aab47435b946 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_stats/v3/config.pb.go @@ -0,0 +1,368 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/grpc_stats/v3/config.proto + +package grpc_statsv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// gRPC statistics filter configuration +type FilterConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If true, the filter maintains a filter state object with the request and response message + // counts. + EmitFilterState bool `protobuf:"varint,1,opt,name=emit_filter_state,json=emitFilterState,proto3" json:"emit_filter_state,omitempty"` + // Types that are assignable to PerMethodStatSpecifier: + // + // *FilterConfig_IndividualMethodStatsAllowlist + // *FilterConfig_StatsForAllMethods + PerMethodStatSpecifier isFilterConfig_PerMethodStatSpecifier `protobuf_oneof:"per_method_stat_specifier"` + // If true, the filter will gather a histogram for the request time of the upstream. + // It works with :ref:`stats_for_all_methods + // ` + // and :ref:`individual_method_stats_allowlist + // ` the same way + // request_message_count and response_message_count works. + EnableUpstreamStats bool `protobuf:"varint,4,opt,name=enable_upstream_stats,json=enableUpstreamStats,proto3" json:"enable_upstream_stats,omitempty"` +} + +func (x *FilterConfig) Reset() { + *x = FilterConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilterConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilterConfig) ProtoMessage() {} + +func (x *FilterConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FilterConfig.ProtoReflect.Descriptor instead. +func (*FilterConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_rawDescGZIP(), []int{0} +} + +func (x *FilterConfig) GetEmitFilterState() bool { + if x != nil { + return x.EmitFilterState + } + return false +} + +func (m *FilterConfig) GetPerMethodStatSpecifier() isFilterConfig_PerMethodStatSpecifier { + if m != nil { + return m.PerMethodStatSpecifier + } + return nil +} + +func (x *FilterConfig) GetIndividualMethodStatsAllowlist() *v3.GrpcMethodList { + if x, ok := x.GetPerMethodStatSpecifier().(*FilterConfig_IndividualMethodStatsAllowlist); ok { + return x.IndividualMethodStatsAllowlist + } + return nil +} + +func (x *FilterConfig) GetStatsForAllMethods() *wrapperspb.BoolValue { + if x, ok := x.GetPerMethodStatSpecifier().(*FilterConfig_StatsForAllMethods); ok { + return x.StatsForAllMethods + } + return nil +} + +func (x *FilterConfig) GetEnableUpstreamStats() bool { + if x != nil { + return x.EnableUpstreamStats + } + return false +} + +type isFilterConfig_PerMethodStatSpecifier interface { + isFilterConfig_PerMethodStatSpecifier() +} + +type FilterConfig_IndividualMethodStatsAllowlist struct { + // If set, specifies an allowlist of service/methods that will have individual stats + // emitted for them. Any call that does not match the allowlist will be counted + // in a stat with no method specifier: “cluster..grpc.*“. + IndividualMethodStatsAllowlist *v3.GrpcMethodList `protobuf:"bytes,2,opt,name=individual_method_stats_allowlist,json=individualMethodStatsAllowlist,proto3,oneof"` +} + +type FilterConfig_StatsForAllMethods struct { + // If set to true, emit stats for all service/method names. + // + // If set to false, emit stats for all service/message types to the same stats without including + // the service/method in the name, with prefix “cluster..grpc“. This can be useful if + // service/method granularity is not needed, or if each cluster only receives a single method. + // + // .. attention:: + // + // This option is only safe if all clients are trusted. If this option is enabled + // with untrusted clients, the clients could cause unbounded growth in the number of stats in + // Envoy, using unbounded memory and potentially slowing down stats pipelines. + // + // .. attention:: + // + // If neither ``individual_method_stats_allowlist`` nor ``stats_for_all_methods`` is set, the + // behavior will default to ``stats_for_all_methods=false``. This default value is changed due + // to the previous value being deprecated. This behavior can be changed with runtime override + // ``envoy.deprecated_features.grpc_stats_filter_enable_stats_for_all_methods_by_default``. + StatsForAllMethods *wrapperspb.BoolValue `protobuf:"bytes,3,opt,name=stats_for_all_methods,json=statsForAllMethods,proto3,oneof"` +} + +func (*FilterConfig_IndividualMethodStatsAllowlist) isFilterConfig_PerMethodStatSpecifier() {} + +func (*FilterConfig_StatsForAllMethods) isFilterConfig_PerMethodStatSpecifier() {} + +// gRPC statistics filter state object in protobuf form. +type FilterObject struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Count of request messages in the request stream. + RequestMessageCount uint64 `protobuf:"varint,1,opt,name=request_message_count,json=requestMessageCount,proto3" json:"request_message_count,omitempty"` + // Count of response messages in the response stream. + ResponseMessageCount uint64 `protobuf:"varint,2,opt,name=response_message_count,json=responseMessageCount,proto3" json:"response_message_count,omitempty"` +} + +func (x *FilterObject) Reset() { + *x = FilterObject{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilterObject) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilterObject) ProtoMessage() {} + +func (x *FilterObject) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FilterObject.ProtoReflect.Descriptor instead. +func (*FilterObject) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_rawDescGZIP(), []int{1} +} + +func (x *FilterObject) GetRequestMessageCount() uint64 { + if x != nil { + return x.RequestMessageCount + } + return 0 +} + +func (x *FilterObject) GetResponseMessageCount() uint64 { + if x != nil { + return x.ResponseMessageCount + } + return 0 +} + +var File_envoy_extensions_filters_http_grpc_stats_v3_config_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_rawDesc = []byte{ + 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, + 0x70, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90, 0x03, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x6d, 0x69, 0x74, 0x5f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0f, 0x65, 0x6d, 0x69, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x71, 0x0a, 0x21, 0x69, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, + 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x1e, 0x69, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, + 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x41, 0x6c, 0x6c, + 0x6f, 0x77, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x15, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, + 0x66, 0x6f, 0x72, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x48, 0x00, 0x52, 0x12, 0x73, 0x74, 0x61, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x41, 0x6c, 0x6c, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x55, 0x70, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x73, 0x3a, 0x3f, 0x9a, 0xc5, 0x88, + 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x1b, 0x0a, 0x19, + 0x70, 0x65, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x5f, + 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0xb9, 0x01, 0x0a, 0x0c, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x34, + 0x0a, 0x16, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0xb3, 0x01, 0x0a, 0x39, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, + 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x5f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_rawDescData = file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_rawDesc +) + +func file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_rawDescData +} + +var file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_goTypes = []interface{}{ + (*FilterConfig)(nil), // 0: envoy.extensions.filters.http.grpc_stats.v3.FilterConfig + (*FilterObject)(nil), // 1: envoy.extensions.filters.http.grpc_stats.v3.FilterObject + (*v3.GrpcMethodList)(nil), // 2: envoy.config.core.v3.GrpcMethodList + (*wrapperspb.BoolValue)(nil), // 3: google.protobuf.BoolValue +} +var file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.filters.http.grpc_stats.v3.FilterConfig.individual_method_stats_allowlist:type_name -> envoy.config.core.v3.GrpcMethodList + 3, // 1: envoy.extensions.filters.http.grpc_stats.v3.FilterConfig.stats_for_all_methods:type_name -> google.protobuf.BoolValue + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_init() } +func file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_init() { + if File_envoy_extensions_filters_http_grpc_stats_v3_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FilterConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FilterObject); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*FilterConfig_IndividualMethodStatsAllowlist)(nil), + (*FilterConfig_StatsForAllMethods)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_grpc_stats_v3_config_proto = out.File + file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_rawDesc = nil + file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_goTypes = nil + file_envoy_extensions_filters_http_grpc_stats_v3_config_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_stats/v3/config.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_stats/v3/config.pb.validate.go new file mode 100644 index 0000000000000..de8845b120127 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_stats/v3/config.pb.validate.go @@ -0,0 +1,306 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/grpc_stats/v3/config.proto + +package grpc_statsv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on FilterConfig 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 *FilterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterConfig 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 FilterConfigMultiError, or +// nil if none found. +func (m *FilterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for EmitFilterState + + // no validation rules for EnableUpstreamStats + + switch m.PerMethodStatSpecifier.(type) { + + case *FilterConfig_IndividualMethodStatsAllowlist: + + if all { + switch v := interface{}(m.GetIndividualMethodStatsAllowlist()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterConfigValidationError{ + field: "IndividualMethodStatsAllowlist", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterConfigValidationError{ + field: "IndividualMethodStatsAllowlist", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIndividualMethodStatsAllowlist()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterConfigValidationError{ + field: "IndividualMethodStatsAllowlist", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *FilterConfig_StatsForAllMethods: + + if all { + switch v := interface{}(m.GetStatsForAllMethods()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterConfigValidationError{ + field: "StatsForAllMethods", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterConfigValidationError{ + field: "StatsForAllMethods", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatsForAllMethods()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterConfigValidationError{ + field: "StatsForAllMethods", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return FilterConfigMultiError(errors) + } + return nil +} + +// FilterConfigMultiError is an error wrapping multiple validation errors +// returned by FilterConfig.ValidateAll() if the designated constraints aren't met. +type FilterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterConfigMultiError) AllErrors() []error { return m } + +// FilterConfigValidationError is the validation error returned by +// FilterConfig.Validate if the designated constraints aren't met. +type FilterConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FilterConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FilterConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FilterConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FilterConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FilterConfigValidationError) ErrorName() string { return "FilterConfigValidationError" } + +// Error satisfies the builtin error interface +func (e FilterConfigValidationError) 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 %sFilterConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FilterConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FilterConfigValidationError{} + +// Validate checks the field values on FilterObject 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 *FilterObject) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterObject 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 FilterObjectMultiError, or +// nil if none found. +func (m *FilterObject) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterObject) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for RequestMessageCount + + // no validation rules for ResponseMessageCount + + if len(errors) > 0 { + return FilterObjectMultiError(errors) + } + return nil +} + +// FilterObjectMultiError is an error wrapping multiple validation errors +// returned by FilterObject.ValidateAll() if the designated constraints aren't met. +type FilterObjectMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterObjectMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterObjectMultiError) AllErrors() []error { return m } + +// FilterObjectValidationError is the validation error returned by +// FilterObject.Validate if the designated constraints aren't met. +type FilterObjectValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FilterObjectValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FilterObjectValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FilterObjectValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FilterObjectValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FilterObjectValidationError) ErrorName() string { return "FilterObjectValidationError" } + +// Error satisfies the builtin error interface +func (e FilterObjectValidationError) 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 %sFilterObject.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FilterObjectValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FilterObjectValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_web/v3/grpc_web.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_web/v3/grpc_web.pb.go new file mode 100644 index 0000000000000..af99e4dfd243f --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_web/v3/grpc_web.pb.go @@ -0,0 +1,160 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/grpc_web/v3/grpc_web.proto + +package grpc_webv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// gRPC Web filter config. +type GrpcWeb struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GrpcWeb) Reset() { + *x = GrpcWeb{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GrpcWeb) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GrpcWeb) ProtoMessage() {} + +func (x *GrpcWeb) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GrpcWeb.ProtoReflect.Descriptor instead. +func (*GrpcWeb) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_rawDesc = []byte{ + 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x67, 0x72, 0x70, 0x63, 0x5f, 0x77, 0x65, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x70, 0x63, + 0x5f, 0x77, 0x65, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x77, + 0x65, 0x62, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, + 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3e, 0x0a, 0x07, 0x47, 0x72, 0x70, 0x63, 0x57, + 0x65, 0x62, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x77, 0x65, 0x62, 0x2e, 0x76, 0x32, 0x2e, + 0x47, 0x72, 0x70, 0x63, 0x57, 0x65, 0x62, 0x42, 0xae, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x77, 0x65, 0x62, + 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x47, 0x72, 0x70, 0x63, 0x57, 0x65, 0x62, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x77, + 0x65, 0x62, 0x2f, 0x76, 0x33, 0x3b, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x77, 0x65, 0x62, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_rawDescData = file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_rawDesc +) + +func file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_rawDescData +} + +var file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_goTypes = []interface{}{ + (*GrpcWeb)(nil), // 0: envoy.extensions.filters.http.grpc_web.v3.GrpcWeb +} +var file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_init() } +func file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_init() { + if File_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GrpcWeb); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto = out.File + file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_rawDesc = nil + file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_goTypes = nil + file_envoy_extensions_filters_http_grpc_web_v3_grpc_web_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_web/v3/grpc_web.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_web/v3/grpc_web.pb.validate.go new file mode 100644 index 0000000000000..09cce9b0a53d8 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_web/v3/grpc_web.pb.validate.go @@ -0,0 +1,133 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/grpc_web/v3/grpc_web.proto + +package grpc_webv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on GrpcWeb 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 *GrpcWeb) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcWeb 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 GrpcWebMultiError, or nil if none found. +func (m *GrpcWeb) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcWeb) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return GrpcWebMultiError(errors) + } + return nil +} + +// GrpcWebMultiError is an error wrapping multiple validation errors returned +// by GrpcWeb.ValidateAll() if the designated constraints aren't met. +type GrpcWebMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcWebMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcWebMultiError) AllErrors() []error { return m } + +// GrpcWebValidationError is the validation error returned by GrpcWeb.Validate +// if the designated constraints aren't met. +type GrpcWebValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GrpcWebValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GrpcWebValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GrpcWebValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GrpcWebValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GrpcWebValidationError) ErrorName() string { return "GrpcWebValidationError" } + +// Error satisfies the builtin error interface +func (e GrpcWebValidationError) 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 %sGrpcWeb.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GrpcWebValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GrpcWebValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/gzip/v3/gzip.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/gzip/v3/gzip.pb.go new file mode 100644 index 0000000000000..0ee7e91e4de39 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/gzip/v3/gzip.pb.go @@ -0,0 +1,458 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/gzip/v3/gzip.proto + +package gzipv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/extensions/filters/http/compressor/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Gzip_CompressionStrategy int32 + +const ( + Gzip_DEFAULT Gzip_CompressionStrategy = 0 + Gzip_FILTERED Gzip_CompressionStrategy = 1 + Gzip_HUFFMAN Gzip_CompressionStrategy = 2 + Gzip_RLE Gzip_CompressionStrategy = 3 +) + +// Enum value maps for Gzip_CompressionStrategy. +var ( + Gzip_CompressionStrategy_name = map[int32]string{ + 0: "DEFAULT", + 1: "FILTERED", + 2: "HUFFMAN", + 3: "RLE", + } + Gzip_CompressionStrategy_value = map[string]int32{ + "DEFAULT": 0, + "FILTERED": 1, + "HUFFMAN": 2, + "RLE": 3, + } +) + +func (x Gzip_CompressionStrategy) Enum() *Gzip_CompressionStrategy { + p := new(Gzip_CompressionStrategy) + *p = x + return p +} + +func (x Gzip_CompressionStrategy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Gzip_CompressionStrategy) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_http_gzip_v3_gzip_proto_enumTypes[0].Descriptor() +} + +func (Gzip_CompressionStrategy) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_http_gzip_v3_gzip_proto_enumTypes[0] +} + +func (x Gzip_CompressionStrategy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Gzip_CompressionStrategy.Descriptor instead. +func (Gzip_CompressionStrategy) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_gzip_v3_gzip_proto_rawDescGZIP(), []int{0, 0} +} + +type Gzip_CompressionLevel_Enum int32 + +const ( + Gzip_CompressionLevel_DEFAULT Gzip_CompressionLevel_Enum = 0 + Gzip_CompressionLevel_BEST Gzip_CompressionLevel_Enum = 1 + Gzip_CompressionLevel_SPEED Gzip_CompressionLevel_Enum = 2 +) + +// Enum value maps for Gzip_CompressionLevel_Enum. +var ( + Gzip_CompressionLevel_Enum_name = map[int32]string{ + 0: "DEFAULT", + 1: "BEST", + 2: "SPEED", + } + Gzip_CompressionLevel_Enum_value = map[string]int32{ + "DEFAULT": 0, + "BEST": 1, + "SPEED": 2, + } +) + +func (x Gzip_CompressionLevel_Enum) Enum() *Gzip_CompressionLevel_Enum { + p := new(Gzip_CompressionLevel_Enum) + *p = x + return p +} + +func (x Gzip_CompressionLevel_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Gzip_CompressionLevel_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_http_gzip_v3_gzip_proto_enumTypes[1].Descriptor() +} + +func (Gzip_CompressionLevel_Enum) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_http_gzip_v3_gzip_proto_enumTypes[1] +} + +func (x Gzip_CompressionLevel_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Gzip_CompressionLevel_Enum.Descriptor instead. +func (Gzip_CompressionLevel_Enum) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_gzip_v3_gzip_proto_rawDescGZIP(), []int{0, 0, 0} +} + +// [#next-free-field: 12] +type Gzip struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Value from 1 to 9 that controls the amount of internal memory used by zlib. Higher values + // use more memory, but are faster and produce better compression results. The default value is 5. + MemoryLevel *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=memory_level,json=memoryLevel,proto3" json:"memory_level,omitempty"` + // A value used for selecting the zlib compression level. This setting will affect speed and + // amount of compression applied to the content. "BEST" provides higher compression at the cost of + // higher latency, "SPEED" provides lower compression with minimum impact on response time. + // "DEFAULT" provides an optimal result between speed and compression. This field will be set to + // "DEFAULT" if not specified. + CompressionLevel Gzip_CompressionLevel_Enum `protobuf:"varint,3,opt,name=compression_level,json=compressionLevel,proto3,enum=envoy.extensions.filters.http.gzip.v3.Gzip_CompressionLevel_Enum" json:"compression_level,omitempty"` + // A value used for selecting the zlib compression strategy which is directly related to the + // characteristics of the content. Most of the time "DEFAULT" will be the best choice, though + // there are situations which changing this parameter might produce better results. For example, + // run-length encoding (RLE) is typically used when the content is known for having sequences + // which same data occurs many consecutive times. For more information about each strategy, please + // refer to zlib manual. + CompressionStrategy Gzip_CompressionStrategy `protobuf:"varint,4,opt,name=compression_strategy,json=compressionStrategy,proto3,enum=envoy.extensions.filters.http.gzip.v3.Gzip_CompressionStrategy" json:"compression_strategy,omitempty"` + // Value from 9 to 15 that represents the base two logarithmic of the compressor's window size. + // Larger window results in better compression at the expense of memory usage. The default is 12 + // which will produce a 4096 bytes window. For more details about this parameter, please refer to + // zlib manual > deflateInit2. + WindowBits *wrapperspb.UInt32Value `protobuf:"bytes,9,opt,name=window_bits,json=windowBits,proto3" json:"window_bits,omitempty"` + // Set of configuration parameters common for all compression filters. You can define + // “content_length“, “content_type“ and other parameters in this field. + Compressor *v3.Compressor `protobuf:"bytes,10,opt,name=compressor,proto3" json:"compressor,omitempty"` + // Value for Zlib's next output buffer. If not set, defaults to 4096. + // See https://www.zlib.net/manual.html for more details. Also see + // https://github.com/envoyproxy/envoy/issues/8448 for context on this filter's performance. + ChunkSize *wrapperspb.UInt32Value `protobuf:"bytes,11,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"` +} + +func (x *Gzip) Reset() { + *x = Gzip{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_gzip_v3_gzip_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Gzip) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Gzip) ProtoMessage() {} + +func (x *Gzip) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_gzip_v3_gzip_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Gzip.ProtoReflect.Descriptor instead. +func (*Gzip) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_gzip_v3_gzip_proto_rawDescGZIP(), []int{0} +} + +func (x *Gzip) GetMemoryLevel() *wrapperspb.UInt32Value { + if x != nil { + return x.MemoryLevel + } + return nil +} + +func (x *Gzip) GetCompressionLevel() Gzip_CompressionLevel_Enum { + if x != nil { + return x.CompressionLevel + } + return Gzip_CompressionLevel_DEFAULT +} + +func (x *Gzip) GetCompressionStrategy() Gzip_CompressionStrategy { + if x != nil { + return x.CompressionStrategy + } + return Gzip_DEFAULT +} + +func (x *Gzip) GetWindowBits() *wrapperspb.UInt32Value { + if x != nil { + return x.WindowBits + } + return nil +} + +func (x *Gzip) GetCompressor() *v3.Compressor { + if x != nil { + return x.Compressor + } + return nil +} + +func (x *Gzip) GetChunkSize() *wrapperspb.UInt32Value { + if x != nil { + return x.ChunkSize + } + return nil +} + +type Gzip_CompressionLevel struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Gzip_CompressionLevel) Reset() { + *x = Gzip_CompressionLevel{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_gzip_v3_gzip_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Gzip_CompressionLevel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Gzip_CompressionLevel) ProtoMessage() {} + +func (x *Gzip_CompressionLevel) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_gzip_v3_gzip_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Gzip_CompressionLevel.ProtoReflect.Descriptor instead. +func (*Gzip_CompressionLevel) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_gzip_v3_gzip_proto_rawDescGZIP(), []int{0, 0} +} + +var File_envoy_extensions_filters_http_gzip_v3_gzip_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_gzip_v3_gzip_proto_rawDesc = []byte{ + 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x67, 0x7a, 0x69, 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x76, 0x33, 0x1a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x69, 0x6e, 0x67, 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, 0x98, 0x07, 0x0a, 0x04, 0x47, 0x7a, 0x69, 0x70, 0x12, 0x4a, 0x0a, 0x0c, 0x6d, + 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, + 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0x09, 0x28, 0x01, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x6f, + 0x72, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x78, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x7a, 0x69, 0x70, 0x2e, + 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, + 0x6c, 0x12, 0x7c, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x7a, 0x69, 0x70, 0x2e, 0x43, 0x6f, 0x6d, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x63, 0x6f, 0x6d, 0x70, + 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, + 0x48, 0x0a, 0x0b, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x5f, 0x62, 0x69, 0x74, 0x73, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0x0f, 0x28, 0x09, 0x52, 0x0a, 0x77, + 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x42, 0x69, 0x74, 0x73, 0x12, 0x57, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x63, 0x6f, + 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x70, + 0x72, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, + 0x6f, 0x72, 0x12, 0x49, 0x0a, 0x0a, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x2a, 0x07, 0x18, 0x80, 0x80, 0x04, 0x28, + 0x80, 0x20, 0x52, 0x09, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x1a, 0x7b, 0x0a, + 0x10, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, + 0x6c, 0x22, 0x28, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, + 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x45, 0x53, 0x54, 0x10, 0x01, + 0x12, 0x09, 0x0a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x10, 0x02, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, + 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x7a, 0x69, + 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x7a, 0x69, 0x70, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x46, 0x0a, 0x13, 0x43, 0x6f, + 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, + 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x0c, + 0x0a, 0x08, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, + 0x48, 0x55, 0x46, 0x46, 0x4d, 0x41, 0x4e, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x52, 0x4c, 0x45, + 0x10, 0x03, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x67, 0x7a, 0x69, 0x70, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x7a, 0x69, 0x70, + 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x07, + 0x10, 0x08, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x52, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x6f, 0x6e, 0x5f, 0x65, 0x74, 0x61, 0x67, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x1d, + 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x5f, 0x65, 0x6e, + 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x9f, 0x01, + 0x0a, 0x33, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x7a, + 0x69, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x47, 0x7a, 0x69, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x67, 0x7a, 0x69, 0x70, 0x2f, 0x76, 0x33, + 0x3b, 0x67, 0x7a, 0x69, 0x70, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_gzip_v3_gzip_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_gzip_v3_gzip_proto_rawDescData = file_envoy_extensions_filters_http_gzip_v3_gzip_proto_rawDesc +) + +func file_envoy_extensions_filters_http_gzip_v3_gzip_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_gzip_v3_gzip_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_gzip_v3_gzip_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_gzip_v3_gzip_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_gzip_v3_gzip_proto_rawDescData +} + +var file_envoy_extensions_filters_http_gzip_v3_gzip_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_envoy_extensions_filters_http_gzip_v3_gzip_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_filters_http_gzip_v3_gzip_proto_goTypes = []interface{}{ + (Gzip_CompressionStrategy)(0), // 0: envoy.extensions.filters.http.gzip.v3.Gzip.CompressionStrategy + (Gzip_CompressionLevel_Enum)(0), // 1: envoy.extensions.filters.http.gzip.v3.Gzip.CompressionLevel.Enum + (*Gzip)(nil), // 2: envoy.extensions.filters.http.gzip.v3.Gzip + (*Gzip_CompressionLevel)(nil), // 3: envoy.extensions.filters.http.gzip.v3.Gzip.CompressionLevel + (*wrapperspb.UInt32Value)(nil), // 4: google.protobuf.UInt32Value + (*v3.Compressor)(nil), // 5: envoy.extensions.filters.http.compressor.v3.Compressor +} +var file_envoy_extensions_filters_http_gzip_v3_gzip_proto_depIdxs = []int32{ + 4, // 0: envoy.extensions.filters.http.gzip.v3.Gzip.memory_level:type_name -> google.protobuf.UInt32Value + 1, // 1: envoy.extensions.filters.http.gzip.v3.Gzip.compression_level:type_name -> envoy.extensions.filters.http.gzip.v3.Gzip.CompressionLevel.Enum + 0, // 2: envoy.extensions.filters.http.gzip.v3.Gzip.compression_strategy:type_name -> envoy.extensions.filters.http.gzip.v3.Gzip.CompressionStrategy + 4, // 3: envoy.extensions.filters.http.gzip.v3.Gzip.window_bits:type_name -> google.protobuf.UInt32Value + 5, // 4: envoy.extensions.filters.http.gzip.v3.Gzip.compressor:type_name -> envoy.extensions.filters.http.compressor.v3.Compressor + 4, // 5: envoy.extensions.filters.http.gzip.v3.Gzip.chunk_size:type_name -> google.protobuf.UInt32Value + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_gzip_v3_gzip_proto_init() } +func file_envoy_extensions_filters_http_gzip_v3_gzip_proto_init() { + if File_envoy_extensions_filters_http_gzip_v3_gzip_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_gzip_v3_gzip_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Gzip); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_gzip_v3_gzip_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Gzip_CompressionLevel); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_gzip_v3_gzip_proto_rawDesc, + NumEnums: 2, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_gzip_v3_gzip_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_gzip_v3_gzip_proto_depIdxs, + EnumInfos: file_envoy_extensions_filters_http_gzip_v3_gzip_proto_enumTypes, + MessageInfos: file_envoy_extensions_filters_http_gzip_v3_gzip_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_gzip_v3_gzip_proto = out.File + file_envoy_extensions_filters_http_gzip_v3_gzip_proto_rawDesc = nil + file_envoy_extensions_filters_http_gzip_v3_gzip_proto_goTypes = nil + file_envoy_extensions_filters_http_gzip_v3_gzip_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/gzip/v3/gzip.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/gzip/v3/gzip.pb.validate.go new file mode 100644 index 0000000000000..313b60e6d416a --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/gzip/v3/gzip.pb.validate.go @@ -0,0 +1,330 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/gzip/v3/gzip.proto + +package gzipv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Gzip 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 *Gzip) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Gzip 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 GzipMultiError, or nil if none found. +func (m *Gzip) ValidateAll() error { + return m.validate(true) +} + +func (m *Gzip) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if wrapper := m.GetMemoryLevel(); wrapper != nil { + + if val := wrapper.GetValue(); val < 1 || val > 9 { + err := GzipValidationError{ + field: "MemoryLevel", + reason: "value must be inside range [1, 9]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if _, ok := Gzip_CompressionLevel_Enum_name[int32(m.GetCompressionLevel())]; !ok { + err := GzipValidationError{ + field: "CompressionLevel", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := Gzip_CompressionStrategy_name[int32(m.GetCompressionStrategy())]; !ok { + err := GzipValidationError{ + field: "CompressionStrategy", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if wrapper := m.GetWindowBits(); wrapper != nil { + + if val := wrapper.GetValue(); val < 9 || val > 15 { + err := GzipValidationError{ + field: "WindowBits", + reason: "value must be inside range [9, 15]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if all { + switch v := interface{}(m.GetCompressor()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GzipValidationError{ + field: "Compressor", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GzipValidationError{ + field: "Compressor", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCompressor()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GzipValidationError{ + field: "Compressor", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if wrapper := m.GetChunkSize(); wrapper != nil { + + if val := wrapper.GetValue(); val < 4096 || val > 65536 { + err := GzipValidationError{ + field: "ChunkSize", + reason: "value must be inside range [4096, 65536]", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if len(errors) > 0 { + return GzipMultiError(errors) + } + return nil +} + +// GzipMultiError is an error wrapping multiple validation errors returned by +// Gzip.ValidateAll() if the designated constraints aren't met. +type GzipMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GzipMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GzipMultiError) AllErrors() []error { return m } + +// GzipValidationError is the validation error returned by Gzip.Validate if the +// designated constraints aren't met. +type GzipValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GzipValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GzipValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GzipValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GzipValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GzipValidationError) ErrorName() string { return "GzipValidationError" } + +// Error satisfies the builtin error interface +func (e GzipValidationError) 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 %sGzip.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GzipValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GzipValidationError{} + +// Validate checks the field values on Gzip_CompressionLevel 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 *Gzip_CompressionLevel) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Gzip_CompressionLevel 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 +// Gzip_CompressionLevelMultiError, or nil if none found. +func (m *Gzip_CompressionLevel) ValidateAll() error { + return m.validate(true) +} + +func (m *Gzip_CompressionLevel) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return Gzip_CompressionLevelMultiError(errors) + } + return nil +} + +// Gzip_CompressionLevelMultiError is an error wrapping multiple validation +// errors returned by Gzip_CompressionLevel.ValidateAll() if the designated +// constraints aren't met. +type Gzip_CompressionLevelMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Gzip_CompressionLevelMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Gzip_CompressionLevelMultiError) AllErrors() []error { return m } + +// Gzip_CompressionLevelValidationError is the validation error returned by +// Gzip_CompressionLevel.Validate if the designated constraints aren't met. +type Gzip_CompressionLevelValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Gzip_CompressionLevelValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Gzip_CompressionLevelValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Gzip_CompressionLevelValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Gzip_CompressionLevelValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Gzip_CompressionLevelValidationError) ErrorName() string { + return "Gzip_CompressionLevelValidationError" +} + +// Error satisfies the builtin error interface +func (e Gzip_CompressionLevelValidationError) 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 %sGzip_CompressionLevel.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Gzip_CompressionLevelValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Gzip_CompressionLevelValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.pb.go new file mode 100644 index 0000000000000..b19673213615e --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.pb.go @@ -0,0 +1,619 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.proto + +package header_to_metadatav3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/type/matcher/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Config_ValueType int32 + +const ( + Config_STRING Config_ValueType = 0 + Config_NUMBER Config_ValueType = 1 + // The value is a serialized `protobuf.Value + // `_. + Config_PROTOBUF_VALUE Config_ValueType = 2 +) + +// Enum value maps for Config_ValueType. +var ( + Config_ValueType_name = map[int32]string{ + 0: "STRING", + 1: "NUMBER", + 2: "PROTOBUF_VALUE", + } + Config_ValueType_value = map[string]int32{ + "STRING": 0, + "NUMBER": 1, + "PROTOBUF_VALUE": 2, + } +) + +func (x Config_ValueType) Enum() *Config_ValueType { + p := new(Config_ValueType) + *p = x + return p +} + +func (x Config_ValueType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Config_ValueType) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_enumTypes[0].Descriptor() +} + +func (Config_ValueType) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_enumTypes[0] +} + +func (x Config_ValueType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Config_ValueType.Descriptor instead. +func (Config_ValueType) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_rawDescGZIP(), []int{0, 0} +} + +// ValueEncode defines the encoding algorithm. +type Config_ValueEncode int32 + +const ( + // The value is not encoded. + Config_NONE Config_ValueEncode = 0 + // The value is encoded in `Base64 `_. + // Note: this is mostly used for STRING and PROTOBUF_VALUE to escape the + // non-ASCII characters in the header. + Config_BASE64 Config_ValueEncode = 1 +) + +// Enum value maps for Config_ValueEncode. +var ( + Config_ValueEncode_name = map[int32]string{ + 0: "NONE", + 1: "BASE64", + } + Config_ValueEncode_value = map[string]int32{ + "NONE": 0, + "BASE64": 1, + } +) + +func (x Config_ValueEncode) Enum() *Config_ValueEncode { + p := new(Config_ValueEncode) + *p = x + return p +} + +func (x Config_ValueEncode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Config_ValueEncode) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_enumTypes[1].Descriptor() +} + +func (Config_ValueEncode) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_enumTypes[1] +} + +func (x Config_ValueEncode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Config_ValueEncode.Descriptor instead. +func (Config_ValueEncode) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_rawDescGZIP(), []int{0, 1} +} + +type Config struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of rules to apply to requests. + RequestRules []*Config_Rule `protobuf:"bytes,1,rep,name=request_rules,json=requestRules,proto3" json:"request_rules,omitempty"` + // The list of rules to apply to responses. + ResponseRules []*Config_Rule `protobuf:"bytes,2,rep,name=response_rules,json=responseRules,proto3" json:"response_rules,omitempty"` +} + +func (x *Config) Reset() { + *x = Config{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config) ProtoMessage() {} + +func (x *Config) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Config.ProtoReflect.Descriptor instead. +func (*Config) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_rawDescGZIP(), []int{0} +} + +func (x *Config) GetRequestRules() []*Config_Rule { + if x != nil { + return x.RequestRules + } + return nil +} + +func (x *Config) GetResponseRules() []*Config_Rule { + if x != nil { + return x.ResponseRules + } + return nil +} + +// [#next-free-field: 7] +type Config_KeyValuePair struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The namespace — if this is empty, the filter's namespace will be used. + MetadataNamespace string `protobuf:"bytes,1,opt,name=metadata_namespace,json=metadataNamespace,proto3" json:"metadata_namespace,omitempty"` + // The key to use within the namespace. + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + // The value to pair with the given key. + // + // When used for a + // :ref:`on_header_present ` + // case, if value is non-empty it'll be used instead of the header value. If both are empty, no metadata is added. + // + // When used for a :ref:`on_header_missing ` + // case, a non-empty value must be provided otherwise no metadata is added. + Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + // If present, the header's value will be matched and substituted with this. If there is no match or substitution, the header value + // is used as-is. + // + // This is only used for :ref:`on_header_present `. + // + // Note: if the “value“ field is non-empty this field should be empty. + RegexValueRewrite *v3.RegexMatchAndSubstitute `protobuf:"bytes,6,opt,name=regex_value_rewrite,json=regexValueRewrite,proto3" json:"regex_value_rewrite,omitempty"` + // The value's type — defaults to string. + Type Config_ValueType `protobuf:"varint,4,opt,name=type,proto3,enum=envoy.extensions.filters.http.header_to_metadata.v3.Config_ValueType" json:"type,omitempty"` + // How is the value encoded, default is NONE (not encoded). + // The value will be decoded accordingly before storing to metadata. + Encode Config_ValueEncode `protobuf:"varint,5,opt,name=encode,proto3,enum=envoy.extensions.filters.http.header_to_metadata.v3.Config_ValueEncode" json:"encode,omitempty"` +} + +func (x *Config_KeyValuePair) Reset() { + *x = Config_KeyValuePair{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Config_KeyValuePair) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config_KeyValuePair) ProtoMessage() {} + +func (x *Config_KeyValuePair) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Config_KeyValuePair.ProtoReflect.Descriptor instead. +func (*Config_KeyValuePair) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Config_KeyValuePair) GetMetadataNamespace() string { + if x != nil { + return x.MetadataNamespace + } + return "" +} + +func (x *Config_KeyValuePair) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *Config_KeyValuePair) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *Config_KeyValuePair) GetRegexValueRewrite() *v3.RegexMatchAndSubstitute { + if x != nil { + return x.RegexValueRewrite + } + return nil +} + +func (x *Config_KeyValuePair) GetType() Config_ValueType { + if x != nil { + return x.Type + } + return Config_STRING +} + +func (x *Config_KeyValuePair) GetEncode() Config_ValueEncode { + if x != nil { + return x.Encode + } + return Config_NONE +} + +// A Rule defines what metadata to apply when a header is present or missing. +// [#next-free-field: 6] +type Config_Rule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies that a match will be performed on the value of a header or a cookie. + // + // The header to be extracted. + Header string `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + // The cookie to be extracted. + Cookie string `protobuf:"bytes,5,opt,name=cookie,proto3" json:"cookie,omitempty"` + // If the header or cookie is present, apply this metadata KeyValuePair. + // + // If the value in the KeyValuePair is non-empty, it'll be used instead + // of the header or cookie value. + OnHeaderPresent *Config_KeyValuePair `protobuf:"bytes,2,opt,name=on_header_present,json=onHeaderPresent,proto3" json:"on_header_present,omitempty"` + // If the header or cookie is not present, apply this metadata KeyValuePair. + // + // The value in the KeyValuePair must be set, since it'll be used in lieu + // of the missing header or cookie value. + OnHeaderMissing *Config_KeyValuePair `protobuf:"bytes,3,opt,name=on_header_missing,json=onHeaderMissing,proto3" json:"on_header_missing,omitempty"` + // Whether or not to remove the header after a rule is applied. + // + // This prevents headers from leaking. + // This field is not supported in case of a cookie. + Remove bool `protobuf:"varint,4,opt,name=remove,proto3" json:"remove,omitempty"` +} + +func (x *Config_Rule) Reset() { + *x = Config_Rule{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Config_Rule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config_Rule) ProtoMessage() {} + +func (x *Config_Rule) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Config_Rule.ProtoReflect.Descriptor instead. +func (*Config_Rule) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *Config_Rule) GetHeader() string { + if x != nil { + return x.Header + } + return "" +} + +func (x *Config_Rule) GetCookie() string { + if x != nil { + return x.Cookie + } + return "" +} + +func (x *Config_Rule) GetOnHeaderPresent() *Config_KeyValuePair { + if x != nil { + return x.OnHeaderPresent + } + return nil +} + +func (x *Config_Rule) GetOnHeaderMissing() *Config_KeyValuePair { + if x != nil { + return x.OnHeaderMissing + } + return nil +} + +func (x *Config_Rule) GetRemove() bool { + if x != nil { + return x.Remove + } + return false +} + +var File_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_rawDesc = []byte{ + 0x0a, 0x4c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x33, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x76, 0x33, 0x1a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, + 0x6e, 0x67, 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, 0x80, 0x0b, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x65, 0x0a, 0x0d, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x75, + 0x6c, 0x65, 0x73, 0x12, 0x67, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, + 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0d, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x1a, 0x87, 0x04, 0x0a, + 0x0c, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x12, 0x2d, 0x0a, + 0x12, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x19, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x12, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x0c, 0x12, 0x0a, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x72, 0x0a, 0x13, 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x42, 0x12, + 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x0c, 0x12, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x52, 0x11, 0x72, 0x65, 0x67, 0x65, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, + 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x63, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x45, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x5f, 0x0a, 0x06, 0x65, 0x6e, + 0x63, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x47, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, + 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x63, + 0x6f, 0x64, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x3a, 0x49, 0x9a, 0xc5, 0x88, + 0x1e, 0x44, 0x0a, 0x42, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x1a, 0xff, 0x03, 0x0a, 0x04, 0x52, 0x75, 0x6c, 0x65, 0x12, + 0x42, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x2a, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0xf2, 0x98, 0xfe, 0x8f, + 0x05, 0x19, 0x12, 0x17, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6f, 0x6b, 0x69, + 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x06, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x2a, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, + 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x19, 0x12, 0x17, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x63, + 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, + 0x06, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x11, 0x6f, 0x6e, 0x5f, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x42, 0x12, 0xf2, + 0x98, 0xfe, 0x8f, 0x05, 0x0c, 0x0a, 0x0a, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, + 0x74, 0x52, 0x0f, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, 0x65, 0x73, 0x65, + 0x6e, 0x74, 0x12, 0x88, 0x01, 0x0a, 0x11, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4b, 0x65, 0x79, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x42, 0x12, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x0c, + 0x0a, 0x0a, 0x6f, 0x6e, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x6f, 0x6e, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x0a, + 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x3a, 0x41, 0x9a, 0xc5, 0x88, 0x1e, 0x3c, 0x0a, 0x3a, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, + 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x22, 0x37, 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, + 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x01, 0x12, 0x12, 0x0a, + 0x0e, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x42, 0x55, 0x46, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, + 0x02, 0x22, 0x23, 0x0a, 0x0b, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, + 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x41, + 0x53, 0x45, 0x36, 0x34, 0x10, 0x01, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, 0x37, 0x0a, 0x35, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, + 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x42, 0xd5, 0x01, 0x0a, 0x41, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x42, 0x15, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x54, 0x6f, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x6f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, 0x3b, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_rawDescData = file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_rawDesc +) + +func file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_rawDescData +} + +var file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_goTypes = []interface{}{ + (Config_ValueType)(0), // 0: envoy.extensions.filters.http.header_to_metadata.v3.Config.ValueType + (Config_ValueEncode)(0), // 1: envoy.extensions.filters.http.header_to_metadata.v3.Config.ValueEncode + (*Config)(nil), // 2: envoy.extensions.filters.http.header_to_metadata.v3.Config + (*Config_KeyValuePair)(nil), // 3: envoy.extensions.filters.http.header_to_metadata.v3.Config.KeyValuePair + (*Config_Rule)(nil), // 4: envoy.extensions.filters.http.header_to_metadata.v3.Config.Rule + (*v3.RegexMatchAndSubstitute)(nil), // 5: envoy.type.matcher.v3.RegexMatchAndSubstitute +} +var file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_depIdxs = []int32{ + 4, // 0: envoy.extensions.filters.http.header_to_metadata.v3.Config.request_rules:type_name -> envoy.extensions.filters.http.header_to_metadata.v3.Config.Rule + 4, // 1: envoy.extensions.filters.http.header_to_metadata.v3.Config.response_rules:type_name -> envoy.extensions.filters.http.header_to_metadata.v3.Config.Rule + 5, // 2: envoy.extensions.filters.http.header_to_metadata.v3.Config.KeyValuePair.regex_value_rewrite:type_name -> envoy.type.matcher.v3.RegexMatchAndSubstitute + 0, // 3: envoy.extensions.filters.http.header_to_metadata.v3.Config.KeyValuePair.type:type_name -> envoy.extensions.filters.http.header_to_metadata.v3.Config.ValueType + 1, // 4: envoy.extensions.filters.http.header_to_metadata.v3.Config.KeyValuePair.encode:type_name -> envoy.extensions.filters.http.header_to_metadata.v3.Config.ValueEncode + 3, // 5: envoy.extensions.filters.http.header_to_metadata.v3.Config.Rule.on_header_present:type_name -> envoy.extensions.filters.http.header_to_metadata.v3.Config.KeyValuePair + 3, // 6: envoy.extensions.filters.http.header_to_metadata.v3.Config.Rule.on_header_missing:type_name -> envoy.extensions.filters.http.header_to_metadata.v3.Config.KeyValuePair + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_init() } +func file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_init() { + if File_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Config); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Config_KeyValuePair); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Config_Rule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_rawDesc, + NumEnums: 2, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_depIdxs, + EnumInfos: file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_enumTypes, + MessageInfos: file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto = out.File + file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_rawDesc = nil + file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_goTypes = nil + file_envoy_extensions_filters_http_header_to_metadata_v3_header_to_metadata_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.pb.validate.go new file mode 100644 index 0000000000000..4ab3cbc0b041a --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.pb.validate.go @@ -0,0 +1,543 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/header_to_metadata/v3/header_to_metadata.proto + +package header_to_metadatav3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Config 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 *Config) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config 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 ConfigMultiError, or nil if none found. +func (m *Config) ValidateAll() error { + return m.validate(true) +} + +func (m *Config) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetRequestRules() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigValidationError{ + field: fmt.Sprintf("RequestRules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigValidationError{ + field: fmt.Sprintf("RequestRules[%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 ConfigValidationError{ + field: fmt.Sprintf("RequestRules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetResponseRules() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigValidationError{ + field: fmt.Sprintf("ResponseRules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigValidationError{ + field: fmt.Sprintf("ResponseRules[%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 ConfigValidationError{ + field: fmt.Sprintf("ResponseRules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ConfigMultiError(errors) + } + return nil +} + +// ConfigMultiError is an error wrapping multiple validation errors returned by +// Config.ValidateAll() if the designated constraints aren't met. +type ConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigMultiError) AllErrors() []error { return m } + +// ConfigValidationError is the validation error returned by Config.Validate if +// the designated constraints aren't met. +type ConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConfigValidationError) ErrorName() string { return "ConfigValidationError" } + +// Error satisfies the builtin error interface +func (e ConfigValidationError) 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 %sConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConfigValidationError{} + +// Validate checks the field values on Config_KeyValuePair 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 *Config_KeyValuePair) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config_KeyValuePair 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 +// Config_KeyValuePairMultiError, or nil if none found. +func (m *Config_KeyValuePair) ValidateAll() error { + return m.validate(true) +} + +func (m *Config_KeyValuePair) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for MetadataNamespace + + if utf8.RuneCountInString(m.GetKey()) < 1 { + err := Config_KeyValuePairValidationError{ + field: "Key", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for Value + + if all { + switch v := interface{}(m.GetRegexValueRewrite()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Config_KeyValuePairValidationError{ + field: "RegexValueRewrite", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Config_KeyValuePairValidationError{ + field: "RegexValueRewrite", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRegexValueRewrite()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Config_KeyValuePairValidationError{ + field: "RegexValueRewrite", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if _, ok := Config_ValueType_name[int32(m.GetType())]; !ok { + err := Config_KeyValuePairValidationError{ + field: "Type", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for Encode + + if len(errors) > 0 { + return Config_KeyValuePairMultiError(errors) + } + return nil +} + +// Config_KeyValuePairMultiError is an error wrapping multiple validation +// errors returned by Config_KeyValuePair.ValidateAll() if the designated +// constraints aren't met. +type Config_KeyValuePairMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Config_KeyValuePairMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Config_KeyValuePairMultiError) AllErrors() []error { return m } + +// Config_KeyValuePairValidationError is the validation error returned by +// Config_KeyValuePair.Validate if the designated constraints aren't met. +type Config_KeyValuePairValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Config_KeyValuePairValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Config_KeyValuePairValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Config_KeyValuePairValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Config_KeyValuePairValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Config_KeyValuePairValidationError) ErrorName() string { + return "Config_KeyValuePairValidationError" +} + +// Error satisfies the builtin error interface +func (e Config_KeyValuePairValidationError) 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 %sConfig_KeyValuePair.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Config_KeyValuePairValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Config_KeyValuePairValidationError{} + +// Validate checks the field values on Config_Rule 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 *Config_Rule) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config_Rule 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 Config_RuleMultiError, or +// nil if none found. +func (m *Config_Rule) ValidateAll() error { + return m.validate(true) +} + +func (m *Config_Rule) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if !_Config_Rule_Header_Pattern.MatchString(m.GetHeader()) { + err := Config_RuleValidationError{ + field: "Header", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + if !_Config_Rule_Cookie_Pattern.MatchString(m.GetCookie()) { + err := Config_RuleValidationError{ + field: "Cookie", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetOnHeaderPresent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Config_RuleValidationError{ + field: "OnHeaderPresent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Config_RuleValidationError{ + field: "OnHeaderPresent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOnHeaderPresent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Config_RuleValidationError{ + field: "OnHeaderPresent", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetOnHeaderMissing()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Config_RuleValidationError{ + field: "OnHeaderMissing", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Config_RuleValidationError{ + field: "OnHeaderMissing", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOnHeaderMissing()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Config_RuleValidationError{ + field: "OnHeaderMissing", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Remove + + if len(errors) > 0 { + return Config_RuleMultiError(errors) + } + return nil +} + +// Config_RuleMultiError is an error wrapping multiple validation errors +// returned by Config_Rule.ValidateAll() if the designated constraints aren't met. +type Config_RuleMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Config_RuleMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Config_RuleMultiError) AllErrors() []error { return m } + +// Config_RuleValidationError is the validation error returned by +// Config_Rule.Validate if the designated constraints aren't met. +type Config_RuleValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Config_RuleValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Config_RuleValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Config_RuleValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Config_RuleValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Config_RuleValidationError) ErrorName() string { return "Config_RuleValidationError" } + +// Error satisfies the builtin error interface +func (e Config_RuleValidationError) 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 %sConfig_Rule.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Config_RuleValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Config_RuleValidationError{} + +var _Config_Rule_Header_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") + +var _Config_Rule_Cookie_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/health_check/v3/health_check.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/health_check/v3/health_check.pb.go new file mode 100644 index 0000000000000..b6ab474e3fb48 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/health_check/v3/health_check.pb.go @@ -0,0 +1,265 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/health_check/v3/health_check.proto + +package health_checkv3 + +import ( + v31 "github.com/cilium/proxy/go/envoy/config/route/v3" + v3 "github.com/cilium/proxy/go/envoy/type/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// [#next-free-field: 6] +type HealthCheck struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies whether the filter operates in pass through mode or not. + PassThroughMode *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=pass_through_mode,json=passThroughMode,proto3" json:"pass_through_mode,omitempty"` + // If operating in pass through mode, the amount of time in milliseconds + // that the filter should cache the upstream response. + CacheTime *durationpb.Duration `protobuf:"bytes,3,opt,name=cache_time,json=cacheTime,proto3" json:"cache_time,omitempty"` + // If operating in non-pass-through mode, specifies a set of upstream cluster + // names and the minimum percentage of servers in each of those clusters that + // must be healthy or degraded in order for the filter to return a 200. + // + // .. note:: + // + // This value is interpreted as an integer by truncating, so 12.50% will be calculated + // as if it were 12%. + ClusterMinHealthyPercentages map[string]*v3.Percent `protobuf:"bytes,4,rep,name=cluster_min_healthy_percentages,json=clusterMinHealthyPercentages,proto3" json:"cluster_min_healthy_percentages,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Specifies a set of health check request headers to match on. The health check filter will + // check a request’s headers against all the specified headers. To specify the health check + // endpoint, set the “:path“ header to match on. + Headers []*v31.HeaderMatcher `protobuf:"bytes,5,rep,name=headers,proto3" json:"headers,omitempty"` +} + +func (x *HealthCheck) Reset() { + *x = HealthCheck{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_health_check_v3_health_check_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HealthCheck) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HealthCheck) ProtoMessage() {} + +func (x *HealthCheck) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_health_check_v3_health_check_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HealthCheck.ProtoReflect.Descriptor instead. +func (*HealthCheck) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_health_check_v3_health_check_proto_rawDescGZIP(), []int{0} +} + +func (x *HealthCheck) GetPassThroughMode() *wrapperspb.BoolValue { + if x != nil { + return x.PassThroughMode + } + return nil +} + +func (x *HealthCheck) GetCacheTime() *durationpb.Duration { + if x != nil { + return x.CacheTime + } + return nil +} + +func (x *HealthCheck) GetClusterMinHealthyPercentages() map[string]*v3.Percent { + if x != nil { + return x.ClusterMinHealthyPercentages + } + return nil +} + +func (x *HealthCheck) GetHeaders() []*v31.HeaderMatcher { + if x != nil { + return x.Headers + } + return nil +} + +var File_envoy_extensions_filters_http_health_check_v3_health_check_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_health_check_v3_health_check_proto_rawDesc = []byte{ + 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2f, 0x76, 0x33, 0x2f, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x76, + 0x33, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, + 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, + 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0xab, 0x04, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x50, 0x0a, 0x11, 0x70, 0x61, 0x73, 0x73, 0x5f, + 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x70, 0x61, 0x73, 0x73, 0x54, 0x68, + 0x72, 0x6f, 0x75, 0x67, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x61, 0x63, + 0x68, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x63, 0x61, 0x63, 0x68, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0xa3, 0x01, 0x0a, 0x1f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, + 0x6d, 0x69, 0x6e, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x5f, 0x70, 0x65, 0x72, 0x63, + 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x5c, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x4d, 0x69, 0x6e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x50, 0x65, 0x72, 0x63, 0x65, + 0x6e, 0x74, 0x61, 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x1c, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x4d, 0x69, 0x6e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x50, 0x65, + 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x07, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x67, 0x0a, 0x21, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x4d, 0x69, 0x6e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x50, 0x65, + 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4a, + 0x04, 0x08, 0x02, 0x10, 0x03, 0x42, 0xbe, 0x01, 0x0a, 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x63, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2f, 0x76, 0x33, 0x3b, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_health_check_v3_health_check_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_health_check_v3_health_check_proto_rawDescData = file_envoy_extensions_filters_http_health_check_v3_health_check_proto_rawDesc +) + +func file_envoy_extensions_filters_http_health_check_v3_health_check_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_health_check_v3_health_check_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_health_check_v3_health_check_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_health_check_v3_health_check_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_health_check_v3_health_check_proto_rawDescData +} + +var file_envoy_extensions_filters_http_health_check_v3_health_check_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_filters_http_health_check_v3_health_check_proto_goTypes = []interface{}{ + (*HealthCheck)(nil), // 0: envoy.extensions.filters.http.health_check.v3.HealthCheck + nil, // 1: envoy.extensions.filters.http.health_check.v3.HealthCheck.ClusterMinHealthyPercentagesEntry + (*wrapperspb.BoolValue)(nil), // 2: google.protobuf.BoolValue + (*durationpb.Duration)(nil), // 3: google.protobuf.Duration + (*v31.HeaderMatcher)(nil), // 4: envoy.config.route.v3.HeaderMatcher + (*v3.Percent)(nil), // 5: envoy.type.v3.Percent +} +var file_envoy_extensions_filters_http_health_check_v3_health_check_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.filters.http.health_check.v3.HealthCheck.pass_through_mode:type_name -> google.protobuf.BoolValue + 3, // 1: envoy.extensions.filters.http.health_check.v3.HealthCheck.cache_time:type_name -> google.protobuf.Duration + 1, // 2: envoy.extensions.filters.http.health_check.v3.HealthCheck.cluster_min_healthy_percentages:type_name -> envoy.extensions.filters.http.health_check.v3.HealthCheck.ClusterMinHealthyPercentagesEntry + 4, // 3: envoy.extensions.filters.http.health_check.v3.HealthCheck.headers:type_name -> envoy.config.route.v3.HeaderMatcher + 5, // 4: envoy.extensions.filters.http.health_check.v3.HealthCheck.ClusterMinHealthyPercentagesEntry.value:type_name -> envoy.type.v3.Percent + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_health_check_v3_health_check_proto_init() } +func file_envoy_extensions_filters_http_health_check_v3_health_check_proto_init() { + if File_envoy_extensions_filters_http_health_check_v3_health_check_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_health_check_v3_health_check_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HealthCheck); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_health_check_v3_health_check_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_health_check_v3_health_check_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_health_check_v3_health_check_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_health_check_v3_health_check_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_health_check_v3_health_check_proto = out.File + file_envoy_extensions_filters_http_health_check_v3_health_check_proto_rawDesc = nil + file_envoy_extensions_filters_http_health_check_v3_health_check_proto_goTypes = nil + file_envoy_extensions_filters_http_health_check_v3_health_check_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/health_check/v3/health_check.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/health_check/v3/health_check.pb.validate.go new file mode 100644 index 0000000000000..9e66290423458 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/health_check/v3/health_check.pb.validate.go @@ -0,0 +1,283 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/health_check/v3/health_check.proto + +package health_checkv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on HealthCheck 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 *HealthCheck) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheck 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 HealthCheckMultiError, or +// nil if none found. +func (m *HealthCheck) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheck) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetPassThroughMode() == nil { + err := HealthCheckValidationError{ + field: "PassThroughMode", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetPassThroughMode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "PassThroughMode", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "PassThroughMode", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPassThroughMode()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheckValidationError{ + field: "PassThroughMode", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetCacheTime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "CacheTime", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: "CacheTime", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCacheTime()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheckValidationError{ + field: "CacheTime", + reason: "embedded message failed validation", + cause: err, + } + } + } + + { + sorted_keys := make([]string, len(m.GetClusterMinHealthyPercentages())) + i := 0 + for key := range m.GetClusterMinHealthyPercentages() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetClusterMinHealthyPercentages()[key] + _ = val + + // no validation rules for ClusterMinHealthyPercentages[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: fmt.Sprintf("ClusterMinHealthyPercentages[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: fmt.Sprintf("ClusterMinHealthyPercentages[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheckValidationError{ + field: fmt.Sprintf("ClusterMinHealthyPercentages[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + for idx, item := range m.GetHeaders() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckValidationError{ + field: fmt.Sprintf("Headers[%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 HealthCheckValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return HealthCheckMultiError(errors) + } + return nil +} + +// HealthCheckMultiError is an error wrapping multiple validation errors +// returned by HealthCheck.ValidateAll() if the designated constraints aren't met. +type HealthCheckMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckMultiError) AllErrors() []error { return m } + +// HealthCheckValidationError is the validation error returned by +// HealthCheck.Validate if the designated constraints aren't met. +type HealthCheckValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HealthCheckValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HealthCheckValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HealthCheckValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HealthCheckValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HealthCheckValidationError) ErrorName() string { return "HealthCheckValidationError" } + +// Error satisfies the builtin error interface +func (e HealthCheckValidationError) 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 %sHealthCheck.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HealthCheckValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HealthCheckValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.pb.go new file mode 100644 index 0000000000000..500fc9251256f --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.pb.go @@ -0,0 +1,351 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.proto + +package ip_taggingv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// The type of requests the filter should apply to. The supported types +// are internal, external or both. The +// :ref:`x-forwarded-for` header is +// used to determine if a request is internal and will result in +// :ref:`x-envoy-internal` +// being set. The filter defaults to both, and it will apply to all request types. +type IPTagging_RequestType int32 + +const ( + // Both external and internal requests will be tagged. This is the default value. + IPTagging_BOTH IPTagging_RequestType = 0 + // Only internal requests will be tagged. + IPTagging_INTERNAL IPTagging_RequestType = 1 + // Only external requests will be tagged. + IPTagging_EXTERNAL IPTagging_RequestType = 2 +) + +// Enum value maps for IPTagging_RequestType. +var ( + IPTagging_RequestType_name = map[int32]string{ + 0: "BOTH", + 1: "INTERNAL", + 2: "EXTERNAL", + } + IPTagging_RequestType_value = map[string]int32{ + "BOTH": 0, + "INTERNAL": 1, + "EXTERNAL": 2, + } +) + +func (x IPTagging_RequestType) Enum() *IPTagging_RequestType { + p := new(IPTagging_RequestType) + *p = x + return p +} + +func (x IPTagging_RequestType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (IPTagging_RequestType) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_enumTypes[0].Descriptor() +} + +func (IPTagging_RequestType) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_enumTypes[0] +} + +func (x IPTagging_RequestType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use IPTagging_RequestType.Descriptor instead. +func (IPTagging_RequestType) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_rawDescGZIP(), []int{0, 0} +} + +type IPTagging struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The type of request the filter should apply to. + RequestType IPTagging_RequestType `protobuf:"varint,1,opt,name=request_type,json=requestType,proto3,enum=envoy.extensions.filters.http.ip_tagging.v3.IPTagging_RequestType" json:"request_type,omitempty"` + // [#comment:TODO(ccaraman): Extend functionality to load IP tags from file system. + // Tracked by issue https://github.com/envoyproxy/envoy/issues/2695] + // The set of IP tags for the filter. + IpTags []*IPTagging_IPTag `protobuf:"bytes,4,rep,name=ip_tags,json=ipTags,proto3" json:"ip_tags,omitempty"` +} + +func (x *IPTagging) Reset() { + *x = IPTagging{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IPTagging) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IPTagging) ProtoMessage() {} + +func (x *IPTagging) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IPTagging.ProtoReflect.Descriptor instead. +func (*IPTagging) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_rawDescGZIP(), []int{0} +} + +func (x *IPTagging) GetRequestType() IPTagging_RequestType { + if x != nil { + return x.RequestType + } + return IPTagging_BOTH +} + +func (x *IPTagging) GetIpTags() []*IPTagging_IPTag { + if x != nil { + return x.IpTags + } + return nil +} + +// Supplies the IP tag name and the IP address subnets. +type IPTagging_IPTag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies the IP tag name to apply. + IpTagName string `protobuf:"bytes,1,opt,name=ip_tag_name,json=ipTagName,proto3" json:"ip_tag_name,omitempty"` + // A list of IP address subnets that will be tagged with + // ip_tag_name. Both IPv4 and IPv6 are supported. + IpList []*v3.CidrRange `protobuf:"bytes,2,rep,name=ip_list,json=ipList,proto3" json:"ip_list,omitempty"` +} + +func (x *IPTagging_IPTag) Reset() { + *x = IPTagging_IPTag{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IPTagging_IPTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IPTagging_IPTag) ProtoMessage() {} + +func (x *IPTagging_IPTag) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IPTagging_IPTag.ProtoReflect.Descriptor instead. +func (*IPTagging_IPTag) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *IPTagging_IPTag) GetIpTagName() string { + if x != nil { + return x.IpTagName + } + return "" +} + +func (x *IPTagging_IPTag) GetIpList() []*v3.CidrRange { + if x != nil { + return x.IpList + } + return nil +} + +var File_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_rawDesc = []byte{ + 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x69, 0x70, 0x5f, 0x74, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x69, 0x70, + 0x5f, 0x74, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2b, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x69, 0x70, + 0x5f, 0x74, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, + 0x33, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0xee, 0x03, 0x0a, 0x09, 0x49, + 0x50, 0x54, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x6f, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x42, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x69, + 0x70, 0x5f, 0x74, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x50, 0x54, + 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x5f, 0x0a, 0x07, 0x69, 0x70, 0x5f, + 0x74, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x69, 0x70, 0x5f, 0x74, 0x61, + 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x50, 0x54, 0x61, 0x67, 0x67, 0x69, + 0x6e, 0x67, 0x2e, 0x49, 0x50, 0x54, 0x61, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, + 0x08, 0x01, 0x52, 0x06, 0x69, 0x70, 0x54, 0x61, 0x67, 0x73, 0x1a, 0xa0, 0x01, 0x0a, 0x05, 0x49, + 0x50, 0x54, 0x61, 0x67, 0x12, 0x1e, 0x0a, 0x0b, 0x69, 0x70, 0x5f, 0x74, 0x61, 0x67, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x70, 0x54, 0x61, 0x67, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x69, 0x70, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x64, + 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x06, 0x69, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x3a, 0x3d, + 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x69, 0x70, 0x5f, 0x74, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x50, + 0x54, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x49, 0x50, 0x54, 0x61, 0x67, 0x22, 0x33, 0x0a, + 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, + 0x42, 0x4f, 0x54, 0x48, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, + 0x41, 0x4c, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, + 0x10, 0x02, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x69, 0x70, 0x5f, 0x74, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x32, 0x2e, 0x49, 0x50, 0x54, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x42, 0xb6, 0x01, 0x0a, 0x39, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x69, 0x70, 0x5f, 0x74, + 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x49, 0x70, 0x54, 0x61, 0x67, + 0x67, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5f, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0x2f, 0x69, 0x70, 0x5f, 0x74, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x3b, + 0x69, 0x70, 0x5f, 0x74, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_rawDescData = file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_rawDesc +) + +func file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_rawDescData +} + +var file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_goTypes = []interface{}{ + (IPTagging_RequestType)(0), // 0: envoy.extensions.filters.http.ip_tagging.v3.IPTagging.RequestType + (*IPTagging)(nil), // 1: envoy.extensions.filters.http.ip_tagging.v3.IPTagging + (*IPTagging_IPTag)(nil), // 2: envoy.extensions.filters.http.ip_tagging.v3.IPTagging.IPTag + (*v3.CidrRange)(nil), // 3: envoy.config.core.v3.CidrRange +} +var file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_depIdxs = []int32{ + 0, // 0: envoy.extensions.filters.http.ip_tagging.v3.IPTagging.request_type:type_name -> envoy.extensions.filters.http.ip_tagging.v3.IPTagging.RequestType + 2, // 1: envoy.extensions.filters.http.ip_tagging.v3.IPTagging.ip_tags:type_name -> envoy.extensions.filters.http.ip_tagging.v3.IPTagging.IPTag + 3, // 2: envoy.extensions.filters.http.ip_tagging.v3.IPTagging.IPTag.ip_list:type_name -> envoy.config.core.v3.CidrRange + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_init() } +func file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_init() { + if File_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IPTagging); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IPTagging_IPTag); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_rawDesc, + NumEnums: 1, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_depIdxs, + EnumInfos: file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_enumTypes, + MessageInfos: file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto = out.File + file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_rawDesc = nil + file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_goTypes = nil + file_envoy_extensions_filters_http_ip_tagging_v3_ip_tagging_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.pb.validate.go new file mode 100644 index 0000000000000..a1805a4c2dd19 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.pb.validate.go @@ -0,0 +1,325 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/ip_tagging/v3/ip_tagging.proto + +package ip_taggingv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on IPTagging 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 *IPTagging) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on IPTagging 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 IPTaggingMultiError, or nil +// if none found. +func (m *IPTagging) ValidateAll() error { + return m.validate(true) +} + +func (m *IPTagging) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if _, ok := IPTagging_RequestType_name[int32(m.GetRequestType())]; !ok { + err := IPTaggingValidationError{ + field: "RequestType", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(m.GetIpTags()) < 1 { + err := IPTaggingValidationError{ + field: "IpTags", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetIpTags() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, IPTaggingValidationError{ + field: fmt.Sprintf("IpTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, IPTaggingValidationError{ + field: fmt.Sprintf("IpTags[%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 IPTaggingValidationError{ + field: fmt.Sprintf("IpTags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return IPTaggingMultiError(errors) + } + return nil +} + +// IPTaggingMultiError is an error wrapping multiple validation errors returned +// by IPTagging.ValidateAll() if the designated constraints aren't met. +type IPTaggingMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m IPTaggingMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m IPTaggingMultiError) AllErrors() []error { return m } + +// IPTaggingValidationError is the validation error returned by +// IPTagging.Validate if the designated constraints aren't met. +type IPTaggingValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e IPTaggingValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e IPTaggingValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e IPTaggingValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e IPTaggingValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e IPTaggingValidationError) ErrorName() string { return "IPTaggingValidationError" } + +// Error satisfies the builtin error interface +func (e IPTaggingValidationError) 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 %sIPTagging.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = IPTaggingValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = IPTaggingValidationError{} + +// Validate checks the field values on IPTagging_IPTag 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 *IPTagging_IPTag) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on IPTagging_IPTag 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 +// IPTagging_IPTagMultiError, or nil if none found. +func (m *IPTagging_IPTag) ValidateAll() error { + return m.validate(true) +} + +func (m *IPTagging_IPTag) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for IpTagName + + for idx, item := range m.GetIpList() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, IPTagging_IPTagValidationError{ + field: fmt.Sprintf("IpList[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, IPTagging_IPTagValidationError{ + field: fmt.Sprintf("IpList[%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 IPTagging_IPTagValidationError{ + field: fmt.Sprintf("IpList[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return IPTagging_IPTagMultiError(errors) + } + return nil +} + +// IPTagging_IPTagMultiError is an error wrapping multiple validation errors +// returned by IPTagging_IPTag.ValidateAll() if the designated constraints +// aren't met. +type IPTagging_IPTagMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m IPTagging_IPTagMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m IPTagging_IPTagMultiError) AllErrors() []error { return m } + +// IPTagging_IPTagValidationError is the validation error returned by +// IPTagging_IPTag.Validate if the designated constraints aren't met. +type IPTagging_IPTagValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e IPTagging_IPTagValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e IPTagging_IPTagValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e IPTagging_IPTagValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e IPTagging_IPTagValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e IPTagging_IPTagValidationError) ErrorName() string { return "IPTagging_IPTagValidationError" } + +// Error satisfies the builtin error interface +func (e IPTagging_IPTagValidationError) 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 %sIPTagging_IPTag.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = IPTagging_IPTagValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = IPTagging_IPTagValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/jwt_authn/v3/config.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/jwt_authn/v3/config.pb.go new file mode 100644 index 0000000000000..bcc6a8593207d --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/jwt_authn/v3/config.pb.go @@ -0,0 +1,2122 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/jwt_authn/v3/config.proto + +package jwt_authnv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + v31 "github.com/cilium/proxy/go/envoy/config/route/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + emptypb "google.golang.org/protobuf/types/known/emptypb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Please see following for JWT authentication flow: +// +// * `JSON Web Token (JWT) `_ +// * `The OAuth 2.0 Authorization Framework `_ +// * `OpenID Connect `_ +// +// A JwtProvider message specifies how a JSON Web Token (JWT) can be verified. It specifies: +// +// * issuer: the principal that issues the JWT. If specified, it has to match the “iss“ field in JWT. +// * allowed audiences: the ones in the token have to be listed here. +// * how to fetch public key JWKS to verify the token signature. +// * how to extract JWT token in the request. +// * how to pass successfully verified token payload. +// +// Example: +// +// .. code-block:: yaml +// +// issuer: https://example.com +// audiences: +// - bookstore_android.apps.googleusercontent.com +// - bookstore_web.apps.googleusercontent.com +// remote_jwks: +// http_uri: +// uri: https://example.com/.well-known/jwks.json +// cluster: example_jwks_cluster +// timeout: 1s +// cache_duration: +// seconds: 300 +// +// [#next-free-field: 15] +type JwtProvider struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specify the `principal `_ that issued + // the JWT, usually a URL or an email address. + // + // It is optional. If specified, it has to match the “iss“ field in JWT, + // otherwise the JWT “iss“ field is not checked. + // + // Note: “JwtRequirement“ :ref:`allow_missing ` + // and :ref:`allow_missing_or_failed ` + // are implemented differently than other “JwtRequirements“. Hence the usage of this field + // is different as follows if “allow_missing“ or “allow_missing_or_failed“ is used: + // + // * If a JWT has “iss“ field, it needs to be specified by this field in one of “JwtProviders“. + // * If a JWT doesn't have “iss“ field, one of “JwtProviders“ should fill this field empty. + // * Multiple “JwtProviders“ should not have same value in this field. + // + // Example: https://securetoken.google.com + // Example: 1234567-compute@developer.gserviceaccount.com + Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` + // The list of JWT `audiences `_ are + // allowed to access. A JWT containing any of these audiences will be accepted. If not specified, + // will not check audiences in the token. + // + // Example: + // + // .. code-block:: yaml + // + // audiences: + // - bookstore_android.apps.googleusercontent.com + // - bookstore_web.apps.googleusercontent.com + Audiences []string `protobuf:"bytes,2,rep,name=audiences,proto3" json:"audiences,omitempty"` + // `JSON Web Key Set (JWKS) `_ is needed to + // validate signature of a JWT. This field specifies where to fetch JWKS. + // + // Types that are assignable to JwksSourceSpecifier: + // + // *JwtProvider_RemoteJwks + // *JwtProvider_LocalJwks + JwksSourceSpecifier isJwtProvider_JwksSourceSpecifier `protobuf_oneof:"jwks_source_specifier"` + // If false, the JWT is removed in the request after a success verification. If true, the JWT is + // not removed in the request. Default value is false. + // caveat: only works for from_header & has no effect for JWTs extracted through from_params & from_cookies. + Forward bool `protobuf:"varint,5,opt,name=forward,proto3" json:"forward,omitempty"` + // Two fields below define where to extract the JWT from an HTTP request. + // + // If no explicit location is specified, the following default locations are tried in order: + // + // 1. The Authorization header using the `Bearer schema + // `_. Example:: + // + // Authorization: Bearer . + // + // 2. `access_token `_ query parameter. + // + // Multiple JWTs can be verified for a request. Each JWT has to be extracted from the locations + // its provider specified or from the default locations. + // + // Specify the HTTP headers to extract JWT token. For examples, following config: + // + // .. code-block:: yaml + // + // from_headers: + // - name: x-goog-iap-jwt-assertion + // + // can be used to extract token from header:: + // + // ``x-goog-iap-jwt-assertion: ``. + FromHeaders []*JwtHeader `protobuf:"bytes,6,rep,name=from_headers,json=fromHeaders,proto3" json:"from_headers,omitempty"` + // JWT is sent in a query parameter. “jwt_params“ represents the query parameter names. + // + // For example, if config is: + // + // .. code-block:: yaml + // + // from_params: + // - jwt_token + // + // The JWT format in query parameter is:: + // + // /path?jwt_token= + FromParams []string `protobuf:"bytes,7,rep,name=from_params,json=fromParams,proto3" json:"from_params,omitempty"` + // JWT is sent in a cookie. “from_cookies“ represents the cookie names to extract from. + // + // For example, if config is: + // + // .. code-block:: yaml + // + // from_cookies: + // - auth-token + // + // Then JWT will be extracted from “auth-token“ cookie in the request. + FromCookies []string `protobuf:"bytes,13,rep,name=from_cookies,json=fromCookies,proto3" json:"from_cookies,omitempty"` + // This field specifies the header name to forward a successfully verified JWT payload to the + // backend. The forwarded data is:: + // + // base64url_encoded(jwt_payload_in_JSON) + // + // If it is not specified, the payload will not be forwarded. + ForwardPayloadHeader string `protobuf:"bytes,8,opt,name=forward_payload_header,json=forwardPayloadHeader,proto3" json:"forward_payload_header,omitempty"` + // When :ref:`forward_payload_header ` + // is specified, the base64 encoded payload will be added to the headers. + // Normally JWT based64 encode doesn't add padding. If this field is true, + // the header will be padded. + // + // This field is only relevant if :ref:`forward_payload_header ` + // is specified. + PadForwardPayloadHeader bool `protobuf:"varint,11,opt,name=pad_forward_payload_header,json=padForwardPayloadHeader,proto3" json:"pad_forward_payload_header,omitempty"` + // If non empty, successfully verified JWT payloads will be written to StreamInfo DynamicMetadata + // in the format as: “namespace“ is the jwt_authn filter name as ````envoy.filters.http.jwt_authn```` + // The value is the “protobuf::Struct“. The value of this field will be the key for its “fields“ + // and the value is the “protobuf::Struct“ converted from JWT JSON payload. + // + // For example, if payload_in_metadata is “my_payload“: + // + // .. code-block:: yaml + // + // envoy.filters.http.jwt_authn: + // my_payload: + // iss: https://example.com + // sub: test@example.com + // aud: https://example.com + // exp: 1501281058 + PayloadInMetadata string `protobuf:"bytes,9,opt,name=payload_in_metadata,json=payloadInMetadata,proto3" json:"payload_in_metadata,omitempty"` + // If not empty, similar to :ref:`payload_in_metadata `, + // a successfully verified JWT header will be written to :ref:`Dynamic State ` + // as an entry (“protobuf::Struct“) in “envoy.filters.http.jwt_authn“ “namespace“ with the + // value of this field as the key. + // + // For example, if “header_in_metadata“ is “my_header“: + // + // .. code-block:: yaml + // + // envoy.filters.http.jwt_authn: + // my_header: + // alg: JWT + // kid: EF71iSaosbC5C4tC6Syq1Gm647M + // alg: PS256 + // + // When the metadata has “envoy.filters.http.jwt_authn“ entry already (for example if + // :ref:`payload_in_metadata ` + // is not empty), it will be inserted as a new entry in the same “namespace“ as shown below: + // + // .. code-block:: yaml + // + // envoy.filters.http.jwt_authn: + // my_payload: + // iss: https://example.com + // sub: test@example.com + // aud: https://example.com + // exp: 1501281058 + // my_header: + // alg: JWT + // kid: EF71iSaosbC5C4tC6Syq1Gm647M + // alg: PS256 + // + // .. warning:: + // + // Using the same key name for :ref:`header_in_metadata ` + // and :ref:`payload_in_metadata ` + // is not suggested due to potential override of existing entry, while it is not enforced during + // config validation. + HeaderInMetadata string `protobuf:"bytes,14,opt,name=header_in_metadata,json=headerInMetadata,proto3" json:"header_in_metadata,omitempty"` + // Specify the clock skew in seconds when verifying JWT time constraint, + // such as “exp“, and “nbf“. If not specified, default is 60 seconds. + ClockSkewSeconds uint32 `protobuf:"varint,10,opt,name=clock_skew_seconds,json=clockSkewSeconds,proto3" json:"clock_skew_seconds,omitempty"` + // Enables JWT cache, its size is specified by “jwt_cache_size“. + // Only valid JWT tokens are cached. + JwtCacheConfig *JwtCacheConfig `protobuf:"bytes,12,opt,name=jwt_cache_config,json=jwtCacheConfig,proto3" json:"jwt_cache_config,omitempty"` +} + +func (x *JwtProvider) Reset() { + *x = JwtProvider{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JwtProvider) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JwtProvider) ProtoMessage() {} + +func (x *JwtProvider) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JwtProvider.ProtoReflect.Descriptor instead. +func (*JwtProvider) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{0} +} + +func (x *JwtProvider) GetIssuer() string { + if x != nil { + return x.Issuer + } + return "" +} + +func (x *JwtProvider) GetAudiences() []string { + if x != nil { + return x.Audiences + } + return nil +} + +func (m *JwtProvider) GetJwksSourceSpecifier() isJwtProvider_JwksSourceSpecifier { + if m != nil { + return m.JwksSourceSpecifier + } + return nil +} + +func (x *JwtProvider) GetRemoteJwks() *RemoteJwks { + if x, ok := x.GetJwksSourceSpecifier().(*JwtProvider_RemoteJwks); ok { + return x.RemoteJwks + } + return nil +} + +func (x *JwtProvider) GetLocalJwks() *v3.DataSource { + if x, ok := x.GetJwksSourceSpecifier().(*JwtProvider_LocalJwks); ok { + return x.LocalJwks + } + return nil +} + +func (x *JwtProvider) GetForward() bool { + if x != nil { + return x.Forward + } + return false +} + +func (x *JwtProvider) GetFromHeaders() []*JwtHeader { + if x != nil { + return x.FromHeaders + } + return nil +} + +func (x *JwtProvider) GetFromParams() []string { + if x != nil { + return x.FromParams + } + return nil +} + +func (x *JwtProvider) GetFromCookies() []string { + if x != nil { + return x.FromCookies + } + return nil +} + +func (x *JwtProvider) GetForwardPayloadHeader() string { + if x != nil { + return x.ForwardPayloadHeader + } + return "" +} + +func (x *JwtProvider) GetPadForwardPayloadHeader() bool { + if x != nil { + return x.PadForwardPayloadHeader + } + return false +} + +func (x *JwtProvider) GetPayloadInMetadata() string { + if x != nil { + return x.PayloadInMetadata + } + return "" +} + +func (x *JwtProvider) GetHeaderInMetadata() string { + if x != nil { + return x.HeaderInMetadata + } + return "" +} + +func (x *JwtProvider) GetClockSkewSeconds() uint32 { + if x != nil { + return x.ClockSkewSeconds + } + return 0 +} + +func (x *JwtProvider) GetJwtCacheConfig() *JwtCacheConfig { + if x != nil { + return x.JwtCacheConfig + } + return nil +} + +type isJwtProvider_JwksSourceSpecifier interface { + isJwtProvider_JwksSourceSpecifier() +} + +type JwtProvider_RemoteJwks struct { + // JWKS can be fetched from remote server via HTTP/HTTPS. This field specifies the remote HTTP + // URI and how the fetched JWKS should be cached. + // + // Example: + // + // .. code-block:: yaml + // + // remote_jwks: + // http_uri: + // uri: https://www.googleapis.com/oauth2/v1/certs + // cluster: jwt.www.googleapis.com|443 + // timeout: 1s + // cache_duration: + // seconds: 300 + RemoteJwks *RemoteJwks `protobuf:"bytes,3,opt,name=remote_jwks,json=remoteJwks,proto3,oneof"` +} + +type JwtProvider_LocalJwks struct { + // JWKS is in local data source. It could be either in a local file or embedded in the + // inline_string. + // + // Example: local file + // + // .. code-block:: yaml + // + // local_jwks: + // filename: /etc/envoy/jwks/jwks1.txt + // + // Example: inline_string + // + // .. code-block:: yaml + // + // local_jwks: + // inline_string: ACADADADADA + LocalJwks *v3.DataSource `protobuf:"bytes,4,opt,name=local_jwks,json=localJwks,proto3,oneof"` +} + +func (*JwtProvider_RemoteJwks) isJwtProvider_JwksSourceSpecifier() {} + +func (*JwtProvider_LocalJwks) isJwtProvider_JwksSourceSpecifier() {} + +// This message specifies JWT Cache configuration. +type JwtCacheConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unit is number of JWT tokens, default to 100. + JwtCacheSize uint32 `protobuf:"varint,1,opt,name=jwt_cache_size,json=jwtCacheSize,proto3" json:"jwt_cache_size,omitempty"` +} + +func (x *JwtCacheConfig) Reset() { + *x = JwtCacheConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JwtCacheConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JwtCacheConfig) ProtoMessage() {} + +func (x *JwtCacheConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JwtCacheConfig.ProtoReflect.Descriptor instead. +func (*JwtCacheConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{1} +} + +func (x *JwtCacheConfig) GetJwtCacheSize() uint32 { + if x != nil { + return x.JwtCacheSize + } + return 0 +} + +// This message specifies how to fetch JWKS from remote and how to cache it. +type RemoteJwks struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The HTTP URI to fetch the JWKS. For example: + // + // .. code-block:: yaml + // + // http_uri: + // uri: https://www.googleapis.com/oauth2/v1/certs + // cluster: jwt.www.googleapis.com|443 + // timeout: 1s + HttpUri *v3.HttpUri `protobuf:"bytes,1,opt,name=http_uri,json=httpUri,proto3" json:"http_uri,omitempty"` + // Duration after which the cached JWKS should be expired. If not specified, default cache + // duration is 5 minutes. + CacheDuration *durationpb.Duration `protobuf:"bytes,2,opt,name=cache_duration,json=cacheDuration,proto3" json:"cache_duration,omitempty"` + // Fetch Jwks asynchronously in the main thread before the listener is activated. + // Fetched Jwks can be used by all worker threads. + // + // If this feature is not enabled: + // + // - The Jwks is fetched on-demand when the requests come. During the fetching, first + // few requests are paused until the Jwks is fetched. + // - Each worker thread fetches its own Jwks since Jwks cache is per worker thread. + // + // If this feature is enabled: + // + // - Fetched Jwks is done in the main thread before the listener is activated. Its fetched + // Jwks can be used by all worker threads. Each worker thread doesn't need to fetch its own. + // - Jwks is ready when the requests come, not need to wait for the Jwks fetching. + AsyncFetch *JwksAsyncFetch `protobuf:"bytes,3,opt,name=async_fetch,json=asyncFetch,proto3" json:"async_fetch,omitempty"` + // Retry policy for fetching Jwks. optional. turned off by default. + // + // For example: + // + // .. code-block:: yaml + // + // retry_policy: + // retry_back_off: + // base_interval: 0.01s + // max_interval: 20s + // num_retries: 10 + // + // will yield a randomized truncated exponential backoff policy with an initial delay of 10ms + // 10 maximum attempts spaced at most 20s seconds. + // + // .. code-block:: yaml + // + // retry_policy: + // num_retries:1 + // + // uses the default :ref:`retry backoff strategy `. + // with the default base interval is 1000 milliseconds. and the default maximum interval of 10 times the base interval. + // + // if num_retries is omitted, the default is to allow only one retry. + // + // If enabled, the retry policy will apply to all Jwks fetching approaches, e.g. on demand or asynchronously in background. + RetryPolicy *v3.RetryPolicy `protobuf:"bytes,4,opt,name=retry_policy,json=retryPolicy,proto3" json:"retry_policy,omitempty"` +} + +func (x *RemoteJwks) Reset() { + *x = RemoteJwks{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoteJwks) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoteJwks) ProtoMessage() {} + +func (x *RemoteJwks) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoteJwks.ProtoReflect.Descriptor instead. +func (*RemoteJwks) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{2} +} + +func (x *RemoteJwks) GetHttpUri() *v3.HttpUri { + if x != nil { + return x.HttpUri + } + return nil +} + +func (x *RemoteJwks) GetCacheDuration() *durationpb.Duration { + if x != nil { + return x.CacheDuration + } + return nil +} + +func (x *RemoteJwks) GetAsyncFetch() *JwksAsyncFetch { + if x != nil { + return x.AsyncFetch + } + return nil +} + +func (x *RemoteJwks) GetRetryPolicy() *v3.RetryPolicy { + if x != nil { + return x.RetryPolicy + } + return nil +} + +// Fetch Jwks asynchronously in the main thread when the filter config is parsed. +// The listener is activated only after the Jwks is fetched. +// When the Jwks is expired in the cache, it is fetched again in the main thread. +// The fetched Jwks from the main thread can be used by all worker threads. +type JwksAsyncFetch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If false, the listener is activated after the initial fetch is completed. + // The initial fetch result can be either successful or failed. + // If true, it is activated without waiting for the initial fetch to complete. + // Default is false. + FastListener bool `protobuf:"varint,1,opt,name=fast_listener,json=fastListener,proto3" json:"fast_listener,omitempty"` +} + +func (x *JwksAsyncFetch) Reset() { + *x = JwksAsyncFetch{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JwksAsyncFetch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JwksAsyncFetch) ProtoMessage() {} + +func (x *JwksAsyncFetch) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JwksAsyncFetch.ProtoReflect.Descriptor instead. +func (*JwksAsyncFetch) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{3} +} + +func (x *JwksAsyncFetch) GetFastListener() bool { + if x != nil { + return x.FastListener + } + return false +} + +// This message specifies a header location to extract JWT token. +type JwtHeader struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The HTTP header name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The value prefix. The value format is "value_prefix" + // For example, for "Authorization: Bearer ", value_prefix="Bearer " with a space at the + // end. + ValuePrefix string `protobuf:"bytes,2,opt,name=value_prefix,json=valuePrefix,proto3" json:"value_prefix,omitempty"` +} + +func (x *JwtHeader) Reset() { + *x = JwtHeader{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JwtHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JwtHeader) ProtoMessage() {} + +func (x *JwtHeader) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JwtHeader.ProtoReflect.Descriptor instead. +func (*JwtHeader) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{4} +} + +func (x *JwtHeader) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *JwtHeader) GetValuePrefix() string { + if x != nil { + return x.ValuePrefix + } + return "" +} + +// Specify a required provider with audiences. +type ProviderWithAudiences struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specify a required provider name. + ProviderName string `protobuf:"bytes,1,opt,name=provider_name,json=providerName,proto3" json:"provider_name,omitempty"` + // This field overrides the one specified in the JwtProvider. + Audiences []string `protobuf:"bytes,2,rep,name=audiences,proto3" json:"audiences,omitempty"` +} + +func (x *ProviderWithAudiences) Reset() { + *x = ProviderWithAudiences{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProviderWithAudiences) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProviderWithAudiences) ProtoMessage() {} + +func (x *ProviderWithAudiences) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProviderWithAudiences.ProtoReflect.Descriptor instead. +func (*ProviderWithAudiences) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{5} +} + +func (x *ProviderWithAudiences) GetProviderName() string { + if x != nil { + return x.ProviderName + } + return "" +} + +func (x *ProviderWithAudiences) GetAudiences() []string { + if x != nil { + return x.Audiences + } + return nil +} + +// This message specifies a Jwt requirement. An empty message means JWT verification is not +// required. Here are some config examples: +// +// .. code-block:: yaml +// +// # Example 1: not required with an empty message +// +// # Example 2: require A +// provider_name: provider-A +// +// # Example 3: require A or B +// requires_any: +// requirements: +// - provider_name: provider-A +// - provider_name: provider-B +// +// # Example 4: require A and B +// requires_all: +// requirements: +// - provider_name: provider-A +// - provider_name: provider-B +// +// # Example 5: require A and (B or C) +// requires_all: +// requirements: +// - provider_name: provider-A +// - requires_any: +// requirements: +// - provider_name: provider-B +// - provider_name: provider-C +// +// # Example 6: require A or (B and C) +// requires_any: +// requirements: +// - provider_name: provider-A +// - requires_all: +// requirements: +// - provider_name: provider-B +// - provider_name: provider-C +// +// # Example 7: A is optional (if token from A is provided, it must be valid, but also allows +// missing token.) +// requires_any: +// requirements: +// - provider_name: provider-A +// - allow_missing: {} +// +// # Example 8: A is optional and B is required. +// requires_all: +// requirements: +// - requires_any: +// requirements: +// - provider_name: provider-A +// - allow_missing: {} +// - provider_name: provider-B +// +// [#next-free-field: 7] +type JwtRequirement struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to RequiresType: + // + // *JwtRequirement_ProviderName + // *JwtRequirement_ProviderAndAudiences + // *JwtRequirement_RequiresAny + // *JwtRequirement_RequiresAll + // *JwtRequirement_AllowMissingOrFailed + // *JwtRequirement_AllowMissing + RequiresType isJwtRequirement_RequiresType `protobuf_oneof:"requires_type"` +} + +func (x *JwtRequirement) Reset() { + *x = JwtRequirement{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JwtRequirement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JwtRequirement) ProtoMessage() {} + +func (x *JwtRequirement) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JwtRequirement.ProtoReflect.Descriptor instead. +func (*JwtRequirement) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{6} +} + +func (m *JwtRequirement) GetRequiresType() isJwtRequirement_RequiresType { + if m != nil { + return m.RequiresType + } + return nil +} + +func (x *JwtRequirement) GetProviderName() string { + if x, ok := x.GetRequiresType().(*JwtRequirement_ProviderName); ok { + return x.ProviderName + } + return "" +} + +func (x *JwtRequirement) GetProviderAndAudiences() *ProviderWithAudiences { + if x, ok := x.GetRequiresType().(*JwtRequirement_ProviderAndAudiences); ok { + return x.ProviderAndAudiences + } + return nil +} + +func (x *JwtRequirement) GetRequiresAny() *JwtRequirementOrList { + if x, ok := x.GetRequiresType().(*JwtRequirement_RequiresAny); ok { + return x.RequiresAny + } + return nil +} + +func (x *JwtRequirement) GetRequiresAll() *JwtRequirementAndList { + if x, ok := x.GetRequiresType().(*JwtRequirement_RequiresAll); ok { + return x.RequiresAll + } + return nil +} + +func (x *JwtRequirement) GetAllowMissingOrFailed() *emptypb.Empty { + if x, ok := x.GetRequiresType().(*JwtRequirement_AllowMissingOrFailed); ok { + return x.AllowMissingOrFailed + } + return nil +} + +func (x *JwtRequirement) GetAllowMissing() *emptypb.Empty { + if x, ok := x.GetRequiresType().(*JwtRequirement_AllowMissing); ok { + return x.AllowMissing + } + return nil +} + +type isJwtRequirement_RequiresType interface { + isJwtRequirement_RequiresType() +} + +type JwtRequirement_ProviderName struct { + // Specify a required provider name. + ProviderName string `protobuf:"bytes,1,opt,name=provider_name,json=providerName,proto3,oneof"` +} + +type JwtRequirement_ProviderAndAudiences struct { + // Specify a required provider with audiences. + ProviderAndAudiences *ProviderWithAudiences `protobuf:"bytes,2,opt,name=provider_and_audiences,json=providerAndAudiences,proto3,oneof"` +} + +type JwtRequirement_RequiresAny struct { + // Specify list of JwtRequirement. Their results are OR-ed. + // If any one of them passes, the result is passed. + RequiresAny *JwtRequirementOrList `protobuf:"bytes,3,opt,name=requires_any,json=requiresAny,proto3,oneof"` +} + +type JwtRequirement_RequiresAll struct { + // Specify list of JwtRequirement. Their results are AND-ed. + // All of them must pass, if one of them fails or missing, it fails. + RequiresAll *JwtRequirementAndList `protobuf:"bytes,4,opt,name=requires_all,json=requiresAll,proto3,oneof"` +} + +type JwtRequirement_AllowMissingOrFailed struct { + // The requirement is always satisfied even if JWT is missing or the JWT + // verification fails. A typical usage is: this filter is used to only verify + // JWTs and pass the verified JWT payloads to another filter, the other filter + // will make decision. In this mode, all JWT tokens will be verified. + AllowMissingOrFailed *emptypb.Empty `protobuf:"bytes,5,opt,name=allow_missing_or_failed,json=allowMissingOrFailed,proto3,oneof"` +} + +type JwtRequirement_AllowMissing struct { + // The requirement is satisfied if JWT is missing, but failed if JWT is + // presented but invalid. Similar to allow_missing_or_failed, this is used + // to only verify JWTs and pass the verified payload to another filter. The + // different is this mode will reject requests with invalid tokens. + AllowMissing *emptypb.Empty `protobuf:"bytes,6,opt,name=allow_missing,json=allowMissing,proto3,oneof"` +} + +func (*JwtRequirement_ProviderName) isJwtRequirement_RequiresType() {} + +func (*JwtRequirement_ProviderAndAudiences) isJwtRequirement_RequiresType() {} + +func (*JwtRequirement_RequiresAny) isJwtRequirement_RequiresType() {} + +func (*JwtRequirement_RequiresAll) isJwtRequirement_RequiresType() {} + +func (*JwtRequirement_AllowMissingOrFailed) isJwtRequirement_RequiresType() {} + +func (*JwtRequirement_AllowMissing) isJwtRequirement_RequiresType() {} + +// This message specifies a list of RequiredProvider. +// Their results are OR-ed; if any one of them passes, the result is passed +type JwtRequirementOrList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specify a list of JwtRequirement. + Requirements []*JwtRequirement `protobuf:"bytes,1,rep,name=requirements,proto3" json:"requirements,omitempty"` +} + +func (x *JwtRequirementOrList) Reset() { + *x = JwtRequirementOrList{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JwtRequirementOrList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JwtRequirementOrList) ProtoMessage() {} + +func (x *JwtRequirementOrList) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JwtRequirementOrList.ProtoReflect.Descriptor instead. +func (*JwtRequirementOrList) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{7} +} + +func (x *JwtRequirementOrList) GetRequirements() []*JwtRequirement { + if x != nil { + return x.Requirements + } + return nil +} + +// This message specifies a list of RequiredProvider. +// Their results are AND-ed; all of them must pass, if one of them fails or missing, it fails. +type JwtRequirementAndList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specify a list of JwtRequirement. + Requirements []*JwtRequirement `protobuf:"bytes,1,rep,name=requirements,proto3" json:"requirements,omitempty"` +} + +func (x *JwtRequirementAndList) Reset() { + *x = JwtRequirementAndList{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JwtRequirementAndList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JwtRequirementAndList) ProtoMessage() {} + +func (x *JwtRequirementAndList) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JwtRequirementAndList.ProtoReflect.Descriptor instead. +func (*JwtRequirementAndList) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{8} +} + +func (x *JwtRequirementAndList) GetRequirements() []*JwtRequirement { + if x != nil { + return x.Requirements + } + return nil +} + +// This message specifies a Jwt requirement for a specific Route condition. +// Example 1: +// +// .. code-block:: yaml +// +// - match: +// prefix: /healthz +// +// In above example, "requires" field is empty for /healthz prefix match, +// it means that requests matching the path prefix don't require JWT authentication. +// +// Example 2: +// +// .. code-block:: yaml +// +// - match: +// prefix: / +// requires: { provider_name: provider-A } +// +// In above example, all requests matched the path prefix require jwt authentication +// from "provider-A". +type RequirementRule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The route matching parameter. Only when the match is satisfied, the "requires" field will + // apply. + // + // For example: following match will match all requests. + // + // .. code-block:: yaml + // + // match: + // prefix: / + Match *v31.RouteMatch `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"` + // Specify a Jwt requirement. + // If not specified, Jwt verification is disabled. + // + // Types that are assignable to RequirementType: + // + // *RequirementRule_Requires + // *RequirementRule_RequirementName + RequirementType isRequirementRule_RequirementType `protobuf_oneof:"requirement_type"` +} + +func (x *RequirementRule) Reset() { + *x = RequirementRule{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RequirementRule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequirementRule) ProtoMessage() {} + +func (x *RequirementRule) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequirementRule.ProtoReflect.Descriptor instead. +func (*RequirementRule) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{9} +} + +func (x *RequirementRule) GetMatch() *v31.RouteMatch { + if x != nil { + return x.Match + } + return nil +} + +func (m *RequirementRule) GetRequirementType() isRequirementRule_RequirementType { + if m != nil { + return m.RequirementType + } + return nil +} + +func (x *RequirementRule) GetRequires() *JwtRequirement { + if x, ok := x.GetRequirementType().(*RequirementRule_Requires); ok { + return x.Requires + } + return nil +} + +func (x *RequirementRule) GetRequirementName() string { + if x, ok := x.GetRequirementType().(*RequirementRule_RequirementName); ok { + return x.RequirementName + } + return "" +} + +type isRequirementRule_RequirementType interface { + isRequirementRule_RequirementType() +} + +type RequirementRule_Requires struct { + // Specify a Jwt requirement. Please see detail comment in message JwtRequirement. + Requires *JwtRequirement `protobuf:"bytes,2,opt,name=requires,proto3,oneof"` +} + +type RequirementRule_RequirementName struct { + // Use requirement_name to specify a Jwt requirement. + // This requirement_name MUST be specified at the + // :ref:`requirement_map ` + // in “JwtAuthentication“. + RequirementName string `protobuf:"bytes,3,opt,name=requirement_name,json=requirementName,proto3,oneof"` +} + +func (*RequirementRule_Requires) isRequirementRule_RequirementType() {} + +func (*RequirementRule_RequirementName) isRequirementRule_RequirementType() {} + +// This message specifies Jwt requirements based on stream_info.filterState. +// This FilterState should use “Router::StringAccessor“ object to set a string value. +// Other HTTP filters can use it to specify Jwt requirements dynamically. +// +// Example: +// +// .. code-block:: yaml +// +// name: jwt_selector +// requires: +// issuer_1: +// provider_name: issuer1 +// issuer_2: +// provider_name: issuer2 +// +// If a filter set "jwt_selector" with "issuer_1" to FilterState for a request, +// jwt_authn filter will use JwtRequirement{"provider_name": "issuer1"} to verify. +type FilterStateRule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The filter state name to retrieve the “Router::StringAccessor“ object. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // A map of string keys to requirements. The string key is the string value + // in the FilterState with the name specified in the “name“ field above. + Requires map[string]*JwtRequirement `protobuf:"bytes,3,rep,name=requires,proto3" json:"requires,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *FilterStateRule) Reset() { + *x = FilterStateRule{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilterStateRule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilterStateRule) ProtoMessage() {} + +func (x *FilterStateRule) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FilterStateRule.ProtoReflect.Descriptor instead. +func (*FilterStateRule) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{10} +} + +func (x *FilterStateRule) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *FilterStateRule) GetRequires() map[string]*JwtRequirement { + if x != nil { + return x.Requires + } + return nil +} + +// This is the Envoy HTTP filter config for JWT authentication. +// +// For example: +// +// .. code-block:: yaml +// +// providers: +// provider1: +// issuer: issuer1 +// audiences: +// - audience1 +// - audience2 +// remote_jwks: +// http_uri: +// uri: https://example.com/.well-known/jwks.json +// cluster: example_jwks_cluster +// timeout: 1s +// provider2: +// issuer: issuer2 +// local_jwks: +// inline_string: jwks_string +// +// rules: +// # Not jwt verification is required for /health path +// - match: +// prefix: /health +// +// # Jwt verification for provider1 is required for path prefixed with "prefix" +// - match: +// prefix: /prefix +// requires: +// provider_name: provider1 +// +// # Jwt verification for either provider1 or provider2 is required for all other requests. +// - match: +// prefix: / +// requires: +// requires_any: +// requirements: +// - provider_name: provider1 +// - provider_name: provider2 +// +// [#next-free-field: 6] +type JwtAuthentication struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Map of provider names to JwtProviders. + // + // .. code-block:: yaml + // + // providers: + // provider1: + // issuer: issuer1 + // audiences: + // - audience1 + // - audience2 + // remote_jwks: + // http_uri: + // uri: https://example.com/.well-known/jwks.json + // cluster: example_jwks_cluster + // timeout: 1s + // provider2: + // issuer: provider2 + // local_jwks: + // inline_string: jwks_string + Providers map[string]*JwtProvider `protobuf:"bytes,1,rep,name=providers,proto3" json:"providers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Specifies requirements based on the route matches. The first matched requirement will be + // applied. If there are overlapped match conditions, please put the most specific match first. + // + // # Examples + // + // .. code-block:: yaml + // + // rules: + // - match: + // prefix: /healthz + // - match: + // prefix: /baz + // requires: + // provider_name: provider1 + // - match: + // prefix: /foo + // requires: + // requires_any: + // requirements: + // - provider_name: provider1 + // - provider_name: provider2 + // - match: + // prefix: /bar + // requires: + // requires_all: + // requirements: + // - provider_name: provider1 + // - provider_name: provider2 + Rules []*RequirementRule `protobuf:"bytes,2,rep,name=rules,proto3" json:"rules,omitempty"` + // This message specifies Jwt requirements based on stream_info.filterState. + // Other HTTP filters can use it to specify Jwt requirements dynamically. + // The “rules“ field above is checked first, if it could not find any matches, + // check this one. + FilterStateRules *FilterStateRule `protobuf:"bytes,3,opt,name=filter_state_rules,json=filterStateRules,proto3" json:"filter_state_rules,omitempty"` + // When set to true, bypass the `CORS preflight request + // `_ regardless of JWT + // requirements specified in the rules. + BypassCorsPreflight bool `protobuf:"varint,4,opt,name=bypass_cors_preflight,json=bypassCorsPreflight,proto3" json:"bypass_cors_preflight,omitempty"` + // A map of unique requirement_names to JwtRequirements. + // :ref:`requirement_name ` + // in “PerRouteConfig“ uses this map to specify a JwtRequirement. + RequirementMap map[string]*JwtRequirement `protobuf:"bytes,5,rep,name=requirement_map,json=requirementMap,proto3" json:"requirement_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *JwtAuthentication) Reset() { + *x = JwtAuthentication{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JwtAuthentication) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JwtAuthentication) ProtoMessage() {} + +func (x *JwtAuthentication) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JwtAuthentication.ProtoReflect.Descriptor instead. +func (*JwtAuthentication) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{11} +} + +func (x *JwtAuthentication) GetProviders() map[string]*JwtProvider { + if x != nil { + return x.Providers + } + return nil +} + +func (x *JwtAuthentication) GetRules() []*RequirementRule { + if x != nil { + return x.Rules + } + return nil +} + +func (x *JwtAuthentication) GetFilterStateRules() *FilterStateRule { + if x != nil { + return x.FilterStateRules + } + return nil +} + +func (x *JwtAuthentication) GetBypassCorsPreflight() bool { + if x != nil { + return x.BypassCorsPreflight + } + return false +} + +func (x *JwtAuthentication) GetRequirementMap() map[string]*JwtRequirement { + if x != nil { + return x.RequirementMap + } + return nil +} + +// Specify per-route config. +type PerRouteConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to RequirementSpecifier: + // + // *PerRouteConfig_Disabled + // *PerRouteConfig_RequirementName + RequirementSpecifier isPerRouteConfig_RequirementSpecifier `protobuf_oneof:"requirement_specifier"` +} + +func (x *PerRouteConfig) Reset() { + *x = PerRouteConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PerRouteConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PerRouteConfig) ProtoMessage() {} + +func (x *PerRouteConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PerRouteConfig.ProtoReflect.Descriptor instead. +func (*PerRouteConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP(), []int{12} +} + +func (m *PerRouteConfig) GetRequirementSpecifier() isPerRouteConfig_RequirementSpecifier { + if m != nil { + return m.RequirementSpecifier + } + return nil +} + +func (x *PerRouteConfig) GetDisabled() bool { + if x, ok := x.GetRequirementSpecifier().(*PerRouteConfig_Disabled); ok { + return x.Disabled + } + return false +} + +func (x *PerRouteConfig) GetRequirementName() string { + if x, ok := x.GetRequirementSpecifier().(*PerRouteConfig_RequirementName); ok { + return x.RequirementName + } + return "" +} + +type isPerRouteConfig_RequirementSpecifier interface { + isPerRouteConfig_RequirementSpecifier() +} + +type PerRouteConfig_Disabled struct { + // Disable Jwt Authentication for this route. + Disabled bool `protobuf:"varint,1,opt,name=disabled,proto3,oneof"` +} + +type PerRouteConfig_RequirementName struct { + // Use requirement_name to specify a JwtRequirement. + // This requirement_name MUST be specified at the + // :ref:`requirement_map ` + // in “JwtAuthentication“. If no, the requests using this route will be rejected with 403. + RequirementName string `protobuf:"bytes,2,opt,name=requirement_name,json=requirementName,proto3,oneof"` +} + +func (*PerRouteConfig_Disabled) isPerRouteConfig_RequirementSpecifier() {} + +func (*PerRouteConfig_RequirementName) isPerRouteConfig_RequirementSpecifier() {} + +var File_envoy_extensions_filters_http_jwt_authn_v3_config_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDesc = []byte{ + 0x0a, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, + 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0x5f, 0x75, 0x72, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, + 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, + 0x6e, 0x67, 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, 0xe8, 0x06, 0x0a, 0x0b, 0x4a, 0x77, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x64, + 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, + 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x59, 0x0a, 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x74, + 0x65, 0x5f, 0x6a, 0x77, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, + 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, + 0x4a, 0x77, 0x6b, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4a, 0x77, + 0x6b, 0x73, 0x12, 0x41, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x6a, 0x77, 0x6b, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, + 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x4a, 0x77, 0x6b, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x12, + 0x58, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, + 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0b, 0x66, 0x72, + 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x72, 0x6f, + 0x6d, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, + 0x66, 0x72, 0x6f, 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x72, + 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x73, 0x12, 0x41, 0x0a, + 0x16, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, + 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x14, 0x66, 0x6f, 0x72, 0x77, + 0x61, 0x72, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x12, 0x3b, 0x0a, 0x1a, 0x70, 0x61, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x70, 0x61, 0x64, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2e, 0x0a, + 0x13, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x49, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, + 0x12, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x49, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x12, 0x63, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x6b, 0x65, 0x77, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, + 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x6b, + 0x65, 0x77, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x64, 0x0a, 0x10, 0x6a, 0x77, 0x74, + 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, + 0x2e, 0x4a, 0x77, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x0e, 0x6a, 0x77, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, + 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x42, 0x1c, + 0x0a, 0x15, 0x6a, 0x77, 0x6b, 0x73, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x36, 0x0a, 0x0e, + 0x4a, 0x77, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x24, + 0x0a, 0x0e, 0x6a, 0x77, 0x74, 0x5f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6a, 0x77, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, + 0x53, 0x69, 0x7a, 0x65, 0x22, 0xe9, 0x02, 0x0a, 0x0a, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4a, + 0x77, 0x6b, 0x73, 0x12, 0x38, 0x0a, 0x08, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x75, 0x72, 0x69, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, + 0x70, 0x55, 0x72, 0x69, 0x52, 0x07, 0x68, 0x74, 0x74, 0x70, 0x55, 0x72, 0x69, 0x12, 0x40, 0x0a, + 0x0e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x5b, 0x0a, 0x0b, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x66, 0x65, 0x74, 0x63, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, + 0x33, 0x2e, 0x4a, 0x77, 0x6b, 0x73, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x65, 0x74, 0x63, 0x68, + 0x52, 0x0a, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x65, 0x74, 0x63, 0x68, 0x12, 0x44, 0x0a, 0x0c, + 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4a, 0x77, 0x6b, 0x73, + 0x22, 0x35, 0x0a, 0x0e, 0x4a, 0x77, 0x6b, 0x73, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x65, 0x74, + 0x63, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x61, 0x73, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x66, 0x61, 0x73, 0x74, 0x4c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x22, 0x9b, 0x01, 0x0a, 0x09, 0x4a, 0x77, 0x74, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, + 0x01, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x0c, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, + 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x52, 0x0b, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x3a, 0x3b, 0x9a, 0xc5, 0x88, 0x1e, 0x36, 0x0a, + 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, + 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0xa3, 0x01, 0x0a, 0x15, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x57, 0x69, 0x74, 0x68, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, + 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, + 0x65, 0x73, 0x3a, 0x47, 0x9a, 0xc5, 0x88, 0x1e, 0x42, 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x57, 0x69, + 0x74, 0x68, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0xe4, 0x04, 0x0a, 0x0e, + 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x25, + 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x79, 0x0a, 0x16, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, + 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x57, 0x69, 0x74, 0x68, 0x41, + 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x48, 0x00, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x41, 0x6e, 0x64, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, + 0x12, 0x65, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x6e, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, + 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x4f, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x73, 0x41, 0x6e, 0x79, 0x12, 0x66, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, + 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, + 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x41, 0x6c, 0x6c, 0x12, + 0x4f, 0x0a, 0x17, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, + 0x5f, 0x6f, 0x72, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x14, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4f, 0x72, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, + 0x12, 0x3d, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, + 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, + 0x00, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x3a, + 0x40, 0x9a, 0xc5, 0x88, 0x1e, 0x3b, 0x0a, 0x39, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x42, 0x0f, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x14, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x68, 0x0a, 0x0c, 0x72, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4a, + 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x02, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3a, 0x46, 0x9a, 0xc5, 0x88, 0x1e, 0x41, 0x0a, 0x3f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xca, 0x01, + 0x0a, 0x15, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x41, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x68, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, + 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, + 0x02, 0x08, 0x02, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x3a, 0x47, 0x9a, 0xc5, 0x88, 0x1e, 0x42, 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x41, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xbb, 0x02, 0x0a, 0x0f, 0x52, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x41, + 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x12, 0x58, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, + 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x48, + 0x00, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x10, 0x72, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, + 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, + 0x65, 0x3a, 0x41, 0x9a, 0xc5, 0x88, 0x1e, 0x3c, 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x75, 0x6c, 0x65, 0x42, 0x12, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xd1, 0x02, 0x0a, 0x0f, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, + 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x65, 0x0a, 0x08, 0x72, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, + 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, + 0x1a, 0x77, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x50, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, + 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x41, 0x9a, 0xc5, 0x88, 0x1e, 0x3c, + 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, + 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x22, 0xa8, 0x06, 0x0a, + 0x11, 0x4a, 0x77, 0x74, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x6a, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, + 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x51, + 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, + 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x12, 0x69, 0x0a, 0x12, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, + 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x10, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, + 0x62, 0x79, 0x70, 0x61, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x72, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, + 0x6c, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x62, 0x79, 0x70, + 0x61, 0x73, 0x73, 0x43, 0x6f, 0x72, 0x73, 0x50, 0x72, 0x65, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, + 0x12, 0x7a, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, + 0x6d, 0x61, 0x70, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x51, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, + 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x1a, 0x75, 0x0a, 0x0e, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x4d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0x7d, 0x0a, 0x13, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x50, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, + 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4a, 0x77, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x3a, 0x43, 0x9a, 0xc5, 0x88, 0x1e, 0x3e, 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4a, 0x77, 0x74, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8b, 0x01, 0x0a, 0x0e, 0x50, 0x65, 0x72, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x0a, 0x08, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x12, 0x34, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x1c, 0x0a, 0x15, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, + 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0xb0, 0x01, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x2e, + 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x5d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, + 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x6a, 0x77, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6e, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescData = file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDesc +) + +func file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDescData +} + +var file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_goTypes = []interface{}{ + (*JwtProvider)(nil), // 0: envoy.extensions.filters.http.jwt_authn.v3.JwtProvider + (*JwtCacheConfig)(nil), // 1: envoy.extensions.filters.http.jwt_authn.v3.JwtCacheConfig + (*RemoteJwks)(nil), // 2: envoy.extensions.filters.http.jwt_authn.v3.RemoteJwks + (*JwksAsyncFetch)(nil), // 3: envoy.extensions.filters.http.jwt_authn.v3.JwksAsyncFetch + (*JwtHeader)(nil), // 4: envoy.extensions.filters.http.jwt_authn.v3.JwtHeader + (*ProviderWithAudiences)(nil), // 5: envoy.extensions.filters.http.jwt_authn.v3.ProviderWithAudiences + (*JwtRequirement)(nil), // 6: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement + (*JwtRequirementOrList)(nil), // 7: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementOrList + (*JwtRequirementAndList)(nil), // 8: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementAndList + (*RequirementRule)(nil), // 9: envoy.extensions.filters.http.jwt_authn.v3.RequirementRule + (*FilterStateRule)(nil), // 10: envoy.extensions.filters.http.jwt_authn.v3.FilterStateRule + (*JwtAuthentication)(nil), // 11: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication + (*PerRouteConfig)(nil), // 12: envoy.extensions.filters.http.jwt_authn.v3.PerRouteConfig + nil, // 13: envoy.extensions.filters.http.jwt_authn.v3.FilterStateRule.RequiresEntry + nil, // 14: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.ProvidersEntry + nil, // 15: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.RequirementMapEntry + (*v3.DataSource)(nil), // 16: envoy.config.core.v3.DataSource + (*v3.HttpUri)(nil), // 17: envoy.config.core.v3.HttpUri + (*durationpb.Duration)(nil), // 18: google.protobuf.Duration + (*v3.RetryPolicy)(nil), // 19: envoy.config.core.v3.RetryPolicy + (*emptypb.Empty)(nil), // 20: google.protobuf.Empty + (*v31.RouteMatch)(nil), // 21: envoy.config.route.v3.RouteMatch +} +var file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.filters.http.jwt_authn.v3.JwtProvider.remote_jwks:type_name -> envoy.extensions.filters.http.jwt_authn.v3.RemoteJwks + 16, // 1: envoy.extensions.filters.http.jwt_authn.v3.JwtProvider.local_jwks:type_name -> envoy.config.core.v3.DataSource + 4, // 2: envoy.extensions.filters.http.jwt_authn.v3.JwtProvider.from_headers:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtHeader + 1, // 3: envoy.extensions.filters.http.jwt_authn.v3.JwtProvider.jwt_cache_config:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtCacheConfig + 17, // 4: envoy.extensions.filters.http.jwt_authn.v3.RemoteJwks.http_uri:type_name -> envoy.config.core.v3.HttpUri + 18, // 5: envoy.extensions.filters.http.jwt_authn.v3.RemoteJwks.cache_duration:type_name -> google.protobuf.Duration + 3, // 6: envoy.extensions.filters.http.jwt_authn.v3.RemoteJwks.async_fetch:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwksAsyncFetch + 19, // 7: envoy.extensions.filters.http.jwt_authn.v3.RemoteJwks.retry_policy:type_name -> envoy.config.core.v3.RetryPolicy + 5, // 8: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement.provider_and_audiences:type_name -> envoy.extensions.filters.http.jwt_authn.v3.ProviderWithAudiences + 7, // 9: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement.requires_any:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementOrList + 8, // 10: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement.requires_all:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementAndList + 20, // 11: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement.allow_missing_or_failed:type_name -> google.protobuf.Empty + 20, // 12: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement.allow_missing:type_name -> google.protobuf.Empty + 6, // 13: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementOrList.requirements:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement + 6, // 14: envoy.extensions.filters.http.jwt_authn.v3.JwtRequirementAndList.requirements:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement + 21, // 15: envoy.extensions.filters.http.jwt_authn.v3.RequirementRule.match:type_name -> envoy.config.route.v3.RouteMatch + 6, // 16: envoy.extensions.filters.http.jwt_authn.v3.RequirementRule.requires:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement + 13, // 17: envoy.extensions.filters.http.jwt_authn.v3.FilterStateRule.requires:type_name -> envoy.extensions.filters.http.jwt_authn.v3.FilterStateRule.RequiresEntry + 14, // 18: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.providers:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.ProvidersEntry + 9, // 19: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.rules:type_name -> envoy.extensions.filters.http.jwt_authn.v3.RequirementRule + 10, // 20: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.filter_state_rules:type_name -> envoy.extensions.filters.http.jwt_authn.v3.FilterStateRule + 15, // 21: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.requirement_map:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.RequirementMapEntry + 6, // 22: envoy.extensions.filters.http.jwt_authn.v3.FilterStateRule.RequiresEntry.value:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement + 0, // 23: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.ProvidersEntry.value:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtProvider + 6, // 24: envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication.RequirementMapEntry.value:type_name -> envoy.extensions.filters.http.jwt_authn.v3.JwtRequirement + 25, // [25:25] is the sub-list for method output_type + 25, // [25:25] is the sub-list for method input_type + 25, // [25:25] is the sub-list for extension type_name + 25, // [25:25] is the sub-list for extension extendee + 0, // [0:25] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_init() } +func file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_init() { + if File_envoy_extensions_filters_http_jwt_authn_v3_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JwtProvider); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JwtCacheConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoteJwks); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JwksAsyncFetch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JwtHeader); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProviderWithAudiences); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JwtRequirement); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JwtRequirementOrList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JwtRequirementAndList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RequirementRule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FilterStateRule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JwtAuthentication); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PerRouteConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*JwtProvider_RemoteJwks)(nil), + (*JwtProvider_LocalJwks)(nil), + } + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*JwtRequirement_ProviderName)(nil), + (*JwtRequirement_ProviderAndAudiences)(nil), + (*JwtRequirement_RequiresAny)(nil), + (*JwtRequirement_RequiresAll)(nil), + (*JwtRequirement_AllowMissingOrFailed)(nil), + (*JwtRequirement_AllowMissing)(nil), + } + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[9].OneofWrappers = []interface{}{ + (*RequirementRule_Requires)(nil), + (*RequirementRule_RequirementName)(nil), + } + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes[12].OneofWrappers = []interface{}{ + (*PerRouteConfig_Disabled)(nil), + (*PerRouteConfig_RequirementName)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDesc, + NumEnums: 0, + NumMessages: 16, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_jwt_authn_v3_config_proto = out.File + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_rawDesc = nil + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_goTypes = nil + file_envoy_extensions_filters_http_jwt_authn_v3_config_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/jwt_authn/v3/config.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/jwt_authn/v3/config.pb.validate.go new file mode 100644 index 0000000000000..e4522d259208b --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/jwt_authn/v3/config.pb.validate.go @@ -0,0 +1,2245 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/jwt_authn/v3/config.proto + +package jwt_authnv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on JwtProvider 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 *JwtProvider) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JwtProvider 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 JwtProviderMultiError, or +// nil if none found. +func (m *JwtProvider) ValidateAll() error { + return m.validate(true) +} + +func (m *JwtProvider) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Issuer + + // no validation rules for Forward + + for idx, item := range m.GetFromHeaders() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtProviderValidationError{ + field: fmt.Sprintf("FromHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtProviderValidationError{ + field: fmt.Sprintf("FromHeaders[%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 JwtProviderValidationError{ + field: fmt.Sprintf("FromHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if !_JwtProvider_ForwardPayloadHeader_Pattern.MatchString(m.GetForwardPayloadHeader()) { + err := JwtProviderValidationError{ + field: "ForwardPayloadHeader", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for PadForwardPayloadHeader + + // no validation rules for PayloadInMetadata + + // no validation rules for HeaderInMetadata + + // no validation rules for ClockSkewSeconds + + if all { + switch v := interface{}(m.GetJwtCacheConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtProviderValidationError{ + field: "JwtCacheConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtProviderValidationError{ + field: "JwtCacheConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetJwtCacheConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return JwtProviderValidationError{ + field: "JwtCacheConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.JwksSourceSpecifier.(type) { + + case *JwtProvider_RemoteJwks: + + if all { + switch v := interface{}(m.GetRemoteJwks()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtProviderValidationError{ + field: "RemoteJwks", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtProviderValidationError{ + field: "RemoteJwks", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRemoteJwks()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return JwtProviderValidationError{ + field: "RemoteJwks", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *JwtProvider_LocalJwks: + + if all { + switch v := interface{}(m.GetLocalJwks()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtProviderValidationError{ + field: "LocalJwks", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtProviderValidationError{ + field: "LocalJwks", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocalJwks()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return JwtProviderValidationError{ + field: "LocalJwks", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := JwtProviderValidationError{ + field: "JwksSourceSpecifier", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return JwtProviderMultiError(errors) + } + return nil +} + +// JwtProviderMultiError is an error wrapping multiple validation errors +// returned by JwtProvider.ValidateAll() if the designated constraints aren't met. +type JwtProviderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JwtProviderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JwtProviderMultiError) AllErrors() []error { return m } + +// JwtProviderValidationError is the validation error returned by +// JwtProvider.Validate if the designated constraints aren't met. +type JwtProviderValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e JwtProviderValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e JwtProviderValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e JwtProviderValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e JwtProviderValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e JwtProviderValidationError) ErrorName() string { return "JwtProviderValidationError" } + +// Error satisfies the builtin error interface +func (e JwtProviderValidationError) 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 %sJwtProvider.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = JwtProviderValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = JwtProviderValidationError{} + +var _JwtProvider_ForwardPayloadHeader_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") + +// Validate checks the field values on JwtCacheConfig 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 *JwtCacheConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JwtCacheConfig 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 JwtCacheConfigMultiError, +// or nil if none found. +func (m *JwtCacheConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *JwtCacheConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for JwtCacheSize + + if len(errors) > 0 { + return JwtCacheConfigMultiError(errors) + } + return nil +} + +// JwtCacheConfigMultiError is an error wrapping multiple validation errors +// returned by JwtCacheConfig.ValidateAll() if the designated constraints +// aren't met. +type JwtCacheConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JwtCacheConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JwtCacheConfigMultiError) AllErrors() []error { return m } + +// JwtCacheConfigValidationError is the validation error returned by +// JwtCacheConfig.Validate if the designated constraints aren't met. +type JwtCacheConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e JwtCacheConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e JwtCacheConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e JwtCacheConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e JwtCacheConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e JwtCacheConfigValidationError) ErrorName() string { return "JwtCacheConfigValidationError" } + +// Error satisfies the builtin error interface +func (e JwtCacheConfigValidationError) 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 %sJwtCacheConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = JwtCacheConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = JwtCacheConfigValidationError{} + +// Validate checks the field values on RemoteJwks 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 *RemoteJwks) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RemoteJwks 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 RemoteJwksMultiError, or +// nil if none found. +func (m *RemoteJwks) ValidateAll() error { + return m.validate(true) +} + +func (m *RemoteJwks) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetHttpUri()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RemoteJwksValidationError{ + field: "HttpUri", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RemoteJwksValidationError{ + field: "HttpUri", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpUri()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RemoteJwksValidationError{ + field: "HttpUri", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetCacheDuration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RemoteJwksValidationError{ + field: "CacheDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RemoteJwksValidationError{ + field: "CacheDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCacheDuration()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RemoteJwksValidationError{ + field: "CacheDuration", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetAsyncFetch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RemoteJwksValidationError{ + field: "AsyncFetch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RemoteJwksValidationError{ + field: "AsyncFetch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAsyncFetch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RemoteJwksValidationError{ + field: "AsyncFetch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetRetryPolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RemoteJwksValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RemoteJwksValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRetryPolicy()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RemoteJwksValidationError{ + field: "RetryPolicy", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RemoteJwksMultiError(errors) + } + return nil +} + +// RemoteJwksMultiError is an error wrapping multiple validation errors +// returned by RemoteJwks.ValidateAll() if the designated constraints aren't met. +type RemoteJwksMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RemoteJwksMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RemoteJwksMultiError) AllErrors() []error { return m } + +// RemoteJwksValidationError is the validation error returned by +// RemoteJwks.Validate if the designated constraints aren't met. +type RemoteJwksValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RemoteJwksValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RemoteJwksValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RemoteJwksValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RemoteJwksValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RemoteJwksValidationError) ErrorName() string { return "RemoteJwksValidationError" } + +// Error satisfies the builtin error interface +func (e RemoteJwksValidationError) 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 %sRemoteJwks.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RemoteJwksValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RemoteJwksValidationError{} + +// Validate checks the field values on JwksAsyncFetch 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 *JwksAsyncFetch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JwksAsyncFetch 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 JwksAsyncFetchMultiError, +// or nil if none found. +func (m *JwksAsyncFetch) ValidateAll() error { + return m.validate(true) +} + +func (m *JwksAsyncFetch) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for FastListener + + if len(errors) > 0 { + return JwksAsyncFetchMultiError(errors) + } + return nil +} + +// JwksAsyncFetchMultiError is an error wrapping multiple validation errors +// returned by JwksAsyncFetch.ValidateAll() if the designated constraints +// aren't met. +type JwksAsyncFetchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JwksAsyncFetchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JwksAsyncFetchMultiError) AllErrors() []error { return m } + +// JwksAsyncFetchValidationError is the validation error returned by +// JwksAsyncFetch.Validate if the designated constraints aren't met. +type JwksAsyncFetchValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e JwksAsyncFetchValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e JwksAsyncFetchValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e JwksAsyncFetchValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e JwksAsyncFetchValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e JwksAsyncFetchValidationError) ErrorName() string { return "JwksAsyncFetchValidationError" } + +// Error satisfies the builtin error interface +func (e JwksAsyncFetchValidationError) 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 %sJwksAsyncFetch.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = JwksAsyncFetchValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = JwksAsyncFetchValidationError{} + +// Validate checks the field values on JwtHeader 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 *JwtHeader) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JwtHeader 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 JwtHeaderMultiError, or nil +// if none found. +func (m *JwtHeader) ValidateAll() error { + return m.validate(true) +} + +func (m *JwtHeader) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetName()) < 1 { + err := JwtHeaderValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if !_JwtHeader_Name_Pattern.MatchString(m.GetName()) { + err := JwtHeaderValidationError{ + field: "Name", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + if !_JwtHeader_ValuePrefix_Pattern.MatchString(m.GetValuePrefix()) { + err := JwtHeaderValidationError{ + field: "ValuePrefix", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return JwtHeaderMultiError(errors) + } + return nil +} + +// JwtHeaderMultiError is an error wrapping multiple validation errors returned +// by JwtHeader.ValidateAll() if the designated constraints aren't met. +type JwtHeaderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JwtHeaderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JwtHeaderMultiError) AllErrors() []error { return m } + +// JwtHeaderValidationError is the validation error returned by +// JwtHeader.Validate if the designated constraints aren't met. +type JwtHeaderValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e JwtHeaderValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e JwtHeaderValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e JwtHeaderValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e JwtHeaderValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e JwtHeaderValidationError) ErrorName() string { return "JwtHeaderValidationError" } + +// Error satisfies the builtin error interface +func (e JwtHeaderValidationError) 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 %sJwtHeader.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = JwtHeaderValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = JwtHeaderValidationError{} + +var _JwtHeader_Name_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") + +var _JwtHeader_ValuePrefix_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") + +// Validate checks the field values on ProviderWithAudiences 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 *ProviderWithAudiences) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ProviderWithAudiences 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 +// ProviderWithAudiencesMultiError, or nil if none found. +func (m *ProviderWithAudiences) ValidateAll() error { + return m.validate(true) +} + +func (m *ProviderWithAudiences) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for ProviderName + + if len(errors) > 0 { + return ProviderWithAudiencesMultiError(errors) + } + return nil +} + +// ProviderWithAudiencesMultiError is an error wrapping multiple validation +// errors returned by ProviderWithAudiences.ValidateAll() if the designated +// constraints aren't met. +type ProviderWithAudiencesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ProviderWithAudiencesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ProviderWithAudiencesMultiError) AllErrors() []error { return m } + +// ProviderWithAudiencesValidationError is the validation error returned by +// ProviderWithAudiences.Validate if the designated constraints aren't met. +type ProviderWithAudiencesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ProviderWithAudiencesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ProviderWithAudiencesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ProviderWithAudiencesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ProviderWithAudiencesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ProviderWithAudiencesValidationError) ErrorName() string { + return "ProviderWithAudiencesValidationError" +} + +// Error satisfies the builtin error interface +func (e ProviderWithAudiencesValidationError) 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 %sProviderWithAudiences.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ProviderWithAudiencesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ProviderWithAudiencesValidationError{} + +// Validate checks the field values on JwtRequirement 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 *JwtRequirement) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JwtRequirement 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 JwtRequirementMultiError, +// or nil if none found. +func (m *JwtRequirement) ValidateAll() error { + return m.validate(true) +} + +func (m *JwtRequirement) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.RequiresType.(type) { + + case *JwtRequirement_ProviderName: + // no validation rules for ProviderName + + case *JwtRequirement_ProviderAndAudiences: + + if all { + switch v := interface{}(m.GetProviderAndAudiences()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "ProviderAndAudiences", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "ProviderAndAudiences", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProviderAndAudiences()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return JwtRequirementValidationError{ + field: "ProviderAndAudiences", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *JwtRequirement_RequiresAny: + + if all { + switch v := interface{}(m.GetRequiresAny()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "RequiresAny", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "RequiresAny", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequiresAny()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return JwtRequirementValidationError{ + field: "RequiresAny", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *JwtRequirement_RequiresAll: + + if all { + switch v := interface{}(m.GetRequiresAll()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "RequiresAll", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "RequiresAll", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequiresAll()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return JwtRequirementValidationError{ + field: "RequiresAll", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *JwtRequirement_AllowMissingOrFailed: + + if all { + switch v := interface{}(m.GetAllowMissingOrFailed()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "AllowMissingOrFailed", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "AllowMissingOrFailed", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowMissingOrFailed()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return JwtRequirementValidationError{ + field: "AllowMissingOrFailed", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *JwtRequirement_AllowMissing: + + if all { + switch v := interface{}(m.GetAllowMissing()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "AllowMissing", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtRequirementValidationError{ + field: "AllowMissing", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAllowMissing()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return JwtRequirementValidationError{ + field: "AllowMissing", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return JwtRequirementMultiError(errors) + } + return nil +} + +// JwtRequirementMultiError is an error wrapping multiple validation errors +// returned by JwtRequirement.ValidateAll() if the designated constraints +// aren't met. +type JwtRequirementMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JwtRequirementMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JwtRequirementMultiError) AllErrors() []error { return m } + +// JwtRequirementValidationError is the validation error returned by +// JwtRequirement.Validate if the designated constraints aren't met. +type JwtRequirementValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e JwtRequirementValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e JwtRequirementValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e JwtRequirementValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e JwtRequirementValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e JwtRequirementValidationError) ErrorName() string { return "JwtRequirementValidationError" } + +// Error satisfies the builtin error interface +func (e JwtRequirementValidationError) 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 %sJwtRequirement.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = JwtRequirementValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = JwtRequirementValidationError{} + +// Validate checks the field values on JwtRequirementOrList 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 *JwtRequirementOrList) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JwtRequirementOrList 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 +// JwtRequirementOrListMultiError, or nil if none found. +func (m *JwtRequirementOrList) ValidateAll() error { + return m.validate(true) +} + +func (m *JwtRequirementOrList) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetRequirements()) < 2 { + err := JwtRequirementOrListValidationError{ + field: "Requirements", + reason: "value must contain at least 2 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetRequirements() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtRequirementOrListValidationError{ + field: fmt.Sprintf("Requirements[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtRequirementOrListValidationError{ + field: fmt.Sprintf("Requirements[%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 JwtRequirementOrListValidationError{ + field: fmt.Sprintf("Requirements[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return JwtRequirementOrListMultiError(errors) + } + return nil +} + +// JwtRequirementOrListMultiError is an error wrapping multiple validation +// errors returned by JwtRequirementOrList.ValidateAll() if the designated +// constraints aren't met. +type JwtRequirementOrListMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JwtRequirementOrListMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JwtRequirementOrListMultiError) AllErrors() []error { return m } + +// JwtRequirementOrListValidationError is the validation error returned by +// JwtRequirementOrList.Validate if the designated constraints aren't met. +type JwtRequirementOrListValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e JwtRequirementOrListValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e JwtRequirementOrListValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e JwtRequirementOrListValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e JwtRequirementOrListValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e JwtRequirementOrListValidationError) ErrorName() string { + return "JwtRequirementOrListValidationError" +} + +// Error satisfies the builtin error interface +func (e JwtRequirementOrListValidationError) 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 %sJwtRequirementOrList.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = JwtRequirementOrListValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = JwtRequirementOrListValidationError{} + +// Validate checks the field values on JwtRequirementAndList 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 *JwtRequirementAndList) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JwtRequirementAndList 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 +// JwtRequirementAndListMultiError, or nil if none found. +func (m *JwtRequirementAndList) ValidateAll() error { + return m.validate(true) +} + +func (m *JwtRequirementAndList) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetRequirements()) < 2 { + err := JwtRequirementAndListValidationError{ + field: "Requirements", + reason: "value must contain at least 2 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetRequirements() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtRequirementAndListValidationError{ + field: fmt.Sprintf("Requirements[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtRequirementAndListValidationError{ + field: fmt.Sprintf("Requirements[%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 JwtRequirementAndListValidationError{ + field: fmt.Sprintf("Requirements[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return JwtRequirementAndListMultiError(errors) + } + return nil +} + +// JwtRequirementAndListMultiError is an error wrapping multiple validation +// errors returned by JwtRequirementAndList.ValidateAll() if the designated +// constraints aren't met. +type JwtRequirementAndListMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JwtRequirementAndListMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JwtRequirementAndListMultiError) AllErrors() []error { return m } + +// JwtRequirementAndListValidationError is the validation error returned by +// JwtRequirementAndList.Validate if the designated constraints aren't met. +type JwtRequirementAndListValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e JwtRequirementAndListValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e JwtRequirementAndListValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e JwtRequirementAndListValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e JwtRequirementAndListValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e JwtRequirementAndListValidationError) ErrorName() string { + return "JwtRequirementAndListValidationError" +} + +// Error satisfies the builtin error interface +func (e JwtRequirementAndListValidationError) 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 %sJwtRequirementAndList.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = JwtRequirementAndListValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = JwtRequirementAndListValidationError{} + +// Validate checks the field values on RequirementRule 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 *RequirementRule) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RequirementRule 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 +// RequirementRuleMultiError, or nil if none found. +func (m *RequirementRule) ValidateAll() error { + return m.validate(true) +} + +func (m *RequirementRule) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetMatch() == nil { + err := RequirementRuleValidationError{ + field: "Match", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RequirementRuleValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RequirementRuleValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RequirementRuleValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.RequirementType.(type) { + + case *RequirementRule_Requires: + + if all { + switch v := interface{}(m.GetRequires()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RequirementRuleValidationError{ + field: "Requires", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RequirementRuleValidationError{ + field: "Requires", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequires()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RequirementRuleValidationError{ + field: "Requires", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *RequirementRule_RequirementName: + + if utf8.RuneCountInString(m.GetRequirementName()) < 1 { + err := RequirementRuleValidationError{ + field: "RequirementName", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if len(errors) > 0 { + return RequirementRuleMultiError(errors) + } + return nil +} + +// RequirementRuleMultiError is an error wrapping multiple validation errors +// returned by RequirementRule.ValidateAll() if the designated constraints +// aren't met. +type RequirementRuleMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RequirementRuleMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RequirementRuleMultiError) AllErrors() []error { return m } + +// RequirementRuleValidationError is the validation error returned by +// RequirementRule.Validate if the designated constraints aren't met. +type RequirementRuleValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RequirementRuleValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RequirementRuleValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RequirementRuleValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RequirementRuleValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RequirementRuleValidationError) ErrorName() string { return "RequirementRuleValidationError" } + +// Error satisfies the builtin error interface +func (e RequirementRuleValidationError) 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 %sRequirementRule.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RequirementRuleValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RequirementRuleValidationError{} + +// Validate checks the field values on FilterStateRule 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 *FilterStateRule) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FilterStateRule 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 +// FilterStateRuleMultiError, or nil if none found. +func (m *FilterStateRule) ValidateAll() error { + return m.validate(true) +} + +func (m *FilterStateRule) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetName()) < 1 { + err := FilterStateRuleValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + { + sorted_keys := make([]string, len(m.GetRequires())) + i := 0 + for key := range m.GetRequires() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetRequires()[key] + _ = val + + // no validation rules for Requires[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FilterStateRuleValidationError{ + field: fmt.Sprintf("Requires[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FilterStateRuleValidationError{ + field: fmt.Sprintf("Requires[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FilterStateRuleValidationError{ + field: fmt.Sprintf("Requires[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if len(errors) > 0 { + return FilterStateRuleMultiError(errors) + } + return nil +} + +// FilterStateRuleMultiError is an error wrapping multiple validation errors +// returned by FilterStateRule.ValidateAll() if the designated constraints +// aren't met. +type FilterStateRuleMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FilterStateRuleMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FilterStateRuleMultiError) AllErrors() []error { return m } + +// FilterStateRuleValidationError is the validation error returned by +// FilterStateRule.Validate if the designated constraints aren't met. +type FilterStateRuleValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FilterStateRuleValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FilterStateRuleValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FilterStateRuleValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FilterStateRuleValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FilterStateRuleValidationError) ErrorName() string { return "FilterStateRuleValidationError" } + +// Error satisfies the builtin error interface +func (e FilterStateRuleValidationError) 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 %sFilterStateRule.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FilterStateRuleValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FilterStateRuleValidationError{} + +// Validate checks the field values on JwtAuthentication 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 *JwtAuthentication) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JwtAuthentication 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 +// JwtAuthenticationMultiError, or nil if none found. +func (m *JwtAuthentication) ValidateAll() error { + return m.validate(true) +} + +func (m *JwtAuthentication) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + { + sorted_keys := make([]string, len(m.GetProviders())) + i := 0 + for key := range m.GetProviders() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetProviders()[key] + _ = val + + // no validation rules for Providers[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtAuthenticationValidationError{ + field: fmt.Sprintf("Providers[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtAuthenticationValidationError{ + field: fmt.Sprintf("Providers[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return JwtAuthenticationValidationError{ + field: fmt.Sprintf("Providers[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + for idx, item := range m.GetRules() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtAuthenticationValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtAuthenticationValidationError{ + field: fmt.Sprintf("Rules[%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 JwtAuthenticationValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetFilterStateRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtAuthenticationValidationError{ + field: "FilterStateRules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtAuthenticationValidationError{ + field: "FilterStateRules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterStateRules()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return JwtAuthenticationValidationError{ + field: "FilterStateRules", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for BypassCorsPreflight + + { + sorted_keys := make([]string, len(m.GetRequirementMap())) + i := 0 + for key := range m.GetRequirementMap() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetRequirementMap()[key] + _ = val + + // no validation rules for RequirementMap[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JwtAuthenticationValidationError{ + field: fmt.Sprintf("RequirementMap[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JwtAuthenticationValidationError{ + field: fmt.Sprintf("RequirementMap[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return JwtAuthenticationValidationError{ + field: fmt.Sprintf("RequirementMap[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if len(errors) > 0 { + return JwtAuthenticationMultiError(errors) + } + return nil +} + +// JwtAuthenticationMultiError is an error wrapping multiple validation errors +// returned by JwtAuthentication.ValidateAll() if the designated constraints +// aren't met. +type JwtAuthenticationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JwtAuthenticationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JwtAuthenticationMultiError) AllErrors() []error { return m } + +// JwtAuthenticationValidationError is the validation error returned by +// JwtAuthentication.Validate if the designated constraints aren't met. +type JwtAuthenticationValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e JwtAuthenticationValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e JwtAuthenticationValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e JwtAuthenticationValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e JwtAuthenticationValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e JwtAuthenticationValidationError) ErrorName() string { + return "JwtAuthenticationValidationError" +} + +// Error satisfies the builtin error interface +func (e JwtAuthenticationValidationError) 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 %sJwtAuthentication.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = JwtAuthenticationValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = JwtAuthenticationValidationError{} + +// Validate checks the field values on PerRouteConfig 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 *PerRouteConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PerRouteConfig 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 PerRouteConfigMultiError, +// or nil if none found. +func (m *PerRouteConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *PerRouteConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.RequirementSpecifier.(type) { + + case *PerRouteConfig_Disabled: + + if m.GetDisabled() != true { + err := PerRouteConfigValidationError{ + field: "Disabled", + reason: "value must equal true", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *PerRouteConfig_RequirementName: + + if utf8.RuneCountInString(m.GetRequirementName()) < 1 { + err := PerRouteConfigValidationError{ + field: "RequirementName", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + default: + err := PerRouteConfigValidationError{ + field: "RequirementSpecifier", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return PerRouteConfigMultiError(errors) + } + return nil +} + +// PerRouteConfigMultiError is an error wrapping multiple validation errors +// returned by PerRouteConfig.ValidateAll() if the designated constraints +// aren't met. +type PerRouteConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PerRouteConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PerRouteConfigMultiError) AllErrors() []error { return m } + +// PerRouteConfigValidationError is the validation error returned by +// PerRouteConfig.Validate if the designated constraints aren't met. +type PerRouteConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PerRouteConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PerRouteConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PerRouteConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PerRouteConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PerRouteConfigValidationError) ErrorName() string { return "PerRouteConfigValidationError" } + +// Error satisfies the builtin error interface +func (e PerRouteConfigValidationError) 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 %sPerRouteConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PerRouteConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PerRouteConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/kill_request/v3/kill_request.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/kill_request/v3/kill_request.pb.go new file mode 100644 index 0000000000000..9bcedb83f86bf --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/kill_request/v3/kill_request.pb.go @@ -0,0 +1,261 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/kill_request/v3/kill_request.proto + +package kill_requestv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/type/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// On which direction should the filter check for the “kill_request_header“. +// Default to “REQUEST“ if unspecified. +type KillRequest_Direction int32 + +const ( + KillRequest_REQUEST KillRequest_Direction = 0 + KillRequest_RESPONSE KillRequest_Direction = 1 +) + +// Enum value maps for KillRequest_Direction. +var ( + KillRequest_Direction_name = map[int32]string{ + 0: "REQUEST", + 1: "RESPONSE", + } + KillRequest_Direction_value = map[string]int32{ + "REQUEST": 0, + "RESPONSE": 1, + } +) + +func (x KillRequest_Direction) Enum() *KillRequest_Direction { + p := new(KillRequest_Direction) + *p = x + return p +} + +func (x KillRequest_Direction) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (KillRequest_Direction) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_enumTypes[0].Descriptor() +} + +func (KillRequest_Direction) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_enumTypes[0] +} + +func (x KillRequest_Direction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use KillRequest_Direction.Descriptor instead. +func (KillRequest_Direction) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_rawDescGZIP(), []int{0, 0} +} + +// Configuration for KillRequest filter. +type KillRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The probability that a Kill request will be triggered. + Probability *v3.FractionalPercent `protobuf:"bytes,1,opt,name=probability,proto3" json:"probability,omitempty"` + // The name of the kill request header. If this field is not empty, it will override the :ref:`default header ` name. Otherwise the default header name will be used. + KillRequestHeader string `protobuf:"bytes,2,opt,name=kill_request_header,json=killRequestHeader,proto3" json:"kill_request_header,omitempty"` + Direction KillRequest_Direction `protobuf:"varint,3,opt,name=direction,proto3,enum=envoy.extensions.filters.http.kill_request.v3.KillRequest_Direction" json:"direction,omitempty"` +} + +func (x *KillRequest) Reset() { + *x = KillRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KillRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KillRequest) ProtoMessage() {} + +func (x *KillRequest) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KillRequest.ProtoReflect.Descriptor instead. +func (*KillRequest) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_rawDescGZIP(), []int{0} +} + +func (x *KillRequest) GetProbability() *v3.FractionalPercent { + if x != nil { + return x.Probability + } + return nil +} + +func (x *KillRequest) GetKillRequestHeader() string { + if x != nil { + return x.KillRequestHeader + } + return "" +} + +func (x *KillRequest) GetDirection() KillRequest_Direction { + if x != nil { + return x.Direction + } + return KillRequest_REQUEST +} + +var File_envoy_extensions_filters_http_kill_request_v3_kill_request_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_rawDesc = []byte{ + 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2f, 0x76, 0x33, 0x2f, + 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x76, + 0x33, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, + 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xa4, 0x02, 0x0a, 0x0b, 0x4b, 0x69, 0x6c, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x62, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x70, + 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x3b, 0x0a, 0x13, 0x6b, 0x69, + 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, + 0x02, 0xc8, 0x01, 0x00, 0x52, 0x11, 0x6b, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x6c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x4b, 0x69, 0x6c, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x26, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x00, 0x12, + 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x01, 0x42, 0xbe, 0x01, + 0x0a, 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6b, 0x69, + 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x4b, + 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x63, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_rawDescData = file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_rawDesc +) + +func file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_rawDescData +} + +var file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_goTypes = []interface{}{ + (KillRequest_Direction)(0), // 0: envoy.extensions.filters.http.kill_request.v3.KillRequest.Direction + (*KillRequest)(nil), // 1: envoy.extensions.filters.http.kill_request.v3.KillRequest + (*v3.FractionalPercent)(nil), // 2: envoy.type.v3.FractionalPercent +} +var file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.filters.http.kill_request.v3.KillRequest.probability:type_name -> envoy.type.v3.FractionalPercent + 0, // 1: envoy.extensions.filters.http.kill_request.v3.KillRequest.direction:type_name -> envoy.extensions.filters.http.kill_request.v3.KillRequest.Direction + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_init() } +func file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_init() { + if File_envoy_extensions_filters_http_kill_request_v3_kill_request_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KillRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_depIdxs, + EnumInfos: file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_enumTypes, + MessageInfos: file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_kill_request_v3_kill_request_proto = out.File + file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_rawDesc = nil + file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_goTypes = nil + file_envoy_extensions_filters_http_kill_request_v3_kill_request_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/kill_request/v3/kill_request.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/kill_request/v3/kill_request.pb.validate.go new file mode 100644 index 0000000000000..77d58afa6e1f7 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/kill_request/v3/kill_request.pb.validate.go @@ -0,0 +1,187 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/kill_request/v3/kill_request.proto + +package kill_requestv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on KillRequest 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 *KillRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on KillRequest 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 KillRequestMultiError, or +// nil if none found. +func (m *KillRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *KillRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetProbability()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, KillRequestValidationError{ + field: "Probability", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, KillRequestValidationError{ + field: "Probability", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProbability()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return KillRequestValidationError{ + field: "Probability", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if !_KillRequest_KillRequestHeader_Pattern.MatchString(m.GetKillRequestHeader()) { + err := KillRequestValidationError{ + field: "KillRequestHeader", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := KillRequest_Direction_name[int32(m.GetDirection())]; !ok { + err := KillRequestValidationError{ + field: "Direction", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return KillRequestMultiError(errors) + } + return nil +} + +// KillRequestMultiError is an error wrapping multiple validation errors +// returned by KillRequest.ValidateAll() if the designated constraints aren't met. +type KillRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m KillRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m KillRequestMultiError) AllErrors() []error { return m } + +// KillRequestValidationError is the validation error returned by +// KillRequest.Validate if the designated constraints aren't met. +type KillRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e KillRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e KillRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e KillRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e KillRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e KillRequestValidationError) ErrorName() string { return "KillRequestValidationError" } + +// Error satisfies the builtin error interface +func (e KillRequestValidationError) 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 %sKillRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = KillRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = KillRequestValidationError{} + +var _KillRequest_KillRequestHeader_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/lua/v3/lua.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/lua/v3/lua.pb.go new file mode 100644 index 0000000000000..e0158677f7b14 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/lua/v3/lua.pb.go @@ -0,0 +1,376 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/lua/v3/lua.proto + +package luav3 + +import ( + _ "github.com/cilium/proxy/go/envoy/annotations" + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Lua struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The Lua code that Envoy will execute. This can be a very small script that + // further loads code from disk if desired. Note that if JSON configuration is used, the code must + // be properly escaped. YAML configuration may be easier to read since YAML supports multi-line + // strings so complex scripts can be easily expressed inline in the configuration. + // + // This field is deprecated. Please use + // :ref:`default_source_code `. + // Only one of :ref:`inline_code ` + // or :ref:`default_source_code ` + // can be set for the Lua filter. + // + // Deprecated: Do not use. + InlineCode string `protobuf:"bytes,1,opt,name=inline_code,json=inlineCode,proto3" json:"inline_code,omitempty"` + // Map of named Lua source codes that can be referenced in :ref:`LuaPerRoute + // `. The Lua source codes can be + // loaded from inline string or local files. + // + // Example: + // + // .. code-block:: yaml + // + // source_codes: + // hello.lua: + // inline_string: | + // function envoy_on_response(response_handle) + // -- Do something. + // end + // world.lua: + // filename: /etc/lua/world.lua + SourceCodes map[string]*v3.DataSource `protobuf:"bytes,2,rep,name=source_codes,json=sourceCodes,proto3" json:"source_codes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The default Lua code that Envoy will execute. If no per route config is provided + // for the request, this Lua code will be applied. + DefaultSourceCode *v3.DataSource `protobuf:"bytes,3,opt,name=default_source_code,json=defaultSourceCode,proto3" json:"default_source_code,omitempty"` +} + +func (x *Lua) Reset() { + *x = Lua{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_lua_v3_lua_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Lua) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Lua) ProtoMessage() {} + +func (x *Lua) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_lua_v3_lua_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Lua.ProtoReflect.Descriptor instead. +func (*Lua) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_lua_v3_lua_proto_rawDescGZIP(), []int{0} +} + +// Deprecated: Do not use. +func (x *Lua) GetInlineCode() string { + if x != nil { + return x.InlineCode + } + return "" +} + +func (x *Lua) GetSourceCodes() map[string]*v3.DataSource { + if x != nil { + return x.SourceCodes + } + return nil +} + +func (x *Lua) GetDefaultSourceCode() *v3.DataSource { + if x != nil { + return x.DefaultSourceCode + } + return nil +} + +type LuaPerRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Override: + // + // *LuaPerRoute_Disabled + // *LuaPerRoute_Name + // *LuaPerRoute_SourceCode + Override isLuaPerRoute_Override `protobuf_oneof:"override"` +} + +func (x *LuaPerRoute) Reset() { + *x = LuaPerRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_lua_v3_lua_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LuaPerRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LuaPerRoute) ProtoMessage() {} + +func (x *LuaPerRoute) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_lua_v3_lua_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LuaPerRoute.ProtoReflect.Descriptor instead. +func (*LuaPerRoute) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_lua_v3_lua_proto_rawDescGZIP(), []int{1} +} + +func (m *LuaPerRoute) GetOverride() isLuaPerRoute_Override { + if m != nil { + return m.Override + } + return nil +} + +func (x *LuaPerRoute) GetDisabled() bool { + if x, ok := x.GetOverride().(*LuaPerRoute_Disabled); ok { + return x.Disabled + } + return false +} + +func (x *LuaPerRoute) GetName() string { + if x, ok := x.GetOverride().(*LuaPerRoute_Name); ok { + return x.Name + } + return "" +} + +func (x *LuaPerRoute) GetSourceCode() *v3.DataSource { + if x, ok := x.GetOverride().(*LuaPerRoute_SourceCode); ok { + return x.SourceCode + } + return nil +} + +type isLuaPerRoute_Override interface { + isLuaPerRoute_Override() +} + +type LuaPerRoute_Disabled struct { + // Disable the Lua filter for this particular vhost or route. If disabled is specified in + // multiple per-filter-configs, the most specific one will be used. + Disabled bool `protobuf:"varint,1,opt,name=disabled,proto3,oneof"` +} + +type LuaPerRoute_Name struct { + // A name of a Lua source code stored in + // :ref:`Lua.source_codes `. + Name string `protobuf:"bytes,2,opt,name=name,proto3,oneof"` +} + +type LuaPerRoute_SourceCode struct { + // A configured per-route Lua source code that can be served by RDS or provided inline. + SourceCode *v3.DataSource `protobuf:"bytes,3,opt,name=source_code,json=sourceCode,proto3,oneof"` +} + +func (*LuaPerRoute_Disabled) isLuaPerRoute_Override() {} + +func (*LuaPerRoute_Name) isLuaPerRoute_Override() {} + +func (*LuaPerRoute_SourceCode) isLuaPerRoute_Override() {} + +var File_envoy_extensions_filters_http_lua_v3_lua_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_lua_v3_lua_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x6c, 0x75, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x6c, 0x75, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x6c, 0x75, 0x61, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0xf2, 0x02, 0x0a, 0x03, 0x4c, 0x75, 0x61, 0x12, + 0x2c, 0x0a, 0x0b, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, + 0x30, 0x52, 0x0a, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x5d, 0x0a, + 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x6c, 0x75, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x75, 0x61, 0x2e, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x50, 0x0a, 0x13, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x11, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x1a, 0x60, + 0x0a, 0x10, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x6c, 0x75, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x75, 0x61, 0x22, 0xa9, 0x01, 0x0a, + 0x0b, 0x4c, 0x75, 0x61, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x08, + 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x43, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, + 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x0f, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x9b, 0x01, 0x0a, 0x32, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6c, 0x75, 0x61, 0x2e, 0x76, 0x33, 0x42, + 0x08, 0x4c, 0x75, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x51, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0x2f, 0x6c, 0x75, 0x61, 0x2f, 0x76, 0x33, 0x3b, 0x6c, 0x75, 0x61, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_lua_v3_lua_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_lua_v3_lua_proto_rawDescData = file_envoy_extensions_filters_http_lua_v3_lua_proto_rawDesc +) + +func file_envoy_extensions_filters_http_lua_v3_lua_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_lua_v3_lua_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_lua_v3_lua_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_lua_v3_lua_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_lua_v3_lua_proto_rawDescData +} + +var file_envoy_extensions_filters_http_lua_v3_lua_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_filters_http_lua_v3_lua_proto_goTypes = []interface{}{ + (*Lua)(nil), // 0: envoy.extensions.filters.http.lua.v3.Lua + (*LuaPerRoute)(nil), // 1: envoy.extensions.filters.http.lua.v3.LuaPerRoute + nil, // 2: envoy.extensions.filters.http.lua.v3.Lua.SourceCodesEntry + (*v3.DataSource)(nil), // 3: envoy.config.core.v3.DataSource +} +var file_envoy_extensions_filters_http_lua_v3_lua_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.filters.http.lua.v3.Lua.source_codes:type_name -> envoy.extensions.filters.http.lua.v3.Lua.SourceCodesEntry + 3, // 1: envoy.extensions.filters.http.lua.v3.Lua.default_source_code:type_name -> envoy.config.core.v3.DataSource + 3, // 2: envoy.extensions.filters.http.lua.v3.LuaPerRoute.source_code:type_name -> envoy.config.core.v3.DataSource + 3, // 3: envoy.extensions.filters.http.lua.v3.Lua.SourceCodesEntry.value:type_name -> envoy.config.core.v3.DataSource + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_lua_v3_lua_proto_init() } +func file_envoy_extensions_filters_http_lua_v3_lua_proto_init() { + if File_envoy_extensions_filters_http_lua_v3_lua_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_lua_v3_lua_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Lua); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_lua_v3_lua_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LuaPerRoute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_http_lua_v3_lua_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*LuaPerRoute_Disabled)(nil), + (*LuaPerRoute_Name)(nil), + (*LuaPerRoute_SourceCode)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_lua_v3_lua_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_lua_v3_lua_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_lua_v3_lua_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_lua_v3_lua_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_lua_v3_lua_proto = out.File + file_envoy_extensions_filters_http_lua_v3_lua_proto_rawDesc = nil + file_envoy_extensions_filters_http_lua_v3_lua_proto_goTypes = nil + file_envoy_extensions_filters_http_lua_v3_lua_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/lua/v3/lua.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/lua/v3/lua.pb.validate.go new file mode 100644 index 0000000000000..3ed14f877ccef --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/lua/v3/lua.pb.validate.go @@ -0,0 +1,379 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/lua/v3/lua.proto + +package luav3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Lua 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 *Lua) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Lua 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 LuaMultiError, or nil if none found. +func (m *Lua) ValidateAll() error { + return m.validate(true) +} + +func (m *Lua) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for InlineCode + + { + sorted_keys := make([]string, len(m.GetSourceCodes())) + i := 0 + for key := range m.GetSourceCodes() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetSourceCodes()[key] + _ = val + + // no validation rules for SourceCodes[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LuaValidationError{ + field: fmt.Sprintf("SourceCodes[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LuaValidationError{ + field: fmt.Sprintf("SourceCodes[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LuaValidationError{ + field: fmt.Sprintf("SourceCodes[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if all { + switch v := interface{}(m.GetDefaultSourceCode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LuaValidationError{ + field: "DefaultSourceCode", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LuaValidationError{ + field: "DefaultSourceCode", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDefaultSourceCode()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LuaValidationError{ + field: "DefaultSourceCode", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return LuaMultiError(errors) + } + return nil +} + +// LuaMultiError is an error wrapping multiple validation errors returned by +// Lua.ValidateAll() if the designated constraints aren't met. +type LuaMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LuaMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LuaMultiError) AllErrors() []error { return m } + +// LuaValidationError is the validation error returned by Lua.Validate if the +// designated constraints aren't met. +type LuaValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e LuaValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e LuaValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e LuaValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e LuaValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e LuaValidationError) ErrorName() string { return "LuaValidationError" } + +// Error satisfies the builtin error interface +func (e LuaValidationError) 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 %sLua.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = LuaValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = LuaValidationError{} + +// Validate checks the field values on LuaPerRoute 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 *LuaPerRoute) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LuaPerRoute 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 LuaPerRouteMultiError, or +// nil if none found. +func (m *LuaPerRoute) ValidateAll() error { + return m.validate(true) +} + +func (m *LuaPerRoute) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.Override.(type) { + + case *LuaPerRoute_Disabled: + + if m.GetDisabled() != true { + err := LuaPerRouteValidationError{ + field: "Disabled", + reason: "value must equal true", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *LuaPerRoute_Name: + + if utf8.RuneCountInString(m.GetName()) < 1 { + err := LuaPerRouteValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *LuaPerRoute_SourceCode: + + if all { + switch v := interface{}(m.GetSourceCode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LuaPerRouteValidationError{ + field: "SourceCode", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LuaPerRouteValidationError{ + field: "SourceCode", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSourceCode()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LuaPerRouteValidationError{ + field: "SourceCode", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := LuaPerRouteValidationError{ + field: "Override", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return LuaPerRouteMultiError(errors) + } + return nil +} + +// LuaPerRouteMultiError is an error wrapping multiple validation errors +// returned by LuaPerRoute.ValidateAll() if the designated constraints aren't met. +type LuaPerRouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LuaPerRouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LuaPerRouteMultiError) AllErrors() []error { return m } + +// LuaPerRouteValidationError is the validation error returned by +// LuaPerRoute.Validate if the designated constraints aren't met. +type LuaPerRouteValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e LuaPerRouteValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e LuaPerRouteValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e LuaPerRouteValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e LuaPerRouteValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e LuaPerRouteValidationError) ErrorName() string { return "LuaPerRouteValidationError" } + +// Error satisfies the builtin error interface +func (e LuaPerRouteValidationError) 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 %sLuaPerRoute.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = LuaPerRouteValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = LuaPerRouteValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/oauth2/v3/oauth.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/oauth2/v3/oauth.pb.go new file mode 100644 index 0000000000000..b7f15b3b31bdb --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/oauth2/v3/oauth.pb.go @@ -0,0 +1,625 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/oauth2/v3/oauth.proto + +package oauth2v3 + +import ( + v31 "github.com/cilium/proxy/go/envoy/config/core/v3" + v33 "github.com/cilium/proxy/go/envoy/config/route/v3" + v3 "github.com/cilium/proxy/go/envoy/extensions/transport_sockets/tls/v3" + v32 "github.com/cilium/proxy/go/envoy/type/matcher/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type OAuth2Credentials struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The client_id to be used in the authorize calls. This value will be URL encoded when sent to the OAuth server. + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + // The secret used to retrieve the access token. This value will be URL encoded when sent to the OAuth server. + TokenSecret *v3.SdsSecretConfig `protobuf:"bytes,2,opt,name=token_secret,json=tokenSecret,proto3" json:"token_secret,omitempty"` + // Configures how the secret token should be created. + // + // Types that are assignable to TokenFormation: + // + // *OAuth2Credentials_HmacSecret + TokenFormation isOAuth2Credentials_TokenFormation `protobuf_oneof:"token_formation"` + // The cookie names used in OAuth filters flow. + CookieNames *OAuth2Credentials_CookieNames `protobuf:"bytes,4,opt,name=cookie_names,json=cookieNames,proto3" json:"cookie_names,omitempty"` +} + +func (x *OAuth2Credentials) Reset() { + *x = OAuth2Credentials{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OAuth2Credentials) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OAuth2Credentials) ProtoMessage() {} + +func (x *OAuth2Credentials) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OAuth2Credentials.ProtoReflect.Descriptor instead. +func (*OAuth2Credentials) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDescGZIP(), []int{0} +} + +func (x *OAuth2Credentials) GetClientId() string { + if x != nil { + return x.ClientId + } + return "" +} + +func (x *OAuth2Credentials) GetTokenSecret() *v3.SdsSecretConfig { + if x != nil { + return x.TokenSecret + } + return nil +} + +func (m *OAuth2Credentials) GetTokenFormation() isOAuth2Credentials_TokenFormation { + if m != nil { + return m.TokenFormation + } + return nil +} + +func (x *OAuth2Credentials) GetHmacSecret() *v3.SdsSecretConfig { + if x, ok := x.GetTokenFormation().(*OAuth2Credentials_HmacSecret); ok { + return x.HmacSecret + } + return nil +} + +func (x *OAuth2Credentials) GetCookieNames() *OAuth2Credentials_CookieNames { + if x != nil { + return x.CookieNames + } + return nil +} + +type isOAuth2Credentials_TokenFormation interface { + isOAuth2Credentials_TokenFormation() +} + +type OAuth2Credentials_HmacSecret struct { + // If present, the secret token will be a HMAC using the provided secret. + HmacSecret *v3.SdsSecretConfig `protobuf:"bytes,3,opt,name=hmac_secret,json=hmacSecret,proto3,oneof"` +} + +func (*OAuth2Credentials_HmacSecret) isOAuth2Credentials_TokenFormation() {} + +// OAuth config +// +// [#next-free-field: 11] +type OAuth2Config struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Endpoint on the authorization server to retrieve the access token from. + TokenEndpoint *v31.HttpUri `protobuf:"bytes,1,opt,name=token_endpoint,json=tokenEndpoint,proto3" json:"token_endpoint,omitempty"` + // The endpoint redirect to for authorization in response to unauthorized requests. + AuthorizationEndpoint string `protobuf:"bytes,2,opt,name=authorization_endpoint,json=authorizationEndpoint,proto3" json:"authorization_endpoint,omitempty"` + // Credentials used for OAuth. + Credentials *OAuth2Credentials `protobuf:"bytes,3,opt,name=credentials,proto3" json:"credentials,omitempty"` + // The redirect URI passed to the authorization endpoint. Supports header formatting + // tokens. For more information, including details on header value syntax, see the + // documentation on :ref:`custom request headers `. + // + // This URI should not contain any query parameters. + RedirectUri string `protobuf:"bytes,4,opt,name=redirect_uri,json=redirectUri,proto3" json:"redirect_uri,omitempty"` + // Matching criteria used to determine whether a path appears to be the result of a redirect from the authorization server. + RedirectPathMatcher *v32.PathMatcher `protobuf:"bytes,5,opt,name=redirect_path_matcher,json=redirectPathMatcher,proto3" json:"redirect_path_matcher,omitempty"` + // The path to sign a user out, clearing their credential cookies. + SignoutPath *v32.PathMatcher `protobuf:"bytes,6,opt,name=signout_path,json=signoutPath,proto3" json:"signout_path,omitempty"` + // Forward the OAuth token as a Bearer to upstream web service. + ForwardBearerToken bool `protobuf:"varint,7,opt,name=forward_bearer_token,json=forwardBearerToken,proto3" json:"forward_bearer_token,omitempty"` + // Any request that matches any of the provided matchers will be passed through without OAuth validation. + PassThroughMatcher []*v33.HeaderMatcher `protobuf:"bytes,8,rep,name=pass_through_matcher,json=passThroughMatcher,proto3" json:"pass_through_matcher,omitempty"` + // Optional list of OAuth scopes to be claimed in the authorization request. If not specified, + // defaults to "user" scope. + // OAuth RFC https://tools.ietf.org/html/rfc6749#section-3.3 + AuthScopes []string `protobuf:"bytes,9,rep,name=auth_scopes,json=authScopes,proto3" json:"auth_scopes,omitempty"` + // Optional resource parameter for authorization request + // RFC: https://tools.ietf.org/html/rfc8707 + Resources []string `protobuf:"bytes,10,rep,name=resources,proto3" json:"resources,omitempty"` +} + +func (x *OAuth2Config) Reset() { + *x = OAuth2Config{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OAuth2Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OAuth2Config) ProtoMessage() {} + +func (x *OAuth2Config) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OAuth2Config.ProtoReflect.Descriptor instead. +func (*OAuth2Config) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDescGZIP(), []int{1} +} + +func (x *OAuth2Config) GetTokenEndpoint() *v31.HttpUri { + if x != nil { + return x.TokenEndpoint + } + return nil +} + +func (x *OAuth2Config) GetAuthorizationEndpoint() string { + if x != nil { + return x.AuthorizationEndpoint + } + return "" +} + +func (x *OAuth2Config) GetCredentials() *OAuth2Credentials { + if x != nil { + return x.Credentials + } + return nil +} + +func (x *OAuth2Config) GetRedirectUri() string { + if x != nil { + return x.RedirectUri + } + return "" +} + +func (x *OAuth2Config) GetRedirectPathMatcher() *v32.PathMatcher { + if x != nil { + return x.RedirectPathMatcher + } + return nil +} + +func (x *OAuth2Config) GetSignoutPath() *v32.PathMatcher { + if x != nil { + return x.SignoutPath + } + return nil +} + +func (x *OAuth2Config) GetForwardBearerToken() bool { + if x != nil { + return x.ForwardBearerToken + } + return false +} + +func (x *OAuth2Config) GetPassThroughMatcher() []*v33.HeaderMatcher { + if x != nil { + return x.PassThroughMatcher + } + return nil +} + +func (x *OAuth2Config) GetAuthScopes() []string { + if x != nil { + return x.AuthScopes + } + return nil +} + +func (x *OAuth2Config) GetResources() []string { + if x != nil { + return x.Resources + } + return nil +} + +// Filter config. +type OAuth2 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Leave this empty to disable OAuth2 for a specific route, using per filter config. + Config *OAuth2Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *OAuth2) Reset() { + *x = OAuth2{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OAuth2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OAuth2) ProtoMessage() {} + +func (x *OAuth2) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OAuth2.ProtoReflect.Descriptor instead. +func (*OAuth2) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDescGZIP(), []int{2} +} + +func (x *OAuth2) GetConfig() *OAuth2Config { + if x != nil { + return x.Config + } + return nil +} + +type OAuth2Credentials_CookieNames struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Cookie name to hold OAuth bearer token value. When the authentication server validates the + // client and returns an authorization token back to the OAuth filter, no matter what format + // that token is, if :ref:`forward_bearer_token ` + // is set to true the filter will send over the bearer token as a cookie with this name to the + // upstream. Defaults to “BearerToken“. + BearerToken string `protobuf:"bytes,1,opt,name=bearer_token,json=bearerToken,proto3" json:"bearer_token,omitempty"` + // Cookie name to hold OAuth HMAC value. Defaults to “OauthHMAC“. + OauthHmac string `protobuf:"bytes,2,opt,name=oauth_hmac,json=oauthHmac,proto3" json:"oauth_hmac,omitempty"` + // Cookie name to hold OAuth expiry value. Defaults to “OauthExpires“. + OauthExpires string `protobuf:"bytes,3,opt,name=oauth_expires,json=oauthExpires,proto3" json:"oauth_expires,omitempty"` +} + +func (x *OAuth2Credentials_CookieNames) Reset() { + *x = OAuth2Credentials_CookieNames{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OAuth2Credentials_CookieNames) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OAuth2Credentials_CookieNames) ProtoMessage() {} + +func (x *OAuth2Credentials_CookieNames) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OAuth2Credentials_CookieNames.ProtoReflect.Descriptor instead. +func (*OAuth2Credentials_CookieNames) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *OAuth2Credentials_CookieNames) GetBearerToken() string { + if x != nil { + return x.BearerToken + } + return "" +} + +func (x *OAuth2Credentials_CookieNames) GetOauthHmac() string { + if x != nil { + return x.OauthHmac + } + return "" +} + +func (x *OAuth2Credentials_CookieNames) GetOauthExpires() string { + if x != nil { + return x.OauthExpires + } + return "" +} + +var File_envoy_extensions_filters_http_oauth2_v3_oauth_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDesc = []byte{ + 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x2f, 0x76, 0x33, 0x2f, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x2e, 0x76, 0x33, 0x1a, 0x23, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x75, 0x72, 0x69, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, + 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 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, 0xac, 0x04, 0x0a, 0x11, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x43, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x24, 0x0a, 0x09, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, + 0x67, 0x0a, 0x0c, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, + 0x33, 0x2e, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x67, 0x0a, 0x0b, 0x68, 0x6d, 0x61, 0x63, + 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, + 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0a, 0x68, 0x6d, 0x61, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x12, 0x69, 0x0a, 0x0c, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x2e, 0x76, + 0x33, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x2e, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, + 0x0b, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x1a, 0x9b, 0x01, 0x0a, + 0x0b, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x0c, + 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xd0, 0x01, 0x01, 0x52, + 0x0b, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2a, 0x0a, 0x0a, + 0x6f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x68, 0x6d, 0x61, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x6f, + 0x61, 0x75, 0x74, 0x68, 0x48, 0x6d, 0x61, 0x63, 0x12, 0x30, 0x0a, 0x0d, 0x6f, 0x61, 0x75, 0x74, + 0x68, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc0, 0x01, 0x01, 0xd0, 0x01, 0x01, 0x52, 0x0c, 0x6f, 0x61, + 0x75, 0x74, 0x68, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x42, 0x16, 0x0a, 0x0f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x03, 0xf8, + 0x42, 0x01, 0x22, 0xa4, 0x05, 0x0a, 0x0c, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x44, 0x0a, 0x0e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x55, 0x72, 0x69, 0x52, 0x0d, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x16, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x15, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x66, 0x0a, 0x0b, 0x63, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, + 0x61, 0x75, 0x74, 0x68, 0x32, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x32, 0x43, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, + 0x73, 0x12, 0x2a, 0x0a, 0x0c, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x75, 0x72, + 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x0b, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x55, 0x72, 0x69, 0x12, 0x60, 0x0a, + 0x15, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x72, 0x65, 0x64, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, + 0x4f, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x6f, 0x75, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, + 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, + 0x02, 0x10, 0x01, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x6f, 0x75, 0x74, 0x50, 0x61, 0x74, 0x68, + 0x12, 0x30, 0x0a, 0x14, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x62, 0x65, 0x61, 0x72, + 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, + 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x56, 0x0a, 0x14, 0x70, 0x61, 0x73, 0x73, 0x5f, 0x74, 0x68, 0x72, 0x6f, 0x75, + 0x67, 0x68, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x12, 0x70, 0x61, 0x73, 0x73, 0x54, 0x68, 0x72, 0x6f, + 0x75, 0x67, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x75, + 0x74, 0x68, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0a, 0x61, 0x75, 0x74, 0x68, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x57, 0x0a, 0x06, 0x4f, 0x41, 0x75, + 0x74, 0x68, 0x32, 0x12, 0x4d, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x41, + 0x75, 0x74, 0x68, 0x32, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x42, 0xa6, 0x01, 0x0a, 0x35, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x4f, 0x61, + 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x57, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, + 0x2f, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x2f, 0x76, 0x33, 0x3b, 0x6f, 0x61, 0x75, 0x74, 0x68, + 0x32, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDescData = file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDesc +) + +func file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDescData +} + +var file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_goTypes = []interface{}{ + (*OAuth2Credentials)(nil), // 0: envoy.extensions.filters.http.oauth2.v3.OAuth2Credentials + (*OAuth2Config)(nil), // 1: envoy.extensions.filters.http.oauth2.v3.OAuth2Config + (*OAuth2)(nil), // 2: envoy.extensions.filters.http.oauth2.v3.OAuth2 + (*OAuth2Credentials_CookieNames)(nil), // 3: envoy.extensions.filters.http.oauth2.v3.OAuth2Credentials.CookieNames + (*v3.SdsSecretConfig)(nil), // 4: envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig + (*v31.HttpUri)(nil), // 5: envoy.config.core.v3.HttpUri + (*v32.PathMatcher)(nil), // 6: envoy.type.matcher.v3.PathMatcher + (*v33.HeaderMatcher)(nil), // 7: envoy.config.route.v3.HeaderMatcher +} +var file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_depIdxs = []int32{ + 4, // 0: envoy.extensions.filters.http.oauth2.v3.OAuth2Credentials.token_secret:type_name -> envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig + 4, // 1: envoy.extensions.filters.http.oauth2.v3.OAuth2Credentials.hmac_secret:type_name -> envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig + 3, // 2: envoy.extensions.filters.http.oauth2.v3.OAuth2Credentials.cookie_names:type_name -> envoy.extensions.filters.http.oauth2.v3.OAuth2Credentials.CookieNames + 5, // 3: envoy.extensions.filters.http.oauth2.v3.OAuth2Config.token_endpoint:type_name -> envoy.config.core.v3.HttpUri + 0, // 4: envoy.extensions.filters.http.oauth2.v3.OAuth2Config.credentials:type_name -> envoy.extensions.filters.http.oauth2.v3.OAuth2Credentials + 6, // 5: envoy.extensions.filters.http.oauth2.v3.OAuth2Config.redirect_path_matcher:type_name -> envoy.type.matcher.v3.PathMatcher + 6, // 6: envoy.extensions.filters.http.oauth2.v3.OAuth2Config.signout_path:type_name -> envoy.type.matcher.v3.PathMatcher + 7, // 7: envoy.extensions.filters.http.oauth2.v3.OAuth2Config.pass_through_matcher:type_name -> envoy.config.route.v3.HeaderMatcher + 1, // 8: envoy.extensions.filters.http.oauth2.v3.OAuth2.config:type_name -> envoy.extensions.filters.http.oauth2.v3.OAuth2Config + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_init() } +func file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_init() { + if File_envoy_extensions_filters_http_oauth2_v3_oauth_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OAuth2Credentials); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OAuth2Config); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OAuth2); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OAuth2Credentials_CookieNames); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*OAuth2Credentials_HmacSecret)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_oauth2_v3_oauth_proto = out.File + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_rawDesc = nil + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_goTypes = nil + file_envoy_extensions_filters_http_oauth2_v3_oauth_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/oauth2/v3/oauth.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/oauth2/v3/oauth.pb.validate.go new file mode 100644 index 0000000000000..81d264d1c93b8 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/oauth2/v3/oauth.pb.validate.go @@ -0,0 +1,857 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/oauth2/v3/oauth.proto + +package oauth2v3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on OAuth2Credentials 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 *OAuth2Credentials) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OAuth2Credentials 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 +// OAuth2CredentialsMultiError, or nil if none found. +func (m *OAuth2Credentials) ValidateAll() error { + return m.validate(true) +} + +func (m *OAuth2Credentials) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetClientId()) < 1 { + err := OAuth2CredentialsValidationError{ + field: "ClientId", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetTokenSecret() == nil { + err := OAuth2CredentialsValidationError{ + field: "TokenSecret", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetTokenSecret()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OAuth2CredentialsValidationError{ + field: "TokenSecret", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OAuth2CredentialsValidationError{ + field: "TokenSecret", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTokenSecret()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OAuth2CredentialsValidationError{ + field: "TokenSecret", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetCookieNames()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OAuth2CredentialsValidationError{ + field: "CookieNames", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OAuth2CredentialsValidationError{ + field: "CookieNames", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCookieNames()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OAuth2CredentialsValidationError{ + field: "CookieNames", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.TokenFormation.(type) { + + case *OAuth2Credentials_HmacSecret: + + if m.GetHmacSecret() == nil { + err := OAuth2CredentialsValidationError{ + field: "HmacSecret", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetHmacSecret()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OAuth2CredentialsValidationError{ + field: "HmacSecret", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OAuth2CredentialsValidationError{ + field: "HmacSecret", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHmacSecret()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OAuth2CredentialsValidationError{ + field: "HmacSecret", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := OAuth2CredentialsValidationError{ + field: "TokenFormation", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return OAuth2CredentialsMultiError(errors) + } + return nil +} + +// OAuth2CredentialsMultiError is an error wrapping multiple validation errors +// returned by OAuth2Credentials.ValidateAll() if the designated constraints +// aren't met. +type OAuth2CredentialsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OAuth2CredentialsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OAuth2CredentialsMultiError) AllErrors() []error { return m } + +// OAuth2CredentialsValidationError is the validation error returned by +// OAuth2Credentials.Validate if the designated constraints aren't met. +type OAuth2CredentialsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OAuth2CredentialsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OAuth2CredentialsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OAuth2CredentialsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OAuth2CredentialsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OAuth2CredentialsValidationError) ErrorName() string { + return "OAuth2CredentialsValidationError" +} + +// Error satisfies the builtin error interface +func (e OAuth2CredentialsValidationError) 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 %sOAuth2Credentials.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OAuth2CredentialsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OAuth2CredentialsValidationError{} + +// Validate checks the field values on OAuth2Config 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 *OAuth2Config) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OAuth2Config 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 OAuth2ConfigMultiError, or +// nil if none found. +func (m *OAuth2Config) ValidateAll() error { + return m.validate(true) +} + +func (m *OAuth2Config) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetTokenEndpoint()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OAuth2ConfigValidationError{ + field: "TokenEndpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OAuth2ConfigValidationError{ + field: "TokenEndpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTokenEndpoint()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OAuth2ConfigValidationError{ + field: "TokenEndpoint", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if utf8.RuneCountInString(m.GetAuthorizationEndpoint()) < 1 { + err := OAuth2ConfigValidationError{ + field: "AuthorizationEndpoint", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetCredentials() == nil { + err := OAuth2ConfigValidationError{ + field: "Credentials", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetCredentials()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OAuth2ConfigValidationError{ + field: "Credentials", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OAuth2ConfigValidationError{ + field: "Credentials", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCredentials()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OAuth2ConfigValidationError{ + field: "Credentials", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if utf8.RuneCountInString(m.GetRedirectUri()) < 1 { + err := OAuth2ConfigValidationError{ + field: "RedirectUri", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetRedirectPathMatcher() == nil { + err := OAuth2ConfigValidationError{ + field: "RedirectPathMatcher", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetRedirectPathMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OAuth2ConfigValidationError{ + field: "RedirectPathMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OAuth2ConfigValidationError{ + field: "RedirectPathMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRedirectPathMatcher()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OAuth2ConfigValidationError{ + field: "RedirectPathMatcher", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetSignoutPath() == nil { + err := OAuth2ConfigValidationError{ + field: "SignoutPath", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetSignoutPath()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OAuth2ConfigValidationError{ + field: "SignoutPath", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OAuth2ConfigValidationError{ + field: "SignoutPath", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSignoutPath()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OAuth2ConfigValidationError{ + field: "SignoutPath", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ForwardBearerToken + + for idx, item := range m.GetPassThroughMatcher() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OAuth2ConfigValidationError{ + field: fmt.Sprintf("PassThroughMatcher[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OAuth2ConfigValidationError{ + field: fmt.Sprintf("PassThroughMatcher[%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 OAuth2ConfigValidationError{ + field: fmt.Sprintf("PassThroughMatcher[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return OAuth2ConfigMultiError(errors) + } + return nil +} + +// OAuth2ConfigMultiError is an error wrapping multiple validation errors +// returned by OAuth2Config.ValidateAll() if the designated constraints aren't met. +type OAuth2ConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OAuth2ConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OAuth2ConfigMultiError) AllErrors() []error { return m } + +// OAuth2ConfigValidationError is the validation error returned by +// OAuth2Config.Validate if the designated constraints aren't met. +type OAuth2ConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OAuth2ConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OAuth2ConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OAuth2ConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OAuth2ConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OAuth2ConfigValidationError) ErrorName() string { return "OAuth2ConfigValidationError" } + +// Error satisfies the builtin error interface +func (e OAuth2ConfigValidationError) 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 %sOAuth2Config.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OAuth2ConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OAuth2ConfigValidationError{} + +// Validate checks the field values on OAuth2 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 *OAuth2) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OAuth2 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 OAuth2MultiError, or nil if none found. +func (m *OAuth2) ValidateAll() error { + return m.validate(true) +} + +func (m *OAuth2) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OAuth2ValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OAuth2ValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OAuth2ValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return OAuth2MultiError(errors) + } + return nil +} + +// OAuth2MultiError is an error wrapping multiple validation errors returned by +// OAuth2.ValidateAll() if the designated constraints aren't met. +type OAuth2MultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OAuth2MultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OAuth2MultiError) AllErrors() []error { return m } + +// OAuth2ValidationError is the validation error returned by OAuth2.Validate if +// the designated constraints aren't met. +type OAuth2ValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OAuth2ValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OAuth2ValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OAuth2ValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OAuth2ValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OAuth2ValidationError) ErrorName() string { return "OAuth2ValidationError" } + +// Error satisfies the builtin error interface +func (e OAuth2ValidationError) 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 %sOAuth2.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OAuth2ValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OAuth2ValidationError{} + +// Validate checks the field values on OAuth2Credentials_CookieNames 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 *OAuth2Credentials_CookieNames) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OAuth2Credentials_CookieNames 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 +// OAuth2Credentials_CookieNamesMultiError, or nil if none found. +func (m *OAuth2Credentials_CookieNames) ValidateAll() error { + return m.validate(true) +} + +func (m *OAuth2Credentials_CookieNames) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetBearerToken() != "" { + + if !_OAuth2Credentials_CookieNames_BearerToken_Pattern.MatchString(m.GetBearerToken()) { + err := OAuth2Credentials_CookieNamesValidationError{ + field: "BearerToken", + reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if m.GetOauthHmac() != "" { + + if !_OAuth2Credentials_CookieNames_OauthHmac_Pattern.MatchString(m.GetOauthHmac()) { + err := OAuth2Credentials_CookieNamesValidationError{ + field: "OauthHmac", + reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if m.GetOauthExpires() != "" { + + if !_OAuth2Credentials_CookieNames_OauthExpires_Pattern.MatchString(m.GetOauthExpires()) { + err := OAuth2Credentials_CookieNamesValidationError{ + field: "OauthExpires", + reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if len(errors) > 0 { + return OAuth2Credentials_CookieNamesMultiError(errors) + } + return nil +} + +// OAuth2Credentials_CookieNamesMultiError is an error wrapping multiple +// validation errors returned by OAuth2Credentials_CookieNames.ValidateAll() +// if the designated constraints aren't met. +type OAuth2Credentials_CookieNamesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OAuth2Credentials_CookieNamesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OAuth2Credentials_CookieNamesMultiError) AllErrors() []error { return m } + +// OAuth2Credentials_CookieNamesValidationError is the validation error +// returned by OAuth2Credentials_CookieNames.Validate if the designated +// constraints aren't met. +type OAuth2Credentials_CookieNamesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OAuth2Credentials_CookieNamesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OAuth2Credentials_CookieNamesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OAuth2Credentials_CookieNamesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OAuth2Credentials_CookieNamesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OAuth2Credentials_CookieNamesValidationError) ErrorName() string { + return "OAuth2Credentials_CookieNamesValidationError" +} + +// Error satisfies the builtin error interface +func (e OAuth2Credentials_CookieNamesValidationError) 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 %sOAuth2Credentials_CookieNames.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OAuth2Credentials_CookieNamesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OAuth2Credentials_CookieNamesValidationError{} + +var _OAuth2Credentials_CookieNames_BearerToken_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$") + +var _OAuth2Credentials_CookieNames_OauthHmac_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$") + +var _OAuth2Credentials_CookieNames_OauthExpires_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$") diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/on_demand/v3/on_demand.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/on_demand/v3/on_demand.pb.go new file mode 100644 index 0000000000000..7d42a384beca1 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/on_demand/v3/on_demand.pb.go @@ -0,0 +1,362 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/on_demand/v3/on_demand.proto + +package on_demandv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration of on-demand CDS. +type OnDemandCds struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A configuration source for the service that will be used for + // on-demand cluster discovery. + Source *v3.ConfigSource `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + // xdstp:// resource locator for on-demand cluster collection. + ResourcesLocator string `protobuf:"bytes,2,opt,name=resources_locator,json=resourcesLocator,proto3" json:"resources_locator,omitempty"` + // The timeout for on demand cluster lookup. If not set, defaults to 5 seconds. + Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"` +} + +func (x *OnDemandCds) Reset() { + *x = OnDemandCds{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnDemandCds) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnDemandCds) ProtoMessage() {} + +func (x *OnDemandCds) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnDemandCds.ProtoReflect.Descriptor instead. +func (*OnDemandCds) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_rawDescGZIP(), []int{0} +} + +func (x *OnDemandCds) GetSource() *v3.ConfigSource { + if x != nil { + return x.Source + } + return nil +} + +func (x *OnDemandCds) GetResourcesLocator() string { + if x != nil { + return x.ResourcesLocator + } + return "" +} + +func (x *OnDemandCds) GetTimeout() *durationpb.Duration { + if x != nil { + return x.Timeout + } + return nil +} + +// On Demand Discovery filter config. +type OnDemand struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // An optional configuration for on-demand cluster discovery + // service. If not specified, the on-demand cluster discovery will + // be disabled. When it's specified, the filter will pause the + // request to an unknown cluster and will begin a cluster discovery + // process. When the discovery is finished (successfully or not), the + // request will be resumed for further processing. + Odcds *OnDemandCds `protobuf:"bytes,1,opt,name=odcds,proto3" json:"odcds,omitempty"` +} + +func (x *OnDemand) Reset() { + *x = OnDemand{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnDemand) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnDemand) ProtoMessage() {} + +func (x *OnDemand) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OnDemand.ProtoReflect.Descriptor instead. +func (*OnDemand) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_rawDescGZIP(), []int{1} +} + +func (x *OnDemand) GetOdcds() *OnDemandCds { + if x != nil { + return x.Odcds + } + return nil +} + +// Per-route configuration for On Demand Discovery. +type PerRouteConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // An optional configuration for on-demand cluster discovery + // service. If not specified, the on-demand cluster discovery will + // be disabled. When it's specified, the filter will pause the + // request to an unknown cluster and will begin a cluster discovery + // process. When the discovery is finished (successfully or not), the + // request will be resumed for further processing. + Odcds *OnDemandCds `protobuf:"bytes,1,opt,name=odcds,proto3" json:"odcds,omitempty"` +} + +func (x *PerRouteConfig) Reset() { + *x = PerRouteConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PerRouteConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PerRouteConfig) ProtoMessage() {} + +func (x *PerRouteConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PerRouteConfig.ProtoReflect.Descriptor instead. +func (*PerRouteConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_rawDescGZIP(), []int{2} +} + +func (x *PerRouteConfig) GetOdcds() *OnDemandCds { + if x != nil { + return x.Odcds + } + return nil +} + +var File_envoy_extensions_filters_http_on_demand_v3_on_demand_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_rawDesc = []byte{ + 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x2f, 0x76, 0x33, 0x2f, 0x6f, 0x6e, 0x5f, + 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x6e, 0x5f, 0x64, + 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x76, 0x33, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0xb5, 0x01, + 0x0a, 0x0b, 0x4f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x43, 0x64, 0x73, 0x12, 0x44, 0x0a, + 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, + 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x90, 0x01, 0x0a, 0x08, 0x4f, 0x6e, 0x44, 0x65, 0x6d, 0x61, + 0x6e, 0x64, 0x12, 0x4d, 0x0a, 0x05, 0x6f, 0x64, 0x63, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4f, + 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x43, 0x64, 0x73, 0x52, 0x05, 0x6f, 0x64, 0x63, 0x64, + 0x73, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x76, 0x32, 0x2e, + 0x4f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x22, 0x5f, 0x0a, 0x0e, 0x50, 0x65, 0x72, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4d, 0x0a, 0x05, 0x6f, 0x64, + 0x63, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6d, + 0x61, 0x6e, 0x64, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x43, + 0x64, 0x73, 0x52, 0x05, 0x6f, 0x64, 0x63, 0x64, 0x73, 0x42, 0xb2, 0x01, 0x0a, 0x38, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6d, + 0x61, 0x6e, 0x64, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x4f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x6f, 0x6e, + 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x2f, 0x76, 0x33, 0x3b, 0x6f, 0x6e, 0x5f, 0x64, 0x65, + 0x6d, 0x61, 0x6e, 0x64, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_rawDescData = file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_rawDesc +) + +func file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_rawDescData +} + +var file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_goTypes = []interface{}{ + (*OnDemandCds)(nil), // 0: envoy.extensions.filters.http.on_demand.v3.OnDemandCds + (*OnDemand)(nil), // 1: envoy.extensions.filters.http.on_demand.v3.OnDemand + (*PerRouteConfig)(nil), // 2: envoy.extensions.filters.http.on_demand.v3.PerRouteConfig + (*v3.ConfigSource)(nil), // 3: envoy.config.core.v3.ConfigSource + (*durationpb.Duration)(nil), // 4: google.protobuf.Duration +} +var file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_depIdxs = []int32{ + 3, // 0: envoy.extensions.filters.http.on_demand.v3.OnDemandCds.source:type_name -> envoy.config.core.v3.ConfigSource + 4, // 1: envoy.extensions.filters.http.on_demand.v3.OnDemandCds.timeout:type_name -> google.protobuf.Duration + 0, // 2: envoy.extensions.filters.http.on_demand.v3.OnDemand.odcds:type_name -> envoy.extensions.filters.http.on_demand.v3.OnDemandCds + 0, // 3: envoy.extensions.filters.http.on_demand.v3.PerRouteConfig.odcds:type_name -> envoy.extensions.filters.http.on_demand.v3.OnDemandCds + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_init() } +func file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_init() { + if File_envoy_extensions_filters_http_on_demand_v3_on_demand_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OnDemandCds); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OnDemand); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PerRouteConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_on_demand_v3_on_demand_proto = out.File + file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_rawDesc = nil + file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_goTypes = nil + file_envoy_extensions_filters_http_on_demand_v3_on_demand_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/on_demand/v3/on_demand.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/on_demand/v3/on_demand.pb.validate.go new file mode 100644 index 0000000000000..103716cae2512 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/on_demand/v3/on_demand.pb.validate.go @@ -0,0 +1,460 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/on_demand/v3/on_demand.proto + +package on_demandv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on OnDemandCds 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 *OnDemandCds) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OnDemandCds 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 OnDemandCdsMultiError, or +// nil if none found. +func (m *OnDemandCds) ValidateAll() error { + return m.validate(true) +} + +func (m *OnDemandCds) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetSource() == nil { + err := OnDemandCdsValidationError{ + field: "Source", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OnDemandCdsValidationError{ + field: "Source", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OnDemandCdsValidationError{ + field: "Source", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSource()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OnDemandCdsValidationError{ + field: "Source", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ResourcesLocator + + if all { + switch v := interface{}(m.GetTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OnDemandCdsValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OnDemandCdsValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OnDemandCdsValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return OnDemandCdsMultiError(errors) + } + return nil +} + +// OnDemandCdsMultiError is an error wrapping multiple validation errors +// returned by OnDemandCds.ValidateAll() if the designated constraints aren't met. +type OnDemandCdsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OnDemandCdsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OnDemandCdsMultiError) AllErrors() []error { return m } + +// OnDemandCdsValidationError is the validation error returned by +// OnDemandCds.Validate if the designated constraints aren't met. +type OnDemandCdsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OnDemandCdsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OnDemandCdsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OnDemandCdsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OnDemandCdsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OnDemandCdsValidationError) ErrorName() string { return "OnDemandCdsValidationError" } + +// Error satisfies the builtin error interface +func (e OnDemandCdsValidationError) 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 %sOnDemandCds.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OnDemandCdsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OnDemandCdsValidationError{} + +// Validate checks the field values on OnDemand 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 *OnDemand) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OnDemand 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 OnDemandMultiError, or nil +// if none found. +func (m *OnDemand) ValidateAll() error { + return m.validate(true) +} + +func (m *OnDemand) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetOdcds()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OnDemandValidationError{ + field: "Odcds", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OnDemandValidationError{ + field: "Odcds", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOdcds()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OnDemandValidationError{ + field: "Odcds", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return OnDemandMultiError(errors) + } + return nil +} + +// OnDemandMultiError is an error wrapping multiple validation errors returned +// by OnDemand.ValidateAll() if the designated constraints aren't met. +type OnDemandMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OnDemandMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OnDemandMultiError) AllErrors() []error { return m } + +// OnDemandValidationError is the validation error returned by +// OnDemand.Validate if the designated constraints aren't met. +type OnDemandValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OnDemandValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OnDemandValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OnDemandValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OnDemandValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OnDemandValidationError) ErrorName() string { return "OnDemandValidationError" } + +// Error satisfies the builtin error interface +func (e OnDemandValidationError) 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 %sOnDemand.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OnDemandValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OnDemandValidationError{} + +// Validate checks the field values on PerRouteConfig 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 *PerRouteConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PerRouteConfig 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 PerRouteConfigMultiError, +// or nil if none found. +func (m *PerRouteConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *PerRouteConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetOdcds()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PerRouteConfigValidationError{ + field: "Odcds", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PerRouteConfigValidationError{ + field: "Odcds", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOdcds()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PerRouteConfigValidationError{ + field: "Odcds", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return PerRouteConfigMultiError(errors) + } + return nil +} + +// PerRouteConfigMultiError is an error wrapping multiple validation errors +// returned by PerRouteConfig.ValidateAll() if the designated constraints +// aren't met. +type PerRouteConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PerRouteConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PerRouteConfigMultiError) AllErrors() []error { return m } + +// PerRouteConfigValidationError is the validation error returned by +// PerRouteConfig.Validate if the designated constraints aren't met. +type PerRouteConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PerRouteConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PerRouteConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PerRouteConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PerRouteConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PerRouteConfigValidationError) ErrorName() string { return "PerRouteConfigValidationError" } + +// Error satisfies the builtin error interface +func (e PerRouteConfigValidationError) 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 %sPerRouteConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PerRouteConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PerRouteConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/original_src/v3/original_src.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/original_src/v3/original_src.pb.go new file mode 100644 index 0000000000000..fba8e7034bcff --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/original_src/v3/original_src.pb.go @@ -0,0 +1,180 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/original_src/v3/original_src.proto + +package original_srcv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// The Original Src filter binds upstream connections to the original source address determined +// for the request. This address could come from something like the Proxy Protocol filter, or it +// could come from trusted http headers. +// [#extension: envoy.filters.http.original_src] +type OriginalSrc struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Sets the SO_MARK option on the upstream connection's socket to the provided value. Used to + // ensure that non-local addresses may be routed back through envoy when binding to the original + // source address. The option will not be applied if the mark is 0. + Mark uint32 `protobuf:"varint,1,opt,name=mark,proto3" json:"mark,omitempty"` +} + +func (x *OriginalSrc) Reset() { + *x = OriginalSrc{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_original_src_v3_original_src_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OriginalSrc) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OriginalSrc) ProtoMessage() {} + +func (x *OriginalSrc) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_original_src_v3_original_src_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OriginalSrc.ProtoReflect.Descriptor instead. +func (*OriginalSrc) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_original_src_v3_original_src_proto_rawDescGZIP(), []int{0} +} + +func (x *OriginalSrc) GetMark() uint32 { + if x != nil { + return x.Mark + } + return 0 +} + +var File_envoy_extensions_filters_http_original_src_v3_original_src_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_original_src_v3_original_src_proto_rawDesc = []byte{ + 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, 0x2f, 0x76, 0x33, 0x2f, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, 0x2e, 0x76, + 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x64, 0x0a, 0x0b, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x53, + 0x72, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x04, 0x6d, 0x61, 0x72, 0x6b, 0x3a, 0x41, 0x9a, 0xc5, 0x88, 0x1e, 0x3c, 0x0a, 0x3a, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, + 0x5f, 0x73, 0x72, 0x63, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x72, 0x63, 0x42, 0xbe, 0x01, 0x0a, 0x3b, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x4f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x61, 0x6c, 0x53, 0x72, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x63, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, + 0x74, 0x74, 0x70, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, + 0x2f, 0x76, 0x33, 0x3b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, + 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_original_src_v3_original_src_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_original_src_v3_original_src_proto_rawDescData = file_envoy_extensions_filters_http_original_src_v3_original_src_proto_rawDesc +) + +func file_envoy_extensions_filters_http_original_src_v3_original_src_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_original_src_v3_original_src_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_original_src_v3_original_src_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_original_src_v3_original_src_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_original_src_v3_original_src_proto_rawDescData +} + +var file_envoy_extensions_filters_http_original_src_v3_original_src_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_http_original_src_v3_original_src_proto_goTypes = []interface{}{ + (*OriginalSrc)(nil), // 0: envoy.extensions.filters.http.original_src.v3.OriginalSrc +} +var file_envoy_extensions_filters_http_original_src_v3_original_src_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_original_src_v3_original_src_proto_init() } +func file_envoy_extensions_filters_http_original_src_v3_original_src_proto_init() { + if File_envoy_extensions_filters_http_original_src_v3_original_src_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_original_src_v3_original_src_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OriginalSrc); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_original_src_v3_original_src_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_original_src_v3_original_src_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_original_src_v3_original_src_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_original_src_v3_original_src_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_original_src_v3_original_src_proto = out.File + file_envoy_extensions_filters_http_original_src_v3_original_src_proto_rawDesc = nil + file_envoy_extensions_filters_http_original_src_v3_original_src_proto_goTypes = nil + file_envoy_extensions_filters_http_original_src_v3_original_src_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/original_src/v3/original_src.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/original_src/v3/original_src.pb.validate.go new file mode 100644 index 0000000000000..45bc268efc53b --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/original_src/v3/original_src.pb.validate.go @@ -0,0 +1,136 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/original_src/v3/original_src.proto + +package original_srcv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on OriginalSrc 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 *OriginalSrc) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OriginalSrc 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 OriginalSrcMultiError, or +// nil if none found. +func (m *OriginalSrc) ValidateAll() error { + return m.validate(true) +} + +func (m *OriginalSrc) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Mark + + if len(errors) > 0 { + return OriginalSrcMultiError(errors) + } + return nil +} + +// OriginalSrcMultiError is an error wrapping multiple validation errors +// returned by OriginalSrc.ValidateAll() if the designated constraints aren't met. +type OriginalSrcMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OriginalSrcMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OriginalSrcMultiError) AllErrors() []error { return m } + +// OriginalSrcValidationError is the validation error returned by +// OriginalSrc.Validate if the designated constraints aren't met. +type OriginalSrcValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OriginalSrcValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OriginalSrcValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OriginalSrcValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OriginalSrcValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OriginalSrcValidationError) ErrorName() string { return "OriginalSrcValidationError" } + +// Error satisfies the builtin error interface +func (e OriginalSrcValidationError) 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 %sOriginalSrc.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OriginalSrcValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OriginalSrcValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/rate_limit_quota/v3/rate_limit_quota.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/rate_limit_quota/v3/rate_limit_quota.pb.go new file mode 100644 index 0000000000000..5a322664fdb38 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/rate_limit_quota/v3/rate_limit_quota.pb.go @@ -0,0 +1,1408 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/rate_limit_quota/v3/rate_limit_quota.proto + +package rate_limit_quotav3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + v32 "github.com/cilium/proxy/go/envoy/type/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + v31 "github.com/cncf/xds/go/xds/type/matcher/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + status "google.golang.org/genproto/googleapis/rpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configures the Rate Limit Quota filter. +// +// Can be overridden in the per-route and per-host configurations. +// The more specific definition completely overrides the less specific definition. +// [#next-free-field: 7] +type RateLimitQuotaFilterConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Configures the gRPC Rate Limit Quota Service (RLQS) RateLimitQuotaService. + RlqsServer *v3.GrpcService `protobuf:"bytes,1,opt,name=rlqs_server,json=rlqsServer,proto3" json:"rlqs_server,omitempty"` + // The application domain to use when calling the service. This enables sharing the quota + // server between different applications without fear of overlap. + // E.g., "envoy". + Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"` + // The match tree to use for grouping incoming requests into buckets. + // + // Example: + // + // .. validated-code-block:: yaml + // + // :type-name: xds.type.matcher.v3.Matcher + // + // matcher_list: + // matchers: + // # Assign requests with header['env'] set to 'staging' to the bucket { name: 'staging' } + // - predicate: + // single_predicate: + // input: + // typed_config: + // '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput + // header_name: env + // value_match: + // exact: staging + // on_match: + // action: + // typed_config: + // '@type': type.googleapis.com/envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings + // bucket_id_builder: + // bucket_id_builder: + // name: + // string_value: staging + // + // # Assign requests with header['user_group'] set to 'admin' to the bucket { acl: 'admin_users' } + // - predicate: + // single_predicate: + // input: + // typed_config: + // '@type': type.googleapis.com/xds.type.matcher.v3.HttpAttributesCelMatchInput + // custom_match: + // typed_config: + // '@type': type.googleapis.com/xds.type.matcher.v3.CelMatcher + // expr_match: + // # Shortened for illustration purposes. Here should be parsed CEL expression: + // # request.headers['user_group'] == 'admin' + // parsed_expr: {} + // on_match: + // action: + // typed_config: + // '@type': type.googleapis.com/envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings + // bucket_id_builder: + // bucket_id_builder: + // acl: + // string_value: admin_users + // + // # Catch-all clause for the requests not matched by any of the matchers. + // # In this example, deny all requests. + // on_no_match: + // action: + // typed_config: + // '@type': type.googleapis.com/envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings + // no_assignment_behavior: + // fallback_rate_limit: + // blanket_rule: DENY_ALL + // + // .. attention:: + // + // The first matched group wins. Once the request is matched into a bucket, matcher + // evaluation ends. + // + // Use “on_no_match“ field to assign the catch-all bucket. If a request is not matched + // into any bucket, and there's no “on_no_match“ field configured, the request will be + // ALLOWED by default. It will NOT be reported to the RLQS server. + // + // Refer to :ref:`Unified Matcher API ` + // documentation for more information on the matcher trees. + BucketMatchers *v31.Matcher `protobuf:"bytes,3,opt,name=bucket_matchers,json=bucketMatchers,proto3" json:"bucket_matchers,omitempty"` + // If set, this will enable -- but not necessarily enforce -- the rate limit for the given + // fraction of requests. + // + // Defaults to 100% of requests. + FilterEnabled *v3.RuntimeFractionalPercent `protobuf:"bytes,4,opt,name=filter_enabled,json=filterEnabled,proto3" json:"filter_enabled,omitempty"` + // If set, this will enforce the rate limit decisions for the given fraction of requests. + // For requests that are not enforced the filter will still obtain the quota and include it + // in the load computation, however the request will always be allowed regardless of the outcome + // of quota application. This allows validation or testing of the rate limiting service + // infrastructure without disrupting existing traffic. + // + // Note: this only applies to the fraction of enabled requests. + // + // Defaults to 100% of requests. + FilterEnforced *v3.RuntimeFractionalPercent `protobuf:"bytes,5,opt,name=filter_enforced,json=filterEnforced,proto3" json:"filter_enforced,omitempty"` + // Specifies a list of HTTP headers that should be added to each request that + // has been rate limited and is also forwarded upstream. This can only occur when the + // filter is enabled but not enforced. + RequestHeadersToAddWhenNotEnforced []*v3.HeaderValueOption `protobuf:"bytes,6,rep,name=request_headers_to_add_when_not_enforced,json=requestHeadersToAddWhenNotEnforced,proto3" json:"request_headers_to_add_when_not_enforced,omitempty"` +} + +func (x *RateLimitQuotaFilterConfig) Reset() { + *x = RateLimitQuotaFilterConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitQuotaFilterConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitQuotaFilterConfig) ProtoMessage() {} + +func (x *RateLimitQuotaFilterConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitQuotaFilterConfig.ProtoReflect.Descriptor instead. +func (*RateLimitQuotaFilterConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_rawDescGZIP(), []int{0} +} + +func (x *RateLimitQuotaFilterConfig) GetRlqsServer() *v3.GrpcService { + if x != nil { + return x.RlqsServer + } + return nil +} + +func (x *RateLimitQuotaFilterConfig) GetDomain() string { + if x != nil { + return x.Domain + } + return "" +} + +func (x *RateLimitQuotaFilterConfig) GetBucketMatchers() *v31.Matcher { + if x != nil { + return x.BucketMatchers + } + return nil +} + +func (x *RateLimitQuotaFilterConfig) GetFilterEnabled() *v3.RuntimeFractionalPercent { + if x != nil { + return x.FilterEnabled + } + return nil +} + +func (x *RateLimitQuotaFilterConfig) GetFilterEnforced() *v3.RuntimeFractionalPercent { + if x != nil { + return x.FilterEnforced + } + return nil +} + +func (x *RateLimitQuotaFilterConfig) GetRequestHeadersToAddWhenNotEnforced() []*v3.HeaderValueOption { + if x != nil { + return x.RequestHeadersToAddWhenNotEnforced + } + return nil +} + +// Per-route and per-host configuration overrides. The more specific definition completely +// overrides the less specific definition. +type RateLimitQuotaOverride struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The application domain to use when calling the service. This enables sharing the quota + // server between different applications without fear of overlap. + // E.g., "envoy". + // + // If empty, inherits the value from the less specific definition. + Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` + // The match tree to use for grouping incoming requests into buckets. + // + // If set, fully overrides the bucket matchers provided on the less specific definition. + // If not set, inherits the value from the less specific definition. + // + // See usage example: :ref:`RateLimitQuotaFilterConfig.bucket_matchers + // `. + BucketMatchers *v31.Matcher `protobuf:"bytes,2,opt,name=bucket_matchers,json=bucketMatchers,proto3" json:"bucket_matchers,omitempty"` +} + +func (x *RateLimitQuotaOverride) Reset() { + *x = RateLimitQuotaOverride{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitQuotaOverride) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitQuotaOverride) ProtoMessage() {} + +func (x *RateLimitQuotaOverride) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitQuotaOverride.ProtoReflect.Descriptor instead. +func (*RateLimitQuotaOverride) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_rawDescGZIP(), []int{1} +} + +func (x *RateLimitQuotaOverride) GetDomain() string { + if x != nil { + return x.Domain + } + return "" +} + +func (x *RateLimitQuotaOverride) GetBucketMatchers() *v31.Matcher { + if x != nil { + return x.BucketMatchers + } + return nil +} + +// Rate Limit Quota Bucket Settings to apply on the successful “bucket_matchers“ match. +// +// Specify this message in the :ref:`Matcher.OnMatch.action +// ` field of the +// “bucket_matchers“ matcher tree to assign the matched requests to the Quota Bucket. +// Usage example: :ref:`RateLimitQuotaFilterConfig.bucket_matchers +// `. +// [#next-free-field: 6] +type RateLimitQuotaBucketSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // “BucketId“ builder. + // + // :ref:`BucketId ` is a map from + // the string key to the string value which serves as bucket identifier common for on + // the control plane and the data plane. + // + // While “BucketId“ is always static, “BucketIdBuilder“ allows to populate map values + // with the dynamic properties associated with the each individual request. + // + // Example 1: static fields only + // + // “BucketIdBuilder“: + // + // .. validated-code-block:: yaml + // + // :type-name: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.BucketIdBuilder + // + // bucket_id_builder: + // name: + // string_value: my_bucket + // hello: + // string_value: world + // + // Produces the following “BucketId“ for all requests: + // + // .. validated-code-block:: yaml + // + // :type-name: envoy.service.rate_limit_quota.v3.BucketId + // + // bucket: + // name: my_bucket + // hello: world + // + // Example 2: static and dynamic fields + // + // .. validated-code-block:: yaml + // + // :type-name: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.BucketIdBuilder + // + // bucket_id_builder: + // name: + // string_value: my_bucket + // env: + // custom_value: + // typed_config: + // '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput + // header_name: environment + // + // In this example, the value of “BucketId“ key “env“ is substituted from the “environment“ + // request header. + // + // This is equivalent to the following “pseudo-code“: + // + // .. code-block:: yaml + // + // name: 'my_bucket' + // env: $header['environment'] + // + // For example, the request with the HTTP header “env“ set to “staging“ will produce + // the following “BucketId“: + // + // .. validated-code-block:: yaml + // + // :type-name: envoy.service.rate_limit_quota.v3.BucketId + // + // bucket: + // name: my_bucket + // env: staging + // + // For the request with the HTTP header “environment“ set to “prod“, will produce: + // + // .. validated-code-block:: yaml + // + // :type-name: envoy.service.rate_limit_quota.v3.BucketId + // + // bucket: + // name: my_bucket + // env: prod + // + // .. note:: + // + // The order of ``BucketId`` keys do not matter. Buckets ``{ a: 'A', b: 'B' }`` and + // ``{ b: 'B', a: 'A' }`` are identical. + // + // If not set, requests will NOT be reported to the server, and will always limited + // according to :ref:`no_assignment_behavior + // ` + // configuration. + BucketIdBuilder *RateLimitQuotaBucketSettings_BucketIdBuilder `protobuf:"bytes,1,opt,name=bucket_id_builder,json=bucketIdBuilder,proto3" json:"bucket_id_builder,omitempty"` + // The interval at which the data plane (RLQS client) is to report quota usage for this bucket. + // + // When the first request is matched to a bucket with no assignment, the data plane is to report + // the request immediately in the :ref:`RateLimitQuotaUsageReports + // ` message. + // For the RLQS server, this signals that the data plane is now subscribed to + // the quota assignments in this bucket, and will start sending the assignment as described in + // the :ref:`RLQS documentation `. + // + // After sending the initial report, the data plane is to continue reporting the bucket usage with + // the internal specified in this field. + // [#comment: 100000000 nanoseconds = 0.1 seconds] + ReportingInterval *durationpb.Duration `protobuf:"bytes,2,opt,name=reporting_interval,json=reportingInterval,proto3" json:"reporting_interval,omitempty"` + // Customize the deny response to the requests over the rate limit. + // If not set, the filter will be configured as if an empty message is set, + // and will behave according to the defaults specified in :ref:`DenyResponseSettings + // `. + DenyResponseSettings *RateLimitQuotaBucketSettings_DenyResponseSettings `protobuf:"bytes,3,opt,name=deny_response_settings,json=denyResponseSettings,proto3" json:"deny_response_settings,omitempty"` + // Configures the behavior in the "no assignment" state: after the first request has been + // matched to the bucket, and before the the RLQS server returns the first quota assignment. + // + // If not set, the default behavior is to allow all requests. + NoAssignmentBehavior *RateLimitQuotaBucketSettings_NoAssignmentBehavior `protobuf:"bytes,4,opt,name=no_assignment_behavior,json=noAssignmentBehavior,proto3" json:"no_assignment_behavior,omitempty"` + // Configures the behavior in the "expired assignment" state: the bucket's assignment has expired, + // and cannot be refreshed. + // + // If not set, the bucket is abandoned when its “active“ assignment expires. + // The process of abandoning the bucket, and restarting the subscription is described in the + // :ref:`AbandonAction ` + // message. + ExpiredAssignmentBehavior *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior `protobuf:"bytes,5,opt,name=expired_assignment_behavior,json=expiredAssignmentBehavior,proto3" json:"expired_assignment_behavior,omitempty"` +} + +func (x *RateLimitQuotaBucketSettings) Reset() { + *x = RateLimitQuotaBucketSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitQuotaBucketSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitQuotaBucketSettings) ProtoMessage() {} + +func (x *RateLimitQuotaBucketSettings) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitQuotaBucketSettings.ProtoReflect.Descriptor instead. +func (*RateLimitQuotaBucketSettings) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_rawDescGZIP(), []int{2} +} + +func (x *RateLimitQuotaBucketSettings) GetBucketIdBuilder() *RateLimitQuotaBucketSettings_BucketIdBuilder { + if x != nil { + return x.BucketIdBuilder + } + return nil +} + +func (x *RateLimitQuotaBucketSettings) GetReportingInterval() *durationpb.Duration { + if x != nil { + return x.ReportingInterval + } + return nil +} + +func (x *RateLimitQuotaBucketSettings) GetDenyResponseSettings() *RateLimitQuotaBucketSettings_DenyResponseSettings { + if x != nil { + return x.DenyResponseSettings + } + return nil +} + +func (x *RateLimitQuotaBucketSettings) GetNoAssignmentBehavior() *RateLimitQuotaBucketSettings_NoAssignmentBehavior { + if x != nil { + return x.NoAssignmentBehavior + } + return nil +} + +func (x *RateLimitQuotaBucketSettings) GetExpiredAssignmentBehavior() *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior { + if x != nil { + return x.ExpiredAssignmentBehavior + } + return nil +} + +// Configures the behavior after the first request has been matched to the bucket, and before the +// the RLQS server returns the first quota assignment. +type RateLimitQuotaBucketSettings_NoAssignmentBehavior struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to NoAssignmentBehavior: + // + // *RateLimitQuotaBucketSettings_NoAssignmentBehavior_FallbackRateLimit + NoAssignmentBehavior isRateLimitQuotaBucketSettings_NoAssignmentBehavior_NoAssignmentBehavior `protobuf_oneof:"no_assignment_behavior"` +} + +func (x *RateLimitQuotaBucketSettings_NoAssignmentBehavior) Reset() { + *x = RateLimitQuotaBucketSettings_NoAssignmentBehavior{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitQuotaBucketSettings_NoAssignmentBehavior) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitQuotaBucketSettings_NoAssignmentBehavior) ProtoMessage() {} + +func (x *RateLimitQuotaBucketSettings_NoAssignmentBehavior) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitQuotaBucketSettings_NoAssignmentBehavior.ProtoReflect.Descriptor instead. +func (*RateLimitQuotaBucketSettings_NoAssignmentBehavior) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_rawDescGZIP(), []int{2, 0} +} + +func (m *RateLimitQuotaBucketSettings_NoAssignmentBehavior) GetNoAssignmentBehavior() isRateLimitQuotaBucketSettings_NoAssignmentBehavior_NoAssignmentBehavior { + if m != nil { + return m.NoAssignmentBehavior + } + return nil +} + +func (x *RateLimitQuotaBucketSettings_NoAssignmentBehavior) GetFallbackRateLimit() *v32.RateLimitStrategy { + if x, ok := x.GetNoAssignmentBehavior().(*RateLimitQuotaBucketSettings_NoAssignmentBehavior_FallbackRateLimit); ok { + return x.FallbackRateLimit + } + return nil +} + +type isRateLimitQuotaBucketSettings_NoAssignmentBehavior_NoAssignmentBehavior interface { + isRateLimitQuotaBucketSettings_NoAssignmentBehavior_NoAssignmentBehavior() +} + +type RateLimitQuotaBucketSettings_NoAssignmentBehavior_FallbackRateLimit struct { + // Apply pre-configured rate limiting strategy until the server sends the first assignment. + FallbackRateLimit *v32.RateLimitStrategy `protobuf:"bytes,1,opt,name=fallback_rate_limit,json=fallbackRateLimit,proto3,oneof"` +} + +func (*RateLimitQuotaBucketSettings_NoAssignmentBehavior_FallbackRateLimit) isRateLimitQuotaBucketSettings_NoAssignmentBehavior_NoAssignmentBehavior() { +} + +// Specifies the behavior when the bucket's assignment has expired, and cannot be refreshed for +// any reason. +type RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Limit the time :ref:`ExpiredAssignmentBehavior + // ` + // is applied. If the server doesn't respond within this duration: + // + // 1. Selected “ExpiredAssignmentBehavior“ is no longer applied. + // 2. The bucket is abandoned. The process of abandoning the bucket is described in the + // :ref:`AbandonAction ` + // message. + // 3. If a new request is matched into the bucket that has become abandoned, + // the data plane restarts the subscription to the bucket. The process of restarting the + // subscription is described in the :ref:`AbandonAction + // ` + // message. + // + // If the field is not set, the “ExpiredAssignmentBehavior“ time is **not limited**: + // it applies to the bucket until replaced by an “active“ assignment. + ExpiredAssignmentBehaviorTimeout *durationpb.Duration `protobuf:"bytes,1,opt,name=expired_assignment_behavior_timeout,json=expiredAssignmentBehaviorTimeout,proto3" json:"expired_assignment_behavior_timeout,omitempty"` + // Types that are assignable to ExpiredAssignmentBehavior: + // + // *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_FallbackRateLimit + // *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment_ + ExpiredAssignmentBehavior isRateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ExpiredAssignmentBehavior `protobuf_oneof:"expired_assignment_behavior"` +} + +func (x *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior) Reset() { + *x = RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior) ProtoMessage() {} + +func (x *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior.ProtoReflect.Descriptor instead. +func (*RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_rawDescGZIP(), []int{2, 1} +} + +func (x *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior) GetExpiredAssignmentBehaviorTimeout() *durationpb.Duration { + if x != nil { + return x.ExpiredAssignmentBehaviorTimeout + } + return nil +} + +func (m *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior) GetExpiredAssignmentBehavior() isRateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ExpiredAssignmentBehavior { + if m != nil { + return m.ExpiredAssignmentBehavior + } + return nil +} + +func (x *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior) GetFallbackRateLimit() *v32.RateLimitStrategy { + if x, ok := x.GetExpiredAssignmentBehavior().(*RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_FallbackRateLimit); ok { + return x.FallbackRateLimit + } + return nil +} + +func (x *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior) GetReuseLastAssignment() *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment { + if x, ok := x.GetExpiredAssignmentBehavior().(*RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment_); ok { + return x.ReuseLastAssignment + } + return nil +} + +type isRateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ExpiredAssignmentBehavior interface { + isRateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ExpiredAssignmentBehavior() +} + +type RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_FallbackRateLimit struct { + // Apply the rate limiting strategy to all requests matched into the bucket until the RLQS + // server sends a new assignment, or the :ref:`expired_assignment_behavior_timeout + // ` + // runs out. + FallbackRateLimit *v32.RateLimitStrategy `protobuf:"bytes,2,opt,name=fallback_rate_limit,json=fallbackRateLimit,proto3,oneof"` +} + +type RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment_ struct { + // Reuse the last “active“ assignment until the RLQS server sends a new assignment, or the + // :ref:`expired_assignment_behavior_timeout + // ` + // runs out. + ReuseLastAssignment *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment `protobuf:"bytes,3,opt,name=reuse_last_assignment,json=reuseLastAssignment,proto3,oneof"` +} + +func (*RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_FallbackRateLimit) isRateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ExpiredAssignmentBehavior() { +} + +func (*RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment_) isRateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ExpiredAssignmentBehavior() { +} + +// Customize the deny response to the requests over the rate limit. +type RateLimitQuotaBucketSettings_DenyResponseSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // HTTP response code to deny for HTTP requests (gRPC excluded). + // Defaults to 429 (:ref:`StatusCode.TooManyRequests`). + HttpStatus *v32.HttpStatus `protobuf:"bytes,1,opt,name=http_status,json=httpStatus,proto3" json:"http_status,omitempty"` + // HTTP response body used to deny for HTTP requests (gRPC excluded). + // If not set, an empty body is returned. + HttpBody *wrapperspb.BytesValue `protobuf:"bytes,2,opt,name=http_body,json=httpBody,proto3" json:"http_body,omitempty"` + // Configure the deny response for gRPC requests over the rate limit. + // Allows to specify the `RPC status code + // `_, + // and the error message. + // Defaults to the Status with the RPC Code “UNAVAILABLE“ and empty message. + // + // To identify gRPC requests, Envoy checks that the “Content-Type“ header is + // “application/grpc“, or one of the various “application/grpc+“ values. + // + // .. note:: + // + // The HTTP code for a gRPC response is always 200. + GrpcStatus *status.Status `protobuf:"bytes,3,opt,name=grpc_status,json=grpcStatus,proto3" json:"grpc_status,omitempty"` + // Specifies a list of HTTP headers that should be added to each response for requests that + // have been rate limited. Applies both to plain HTTP, and gRPC requests. + // The headers are added even when the rate limit quota was not enforced. + ResponseHeadersToAdd []*v3.HeaderValueOption `protobuf:"bytes,4,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` +} + +func (x *RateLimitQuotaBucketSettings_DenyResponseSettings) Reset() { + *x = RateLimitQuotaBucketSettings_DenyResponseSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitQuotaBucketSettings_DenyResponseSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitQuotaBucketSettings_DenyResponseSettings) ProtoMessage() {} + +func (x *RateLimitQuotaBucketSettings_DenyResponseSettings) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitQuotaBucketSettings_DenyResponseSettings.ProtoReflect.Descriptor instead. +func (*RateLimitQuotaBucketSettings_DenyResponseSettings) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_rawDescGZIP(), []int{2, 2} +} + +func (x *RateLimitQuotaBucketSettings_DenyResponseSettings) GetHttpStatus() *v32.HttpStatus { + if x != nil { + return x.HttpStatus + } + return nil +} + +func (x *RateLimitQuotaBucketSettings_DenyResponseSettings) GetHttpBody() *wrapperspb.BytesValue { + if x != nil { + return x.HttpBody + } + return nil +} + +func (x *RateLimitQuotaBucketSettings_DenyResponseSettings) GetGrpcStatus() *status.Status { + if x != nil { + return x.GrpcStatus + } + return nil +} + +func (x *RateLimitQuotaBucketSettings_DenyResponseSettings) GetResponseHeadersToAdd() []*v3.HeaderValueOption { + if x != nil { + return x.ResponseHeadersToAdd + } + return nil +} + +// “BucketIdBuilder“ makes it possible to build :ref:`BucketId +// ` with values substituted +// from the dynamic properties associated with each individual request. See usage examples in +// the docs to :ref:`bucket_id_builder +// ` +// field. +type RateLimitQuotaBucketSettings_BucketIdBuilder struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The map translated into the “BucketId“ map. + // + // The “string key“ of this map and becomes the key of “BucketId“ map as is. + // + // The “ValueBuilder value“ for the key can be: + // + // - static “StringValue string_value“ — becomes the value in the “BucketId“ map as is. + // - dynamic “TypedExtensionConfig custom_value“ — evaluated for each request. Must produce + // a string output, which becomes the value in the the “BucketId“ map. + // + // See usage examples in the docs to :ref:`bucket_id_builder + // ` + // field. + BucketIdBuilder map[string]*RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder `protobuf:"bytes,1,rep,name=bucket_id_builder,json=bucketIdBuilder,proto3" json:"bucket_id_builder,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *RateLimitQuotaBucketSettings_BucketIdBuilder) Reset() { + *x = RateLimitQuotaBucketSettings_BucketIdBuilder{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitQuotaBucketSettings_BucketIdBuilder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitQuotaBucketSettings_BucketIdBuilder) ProtoMessage() {} + +func (x *RateLimitQuotaBucketSettings_BucketIdBuilder) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitQuotaBucketSettings_BucketIdBuilder.ProtoReflect.Descriptor instead. +func (*RateLimitQuotaBucketSettings_BucketIdBuilder) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_rawDescGZIP(), []int{2, 3} +} + +func (x *RateLimitQuotaBucketSettings_BucketIdBuilder) GetBucketIdBuilder() map[string]*RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder { + if x != nil { + return x.BucketIdBuilder + } + return nil +} + +// Reuse the last known quota assignment, effectively extending it for the duration +// specified in the :ref:`expired_assignment_behavior_timeout +// ` +// field. +type RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment) Reset() { + *x = RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment) ProtoMessage() {} + +func (x *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment.ProtoReflect.Descriptor instead. +func (*RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_rawDescGZIP(), []int{2, 1, 0} +} + +// Produces the value of the :ref:`BucketId +// ` map. +type RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to ValueSpecifier: + // + // *RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder_StringValue + // *RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder_CustomValue + ValueSpecifier isRateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder_ValueSpecifier `protobuf_oneof:"value_specifier"` +} + +func (x *RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder) Reset() { + *x = RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder) ProtoMessage() {} + +func (x *RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder.ProtoReflect.Descriptor instead. +func (*RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_rawDescGZIP(), []int{2, 3, 0} +} + +func (m *RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder) GetValueSpecifier() isRateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder_ValueSpecifier { + if m != nil { + return m.ValueSpecifier + } + return nil +} + +func (x *RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder) GetStringValue() string { + if x, ok := x.GetValueSpecifier().(*RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder_StringValue); ok { + return x.StringValue + } + return "" +} + +func (x *RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder) GetCustomValue() *v3.TypedExtensionConfig { + if x, ok := x.GetValueSpecifier().(*RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder_CustomValue); ok { + return x.CustomValue + } + return nil +} + +type isRateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder_ValueSpecifier interface { + isRateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder_ValueSpecifier() +} + +type RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder_StringValue struct { + // Static string value — becomes the value in the :ref:`BucketId + // ` map as is. + StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"` +} + +type RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder_CustomValue struct { + // Dynamic value — evaluated for each request. Must produce a string output, which becomes + // the value in the :ref:`BucketId ` + // map. For example, extensions with the “envoy.matching.http.input“ category can be used. + CustomValue *v3.TypedExtensionConfig `protobuf:"bytes,2,opt,name=custom_value,json=customValue,proto3,oneof"` +} + +func (*RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder_StringValue) isRateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder_ValueSpecifier() { +} + +func (*RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder_CustomValue) isRateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder_ValueSpecifier() { +} + +var File_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_rawDesc = []byte{ + 0x0a, 0x48, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x61, + 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x71, + 0x75, 0x6f, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x31, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, + 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, + 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x96, 0x04, 0x0a, 0x1a, + 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4c, 0x0a, 0x0b, 0x72, 0x6c, + 0x71, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, 0x6c, + 0x71, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, + 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, + 0x01, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x4f, 0x0a, 0x0f, 0x62, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x12, 0x55, 0x0a, 0x0e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, + 0x6e, 0x74, 0x52, 0x0d, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x12, 0x57, 0x0a, 0x0f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x65, 0x6e, 0x66, 0x6f, + 0x72, 0x63, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x12, 0x87, 0x01, 0x0a, 0x28, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, + 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x5f, 0x77, 0x68, 0x65, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x65, + 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x0a, + 0x52, 0x22, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x54, 0x6f, 0x41, 0x64, 0x64, 0x57, 0x68, 0x65, 0x6e, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x66, 0x6f, + 0x72, 0x63, 0x65, 0x64, 0x22, 0x77, 0x0a, 0x16, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x45, 0x0a, 0x0f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0e, 0x62, + 0x75, 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x22, 0x92, 0x11, + 0x0a, 0x1c, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, + 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x8b, + 0x01, 0x0a, 0x11, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x5f, 0x62, 0x75, 0x69, + 0x6c, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x5f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x42, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x49, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x52, 0x0f, 0x62, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x49, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x12, + 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0xfa, 0x42, 0x0c, 0xaa, 0x01, 0x09, 0x08, 0x01, 0x2a, 0x05, 0x10, + 0x80, 0xc2, 0xd7, 0x2f, 0x52, 0x11, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x9a, 0x01, 0x0a, 0x16, 0x64, 0x65, 0x6e, 0x79, + 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x64, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x44, 0x65, 0x6e, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x14, + 0x64, 0x65, 0x6e, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x12, 0x9a, 0x01, 0x0a, 0x16, 0x6e, 0x6f, 0x5f, 0x61, 0x73, 0x73, 0x69, + 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x64, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x4e, 0x6f, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x52, 0x14, 0x6e, 0x6f, 0x41, + 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, + 0x72, 0x12, 0xa9, 0x01, 0x0a, 0x1b, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x61, 0x73, + 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, + 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x69, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, + 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, + 0x6f, 0x72, 0x52, 0x19, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x1a, 0x89, 0x01, + 0x0a, 0x14, 0x4e, 0x6f, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x65, + 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x12, 0x52, 0x0a, 0x13, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, + 0x63, 0x6b, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x74, 0x72, + 0x61, 0x74, 0x65, 0x67, 0x79, 0x48, 0x00, 0x52, 0x11, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, + 0x6b, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x1d, 0x0a, 0x16, 0x6e, 0x6f, + 0x5f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x65, 0x68, 0x61, + 0x76, 0x69, 0x6f, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xd4, 0x03, 0x0a, 0x19, 0x45, 0x78, + 0x70, 0x69, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x42, + 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x12, 0x72, 0x0a, 0x23, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x64, 0x5f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x65, + 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x2a, 0x00, 0x52, 0x20, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, + 0x76, 0x69, 0x6f, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x52, 0x0a, 0x13, 0x66, + 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x48, 0x00, 0x52, 0x11, 0x66, 0x61, + 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, + 0xb3, 0x01, 0x0a, 0x15, 0x72, 0x65, 0x75, 0x73, 0x65, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x61, + 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x7d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x61, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, + 0x74, 0x61, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x2e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x75, 0x73, 0x65, + 0x4c, 0x61, 0x73, 0x74, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, + 0x52, 0x13, 0x72, 0x65, 0x75, 0x73, 0x65, 0x4c, 0x61, 0x73, 0x74, 0x41, 0x73, 0x73, 0x69, 0x67, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x15, 0x0a, 0x13, 0x52, 0x65, 0x75, 0x73, 0x65, 0x4c, 0x61, + 0x73, 0x74, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x22, 0x0a, 0x1b, + 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, + 0x1a, 0xab, 0x02, 0x0a, 0x14, 0x44, 0x65, 0x6e, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x0b, 0x68, 0x74, 0x74, + 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, + 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x62, 0x6f, + 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x68, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x12, + 0x33, 0x0a, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, + 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0a, 0x67, 0x72, 0x70, 0x63, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x68, 0x0a, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x0a, 0x52, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x1a, 0x91, + 0x04, 0x0a, 0x0f, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, + 0x65, 0x72, 0x12, 0xaa, 0x01, 0x0a, 0x11, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, + 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x74, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, + 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x2e, + 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, 0x74, + 0x61, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, + 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, + 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x9a, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0f, + 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x1a, + 0x9c, 0x01, 0x0a, 0x0c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, + 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4f, 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x16, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, + 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xb1, + 0x01, 0x0a, 0x14, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, + 0x65, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x82, 0x01, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x6c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, + 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x42, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x49, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x42, 0xd5, 0x01, 0x0a, 0x3f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x71, 0x75, + 0x6f, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x42, 0x13, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6b, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, + 0x74, 0x74, 0x70, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x71, + 0x75, 0x6f, 0x74, 0x61, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_rawDescData = file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_rawDesc +) + +func file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_rawDescData +} + +var file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_goTypes = []interface{}{ + (*RateLimitQuotaFilterConfig)(nil), // 0: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaFilterConfig + (*RateLimitQuotaOverride)(nil), // 1: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaOverride + (*RateLimitQuotaBucketSettings)(nil), // 2: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings + (*RateLimitQuotaBucketSettings_NoAssignmentBehavior)(nil), // 3: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.NoAssignmentBehavior + (*RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior)(nil), // 4: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.ExpiredAssignmentBehavior + (*RateLimitQuotaBucketSettings_DenyResponseSettings)(nil), // 5: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.DenyResponseSettings + (*RateLimitQuotaBucketSettings_BucketIdBuilder)(nil), // 6: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.BucketIdBuilder + (*RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment)(nil), // 7: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.ExpiredAssignmentBehavior.ReuseLastAssignment + (*RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder)(nil), // 8: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.BucketIdBuilder.ValueBuilder + nil, // 9: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.BucketIdBuilder.BucketIdBuilderEntry + (*v3.GrpcService)(nil), // 10: envoy.config.core.v3.GrpcService + (*v31.Matcher)(nil), // 11: xds.type.matcher.v3.Matcher + (*v3.RuntimeFractionalPercent)(nil), // 12: envoy.config.core.v3.RuntimeFractionalPercent + (*v3.HeaderValueOption)(nil), // 13: envoy.config.core.v3.HeaderValueOption + (*durationpb.Duration)(nil), // 14: google.protobuf.Duration + (*v32.RateLimitStrategy)(nil), // 15: envoy.type.v3.RateLimitStrategy + (*v32.HttpStatus)(nil), // 16: envoy.type.v3.HttpStatus + (*wrapperspb.BytesValue)(nil), // 17: google.protobuf.BytesValue + (*status.Status)(nil), // 18: google.rpc.Status + (*v3.TypedExtensionConfig)(nil), // 19: envoy.config.core.v3.TypedExtensionConfig +} +var file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_depIdxs = []int32{ + 10, // 0: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaFilterConfig.rlqs_server:type_name -> envoy.config.core.v3.GrpcService + 11, // 1: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaFilterConfig.bucket_matchers:type_name -> xds.type.matcher.v3.Matcher + 12, // 2: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaFilterConfig.filter_enabled:type_name -> envoy.config.core.v3.RuntimeFractionalPercent + 12, // 3: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaFilterConfig.filter_enforced:type_name -> envoy.config.core.v3.RuntimeFractionalPercent + 13, // 4: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaFilterConfig.request_headers_to_add_when_not_enforced:type_name -> envoy.config.core.v3.HeaderValueOption + 11, // 5: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaOverride.bucket_matchers:type_name -> xds.type.matcher.v3.Matcher + 6, // 6: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.bucket_id_builder:type_name -> envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.BucketIdBuilder + 14, // 7: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.reporting_interval:type_name -> google.protobuf.Duration + 5, // 8: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.deny_response_settings:type_name -> envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.DenyResponseSettings + 3, // 9: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.no_assignment_behavior:type_name -> envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.NoAssignmentBehavior + 4, // 10: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.expired_assignment_behavior:type_name -> envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.ExpiredAssignmentBehavior + 15, // 11: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.NoAssignmentBehavior.fallback_rate_limit:type_name -> envoy.type.v3.RateLimitStrategy + 14, // 12: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.ExpiredAssignmentBehavior.expired_assignment_behavior_timeout:type_name -> google.protobuf.Duration + 15, // 13: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.ExpiredAssignmentBehavior.fallback_rate_limit:type_name -> envoy.type.v3.RateLimitStrategy + 7, // 14: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.ExpiredAssignmentBehavior.reuse_last_assignment:type_name -> envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.ExpiredAssignmentBehavior.ReuseLastAssignment + 16, // 15: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.DenyResponseSettings.http_status:type_name -> envoy.type.v3.HttpStatus + 17, // 16: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.DenyResponseSettings.http_body:type_name -> google.protobuf.BytesValue + 18, // 17: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.DenyResponseSettings.grpc_status:type_name -> google.rpc.Status + 13, // 18: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.DenyResponseSettings.response_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption + 9, // 19: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.BucketIdBuilder.bucket_id_builder:type_name -> envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.BucketIdBuilder.BucketIdBuilderEntry + 19, // 20: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.BucketIdBuilder.ValueBuilder.custom_value:type_name -> envoy.config.core.v3.TypedExtensionConfig + 8, // 21: envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.BucketIdBuilder.BucketIdBuilderEntry.value:type_name -> envoy.extensions.filters.http.rate_limit_quota.v3.RateLimitQuotaBucketSettings.BucketIdBuilder.ValueBuilder + 22, // [22:22] is the sub-list for method output_type + 22, // [22:22] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_init() } +func file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_init() { + if File_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitQuotaFilterConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitQuotaOverride); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitQuotaBucketSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitQuotaBucketSettings_NoAssignmentBehavior); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitQuotaBucketSettings_DenyResponseSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitQuotaBucketSettings_BucketIdBuilder); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*RateLimitQuotaBucketSettings_NoAssignmentBehavior_FallbackRateLimit)(nil), + } + file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_FallbackRateLimit)(nil), + (*RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment_)(nil), + } + file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes[8].OneofWrappers = []interface{}{ + (*RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder_StringValue)(nil), + (*RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder_CustomValue)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_rawDesc, + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto = out.File + file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_rawDesc = nil + file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_goTypes = nil + file_envoy_extensions_filters_http_rate_limit_quota_v3_rate_limit_quota_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/rate_limit_quota/v3/rate_limit_quota.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/rate_limit_quota/v3/rate_limit_quota.pb.validate.go new file mode 100644 index 0000000000000..635934caae303 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/rate_limit_quota/v3/rate_limit_quota.pb.validate.go @@ -0,0 +1,1792 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/rate_limit_quota/v3/rate_limit_quota.proto + +package rate_limit_quotav3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RateLimitQuotaFilterConfig 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 *RateLimitQuotaFilterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitQuotaFilterConfig 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 +// RateLimitQuotaFilterConfigMultiError, or nil if none found. +func (m *RateLimitQuotaFilterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitQuotaFilterConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetRlqsServer() == nil { + err := RateLimitQuotaFilterConfigValidationError{ + field: "RlqsServer", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetRlqsServer()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaFilterConfigValidationError{ + field: "RlqsServer", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaFilterConfigValidationError{ + field: "RlqsServer", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRlqsServer()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitQuotaFilterConfigValidationError{ + field: "RlqsServer", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if utf8.RuneCountInString(m.GetDomain()) < 1 { + err := RateLimitQuotaFilterConfigValidationError{ + field: "Domain", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetBucketMatchers() == nil { + err := RateLimitQuotaFilterConfigValidationError{ + field: "BucketMatchers", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetBucketMatchers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaFilterConfigValidationError{ + field: "BucketMatchers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaFilterConfigValidationError{ + field: "BucketMatchers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBucketMatchers()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitQuotaFilterConfigValidationError{ + field: "BucketMatchers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetFilterEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaFilterConfigValidationError{ + field: "FilterEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaFilterConfigValidationError{ + field: "FilterEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterEnabled()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitQuotaFilterConfigValidationError{ + field: "FilterEnabled", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetFilterEnforced()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaFilterConfigValidationError{ + field: "FilterEnforced", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaFilterConfigValidationError{ + field: "FilterEnforced", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFilterEnforced()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitQuotaFilterConfigValidationError{ + field: "FilterEnforced", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(m.GetRequestHeadersToAddWhenNotEnforced()) > 10 { + err := RateLimitQuotaFilterConfigValidationError{ + field: "RequestHeadersToAddWhenNotEnforced", + reason: "value must contain no more than 10 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetRequestHeadersToAddWhenNotEnforced() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaFilterConfigValidationError{ + field: fmt.Sprintf("RequestHeadersToAddWhenNotEnforced[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaFilterConfigValidationError{ + field: fmt.Sprintf("RequestHeadersToAddWhenNotEnforced[%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 RateLimitQuotaFilterConfigValidationError{ + field: fmt.Sprintf("RequestHeadersToAddWhenNotEnforced[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return RateLimitQuotaFilterConfigMultiError(errors) + } + return nil +} + +// RateLimitQuotaFilterConfigMultiError is an error wrapping multiple +// validation errors returned by RateLimitQuotaFilterConfig.ValidateAll() if +// the designated constraints aren't met. +type RateLimitQuotaFilterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitQuotaFilterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitQuotaFilterConfigMultiError) AllErrors() []error { return m } + +// RateLimitQuotaFilterConfigValidationError is the validation error returned +// by RateLimitQuotaFilterConfig.Validate if the designated constraints aren't met. +type RateLimitQuotaFilterConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitQuotaFilterConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitQuotaFilterConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitQuotaFilterConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitQuotaFilterConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitQuotaFilterConfigValidationError) ErrorName() string { + return "RateLimitQuotaFilterConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitQuotaFilterConfigValidationError) 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 %sRateLimitQuotaFilterConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitQuotaFilterConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitQuotaFilterConfigValidationError{} + +// Validate checks the field values on RateLimitQuotaOverride 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 *RateLimitQuotaOverride) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitQuotaOverride 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 +// RateLimitQuotaOverrideMultiError, or nil if none found. +func (m *RateLimitQuotaOverride) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitQuotaOverride) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Domain + + if all { + switch v := interface{}(m.GetBucketMatchers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaOverrideValidationError{ + field: "BucketMatchers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaOverrideValidationError{ + field: "BucketMatchers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBucketMatchers()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitQuotaOverrideValidationError{ + field: "BucketMatchers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RateLimitQuotaOverrideMultiError(errors) + } + return nil +} + +// RateLimitQuotaOverrideMultiError is an error wrapping multiple validation +// errors returned by RateLimitQuotaOverride.ValidateAll() if the designated +// constraints aren't met. +type RateLimitQuotaOverrideMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitQuotaOverrideMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitQuotaOverrideMultiError) AllErrors() []error { return m } + +// RateLimitQuotaOverrideValidationError is the validation error returned by +// RateLimitQuotaOverride.Validate if the designated constraints aren't met. +type RateLimitQuotaOverrideValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitQuotaOverrideValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitQuotaOverrideValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitQuotaOverrideValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitQuotaOverrideValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitQuotaOverrideValidationError) ErrorName() string { + return "RateLimitQuotaOverrideValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitQuotaOverrideValidationError) 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 %sRateLimitQuotaOverride.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitQuotaOverrideValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitQuotaOverrideValidationError{} + +// Validate checks the field values on RateLimitQuotaBucketSettings 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 *RateLimitQuotaBucketSettings) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitQuotaBucketSettings 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 +// RateLimitQuotaBucketSettingsMultiError, or nil if none found. +func (m *RateLimitQuotaBucketSettings) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitQuotaBucketSettings) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetBucketIdBuilder()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettingsValidationError{ + field: "BucketIdBuilder", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettingsValidationError{ + field: "BucketIdBuilder", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBucketIdBuilder()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitQuotaBucketSettingsValidationError{ + field: "BucketIdBuilder", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetReportingInterval() == nil { + err := RateLimitQuotaBucketSettingsValidationError{ + field: "ReportingInterval", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if d := m.GetReportingInterval(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = RateLimitQuotaBucketSettingsValidationError{ + field: "ReportingInterval", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 100000000*time.Nanosecond) + + if dur <= gt { + err := RateLimitQuotaBucketSettingsValidationError{ + field: "ReportingInterval", + reason: "value must be greater than 100ms", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if all { + switch v := interface{}(m.GetDenyResponseSettings()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettingsValidationError{ + field: "DenyResponseSettings", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettingsValidationError{ + field: "DenyResponseSettings", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDenyResponseSettings()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitQuotaBucketSettingsValidationError{ + field: "DenyResponseSettings", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetNoAssignmentBehavior()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettingsValidationError{ + field: "NoAssignmentBehavior", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettingsValidationError{ + field: "NoAssignmentBehavior", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNoAssignmentBehavior()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitQuotaBucketSettingsValidationError{ + field: "NoAssignmentBehavior", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetExpiredAssignmentBehavior()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettingsValidationError{ + field: "ExpiredAssignmentBehavior", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettingsValidationError{ + field: "ExpiredAssignmentBehavior", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExpiredAssignmentBehavior()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitQuotaBucketSettingsValidationError{ + field: "ExpiredAssignmentBehavior", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RateLimitQuotaBucketSettingsMultiError(errors) + } + return nil +} + +// RateLimitQuotaBucketSettingsMultiError is an error wrapping multiple +// validation errors returned by RateLimitQuotaBucketSettings.ValidateAll() if +// the designated constraints aren't met. +type RateLimitQuotaBucketSettingsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitQuotaBucketSettingsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitQuotaBucketSettingsMultiError) AllErrors() []error { return m } + +// RateLimitQuotaBucketSettingsValidationError is the validation error returned +// by RateLimitQuotaBucketSettings.Validate if the designated constraints +// aren't met. +type RateLimitQuotaBucketSettingsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitQuotaBucketSettingsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitQuotaBucketSettingsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitQuotaBucketSettingsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitQuotaBucketSettingsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitQuotaBucketSettingsValidationError) ErrorName() string { + return "RateLimitQuotaBucketSettingsValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitQuotaBucketSettingsValidationError) 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 %sRateLimitQuotaBucketSettings.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitQuotaBucketSettingsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitQuotaBucketSettingsValidationError{} + +// Validate checks the field values on +// RateLimitQuotaBucketSettings_NoAssignmentBehavior 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 *RateLimitQuotaBucketSettings_NoAssignmentBehavior) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// RateLimitQuotaBucketSettings_NoAssignmentBehavior 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 +// RateLimitQuotaBucketSettings_NoAssignmentBehaviorMultiError, or nil if none found. +func (m *RateLimitQuotaBucketSettings_NoAssignmentBehavior) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitQuotaBucketSettings_NoAssignmentBehavior) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.NoAssignmentBehavior.(type) { + + case *RateLimitQuotaBucketSettings_NoAssignmentBehavior_FallbackRateLimit: + + if all { + switch v := interface{}(m.GetFallbackRateLimit()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettings_NoAssignmentBehaviorValidationError{ + field: "FallbackRateLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettings_NoAssignmentBehaviorValidationError{ + field: "FallbackRateLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFallbackRateLimit()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitQuotaBucketSettings_NoAssignmentBehaviorValidationError{ + field: "FallbackRateLimit", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := RateLimitQuotaBucketSettings_NoAssignmentBehaviorValidationError{ + field: "NoAssignmentBehavior", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return RateLimitQuotaBucketSettings_NoAssignmentBehaviorMultiError(errors) + } + return nil +} + +// RateLimitQuotaBucketSettings_NoAssignmentBehaviorMultiError is an error +// wrapping multiple validation errors returned by +// RateLimitQuotaBucketSettings_NoAssignmentBehavior.ValidateAll() if the +// designated constraints aren't met. +type RateLimitQuotaBucketSettings_NoAssignmentBehaviorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitQuotaBucketSettings_NoAssignmentBehaviorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitQuotaBucketSettings_NoAssignmentBehaviorMultiError) AllErrors() []error { return m } + +// RateLimitQuotaBucketSettings_NoAssignmentBehaviorValidationError is the +// validation error returned by +// RateLimitQuotaBucketSettings_NoAssignmentBehavior.Validate if the +// designated constraints aren't met. +type RateLimitQuotaBucketSettings_NoAssignmentBehaviorValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitQuotaBucketSettings_NoAssignmentBehaviorValidationError) Field() string { + return e.field +} + +// Reason function returns reason value. +func (e RateLimitQuotaBucketSettings_NoAssignmentBehaviorValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e RateLimitQuotaBucketSettings_NoAssignmentBehaviorValidationError) Cause() error { + return e.cause +} + +// Key function returns key value. +func (e RateLimitQuotaBucketSettings_NoAssignmentBehaviorValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitQuotaBucketSettings_NoAssignmentBehaviorValidationError) ErrorName() string { + return "RateLimitQuotaBucketSettings_NoAssignmentBehaviorValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitQuotaBucketSettings_NoAssignmentBehaviorValidationError) 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 %sRateLimitQuotaBucketSettings_NoAssignmentBehavior.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitQuotaBucketSettings_NoAssignmentBehaviorValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitQuotaBucketSettings_NoAssignmentBehaviorValidationError{} + +// Validate checks the field values on +// RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior 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 *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior 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 +// RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorMultiError, or nil if +// none found. +func (m *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if d := m.GetExpiredAssignmentBehaviorTimeout(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorValidationError{ + field: "ExpiredAssignmentBehaviorTimeout", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorValidationError{ + field: "ExpiredAssignmentBehaviorTimeout", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + switch m.ExpiredAssignmentBehavior.(type) { + + case *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_FallbackRateLimit: + + if all { + switch v := interface{}(m.GetFallbackRateLimit()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorValidationError{ + field: "FallbackRateLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorValidationError{ + field: "FallbackRateLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFallbackRateLimit()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorValidationError{ + field: "FallbackRateLimit", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment_: + + if all { + switch v := interface{}(m.GetReuseLastAssignment()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorValidationError{ + field: "ReuseLastAssignment", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorValidationError{ + field: "ReuseLastAssignment", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetReuseLastAssignment()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorValidationError{ + field: "ReuseLastAssignment", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorValidationError{ + field: "ExpiredAssignmentBehavior", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorMultiError(errors) + } + return nil +} + +// RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorMultiError is an error +// wrapping multiple validation errors returned by +// RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior.ValidateAll() if the +// designated constraints aren't met. +type RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorMultiError) AllErrors() []error { + return m +} + +// RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorValidationError is the +// validation error returned by +// RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior.Validate if the +// designated constraints aren't met. +type RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorValidationError) Field() string { + return e.field +} + +// Reason function returns reason value. +func (e RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorValidationError) Cause() error { + return e.cause +} + +// Key function returns key value. +func (e RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorValidationError) Key() bool { + return e.key +} + +// ErrorName returns error name. +func (e RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorValidationError) ErrorName() string { + return "RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorValidationError) 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 %sRateLimitQuotaBucketSettings_ExpiredAssignmentBehavior.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitQuotaBucketSettings_ExpiredAssignmentBehaviorValidationError{} + +// Validate checks the field values on +// RateLimitQuotaBucketSettings_DenyResponseSettings 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 *RateLimitQuotaBucketSettings_DenyResponseSettings) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// RateLimitQuotaBucketSettings_DenyResponseSettings 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 +// RateLimitQuotaBucketSettings_DenyResponseSettingsMultiError, or nil if none found. +func (m *RateLimitQuotaBucketSettings_DenyResponseSettings) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitQuotaBucketSettings_DenyResponseSettings) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetHttpStatus()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError{ + field: "HttpStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError{ + field: "HttpStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpStatus()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError{ + field: "HttpStatus", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetHttpBody()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError{ + field: "HttpBody", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError{ + field: "HttpBody", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpBody()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError{ + field: "HttpBody", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetGrpcStatus()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError{ + field: "GrpcStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError{ + field: "GrpcStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcStatus()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError{ + field: "GrpcStatus", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(m.GetResponseHeadersToAdd()) > 10 { + err := RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError{ + field: "ResponseHeadersToAdd", + reason: "value must contain no more than 10 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetResponseHeadersToAdd() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%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 RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return RateLimitQuotaBucketSettings_DenyResponseSettingsMultiError(errors) + } + return nil +} + +// RateLimitQuotaBucketSettings_DenyResponseSettingsMultiError is an error +// wrapping multiple validation errors returned by +// RateLimitQuotaBucketSettings_DenyResponseSettings.ValidateAll() if the +// designated constraints aren't met. +type RateLimitQuotaBucketSettings_DenyResponseSettingsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitQuotaBucketSettings_DenyResponseSettingsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitQuotaBucketSettings_DenyResponseSettingsMultiError) AllErrors() []error { return m } + +// RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError is the +// validation error returned by +// RateLimitQuotaBucketSettings_DenyResponseSettings.Validate if the +// designated constraints aren't met. +type RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError) Field() string { + return e.field +} + +// Reason function returns reason value. +func (e RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError) Cause() error { + return e.cause +} + +// Key function returns key value. +func (e RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError) ErrorName() string { + return "RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError) 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 %sRateLimitQuotaBucketSettings_DenyResponseSettings.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitQuotaBucketSettings_DenyResponseSettingsValidationError{} + +// Validate checks the field values on +// RateLimitQuotaBucketSettings_BucketIdBuilder 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 *RateLimitQuotaBucketSettings_BucketIdBuilder) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// RateLimitQuotaBucketSettings_BucketIdBuilder 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 +// RateLimitQuotaBucketSettings_BucketIdBuilderMultiError, or nil if none found. +func (m *RateLimitQuotaBucketSettings_BucketIdBuilder) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitQuotaBucketSettings_BucketIdBuilder) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetBucketIdBuilder()) < 1 { + err := RateLimitQuotaBucketSettings_BucketIdBuilderValidationError{ + field: "BucketIdBuilder", + reason: "value must contain at least 1 pair(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + { + sorted_keys := make([]string, len(m.GetBucketIdBuilder())) + i := 0 + for key := range m.GetBucketIdBuilder() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetBucketIdBuilder()[key] + _ = val + + // no validation rules for BucketIdBuilder[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettings_BucketIdBuilderValidationError{ + field: fmt.Sprintf("BucketIdBuilder[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettings_BucketIdBuilderValidationError{ + field: fmt.Sprintf("BucketIdBuilder[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitQuotaBucketSettings_BucketIdBuilderValidationError{ + field: fmt.Sprintf("BucketIdBuilder[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if len(errors) > 0 { + return RateLimitQuotaBucketSettings_BucketIdBuilderMultiError(errors) + } + return nil +} + +// RateLimitQuotaBucketSettings_BucketIdBuilderMultiError is an error wrapping +// multiple validation errors returned by +// RateLimitQuotaBucketSettings_BucketIdBuilder.ValidateAll() if the +// designated constraints aren't met. +type RateLimitQuotaBucketSettings_BucketIdBuilderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitQuotaBucketSettings_BucketIdBuilderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitQuotaBucketSettings_BucketIdBuilderMultiError) AllErrors() []error { return m } + +// RateLimitQuotaBucketSettings_BucketIdBuilderValidationError is the +// validation error returned by +// RateLimitQuotaBucketSettings_BucketIdBuilder.Validate if the designated +// constraints aren't met. +type RateLimitQuotaBucketSettings_BucketIdBuilderValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitQuotaBucketSettings_BucketIdBuilderValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitQuotaBucketSettings_BucketIdBuilderValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitQuotaBucketSettings_BucketIdBuilderValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitQuotaBucketSettings_BucketIdBuilderValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitQuotaBucketSettings_BucketIdBuilderValidationError) ErrorName() string { + return "RateLimitQuotaBucketSettings_BucketIdBuilderValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitQuotaBucketSettings_BucketIdBuilderValidationError) 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 %sRateLimitQuotaBucketSettings_BucketIdBuilder.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitQuotaBucketSettings_BucketIdBuilderValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitQuotaBucketSettings_BucketIdBuilderValidationError{} + +// Validate checks the field values on +// RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment +// 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 *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment +// 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 +// RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignmentMultiError, +// or nil if none found. +func (m *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignmentMultiError(errors) + } + return nil +} + +// RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignmentMultiError +// is an error wrapping multiple validation errors returned by +// RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment.ValidateAll() +// if the designated constraints aren't met. +type RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignmentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignmentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignmentMultiError) AllErrors() []error { + return m +} + +// RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignmentValidationError +// is the validation error returned by +// RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment.Validate +// if the designated constraints aren't met. +type RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignmentValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignmentValidationError) Field() string { + return e.field +} + +// Reason function returns reason value. +func (e RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignmentValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignmentValidationError) Cause() error { + return e.cause +} + +// Key function returns key value. +func (e RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignmentValidationError) Key() bool { + return e.key +} + +// ErrorName returns error name. +func (e RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignmentValidationError) ErrorName() string { + return "RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignmentValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignmentValidationError) 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 %sRateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignment.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignmentValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitQuotaBucketSettings_ExpiredAssignmentBehavior_ReuseLastAssignmentValidationError{} + +// Validate checks the field values on +// RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder 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 *RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder 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 +// RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilderMultiError, or nil +// if none found. +func (m *RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.ValueSpecifier.(type) { + + case *RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder_StringValue: + // no validation rules for StringValue + + case *RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder_CustomValue: + + if all { + switch v := interface{}(m.GetCustomValue()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilderValidationError{ + field: "CustomValue", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilderValidationError{ + field: "CustomValue", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCustomValue()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilderValidationError{ + field: "CustomValue", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilderValidationError{ + field: "ValueSpecifier", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilderMultiError(errors) + } + return nil +} + +// RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilderMultiError is an +// error wrapping multiple validation errors returned by +// RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder.ValidateAll() if +// the designated constraints aren't met. +type RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilderMultiError) AllErrors() []error { + return m +} + +// RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilderValidationError is +// the validation error returned by +// RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder.Validate if the +// designated constraints aren't met. +type RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilderValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilderValidationError) Field() string { + return e.field +} + +// Reason function returns reason value. +func (e RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilderValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilderValidationError) Cause() error { + return e.cause +} + +// Key function returns key value. +func (e RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilderValidationError) Key() bool { + return e.key +} + +// ErrorName returns error name. +func (e RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilderValidationError) ErrorName() string { + return "RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilderValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilderValidationError) 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 %sRateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilder.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilderValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitQuotaBucketSettings_BucketIdBuilder_ValueBuilderValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/rbac/v3/rbac.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/rbac/v3/rbac.pb.go new file mode 100644 index 0000000000000..f50a748996ca0 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/rbac/v3/rbac.pb.go @@ -0,0 +1,334 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/rbac/v3/rbac.proto + +package rbacv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/rbac/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + v31 "github.com/cncf/xds/go/xds/type/matcher/v3" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// RBAC filter config. +// [#next-free-field: 6] +type RBAC struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specify the RBAC rules to be applied globally. + // If absent, no enforcing RBAC policy will be applied. + // If present and empty, DENY. + // If both rules and matcher are configured, rules will be ignored. + Rules *v3.RBAC `protobuf:"bytes,1,opt,name=rules,proto3" json:"rules,omitempty"` + // The match tree to use when resolving RBAC action for incoming requests. Requests do not + // match any matcher will be denied. + // If absent, no enforcing RBAC matcher will be applied. + // If present and empty, deny all requests. + Matcher *v31.Matcher `protobuf:"bytes,4,opt,name=matcher,proto3" json:"matcher,omitempty"` + // Shadow rules are not enforced by the filter (i.e., returning a 403) + // but will emit stats and logs and can be used for rule testing. + // If absent, no shadow RBAC policy will be applied. + // If both shadow rules and shadow matcher are configured, shadow rules will be ignored. + ShadowRules *v3.RBAC `protobuf:"bytes,2,opt,name=shadow_rules,json=shadowRules,proto3" json:"shadow_rules,omitempty"` + // The match tree to use for emitting stats and logs which can be used for rule testing for + // incoming requests. + // If absent, no shadow matcher will be applied. + ShadowMatcher *v31.Matcher `protobuf:"bytes,5,opt,name=shadow_matcher,json=shadowMatcher,proto3" json:"shadow_matcher,omitempty"` + // If specified, shadow rules will emit stats with the given prefix. + // This is useful to distinguish the stat when there are more than 1 RBAC filter configured with + // shadow rules. + ShadowRulesStatPrefix string `protobuf:"bytes,3,opt,name=shadow_rules_stat_prefix,json=shadowRulesStatPrefix,proto3" json:"shadow_rules_stat_prefix,omitempty"` +} + +func (x *RBAC) Reset() { + *x = RBAC{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_rbac_v3_rbac_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RBAC) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RBAC) ProtoMessage() {} + +func (x *RBAC) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_rbac_v3_rbac_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RBAC.ProtoReflect.Descriptor instead. +func (*RBAC) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDescGZIP(), []int{0} +} + +func (x *RBAC) GetRules() *v3.RBAC { + if x != nil { + return x.Rules + } + return nil +} + +func (x *RBAC) GetMatcher() *v31.Matcher { + if x != nil { + return x.Matcher + } + return nil +} + +func (x *RBAC) GetShadowRules() *v3.RBAC { + if x != nil { + return x.ShadowRules + } + return nil +} + +func (x *RBAC) GetShadowMatcher() *v31.Matcher { + if x != nil { + return x.ShadowMatcher + } + return nil +} + +func (x *RBAC) GetShadowRulesStatPrefix() string { + if x != nil { + return x.ShadowRulesStatPrefix + } + return "" +} + +type RBACPerRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Override the global configuration of the filter with this new config. + // If absent, the global RBAC policy will be disabled for this route. + Rbac *RBAC `protobuf:"bytes,2,opt,name=rbac,proto3" json:"rbac,omitempty"` +} + +func (x *RBACPerRoute) Reset() { + *x = RBACPerRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_rbac_v3_rbac_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RBACPerRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RBACPerRoute) ProtoMessage() {} + +func (x *RBACPerRoute) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_rbac_v3_rbac_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RBACPerRoute.ProtoReflect.Descriptor instead. +func (*RBACPerRoute) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDescGZIP(), []int{1} +} + +func (x *RBACPerRoute) GetRbac() *RBAC { + if x != nil { + return x.Rbac + } + return nil +} + +var File_envoy_extensions_filters_http_rbac_v3_rbac_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDesc = []byte{ + 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x72, 0x62, 0x61, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2f, 0x76, 0x33, 0x2f, + 0x72, 0x62, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x78, 0x64, 0x73, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, + 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xdd, 0x03, 0x0a, 0x04, 0x52, 0x42, 0x41, 0x43, 0x12, 0x49, 0x0a, 0x05, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, + 0x52, 0x42, 0x41, 0x43, 0x42, 0x17, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x11, 0x12, 0x0f, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x05, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x12, 0x57, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x42, 0x1f, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x11, 0x12, 0x0f, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0xd2, 0xc6, 0xa4, 0xe1, + 0x06, 0x02, 0x08, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x5d, 0x0a, + 0x0c, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x42, + 0x1e, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x18, 0x12, 0x16, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x5f, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, + 0x0b, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x6b, 0x0a, 0x0e, + 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x42, 0x26, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x18, 0x12, 0x16, 0x73, 0x68, 0x61, 0x64, + 0x6f, 0x77, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x72, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x52, 0x0d, 0x73, 0x68, 0x61, 0x64, + 0x6f, 0x77, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x18, 0x73, 0x68, 0x61, + 0x64, 0x6f, 0x77, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x73, 0x68, 0x61, + 0x64, 0x6f, 0x77, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x42, 0x41, 0x43, + 0x22, 0x8b, 0x01, 0x0a, 0x0c, 0x52, 0x42, 0x41, 0x43, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x12, 0x3f, 0x0a, 0x04, 0x72, 0x62, 0x61, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x52, 0x04, 0x72, 0x62, + 0x61, 0x63, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x42, 0x41, 0x43, + 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x42, 0x9f, + 0x01, 0x0a, 0x33, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, + 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x52, 0x62, 0x61, 0x63, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2f, 0x76, + 0x33, 0x3b, 0x72, 0x62, 0x61, 0x63, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDescData = file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDesc +) + +func file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDescData +} + +var file_envoy_extensions_filters_http_rbac_v3_rbac_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_filters_http_rbac_v3_rbac_proto_goTypes = []interface{}{ + (*RBAC)(nil), // 0: envoy.extensions.filters.http.rbac.v3.RBAC + (*RBACPerRoute)(nil), // 1: envoy.extensions.filters.http.rbac.v3.RBACPerRoute + (*v3.RBAC)(nil), // 2: envoy.config.rbac.v3.RBAC + (*v31.Matcher)(nil), // 3: xds.type.matcher.v3.Matcher +} +var file_envoy_extensions_filters_http_rbac_v3_rbac_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.filters.http.rbac.v3.RBAC.rules:type_name -> envoy.config.rbac.v3.RBAC + 3, // 1: envoy.extensions.filters.http.rbac.v3.RBAC.matcher:type_name -> xds.type.matcher.v3.Matcher + 2, // 2: envoy.extensions.filters.http.rbac.v3.RBAC.shadow_rules:type_name -> envoy.config.rbac.v3.RBAC + 3, // 3: envoy.extensions.filters.http.rbac.v3.RBAC.shadow_matcher:type_name -> xds.type.matcher.v3.Matcher + 0, // 4: envoy.extensions.filters.http.rbac.v3.RBACPerRoute.rbac:type_name -> envoy.extensions.filters.http.rbac.v3.RBAC + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_rbac_v3_rbac_proto_init() } +func file_envoy_extensions_filters_http_rbac_v3_rbac_proto_init() { + if File_envoy_extensions_filters_http_rbac_v3_rbac_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_rbac_v3_rbac_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RBAC); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_rbac_v3_rbac_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RBACPerRoute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_rbac_v3_rbac_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_rbac_v3_rbac_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_rbac_v3_rbac_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_rbac_v3_rbac_proto = out.File + file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDesc = nil + file_envoy_extensions_filters_http_rbac_v3_rbac_proto_goTypes = nil + file_envoy_extensions_filters_http_rbac_v3_rbac_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/rbac/v3/rbac.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/rbac/v3/rbac.pb.validate.go new file mode 100644 index 0000000000000..29ae96d5d32d3 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/rbac/v3/rbac.pb.validate.go @@ -0,0 +1,378 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/rbac/v3/rbac.proto + +package rbacv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RBAC 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 *RBAC) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RBAC 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 RBACMultiError, or nil if none found. +func (m *RBAC) ValidateAll() error { + return m.validate(true) +} + +func (m *RBAC) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RBACValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RBACValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRules()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RBACValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RBACValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RBACValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RBACValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetShadowRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RBACValidationError{ + field: "ShadowRules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RBACValidationError{ + field: "ShadowRules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetShadowRules()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RBACValidationError{ + field: "ShadowRules", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetShadowMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RBACValidationError{ + field: "ShadowMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RBACValidationError{ + field: "ShadowMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetShadowMatcher()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RBACValidationError{ + field: "ShadowMatcher", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ShadowRulesStatPrefix + + if len(errors) > 0 { + return RBACMultiError(errors) + } + return nil +} + +// RBACMultiError is an error wrapping multiple validation errors returned by +// RBAC.ValidateAll() if the designated constraints aren't met. +type RBACMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RBACMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RBACMultiError) AllErrors() []error { return m } + +// RBACValidationError is the validation error returned by RBAC.Validate if the +// designated constraints aren't met. +type RBACValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RBACValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RBACValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RBACValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RBACValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RBACValidationError) ErrorName() string { return "RBACValidationError" } + +// Error satisfies the builtin error interface +func (e RBACValidationError) 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 %sRBAC.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RBACValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RBACValidationError{} + +// Validate checks the field values on RBACPerRoute 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 *RBACPerRoute) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RBACPerRoute 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 RBACPerRouteMultiError, or +// nil if none found. +func (m *RBACPerRoute) ValidateAll() error { + return m.validate(true) +} + +func (m *RBACPerRoute) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetRbac()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RBACPerRouteValidationError{ + field: "Rbac", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RBACPerRouteValidationError{ + field: "Rbac", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRbac()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RBACPerRouteValidationError{ + field: "Rbac", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RBACPerRouteMultiError(errors) + } + return nil +} + +// RBACPerRouteMultiError is an error wrapping multiple validation errors +// returned by RBACPerRoute.ValidateAll() if the designated constraints aren't met. +type RBACPerRouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RBACPerRouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RBACPerRouteMultiError) AllErrors() []error { return m } + +// RBACPerRouteValidationError is the validation error returned by +// RBACPerRoute.Validate if the designated constraints aren't met. +type RBACPerRouteValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RBACPerRouteValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RBACPerRouteValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RBACPerRouteValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RBACPerRouteValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RBACPerRouteValidationError) ErrorName() string { return "RBACPerRouteValidationError" } + +// Error satisfies the builtin error interface +func (e RBACPerRouteValidationError) 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 %sRBACPerRoute.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RBACPerRouteValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RBACPerRouteValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/stateful_session/v3/stateful_session.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/stateful_session/v3/stateful_session.pb.go new file mode 100644 index 0000000000000..4ea330e63d49f --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/stateful_session/v3/stateful_session.pb.go @@ -0,0 +1,298 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/stateful_session/v3/stateful_session.proto + +package stateful_sessionv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type StatefulSession struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specific implementation of session state. This session state will be used to store and + // get address of the upstream host to which the session is assigned. + // + // [#extension-category: envoy.http.stateful_session] + SessionState *v3.TypedExtensionConfig `protobuf:"bytes,1,opt,name=session_state,json=sessionState,proto3" json:"session_state,omitempty"` +} + +func (x *StatefulSession) Reset() { + *x = StatefulSession{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StatefulSession) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatefulSession) ProtoMessage() {} + +func (x *StatefulSession) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StatefulSession.ProtoReflect.Descriptor instead. +func (*StatefulSession) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDescGZIP(), []int{0} +} + +func (x *StatefulSession) GetSessionState() *v3.TypedExtensionConfig { + if x != nil { + return x.SessionState + } + return nil +} + +type StatefulSessionPerRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Override: + // + // *StatefulSessionPerRoute_Disabled + // *StatefulSessionPerRoute_StatefulSession + Override isStatefulSessionPerRoute_Override `protobuf_oneof:"override"` +} + +func (x *StatefulSessionPerRoute) Reset() { + *x = StatefulSessionPerRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StatefulSessionPerRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatefulSessionPerRoute) ProtoMessage() {} + +func (x *StatefulSessionPerRoute) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StatefulSessionPerRoute.ProtoReflect.Descriptor instead. +func (*StatefulSessionPerRoute) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDescGZIP(), []int{1} +} + +func (m *StatefulSessionPerRoute) GetOverride() isStatefulSessionPerRoute_Override { + if m != nil { + return m.Override + } + return nil +} + +func (x *StatefulSessionPerRoute) GetDisabled() bool { + if x, ok := x.GetOverride().(*StatefulSessionPerRoute_Disabled); ok { + return x.Disabled + } + return false +} + +func (x *StatefulSessionPerRoute) GetStatefulSession() *StatefulSession { + if x, ok := x.GetOverride().(*StatefulSessionPerRoute_StatefulSession); ok { + return x.StatefulSession + } + return nil +} + +type isStatefulSessionPerRoute_Override interface { + isStatefulSessionPerRoute_Override() +} + +type StatefulSessionPerRoute_Disabled struct { + // Disable the stateful session filter for this particular vhost or route. If disabled is + // specified in multiple per-filter-configs, the most specific one will be used. + Disabled bool `protobuf:"varint,1,opt,name=disabled,proto3,oneof"` +} + +type StatefulSessionPerRoute_StatefulSession struct { + // Per-route stateful session configuration that can be served by RDS or static route table. + StatefulSession *StatefulSession `protobuf:"bytes,2,opt,name=stateful_session,json=statefulSession,proto3,oneof"` +} + +func (*StatefulSessionPerRoute_Disabled) isStatefulSessionPerRoute_Override() {} + +func (*StatefulSessionPerRoute_StatefulSession) isStatefulSessionPerRoute_Override() {} + +var File_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDesc = []byte{ + 0x0a, 0x48, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x5f, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x31, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, + 0x75, 0x6c, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x1a, 0x24, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x62, 0x0a, 0x0f, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4f, + 0x0a, 0x0d, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, + 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, + 0xc2, 0x01, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x08, 0x64, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x12, 0x6f, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x5f, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x66, 0x75, 0x6c, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x33, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, + 0x03, 0xf8, 0x42, 0x01, 0x42, 0xce, 0x01, 0x0a, 0x3f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x5f, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x14, 0x53, 0x74, 0x61, 0x74, 0x65, 0x66, + 0x75, 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x6b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x5f, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x66, 0x75, 0x6c, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDescData = file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDesc +) + +func file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDescData +} + +var file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_goTypes = []interface{}{ + (*StatefulSession)(nil), // 0: envoy.extensions.filters.http.stateful_session.v3.StatefulSession + (*StatefulSessionPerRoute)(nil), // 1: envoy.extensions.filters.http.stateful_session.v3.StatefulSessionPerRoute + (*v3.TypedExtensionConfig)(nil), // 2: envoy.config.core.v3.TypedExtensionConfig +} +var file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.filters.http.stateful_session.v3.StatefulSession.session_state:type_name -> envoy.config.core.v3.TypedExtensionConfig + 0, // 1: envoy.extensions.filters.http.stateful_session.v3.StatefulSessionPerRoute.stateful_session:type_name -> envoy.extensions.filters.http.stateful_session.v3.StatefulSession + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_init() } +func file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_init() { + if File_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StatefulSession); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StatefulSessionPerRoute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*StatefulSessionPerRoute_Disabled)(nil), + (*StatefulSessionPerRoute_StatefulSession)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto = out.File + file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_rawDesc = nil + file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_goTypes = nil + file_envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/stateful_session/v3/stateful_session.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/stateful_session/v3/stateful_session.pb.validate.go new file mode 100644 index 0000000000000..ca84b7b5b0ae2 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/stateful_session/v3/stateful_session.pb.validate.go @@ -0,0 +1,323 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/stateful_session/v3/stateful_session.proto + +package stateful_sessionv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on StatefulSession 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 *StatefulSession) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StatefulSession 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 +// StatefulSessionMultiError, or nil if none found. +func (m *StatefulSession) ValidateAll() error { + return m.validate(true) +} + +func (m *StatefulSession) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetSessionState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StatefulSessionValidationError{ + field: "SessionState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StatefulSessionValidationError{ + field: "SessionState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSessionState()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StatefulSessionValidationError{ + field: "SessionState", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return StatefulSessionMultiError(errors) + } + return nil +} + +// StatefulSessionMultiError is an error wrapping multiple validation errors +// returned by StatefulSession.ValidateAll() if the designated constraints +// aren't met. +type StatefulSessionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StatefulSessionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StatefulSessionMultiError) AllErrors() []error { return m } + +// StatefulSessionValidationError is the validation error returned by +// StatefulSession.Validate if the designated constraints aren't met. +type StatefulSessionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StatefulSessionValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StatefulSessionValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StatefulSessionValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StatefulSessionValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StatefulSessionValidationError) ErrorName() string { return "StatefulSessionValidationError" } + +// Error satisfies the builtin error interface +func (e StatefulSessionValidationError) 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 %sStatefulSession.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StatefulSessionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StatefulSessionValidationError{} + +// Validate checks the field values on StatefulSessionPerRoute 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 *StatefulSessionPerRoute) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StatefulSessionPerRoute 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 +// StatefulSessionPerRouteMultiError, or nil if none found. +func (m *StatefulSessionPerRoute) ValidateAll() error { + return m.validate(true) +} + +func (m *StatefulSessionPerRoute) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.Override.(type) { + + case *StatefulSessionPerRoute_Disabled: + + if m.GetDisabled() != true { + err := StatefulSessionPerRouteValidationError{ + field: "Disabled", + reason: "value must equal true", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *StatefulSessionPerRoute_StatefulSession: + + if all { + switch v := interface{}(m.GetStatefulSession()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StatefulSessionPerRouteValidationError{ + field: "StatefulSession", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StatefulSessionPerRouteValidationError{ + field: "StatefulSession", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatefulSession()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StatefulSessionPerRouteValidationError{ + field: "StatefulSession", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := StatefulSessionPerRouteValidationError{ + field: "Override", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return StatefulSessionPerRouteMultiError(errors) + } + return nil +} + +// StatefulSessionPerRouteMultiError is an error wrapping multiple validation +// errors returned by StatefulSessionPerRoute.ValidateAll() if the designated +// constraints aren't met. +type StatefulSessionPerRouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StatefulSessionPerRouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StatefulSessionPerRouteMultiError) AllErrors() []error { return m } + +// StatefulSessionPerRouteValidationError is the validation error returned by +// StatefulSessionPerRoute.Validate if the designated constraints aren't met. +type StatefulSessionPerRouteValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StatefulSessionPerRouteValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StatefulSessionPerRouteValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StatefulSessionPerRouteValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StatefulSessionPerRouteValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StatefulSessionPerRouteValidationError) ErrorName() string { + return "StatefulSessionPerRouteValidationError" +} + +// Error satisfies the builtin error interface +func (e StatefulSessionPerRouteValidationError) 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 %sStatefulSessionPerRoute.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StatefulSessionPerRouteValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StatefulSessionPerRouteValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/tap/v3/tap.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/tap/v3/tap.pb.go new file mode 100644 index 0000000000000..2055ab68a84e4 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/tap/v3/tap.pb.go @@ -0,0 +1,183 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/tap/v3/tap.proto + +package tapv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/extensions/common/tap/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Top level configuration for the tap filter. +type Tap struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Common configuration for the HTTP tap filter. + CommonConfig *v3.CommonExtensionConfig `protobuf:"bytes,1,opt,name=common_config,json=commonConfig,proto3" json:"common_config,omitempty"` +} + +func (x *Tap) Reset() { + *x = Tap{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_tap_v3_tap_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Tap) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Tap) ProtoMessage() {} + +func (x *Tap) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_tap_v3_tap_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Tap.ProtoReflect.Descriptor instead. +func (*Tap) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_tap_v3_tap_proto_rawDescGZIP(), []int{0} +} + +func (x *Tap) GetCommonConfig() *v3.CommonExtensionConfig { + if x != nil { + return x.CommonConfig + } + return nil +} + +var File_envoy_extensions_filters_http_tap_v3_tap_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_tap_v3_tap_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x74, 0x61, 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x61, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x1a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x74, 0x61, 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0x9c, + 0x01, 0x0a, 0x03, 0x54, 0x61, 0x70, 0x12, 0x64, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x43, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x2f, 0x9a, 0xc5, + 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x74, 0x61, + 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x61, 0x70, 0x42, 0x9b, 0x01, + 0x0a, 0x32, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x74, 0x61, + 0x70, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x54, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x61, + 0x70, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_tap_v3_tap_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_tap_v3_tap_proto_rawDescData = file_envoy_extensions_filters_http_tap_v3_tap_proto_rawDesc +) + +func file_envoy_extensions_filters_http_tap_v3_tap_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_tap_v3_tap_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_tap_v3_tap_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_tap_v3_tap_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_tap_v3_tap_proto_rawDescData +} + +var file_envoy_extensions_filters_http_tap_v3_tap_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_http_tap_v3_tap_proto_goTypes = []interface{}{ + (*Tap)(nil), // 0: envoy.extensions.filters.http.tap.v3.Tap + (*v3.CommonExtensionConfig)(nil), // 1: envoy.extensions.common.tap.v3.CommonExtensionConfig +} +var file_envoy_extensions_filters_http_tap_v3_tap_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.http.tap.v3.Tap.common_config:type_name -> envoy.extensions.common.tap.v3.CommonExtensionConfig + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_tap_v3_tap_proto_init() } +func file_envoy_extensions_filters_http_tap_v3_tap_proto_init() { + if File_envoy_extensions_filters_http_tap_v3_tap_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_tap_v3_tap_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Tap); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_tap_v3_tap_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_tap_v3_tap_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_tap_v3_tap_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_tap_v3_tap_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_tap_v3_tap_proto = out.File + file_envoy_extensions_filters_http_tap_v3_tap_proto_rawDesc = nil + file_envoy_extensions_filters_http_tap_v3_tap_proto_goTypes = nil + file_envoy_extensions_filters_http_tap_v3_tap_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/tap/v3/tap.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/tap/v3/tap.pb.validate.go new file mode 100644 index 0000000000000..719d4900dab8b --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/tap/v3/tap.pb.validate.go @@ -0,0 +1,173 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/tap/v3/tap.proto + +package tapv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Tap 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 *Tap) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Tap 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 TapMultiError, or nil if none found. +func (m *Tap) ValidateAll() error { + return m.validate(true) +} + +func (m *Tap) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetCommonConfig() == nil { + err := TapValidationError{ + field: "CommonConfig", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetCommonConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TapValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TapValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TapValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return TapMultiError(errors) + } + return nil +} + +// TapMultiError is an error wrapping multiple validation errors returned by +// Tap.ValidateAll() if the designated constraints aren't met. +type TapMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TapMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TapMultiError) AllErrors() []error { return m } + +// TapValidationError is the validation error returned by Tap.Validate if the +// designated constraints aren't met. +type TapValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TapValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TapValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TapValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TapValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TapValidationError) ErrorName() string { return "TapValidationError" } + +// Error satisfies the builtin error interface +func (e TapValidationError) 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 %sTap.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TapValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TapValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/wasm/v3/wasm.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/wasm/v3/wasm.pb.go new file mode 100644 index 0000000000000..ee170c961ca67 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/wasm/v3/wasm.pb.go @@ -0,0 +1,171 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/http/wasm/v3/wasm.proto + +package wasmv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/extensions/wasm/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Wasm struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // General Plugin configuration. + Config *v3.PluginConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *Wasm) Reset() { + *x = Wasm{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_http_wasm_v3_wasm_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Wasm) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Wasm) ProtoMessage() {} + +func (x *Wasm) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_http_wasm_v3_wasm_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Wasm.ProtoReflect.Descriptor instead. +func (*Wasm) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_http_wasm_v3_wasm_proto_rawDescGZIP(), []int{0} +} + +func (x *Wasm) GetConfig() *v3.PluginConfig { + if x != nil { + return x.Config + } + return nil +} + +var File_envoy_extensions_filters_http_wasm_v3_wasm_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_http_wasm_v3_wasm_proto_rawDesc = []byte{ + 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x77, 0x61, 0x73, 0x6d, 0x2f, 0x76, 0x33, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x77, 0x61, 0x73, 0x6d, + 0x2f, 0x76, 0x33, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x46, 0x0a, + 0x04, 0x57, 0x61, 0x73, 0x6d, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, + 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x9f, 0x01, 0x0a, 0x33, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x57, + 0x61, 0x73, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, + 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2f, 0x76, 0x33, 0x3b, 0x77, 0x61, 0x73, 0x6d, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_http_wasm_v3_wasm_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_wasm_v3_wasm_proto_rawDescData = file_envoy_extensions_filters_http_wasm_v3_wasm_proto_rawDesc +) + +func file_envoy_extensions_filters_http_wasm_v3_wasm_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_wasm_v3_wasm_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_wasm_v3_wasm_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_wasm_v3_wasm_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_wasm_v3_wasm_proto_rawDescData +} + +var file_envoy_extensions_filters_http_wasm_v3_wasm_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_http_wasm_v3_wasm_proto_goTypes = []interface{}{ + (*Wasm)(nil), // 0: envoy.extensions.filters.http.wasm.v3.Wasm + (*v3.PluginConfig)(nil), // 1: envoy.extensions.wasm.v3.PluginConfig +} +var file_envoy_extensions_filters_http_wasm_v3_wasm_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.http.wasm.v3.Wasm.config:type_name -> envoy.extensions.wasm.v3.PluginConfig + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_http_wasm_v3_wasm_proto_init() } +func file_envoy_extensions_filters_http_wasm_v3_wasm_proto_init() { + if File_envoy_extensions_filters_http_wasm_v3_wasm_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_http_wasm_v3_wasm_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Wasm); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_http_wasm_v3_wasm_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_http_wasm_v3_wasm_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_http_wasm_v3_wasm_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_http_wasm_v3_wasm_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_http_wasm_v3_wasm_proto = out.File + file_envoy_extensions_filters_http_wasm_v3_wasm_proto_rawDesc = nil + file_envoy_extensions_filters_http_wasm_v3_wasm_proto_goTypes = nil + file_envoy_extensions_filters_http_wasm_v3_wasm_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/wasm/v3/wasm.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/wasm/v3/wasm.pb.validate.go new file mode 100644 index 0000000000000..436587dbd5c6b --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/http/wasm/v3/wasm.pb.validate.go @@ -0,0 +1,162 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/http/wasm/v3/wasm.proto + +package wasmv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Wasm 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 *Wasm) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Wasm 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 WasmMultiError, or nil if none found. +func (m *Wasm) ValidateAll() error { + return m.validate(true) +} + +func (m *Wasm) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WasmValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WasmValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return WasmValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return WasmMultiError(errors) + } + return nil +} + +// WasmMultiError is an error wrapping multiple validation errors returned by +// Wasm.ValidateAll() if the designated constraints aren't met. +type WasmMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WasmMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WasmMultiError) AllErrors() []error { return m } + +// WasmValidationError is the validation error returned by Wasm.Validate if the +// designated constraints aren't met. +type WasmValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e WasmValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e WasmValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e WasmValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e WasmValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e WasmValidationError) ErrorName() string { return "WasmValidationError" } + +// Error satisfies the builtin error interface +func (e WasmValidationError) 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 %sWasm.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = WasmValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = WasmValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/http_inspector/v3/http_inspector.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/http_inspector/v3/http_inspector.pb.go new file mode 100644 index 0000000000000..950f18461df43 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/http_inspector/v3/http_inspector.pb.go @@ -0,0 +1,164 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/listener/http_inspector/v3/http_inspector.proto + +package http_inspectorv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type HttpInspector struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *HttpInspector) Reset() { + *x = HttpInspector{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpInspector) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpInspector) ProtoMessage() {} + +func (x *HttpInspector) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpInspector.ProtoReflect.Descriptor instead. +func (*HttpInspector) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_rawDesc = []byte{ + 0x0a, 0x48, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x33, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x54, 0x0a, 0x0d, 0x48, 0x74, 0x74, 0x70, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x3a, 0x43, 0x9a, 0xc5, 0x88, 0x1e, 0x3e, 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x69, 0x6e, 0x73, + 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x49, 0x6e, + 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x42, 0xce, 0x01, 0x0a, 0x41, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x12, 0x48, + 0x74, 0x74, 0x70, 0x49, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x6b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x68, 0x74, + 0x74, 0x70, 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x33, 0x3b, + 0x68, 0x74, 0x74, 0x70, 0x5f, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_rawDescData = file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_rawDesc +) + +func file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_rawDescData) + }) + return file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_rawDescData +} + +var file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_goTypes = []interface{}{ + (*HttpInspector)(nil), // 0: envoy.extensions.filters.listener.http_inspector.v3.HttpInspector +} +var file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_init() } +func file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_init() { + if File_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpInspector); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto = out.File + file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_rawDesc = nil + file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_goTypes = nil + file_envoy_extensions_filters_listener_http_inspector_v3_http_inspector_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/http_inspector/v3/http_inspector.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/http_inspector/v3/http_inspector.pb.validate.go new file mode 100644 index 0000000000000..388a492fbd223 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/http_inspector/v3/http_inspector.pb.validate.go @@ -0,0 +1,135 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/listener/http_inspector/v3/http_inspector.proto + +package http_inspectorv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on HttpInspector 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 *HttpInspector) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpInspector 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 HttpInspectorMultiError, or +// nil if none found. +func (m *HttpInspector) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpInspector) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return HttpInspectorMultiError(errors) + } + return nil +} + +// HttpInspectorMultiError is an error wrapping multiple validation errors +// returned by HttpInspector.ValidateAll() if the designated constraints +// aren't met. +type HttpInspectorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpInspectorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpInspectorMultiError) AllErrors() []error { return m } + +// HttpInspectorValidationError is the validation error returned by +// HttpInspector.Validate if the designated constraints aren't met. +type HttpInspectorValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpInspectorValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpInspectorValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpInspectorValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpInspectorValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpInspectorValidationError) ErrorName() string { return "HttpInspectorValidationError" } + +// Error satisfies the builtin error interface +func (e HttpInspectorValidationError) 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 %sHttpInspector.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpInspectorValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpInspectorValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/original_dst/v3/original_dst.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/original_dst/v3/original_dst.pb.go new file mode 100644 index 0000000000000..c9438b93cdb8e --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/original_dst/v3/original_dst.pb.go @@ -0,0 +1,163 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/listener/original_dst/v3/original_dst.proto + +package original_dstv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type OriginalDst struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *OriginalDst) Reset() { + *x = OriginalDst{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OriginalDst) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OriginalDst) ProtoMessage() {} + +func (x *OriginalDst) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OriginalDst.ProtoReflect.Descriptor instead. +func (*OriginalDst) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_rawDesc = []byte{ + 0x0a, 0x44, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, + 0x2f, 0x76, 0x33, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4e, 0x0a, 0x0b, 0x4f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x3a, 0x3f, 0x9a, 0xc5, 0x88, 0x1e, + 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, 0x2e, 0x76, 0x32, 0x2e, + 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x42, 0xc6, 0x01, 0x0a, 0x3f, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, 0x2e, 0x76, 0x33, 0x42, + 0x10, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x44, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x67, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x6f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x6f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x73, 0x74, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_rawDescData = file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_rawDesc +) + +func file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_rawDescData) + }) + return file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_rawDescData +} + +var file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_goTypes = []interface{}{ + (*OriginalDst)(nil), // 0: envoy.extensions.filters.listener.original_dst.v3.OriginalDst +} +var file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_init() } +func file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_init() { + if File_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OriginalDst); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto = out.File + file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_rawDesc = nil + file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_goTypes = nil + file_envoy_extensions_filters_listener_original_dst_v3_original_dst_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/original_dst/v3/original_dst.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/original_dst/v3/original_dst.pb.validate.go new file mode 100644 index 0000000000000..7aada199c0464 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/original_dst/v3/original_dst.pb.validate.go @@ -0,0 +1,134 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/listener/original_dst/v3/original_dst.proto + +package original_dstv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on OriginalDst 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 *OriginalDst) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OriginalDst 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 OriginalDstMultiError, or +// nil if none found. +func (m *OriginalDst) ValidateAll() error { + return m.validate(true) +} + +func (m *OriginalDst) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return OriginalDstMultiError(errors) + } + return nil +} + +// OriginalDstMultiError is an error wrapping multiple validation errors +// returned by OriginalDst.ValidateAll() if the designated constraints aren't met. +type OriginalDstMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OriginalDstMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OriginalDstMultiError) AllErrors() []error { return m } + +// OriginalDstValidationError is the validation error returned by +// OriginalDst.Validate if the designated constraints aren't met. +type OriginalDstValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OriginalDstValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OriginalDstValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OriginalDstValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OriginalDstValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OriginalDstValidationError) ErrorName() string { return "OriginalDstValidationError" } + +// Error satisfies the builtin error interface +func (e OriginalDstValidationError) 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 %sOriginalDst.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OriginalDstValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OriginalDstValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/original_src/v3/original_src.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/original_src/v3/original_src.pb.go new file mode 100644 index 0000000000000..01715a3afa630 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/original_src/v3/original_src.pb.go @@ -0,0 +1,192 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/listener/original_src/v3/original_src.proto + +package original_srcv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// The Original Src filter binds upstream connections to the original source address determined +// for the connection. This address could come from something like the Proxy Protocol filter, or it +// could come from trusted http headers. +type OriginalSrc struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Whether to bind the port to the one used in the original downstream connection. + // [#not-implemented-hide:] + BindPort bool `protobuf:"varint,1,opt,name=bind_port,json=bindPort,proto3" json:"bind_port,omitempty"` + // Sets the SO_MARK option on the upstream connection's socket to the provided value. Used to + // ensure that non-local addresses may be routed back through envoy when binding to the original + // source address. The option will not be applied if the mark is 0. + Mark uint32 `protobuf:"varint,2,opt,name=mark,proto3" json:"mark,omitempty"` +} + +func (x *OriginalSrc) Reset() { + *x = OriginalSrc{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OriginalSrc) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OriginalSrc) ProtoMessage() {} + +func (x *OriginalSrc) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OriginalSrc.ProtoReflect.Descriptor instead. +func (*OriginalSrc) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_rawDescGZIP(), []int{0} +} + +func (x *OriginalSrc) GetBindPort() bool { + if x != nil { + return x.BindPort + } + return false +} + +func (x *OriginalSrc) GetMark() uint32 { + if x != nil { + return x.Mark + } + return 0 +} + +var File_envoy_extensions_filters_listener_original_src_v3_original_src_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_rawDesc = []byte{ + 0x0a, 0x44, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, + 0x2f, 0x76, 0x33, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x0b, + 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x72, 0x63, 0x12, 0x1b, 0x0a, 0x09, 0x62, + 0x69, 0x6e, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, + 0x62, 0x69, 0x6e, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x72, 0x6b, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6d, 0x61, 0x72, 0x6b, 0x3a, 0x45, 0x9a, 0xc5, + 0x88, 0x1e, 0x40, 0x0a, 0x3e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, 0x2e, 0x76, + 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, + 0x53, 0x72, 0x63, 0x42, 0xc6, 0x01, 0x0a, 0x3f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, + 0x5f, 0x73, 0x72, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, + 0x6c, 0x53, 0x72, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x67, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, + 0x72, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, + 0x72, 0x63, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_rawDescData = file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_rawDesc +) + +func file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_rawDescData) + }) + return file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_rawDescData +} + +var file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_goTypes = []interface{}{ + (*OriginalSrc)(nil), // 0: envoy.extensions.filters.listener.original_src.v3.OriginalSrc +} +var file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_init() } +func file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_init() { + if File_envoy_extensions_filters_listener_original_src_v3_original_src_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OriginalSrc); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_listener_original_src_v3_original_src_proto = out.File + file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_rawDesc = nil + file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_goTypes = nil + file_envoy_extensions_filters_listener_original_src_v3_original_src_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/original_src/v3/original_src.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/original_src/v3/original_src.pb.validate.go new file mode 100644 index 0000000000000..5267e0e2b7d85 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/original_src/v3/original_src.pb.validate.go @@ -0,0 +1,138 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/listener/original_src/v3/original_src.proto + +package original_srcv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on OriginalSrc 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 *OriginalSrc) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OriginalSrc 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 OriginalSrcMultiError, or +// nil if none found. +func (m *OriginalSrc) ValidateAll() error { + return m.validate(true) +} + +func (m *OriginalSrc) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for BindPort + + // no validation rules for Mark + + if len(errors) > 0 { + return OriginalSrcMultiError(errors) + } + return nil +} + +// OriginalSrcMultiError is an error wrapping multiple validation errors +// returned by OriginalSrc.ValidateAll() if the designated constraints aren't met. +type OriginalSrcMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OriginalSrcMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OriginalSrcMultiError) AllErrors() []error { return m } + +// OriginalSrcValidationError is the validation error returned by +// OriginalSrc.Validate if the designated constraints aren't met. +type OriginalSrcValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OriginalSrcValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OriginalSrcValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OriginalSrcValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OriginalSrcValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OriginalSrcValidationError) ErrorName() string { return "OriginalSrcValidationError" } + +// Error satisfies the builtin error interface +func (e OriginalSrcValidationError) 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 %sOriginalSrc.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OriginalSrcValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OriginalSrcValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.pb.go new file mode 100644 index 0000000000000..918f5a3dbfb57 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.pb.go @@ -0,0 +1,372 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.proto + +package proxy_protocolv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type ProxyProtocol struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of rules to apply to requests. + Rules []*ProxyProtocol_Rule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` + // Allow requests through that don't use proxy protocol. Defaults to false. + // + // .. attention:: + // + // This breaks conformance with the specification. + // Only enable if ALL traffic to the listener comes from a trusted source. + // For more information on the security implications of this feature, see + // https://www.haproxy.org/download/2.1/doc/proxy-protocol.txt + // + // .. attention:: + // + // Requests of 12 or fewer bytes that match the proxy protocol v2 signature + // and requests of 6 or fewer bytes that match the proxy protocol v1 + // signature will timeout (Envoy is unable to differentiate these requests + // from incomplete proxy protocol requests). + AllowRequestsWithoutProxyProtocol bool `protobuf:"varint,2,opt,name=allow_requests_without_proxy_protocol,json=allowRequestsWithoutProxyProtocol,proto3" json:"allow_requests_without_proxy_protocol,omitempty"` +} + +func (x *ProxyProtocol) Reset() { + *x = ProxyProtocol{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProxyProtocol) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProxyProtocol) ProtoMessage() {} + +func (x *ProxyProtocol) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProxyProtocol.ProtoReflect.Descriptor instead. +func (*ProxyProtocol) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDescGZIP(), []int{0} +} + +func (x *ProxyProtocol) GetRules() []*ProxyProtocol_Rule { + if x != nil { + return x.Rules + } + return nil +} + +func (x *ProxyProtocol) GetAllowRequestsWithoutProxyProtocol() bool { + if x != nil { + return x.AllowRequestsWithoutProxyProtocol + } + return false +} + +type ProxyProtocol_KeyValuePair struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The namespace — if this is empty, the filter's namespace will be used. + MetadataNamespace string `protobuf:"bytes,1,opt,name=metadata_namespace,json=metadataNamespace,proto3" json:"metadata_namespace,omitempty"` + // The key to use within the namespace. + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` +} + +func (x *ProxyProtocol_KeyValuePair) Reset() { + *x = ProxyProtocol_KeyValuePair{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProxyProtocol_KeyValuePair) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProxyProtocol_KeyValuePair) ProtoMessage() {} + +func (x *ProxyProtocol_KeyValuePair) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProxyProtocol_KeyValuePair.ProtoReflect.Descriptor instead. +func (*ProxyProtocol_KeyValuePair) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *ProxyProtocol_KeyValuePair) GetMetadataNamespace() string { + if x != nil { + return x.MetadataNamespace + } + return "" +} + +func (x *ProxyProtocol_KeyValuePair) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +// A Rule defines what metadata to apply when a header is present or missing. +type ProxyProtocol_Rule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The type that triggers the rule - required + // TLV type is defined as uint8_t in proxy protocol. See `the spec + // `_ for details. + TlvType uint32 `protobuf:"varint,1,opt,name=tlv_type,json=tlvType,proto3" json:"tlv_type,omitempty"` + // If the TLV type is present, apply this metadata KeyValuePair. + OnTlvPresent *ProxyProtocol_KeyValuePair `protobuf:"bytes,2,opt,name=on_tlv_present,json=onTlvPresent,proto3" json:"on_tlv_present,omitempty"` +} + +func (x *ProxyProtocol_Rule) Reset() { + *x = ProxyProtocol_Rule{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProxyProtocol_Rule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProxyProtocol_Rule) ProtoMessage() {} + +func (x *ProxyProtocol_Rule) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProxyProtocol_Rule.ProtoReflect.Descriptor instead. +func (*ProxyProtocol_Rule) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *ProxyProtocol_Rule) GetTlvType() uint32 { + if x != nil { + return x.TlvType + } + return 0 +} + +func (x *ProxyProtocol_Rule) GetOnTlvPresent() *ProxyProtocol_KeyValuePair { + if x != nil { + return x.OnTlvPresent + } + return nil +} + +var File_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDesc = []byte{ + 0x0a, 0x48, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x33, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x76, 0x33, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0x84, 0x04, 0x0a, 0x0d, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x5d, 0x0a, 0x05, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x76, + 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, + 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x50, 0x0a, 0x25, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x77, 0x69, + 0x74, 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x21, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, + 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x1a, 0x58, 0x0a, + 0x0c, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x12, 0x2d, 0x0a, + 0x12, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x19, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x1a, 0xa2, 0x01, 0x0a, 0x04, 0x52, 0x75, 0x6c, 0x65, + 0x12, 0x23, 0x0a, 0x08, 0x74, 0x6c, 0x76, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x2a, 0x03, 0x10, 0x80, 0x02, 0x52, 0x07, 0x74, 0x6c, + 0x76, 0x54, 0x79, 0x70, 0x65, 0x12, 0x75, 0x0a, 0x0e, 0x6f, 0x6e, 0x5f, 0x74, 0x6c, 0x76, 0x5f, + 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x0c, + 0x6f, 0x6e, 0x54, 0x6c, 0x76, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x3a, 0x43, 0x9a, 0xc5, + 0x88, 0x1e, 0x3e, 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x42, 0xce, 0x01, 0x0a, 0x41, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x76, 0x33, 0x42, 0x12, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6b, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x76, 0x33, 0x3b, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDescData = file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDesc +) + +func file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDescData) + }) + return file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDescData +} + +var file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_goTypes = []interface{}{ + (*ProxyProtocol)(nil), // 0: envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol + (*ProxyProtocol_KeyValuePair)(nil), // 1: envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol.KeyValuePair + (*ProxyProtocol_Rule)(nil), // 2: envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol.Rule +} +var file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol.rules:type_name -> envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol.Rule + 1, // 1: envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol.Rule.on_tlv_present:type_name -> envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol.KeyValuePair + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_init() } +func file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_init() { + if File_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProxyProtocol); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProxyProtocol_KeyValuePair); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProxyProtocol_Rule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto = out.File + file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDesc = nil + file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_goTypes = nil + file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.pb.validate.go new file mode 100644 index 0000000000000..a46418881ae90 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.pb.validate.go @@ -0,0 +1,426 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.proto + +package proxy_protocolv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ProxyProtocol 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 *ProxyProtocol) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ProxyProtocol 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 ProxyProtocolMultiError, or +// nil if none found. +func (m *ProxyProtocol) ValidateAll() error { + return m.validate(true) +} + +func (m *ProxyProtocol) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetRules() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProxyProtocolValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProxyProtocolValidationError{ + field: fmt.Sprintf("Rules[%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 ProxyProtocolValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for AllowRequestsWithoutProxyProtocol + + if len(errors) > 0 { + return ProxyProtocolMultiError(errors) + } + return nil +} + +// ProxyProtocolMultiError is an error wrapping multiple validation errors +// returned by ProxyProtocol.ValidateAll() if the designated constraints +// aren't met. +type ProxyProtocolMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ProxyProtocolMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ProxyProtocolMultiError) AllErrors() []error { return m } + +// ProxyProtocolValidationError is the validation error returned by +// ProxyProtocol.Validate if the designated constraints aren't met. +type ProxyProtocolValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ProxyProtocolValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ProxyProtocolValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ProxyProtocolValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ProxyProtocolValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ProxyProtocolValidationError) ErrorName() string { return "ProxyProtocolValidationError" } + +// Error satisfies the builtin error interface +func (e ProxyProtocolValidationError) 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 %sProxyProtocol.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ProxyProtocolValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ProxyProtocolValidationError{} + +// Validate checks the field values on ProxyProtocol_KeyValuePair 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 *ProxyProtocol_KeyValuePair) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ProxyProtocol_KeyValuePair 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 +// ProxyProtocol_KeyValuePairMultiError, or nil if none found. +func (m *ProxyProtocol_KeyValuePair) ValidateAll() error { + return m.validate(true) +} + +func (m *ProxyProtocol_KeyValuePair) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for MetadataNamespace + + if utf8.RuneCountInString(m.GetKey()) < 1 { + err := ProxyProtocol_KeyValuePairValidationError{ + field: "Key", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return ProxyProtocol_KeyValuePairMultiError(errors) + } + return nil +} + +// ProxyProtocol_KeyValuePairMultiError is an error wrapping multiple +// validation errors returned by ProxyProtocol_KeyValuePair.ValidateAll() if +// the designated constraints aren't met. +type ProxyProtocol_KeyValuePairMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ProxyProtocol_KeyValuePairMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ProxyProtocol_KeyValuePairMultiError) AllErrors() []error { return m } + +// ProxyProtocol_KeyValuePairValidationError is the validation error returned +// by ProxyProtocol_KeyValuePair.Validate if the designated constraints aren't met. +type ProxyProtocol_KeyValuePairValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ProxyProtocol_KeyValuePairValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ProxyProtocol_KeyValuePairValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ProxyProtocol_KeyValuePairValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ProxyProtocol_KeyValuePairValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ProxyProtocol_KeyValuePairValidationError) ErrorName() string { + return "ProxyProtocol_KeyValuePairValidationError" +} + +// Error satisfies the builtin error interface +func (e ProxyProtocol_KeyValuePairValidationError) 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 %sProxyProtocol_KeyValuePair.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ProxyProtocol_KeyValuePairValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ProxyProtocol_KeyValuePairValidationError{} + +// Validate checks the field values on ProxyProtocol_Rule 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 *ProxyProtocol_Rule) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ProxyProtocol_Rule 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 +// ProxyProtocol_RuleMultiError, or nil if none found. +func (m *ProxyProtocol_Rule) ValidateAll() error { + return m.validate(true) +} + +func (m *ProxyProtocol_Rule) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetTlvType() >= 256 { + err := ProxyProtocol_RuleValidationError{ + field: "TlvType", + reason: "value must be less than 256", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetOnTlvPresent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProxyProtocol_RuleValidationError{ + field: "OnTlvPresent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProxyProtocol_RuleValidationError{ + field: "OnTlvPresent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOnTlvPresent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProxyProtocol_RuleValidationError{ + field: "OnTlvPresent", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ProxyProtocol_RuleMultiError(errors) + } + return nil +} + +// ProxyProtocol_RuleMultiError is an error wrapping multiple validation errors +// returned by ProxyProtocol_Rule.ValidateAll() if the designated constraints +// aren't met. +type ProxyProtocol_RuleMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ProxyProtocol_RuleMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ProxyProtocol_RuleMultiError) AllErrors() []error { return m } + +// ProxyProtocol_RuleValidationError is the validation error returned by +// ProxyProtocol_Rule.Validate if the designated constraints aren't met. +type ProxyProtocol_RuleValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ProxyProtocol_RuleValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ProxyProtocol_RuleValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ProxyProtocol_RuleValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ProxyProtocol_RuleValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ProxyProtocol_RuleValidationError) ErrorName() string { + return "ProxyProtocol_RuleValidationError" +} + +// Error satisfies the builtin error interface +func (e ProxyProtocol_RuleValidationError) 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 %sProxyProtocol_Rule.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ProxyProtocol_RuleValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ProxyProtocol_RuleValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/direct_response/v3/config.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/direct_response/v3/config.pb.go new file mode 100644 index 0000000000000..83e99f2983b1d --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/direct_response/v3/config.pb.go @@ -0,0 +1,182 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/direct_response/v3/config.proto + +package direct_responsev3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Config struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Response data as a data source. + Response *v3.DataSource `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` +} + +func (x *Config) Reset() { + *x = Config{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_direct_response_v3_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config) ProtoMessage() {} + +func (x *Config) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_direct_response_v3_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Config.ProtoReflect.Descriptor instead. +func (*Config) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_direct_response_v3_config_proto_rawDescGZIP(), []int{0} +} + +func (x *Config) GetResponse() *v3.DataSource { + if x != nil { + return x.Response + } + return nil +} + +var File_envoy_extensions_filters_network_direct_response_v3_config_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_direct_response_v3_config_proto_rawDesc = []byte{ + 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x84, 0x01, 0x0a, 0x06, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3c, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, + 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x42, 0xc8, 0x01, 0x0a, 0x41, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, + 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, + 0x76, 0x33, 0x3b, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_network_direct_response_v3_config_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_direct_response_v3_config_proto_rawDescData = file_envoy_extensions_filters_network_direct_response_v3_config_proto_rawDesc +) + +func file_envoy_extensions_filters_network_direct_response_v3_config_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_direct_response_v3_config_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_direct_response_v3_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_direct_response_v3_config_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_direct_response_v3_config_proto_rawDescData +} + +var file_envoy_extensions_filters_network_direct_response_v3_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_network_direct_response_v3_config_proto_goTypes = []interface{}{ + (*Config)(nil), // 0: envoy.extensions.filters.network.direct_response.v3.Config + (*v3.DataSource)(nil), // 1: envoy.config.core.v3.DataSource +} +var file_envoy_extensions_filters_network_direct_response_v3_config_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.network.direct_response.v3.Config.response:type_name -> envoy.config.core.v3.DataSource + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_network_direct_response_v3_config_proto_init() } +func file_envoy_extensions_filters_network_direct_response_v3_config_proto_init() { + if File_envoy_extensions_filters_network_direct_response_v3_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_direct_response_v3_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Config); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_direct_response_v3_config_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_direct_response_v3_config_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_direct_response_v3_config_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_network_direct_response_v3_config_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_direct_response_v3_config_proto = out.File + file_envoy_extensions_filters_network_direct_response_v3_config_proto_rawDesc = nil + file_envoy_extensions_filters_network_direct_response_v3_config_proto_goTypes = nil + file_envoy_extensions_filters_network_direct_response_v3_config_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/direct_response/v3/config.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/direct_response/v3/config.pb.validate.go new file mode 100644 index 0000000000000..bcb12f5d36839 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/direct_response/v3/config.pb.validate.go @@ -0,0 +1,162 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/direct_response/v3/config.proto + +package direct_responsev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Config 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 *Config) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config 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 ConfigMultiError, or nil if none found. +func (m *Config) ValidateAll() error { + return m.validate(true) +} + +func (m *Config) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ConfigValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ConfigMultiError(errors) + } + return nil +} + +// ConfigMultiError is an error wrapping multiple validation errors returned by +// Config.ValidateAll() if the designated constraints aren't met. +type ConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigMultiError) AllErrors() []error { return m } + +// ConfigValidationError is the validation error returned by Config.Validate if +// the designated constraints aren't met. +type ConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConfigValidationError) ErrorName() string { return "ConfigValidationError" } + +// Error satisfies the builtin error interface +func (e ConfigValidationError) 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 %sConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/dubbo_proxy/router/v3/router.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/dubbo_proxy/router/v3/router.pb.go new file mode 100644 index 0000000000000..e4c8fe12f9e4f --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/dubbo_proxy/router/v3/router.pb.go @@ -0,0 +1,163 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/dubbo_proxy/router/v3/router.proto + +package routerv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Router struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Router) Reset() { + *x = Router{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Router) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Router) ProtoMessage() {} + +func (x *Router) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Router.ProtoReflect.Descriptor instead. +func (*Router) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_rawDesc = []byte{ + 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x41, 0x0a, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, + 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x72, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x72, 0x42, 0xc5, 0x01, 0x0a, 0x44, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, + 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_rawDescData = file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_rawDesc +) + +func file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_rawDescData +} + +var file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_goTypes = []interface{}{ + (*Router)(nil), // 0: envoy.extensions.filters.network.dubbo_proxy.router.v3.Router +} +var file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_init() } +func file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_init() { + if File_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Router); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto = out.File + file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_rawDesc = nil + file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_goTypes = nil + file_envoy_extensions_filters_network_dubbo_proxy_router_v3_router_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/dubbo_proxy/router/v3/router.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/dubbo_proxy/router/v3/router.pb.validate.go new file mode 100644 index 0000000000000..4a9d36c622caf --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/dubbo_proxy/router/v3/router.pb.validate.go @@ -0,0 +1,133 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/dubbo_proxy/router/v3/router.proto + +package routerv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Router 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 *Router) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Router 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 RouterMultiError, or nil if none found. +func (m *Router) ValidateAll() error { + return m.validate(true) +} + +func (m *Router) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return RouterMultiError(errors) + } + return nil +} + +// RouterMultiError is an error wrapping multiple validation errors returned by +// Router.ValidateAll() if the designated constraints aren't met. +type RouterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouterMultiError) AllErrors() []error { return m } + +// RouterValidationError is the validation error returned by Router.Validate if +// the designated constraints aren't met. +type RouterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RouterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RouterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RouterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RouterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RouterValidationError) ErrorName() string { return "RouterValidationError" } + +// Error satisfies the builtin error interface +func (e RouterValidationError) 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 %sRouter.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RouterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RouterValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.pb.go new file mode 100644 index 0000000000000..5899d11e4db96 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.pb.go @@ -0,0 +1,607 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.proto + +package dubbo_proxyv3 + +import ( + _ "github.com/cilium/proxy/go/envoy/annotations" + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Dubbo Protocol types supported by Envoy. +type ProtocolType int32 + +const ( + // the default protocol. + ProtocolType_Dubbo ProtocolType = 0 +) + +// Enum value maps for ProtocolType. +var ( + ProtocolType_name = map[int32]string{ + 0: "Dubbo", + } + ProtocolType_value = map[string]int32{ + "Dubbo": 0, + } +) + +func (x ProtocolType) Enum() *ProtocolType { + p := new(ProtocolType) + *p = x + return p +} + +func (x ProtocolType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ProtocolType) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_enumTypes[0].Descriptor() +} + +func (ProtocolType) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_enumTypes[0] +} + +func (x ProtocolType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ProtocolType.Descriptor instead. +func (ProtocolType) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_rawDescGZIP(), []int{0} +} + +// Dubbo Serialization types supported by Envoy. +type SerializationType int32 + +const ( + // the default serialization protocol. + SerializationType_Hessian2 SerializationType = 0 +) + +// Enum value maps for SerializationType. +var ( + SerializationType_name = map[int32]string{ + 0: "Hessian2", + } + SerializationType_value = map[string]int32{ + "Hessian2": 0, + } +) + +func (x SerializationType) Enum() *SerializationType { + p := new(SerializationType) + *p = x + return p +} + +func (x SerializationType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SerializationType) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_enumTypes[1].Descriptor() +} + +func (SerializationType) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_enumTypes[1] +} + +func (x SerializationType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SerializationType.Descriptor instead. +func (SerializationType) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_rawDescGZIP(), []int{1} +} + +type Drds struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Configuration source specifier. + // In case of “api_config_source“ only aggregated “api_type“ is supported. + ConfigSource *v3.ConfigSource `protobuf:"bytes,1,opt,name=config_source,json=configSource,proto3" json:"config_source,omitempty"` + // The name of the multiple route configuration. This allows to use different multiple route + // configurations. Tells which multiple route configuration should be fetched from the configuration + // source. Leave unspecified is also valid and means the unnamed multiple route configuration. + RouteConfigName string `protobuf:"bytes,2,opt,name=route_config_name,json=routeConfigName,proto3" json:"route_config_name,omitempty"` +} + +func (x *Drds) Reset() { + *x = Drds{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Drds) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Drds) ProtoMessage() {} + +func (x *Drds) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Drds.ProtoReflect.Descriptor instead. +func (*Drds) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_rawDescGZIP(), []int{0} +} + +func (x *Drds) GetConfigSource() *v3.ConfigSource { + if x != nil { + return x.ConfigSource + } + return nil +} + +func (x *Drds) GetRouteConfigName() string { + if x != nil { + return x.RouteConfigName + } + return "" +} + +// [#next-free-field: 8] +type DubboProxy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The human readable prefix to use when emitting statistics. + StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` + // Configure the protocol used. + ProtocolType ProtocolType `protobuf:"varint,2,opt,name=protocol_type,json=protocolType,proto3,enum=envoy.extensions.filters.network.dubbo_proxy.v3.ProtocolType" json:"protocol_type,omitempty"` + // Configure the serialization protocol used. + SerializationType SerializationType `protobuf:"varint,3,opt,name=serialization_type,json=serializationType,proto3,enum=envoy.extensions.filters.network.dubbo_proxy.v3.SerializationType" json:"serialization_type,omitempty"` + // The route table for the connection manager is static and is specified in this property. + // + // .. note:: + // + // This field is deprecated. Please use ``drds`` or ``multiple_route_config`` first. + // + // Deprecated: Do not use. + RouteConfig []*RouteConfiguration `protobuf:"bytes,4,rep,name=route_config,json=routeConfig,proto3" json:"route_config,omitempty"` + // Types that are assignable to RouteSpecifier: + // + // *DubboProxy_Drds + // *DubboProxy_MultipleRouteConfig + RouteSpecifier isDubboProxy_RouteSpecifier `protobuf_oneof:"route_specifier"` + // A list of individual Dubbo filters that make up the filter chain for requests made to the + // Dubbo proxy. Order matters as the filters are processed sequentially. For backwards + // compatibility, if no dubbo_filters are specified, a default Dubbo router filter + // (“envoy.filters.dubbo.router“) is used. + DubboFilters []*DubboFilter `protobuf:"bytes,5,rep,name=dubbo_filters,json=dubboFilters,proto3" json:"dubbo_filters,omitempty"` +} + +func (x *DubboProxy) Reset() { + *x = DubboProxy{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DubboProxy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DubboProxy) ProtoMessage() {} + +func (x *DubboProxy) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DubboProxy.ProtoReflect.Descriptor instead. +func (*DubboProxy) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_rawDescGZIP(), []int{1} +} + +func (x *DubboProxy) GetStatPrefix() string { + if x != nil { + return x.StatPrefix + } + return "" +} + +func (x *DubboProxy) GetProtocolType() ProtocolType { + if x != nil { + return x.ProtocolType + } + return ProtocolType_Dubbo +} + +func (x *DubboProxy) GetSerializationType() SerializationType { + if x != nil { + return x.SerializationType + } + return SerializationType_Hessian2 +} + +// Deprecated: Do not use. +func (x *DubboProxy) GetRouteConfig() []*RouteConfiguration { + if x != nil { + return x.RouteConfig + } + return nil +} + +func (m *DubboProxy) GetRouteSpecifier() isDubboProxy_RouteSpecifier { + if m != nil { + return m.RouteSpecifier + } + return nil +} + +func (x *DubboProxy) GetDrds() *Drds { + if x, ok := x.GetRouteSpecifier().(*DubboProxy_Drds); ok { + return x.Drds + } + return nil +} + +func (x *DubboProxy) GetMultipleRouteConfig() *MultipleRouteConfiguration { + if x, ok := x.GetRouteSpecifier().(*DubboProxy_MultipleRouteConfig); ok { + return x.MultipleRouteConfig + } + return nil +} + +func (x *DubboProxy) GetDubboFilters() []*DubboFilter { + if x != nil { + return x.DubboFilters + } + return nil +} + +type isDubboProxy_RouteSpecifier interface { + isDubboProxy_RouteSpecifier() +} + +type DubboProxy_Drds struct { + // Use xDS to fetch the route configuration. It is invalid to define both “route_config“ and “drds“. + Drds *Drds `protobuf:"bytes,6,opt,name=drds,proto3,oneof"` +} + +type DubboProxy_MultipleRouteConfig struct { + MultipleRouteConfig *MultipleRouteConfiguration `protobuf:"bytes,7,opt,name=multiple_route_config,json=multipleRouteConfig,proto3,oneof"` +} + +func (*DubboProxy_Drds) isDubboProxy_RouteSpecifier() {} + +func (*DubboProxy_MultipleRouteConfig) isDubboProxy_RouteSpecifier() {} + +// DubboFilter configures a Dubbo filter. +type DubboFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the filter to instantiate. The name must match a supported + // filter. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Filter specific configuration which depends on the filter being + // instantiated. See the supported filters for further documentation. + Config *anypb.Any `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *DubboFilter) Reset() { + *x = DubboFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DubboFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DubboFilter) ProtoMessage() {} + +func (x *DubboFilter) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DubboFilter.ProtoReflect.Descriptor instead. +func (*DubboFilter) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_rawDescGZIP(), []int{2} +} + +func (x *DubboFilter) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DubboFilter) GetConfig() *anypb.Any { + if x != nil { + return x.Config + } + return nil +} + +var File_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_rawDesc = []byte{ + 0x0a, 0x41, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, + 0x33, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3b, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x2f, + 0x72, 0x6f, 0x75, 0x74, 0x65, 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, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, + 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0x85, 0x01, 0x0a, 0x04, 0x44, 0x72, 0x64, 0x73, 0x12, + 0x51, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xba, + 0x06, 0x0a, 0x0a, 0x44, 0x75, 0x62, 0x62, 0x6f, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x28, 0x0a, + 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, + 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x6c, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, + 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x7b, 0x0a, 0x12, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x42, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x11, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x73, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, + 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x18, + 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x64, 0x0a, 0x04, 0x64, 0x72, 0x64, 0x73, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x72, 0x64, 0x73, 0x42, 0x17, 0xf2, 0x98, + 0xfe, 0x8f, 0x05, 0x11, 0x12, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x48, 0x00, 0x52, 0x04, 0x64, 0x72, 0x64, 0x73, 0x12, 0x81, 0x01, + 0x0a, 0x15, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4b, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, + 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x13, 0x6d, 0x75, + 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x61, 0x0a, 0x0d, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, + 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x75, 0x62, 0x62, 0x6f, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0c, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x3a, 0x42, 0x9a, 0xc5, 0x88, 0x1e, 0x3d, 0x0a, 0x3b, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x75, + 0x62, 0x62, 0x6f, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x42, 0x11, 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x9d, 0x01, 0x0a, 0x0b, + 0x44, 0x75, 0x62, 0x62, 0x6f, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 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, 0x06, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x43, 0x9a, 0xc5, 0x88, 0x1e, 0x3e, 0x0a, 0x3c, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x44, 0x75, 0x62, 0x62, 0x6f, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2a, 0x19, 0x0a, 0x0c, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x44, + 0x75, 0x62, 0x62, 0x6f, 0x10, 0x00, 0x2a, 0x21, 0x0a, 0x11, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x48, + 0x65, 0x73, 0x73, 0x69, 0x61, 0x6e, 0x32, 0x10, 0x00, 0x42, 0xc0, 0x01, 0x0a, 0x3d, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, + 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x44, 0x75, 0x62, + 0x62, 0x6f, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x64, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_rawDescData = file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_rawDesc +) + +func file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_rawDescData +} + +var file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_goTypes = []interface{}{ + (ProtocolType)(0), // 0: envoy.extensions.filters.network.dubbo_proxy.v3.ProtocolType + (SerializationType)(0), // 1: envoy.extensions.filters.network.dubbo_proxy.v3.SerializationType + (*Drds)(nil), // 2: envoy.extensions.filters.network.dubbo_proxy.v3.Drds + (*DubboProxy)(nil), // 3: envoy.extensions.filters.network.dubbo_proxy.v3.DubboProxy + (*DubboFilter)(nil), // 4: envoy.extensions.filters.network.dubbo_proxy.v3.DubboFilter + (*v3.ConfigSource)(nil), // 5: envoy.config.core.v3.ConfigSource + (*RouteConfiguration)(nil), // 6: envoy.extensions.filters.network.dubbo_proxy.v3.RouteConfiguration + (*MultipleRouteConfiguration)(nil), // 7: envoy.extensions.filters.network.dubbo_proxy.v3.MultipleRouteConfiguration + (*anypb.Any)(nil), // 8: google.protobuf.Any +} +var file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_depIdxs = []int32{ + 5, // 0: envoy.extensions.filters.network.dubbo_proxy.v3.Drds.config_source:type_name -> envoy.config.core.v3.ConfigSource + 0, // 1: envoy.extensions.filters.network.dubbo_proxy.v3.DubboProxy.protocol_type:type_name -> envoy.extensions.filters.network.dubbo_proxy.v3.ProtocolType + 1, // 2: envoy.extensions.filters.network.dubbo_proxy.v3.DubboProxy.serialization_type:type_name -> envoy.extensions.filters.network.dubbo_proxy.v3.SerializationType + 6, // 3: envoy.extensions.filters.network.dubbo_proxy.v3.DubboProxy.route_config:type_name -> envoy.extensions.filters.network.dubbo_proxy.v3.RouteConfiguration + 2, // 4: envoy.extensions.filters.network.dubbo_proxy.v3.DubboProxy.drds:type_name -> envoy.extensions.filters.network.dubbo_proxy.v3.Drds + 7, // 5: envoy.extensions.filters.network.dubbo_proxy.v3.DubboProxy.multiple_route_config:type_name -> envoy.extensions.filters.network.dubbo_proxy.v3.MultipleRouteConfiguration + 4, // 6: envoy.extensions.filters.network.dubbo_proxy.v3.DubboProxy.dubbo_filters:type_name -> envoy.extensions.filters.network.dubbo_proxy.v3.DubboFilter + 8, // 7: envoy.extensions.filters.network.dubbo_proxy.v3.DubboFilter.config:type_name -> google.protobuf.Any + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_init() } +func file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_init() { + if File_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto != nil { + return + } + file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_init() + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Drds); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DubboProxy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DubboFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*DubboProxy_Drds)(nil), + (*DubboProxy_MultipleRouteConfig)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_rawDesc, + NumEnums: 2, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_depIdxs, + EnumInfos: file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_enumTypes, + MessageInfos: file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto = out.File + file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_rawDesc = nil + file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_goTypes = nil + file_envoy_extensions_filters_network_dubbo_proxy_v3_dubbo_proxy_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.pb.validate.go new file mode 100644 index 0000000000000..1ea9566522506 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.pb.validate.go @@ -0,0 +1,578 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/dubbo_proxy/v3/dubbo_proxy.proto + +package dubbo_proxyv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Drds 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 *Drds) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Drds 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 DrdsMultiError, or nil if none found. +func (m *Drds) ValidateAll() error { + return m.validate(true) +} + +func (m *Drds) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetConfigSource() == nil { + err := DrdsValidationError{ + field: "ConfigSource", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetConfigSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DrdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DrdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfigSource()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DrdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for RouteConfigName + + if len(errors) > 0 { + return DrdsMultiError(errors) + } + return nil +} + +// DrdsMultiError is an error wrapping multiple validation errors returned by +// Drds.ValidateAll() if the designated constraints aren't met. +type DrdsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DrdsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DrdsMultiError) AllErrors() []error { return m } + +// DrdsValidationError is the validation error returned by Drds.Validate if the +// designated constraints aren't met. +type DrdsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DrdsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DrdsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DrdsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DrdsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DrdsValidationError) ErrorName() string { return "DrdsValidationError" } + +// Error satisfies the builtin error interface +func (e DrdsValidationError) 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 %sDrds.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DrdsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DrdsValidationError{} + +// Validate checks the field values on DubboProxy 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 *DubboProxy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DubboProxy 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 DubboProxyMultiError, or +// nil if none found. +func (m *DubboProxy) ValidateAll() error { + return m.validate(true) +} + +func (m *DubboProxy) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { + err := DubboProxyValidationError{ + field: "StatPrefix", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := ProtocolType_name[int32(m.GetProtocolType())]; !ok { + err := DubboProxyValidationError{ + field: "ProtocolType", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := SerializationType_name[int32(m.GetSerializationType())]; !ok { + err := DubboProxyValidationError{ + field: "SerializationType", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetRouteConfig() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DubboProxyValidationError{ + field: fmt.Sprintf("RouteConfig[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DubboProxyValidationError{ + field: fmt.Sprintf("RouteConfig[%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 DubboProxyValidationError{ + field: fmt.Sprintf("RouteConfig[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetDubboFilters() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DubboProxyValidationError{ + field: fmt.Sprintf("DubboFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DubboProxyValidationError{ + field: fmt.Sprintf("DubboFilters[%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 DubboProxyValidationError{ + field: fmt.Sprintf("DubboFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + switch m.RouteSpecifier.(type) { + + case *DubboProxy_Drds: + + if all { + switch v := interface{}(m.GetDrds()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DubboProxyValidationError{ + field: "Drds", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DubboProxyValidationError{ + field: "Drds", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDrds()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DubboProxyValidationError{ + field: "Drds", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *DubboProxy_MultipleRouteConfig: + + if all { + switch v := interface{}(m.GetMultipleRouteConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DubboProxyValidationError{ + field: "MultipleRouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DubboProxyValidationError{ + field: "MultipleRouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMultipleRouteConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DubboProxyValidationError{ + field: "MultipleRouteConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return DubboProxyMultiError(errors) + } + return nil +} + +// DubboProxyMultiError is an error wrapping multiple validation errors +// returned by DubboProxy.ValidateAll() if the designated constraints aren't met. +type DubboProxyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DubboProxyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DubboProxyMultiError) AllErrors() []error { return m } + +// DubboProxyValidationError is the validation error returned by +// DubboProxy.Validate if the designated constraints aren't met. +type DubboProxyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DubboProxyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DubboProxyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DubboProxyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DubboProxyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DubboProxyValidationError) ErrorName() string { return "DubboProxyValidationError" } + +// Error satisfies the builtin error interface +func (e DubboProxyValidationError) 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 %sDubboProxy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DubboProxyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DubboProxyValidationError{} + +// Validate checks the field values on DubboFilter 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 *DubboFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DubboFilter 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 DubboFilterMultiError, or +// nil if none found. +func (m *DubboFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *DubboFilter) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetName()) < 1 { + err := DubboFilterValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DubboFilterValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DubboFilterValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DubboFilterValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return DubboFilterMultiError(errors) + } + return nil +} + +// DubboFilterMultiError is an error wrapping multiple validation errors +// returned by DubboFilter.ValidateAll() if the designated constraints aren't met. +type DubboFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DubboFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DubboFilterMultiError) AllErrors() []error { return m } + +// DubboFilterValidationError is the validation error returned by +// DubboFilter.Validate if the designated constraints aren't met. +type DubboFilterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DubboFilterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DubboFilterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DubboFilterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DubboFilterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DubboFilterValidationError) ErrorName() string { return "DubboFilterValidationError" } + +// Error satisfies the builtin error interface +func (e DubboFilterValidationError) 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 %sDubboFilter.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DubboFilterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DubboFilterValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/dubbo_proxy/v3/route.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/dubbo_proxy/v3/route.pb.go new file mode 100644 index 0000000000000..d30d5cd64f063 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/dubbo_proxy/v3/route.pb.go @@ -0,0 +1,876 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/dubbo_proxy/v3/route.proto + +package dubbo_proxyv3 + +import ( + v31 "github.com/cilium/proxy/go/envoy/config/core/v3" + v3 "github.com/cilium/proxy/go/envoy/config/route/v3" + v32 "github.com/cilium/proxy/go/envoy/type/matcher/v3" + v33 "github.com/cilium/proxy/go/envoy/type/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// [#next-free-field: 6] +type RouteConfiguration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the route configuration. Reserved for future use in asynchronous route discovery. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The interface name of the service. Wildcard interface are supported in the suffix or prefix form. + // e.g. “*.methods.add“ will match “com.dev.methods.add“, “com.prod.methods.add“, etc. + // “com.dev.methods.*“ will match “com.dev.methods.add“, “com.dev.methods.update“, etc. + // Special wildcard “*“ matching any interface. + // + // .. note:: + // + // The wildcard will not match the empty string. + // e.g. ``*.methods.add`` will match ``com.dev.methods.add`` but not ``.methods.add``. + Interface string `protobuf:"bytes,2,opt,name=interface,proto3" json:"interface,omitempty"` + // Which group does the interface belong to. + Group string `protobuf:"bytes,3,opt,name=group,proto3" json:"group,omitempty"` + // The version number of the interface. + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + // The list of routes that will be matched, in order, against incoming requests. The first route + // that matches will be used. + Routes []*Route `protobuf:"bytes,5,rep,name=routes,proto3" json:"routes,omitempty"` +} + +func (x *RouteConfiguration) Reset() { + *x = RouteConfiguration{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RouteConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RouteConfiguration) ProtoMessage() {} + +func (x *RouteConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RouteConfiguration.ProtoReflect.Descriptor instead. +func (*RouteConfiguration) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_rawDescGZIP(), []int{0} +} + +func (x *RouteConfiguration) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RouteConfiguration) GetInterface() string { + if x != nil { + return x.Interface + } + return "" +} + +func (x *RouteConfiguration) GetGroup() string { + if x != nil { + return x.Group + } + return "" +} + +func (x *RouteConfiguration) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *RouteConfiguration) GetRoutes() []*Route { + if x != nil { + return x.Routes + } + return nil +} + +type Route struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Route matching parameters. + Match *RouteMatch `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"` + // Route request to some upstream cluster. + Route *RouteAction `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` +} + +func (x *Route) Reset() { + *x = Route{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Route) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Route) ProtoMessage() {} + +func (x *Route) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Route.ProtoReflect.Descriptor instead. +func (*Route) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_rawDescGZIP(), []int{1} +} + +func (x *Route) GetMatch() *RouteMatch { + if x != nil { + return x.Match + } + return nil +} + +func (x *Route) GetRoute() *RouteAction { + if x != nil { + return x.Route + } + return nil +} + +type RouteMatch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Method level routing matching. + Method *MethodMatch `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` + // Specifies a set of headers that the route should match on. The router will check the request’s + // headers against all the specified headers in the route config. A match will happen if all the + // headers in the route are present in the request with the same values (or based on presence if + // the value field is not in the config). + Headers []*v3.HeaderMatcher `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"` +} + +func (x *RouteMatch) Reset() { + *x = RouteMatch{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RouteMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RouteMatch) ProtoMessage() {} + +func (x *RouteMatch) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RouteMatch.ProtoReflect.Descriptor instead. +func (*RouteMatch) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_rawDescGZIP(), []int{2} +} + +func (x *RouteMatch) GetMethod() *MethodMatch { + if x != nil { + return x.Method + } + return nil +} + +func (x *RouteMatch) GetHeaders() []*v3.HeaderMatcher { + if x != nil { + return x.Headers + } + return nil +} + +type RouteAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to ClusterSpecifier: + // + // *RouteAction_Cluster + // *RouteAction_WeightedClusters + ClusterSpecifier isRouteAction_ClusterSpecifier `protobuf_oneof:"cluster_specifier"` + // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in + // the upstream cluster with metadata matching what is set in this field will be considered for + // load balancing. The filter name should be specified as “envoy.lb“. + MetadataMatch *v31.Metadata `protobuf:"bytes,3,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` +} + +func (x *RouteAction) Reset() { + *x = RouteAction{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RouteAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RouteAction) ProtoMessage() {} + +func (x *RouteAction) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RouteAction.ProtoReflect.Descriptor instead. +func (*RouteAction) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_rawDescGZIP(), []int{3} +} + +func (m *RouteAction) GetClusterSpecifier() isRouteAction_ClusterSpecifier { + if m != nil { + return m.ClusterSpecifier + } + return nil +} + +func (x *RouteAction) GetCluster() string { + if x, ok := x.GetClusterSpecifier().(*RouteAction_Cluster); ok { + return x.Cluster + } + return "" +} + +func (x *RouteAction) GetWeightedClusters() *v3.WeightedCluster { + if x, ok := x.GetClusterSpecifier().(*RouteAction_WeightedClusters); ok { + return x.WeightedClusters + } + return nil +} + +func (x *RouteAction) GetMetadataMatch() *v31.Metadata { + if x != nil { + return x.MetadataMatch + } + return nil +} + +type isRouteAction_ClusterSpecifier interface { + isRouteAction_ClusterSpecifier() +} + +type RouteAction_Cluster struct { + // Indicates the upstream cluster to which the request should be routed. + Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3,oneof"` +} + +type RouteAction_WeightedClusters struct { + // Multiple upstream clusters can be specified for a given route. The + // request is routed to one of the upstream clusters based on weights + // assigned to each cluster. + // Currently ClusterWeight only supports the name and weight fields. + WeightedClusters *v3.WeightedCluster `protobuf:"bytes,2,opt,name=weighted_clusters,json=weightedClusters,proto3,oneof"` +} + +func (*RouteAction_Cluster) isRouteAction_ClusterSpecifier() {} + +func (*RouteAction_WeightedClusters) isRouteAction_ClusterSpecifier() {} + +type MethodMatch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the method. + Name *v32.StringMatcher `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Method parameter definition. + // The key is the parameter index, starting from 0. + // The value is the parameter matching type. + ParamsMatch map[uint32]*MethodMatch_ParameterMatchSpecifier `protobuf:"bytes,2,rep,name=params_match,json=paramsMatch,proto3" json:"params_match,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *MethodMatch) Reset() { + *x = MethodMatch{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MethodMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MethodMatch) ProtoMessage() {} + +func (x *MethodMatch) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MethodMatch.ProtoReflect.Descriptor instead. +func (*MethodMatch) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_rawDescGZIP(), []int{4} +} + +func (x *MethodMatch) GetName() *v32.StringMatcher { + if x != nil { + return x.Name + } + return nil +} + +func (x *MethodMatch) GetParamsMatch() map[uint32]*MethodMatch_ParameterMatchSpecifier { + if x != nil { + return x.ParamsMatch + } + return nil +} + +type MultipleRouteConfiguration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the named route configurations. This name is used in asynchronous route discovery. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The route table of the dubbo connection manager. + RouteConfig []*RouteConfiguration `protobuf:"bytes,4,rep,name=route_config,json=routeConfig,proto3" json:"route_config,omitempty"` +} + +func (x *MultipleRouteConfiguration) Reset() { + *x = MultipleRouteConfiguration{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MultipleRouteConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MultipleRouteConfiguration) ProtoMessage() {} + +func (x *MultipleRouteConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MultipleRouteConfiguration.ProtoReflect.Descriptor instead. +func (*MultipleRouteConfiguration) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_rawDescGZIP(), []int{5} +} + +func (x *MultipleRouteConfiguration) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *MultipleRouteConfiguration) GetRouteConfig() []*RouteConfiguration { + if x != nil { + return x.RouteConfig + } + return nil +} + +// The parameter matching type. +type MethodMatch_ParameterMatchSpecifier struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to ParameterMatchSpecifier: + // + // *MethodMatch_ParameterMatchSpecifier_ExactMatch + // *MethodMatch_ParameterMatchSpecifier_RangeMatch + ParameterMatchSpecifier isMethodMatch_ParameterMatchSpecifier_ParameterMatchSpecifier `protobuf_oneof:"parameter_match_specifier"` +} + +func (x *MethodMatch_ParameterMatchSpecifier) Reset() { + *x = MethodMatch_ParameterMatchSpecifier{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MethodMatch_ParameterMatchSpecifier) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MethodMatch_ParameterMatchSpecifier) ProtoMessage() {} + +func (x *MethodMatch_ParameterMatchSpecifier) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MethodMatch_ParameterMatchSpecifier.ProtoReflect.Descriptor instead. +func (*MethodMatch_ParameterMatchSpecifier) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_rawDescGZIP(), []int{4, 0} +} + +func (m *MethodMatch_ParameterMatchSpecifier) GetParameterMatchSpecifier() isMethodMatch_ParameterMatchSpecifier_ParameterMatchSpecifier { + if m != nil { + return m.ParameterMatchSpecifier + } + return nil +} + +func (x *MethodMatch_ParameterMatchSpecifier) GetExactMatch() string { + if x, ok := x.GetParameterMatchSpecifier().(*MethodMatch_ParameterMatchSpecifier_ExactMatch); ok { + return x.ExactMatch + } + return "" +} + +func (x *MethodMatch_ParameterMatchSpecifier) GetRangeMatch() *v33.Int64Range { + if x, ok := x.GetParameterMatchSpecifier().(*MethodMatch_ParameterMatchSpecifier_RangeMatch); ok { + return x.RangeMatch + } + return nil +} + +type isMethodMatch_ParameterMatchSpecifier_ParameterMatchSpecifier interface { + isMethodMatch_ParameterMatchSpecifier_ParameterMatchSpecifier() +} + +type MethodMatch_ParameterMatchSpecifier_ExactMatch struct { + // If specified, header match will be performed based on the value of the header. + ExactMatch string `protobuf:"bytes,3,opt,name=exact_match,json=exactMatch,proto3,oneof"` +} + +type MethodMatch_ParameterMatchSpecifier_RangeMatch struct { + // If specified, header match will be performed based on range. + // The rule will match if the request header value is within this range. + // The entire request header value must represent an integer in base 10 notation: consisting + // of an optional plus or minus sign followed by a sequence of digits. The rule will not match + // if the header value does not represent an integer. Match will fail for empty values, + // floating point numbers or if only a subsequence of the header value is an integer. + // + // Examples: + // + // - For range [-10,0), route will match for header value -1, but not for 0, + // "somestring", 10.9, "-1somestring" + RangeMatch *v33.Int64Range `protobuf:"bytes,4,opt,name=range_match,json=rangeMatch,proto3,oneof"` +} + +func (*MethodMatch_ParameterMatchSpecifier_ExactMatch) isMethodMatch_ParameterMatchSpecifier_ParameterMatchSpecifier() { +} + +func (*MethodMatch_ParameterMatchSpecifier_RangeMatch) isMethodMatch_ParameterMatchSpecifier_ParameterMatchSpecifier() { +} + +var File_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_rawDesc = []byte{ + 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, + 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, + 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x1f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, + 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0x92, 0x02, 0x0a, 0x12, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x4e, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, + 0x3a, 0x4a, 0x9a, 0xc5, 0x88, 0x1e, 0x45, 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x81, 0x02, 0x0a, + 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x5b, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x12, 0x5c, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x22, 0xe6, 0x01, 0x0a, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, + 0x54, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, + 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x06, 0x6d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x3e, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x3a, 0x42, 0x9a, 0xc5, 0x88, 0x1e, 0x3d, 0x0a, 0x3b, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xa6, 0x02, 0x0a, 0x0b, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x07, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x11, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, + 0x64, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, + 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x77, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x45, 0x0a, 0x0e, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x3a, 0x43, 0x9a, 0xc5, 0x88, 0x1e, 0x3e, 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x18, 0x0a, 0x11, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, + 0x42, 0x01, 0x22, 0x8c, 0x05, 0x0a, 0x0b, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x12, 0x38, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x70, 0x0a, 0x0c, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0xf4, + 0x01, 0x0a, 0x17, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0b, 0x65, 0x78, + 0x61, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x0a, 0x65, 0x78, 0x61, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x3c, 0x0a, + 0x0b, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, 0x52, + 0x0a, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x5b, 0x9a, 0xc5, 0x88, + 0x1e, 0x56, 0x0a, 0x54, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, + 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0x1b, 0x0a, 0x19, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x1a, 0x94, 0x01, 0x0a, 0x10, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x6a, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x54, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, + 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x43, 0x9a, 0xc5, + 0x88, 0x1e, 0x3e, 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x22, 0x98, 0x01, 0x0a, 0x1a, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x66, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x75, + 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xbb, 0x01, 0x0a, + 0x3d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, + 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0a, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x64, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_rawDescData = file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_rawDesc +) + +func file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_rawDescData +} + +var file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_goTypes = []interface{}{ + (*RouteConfiguration)(nil), // 0: envoy.extensions.filters.network.dubbo_proxy.v3.RouteConfiguration + (*Route)(nil), // 1: envoy.extensions.filters.network.dubbo_proxy.v3.Route + (*RouteMatch)(nil), // 2: envoy.extensions.filters.network.dubbo_proxy.v3.RouteMatch + (*RouteAction)(nil), // 3: envoy.extensions.filters.network.dubbo_proxy.v3.RouteAction + (*MethodMatch)(nil), // 4: envoy.extensions.filters.network.dubbo_proxy.v3.MethodMatch + (*MultipleRouteConfiguration)(nil), // 5: envoy.extensions.filters.network.dubbo_proxy.v3.MultipleRouteConfiguration + (*MethodMatch_ParameterMatchSpecifier)(nil), // 6: envoy.extensions.filters.network.dubbo_proxy.v3.MethodMatch.ParameterMatchSpecifier + nil, // 7: envoy.extensions.filters.network.dubbo_proxy.v3.MethodMatch.ParamsMatchEntry + (*v3.HeaderMatcher)(nil), // 8: envoy.config.route.v3.HeaderMatcher + (*v3.WeightedCluster)(nil), // 9: envoy.config.route.v3.WeightedCluster + (*v31.Metadata)(nil), // 10: envoy.config.core.v3.Metadata + (*v32.StringMatcher)(nil), // 11: envoy.type.matcher.v3.StringMatcher + (*v33.Int64Range)(nil), // 12: envoy.type.v3.Int64Range +} +var file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.network.dubbo_proxy.v3.RouteConfiguration.routes:type_name -> envoy.extensions.filters.network.dubbo_proxy.v3.Route + 2, // 1: envoy.extensions.filters.network.dubbo_proxy.v3.Route.match:type_name -> envoy.extensions.filters.network.dubbo_proxy.v3.RouteMatch + 3, // 2: envoy.extensions.filters.network.dubbo_proxy.v3.Route.route:type_name -> envoy.extensions.filters.network.dubbo_proxy.v3.RouteAction + 4, // 3: envoy.extensions.filters.network.dubbo_proxy.v3.RouteMatch.method:type_name -> envoy.extensions.filters.network.dubbo_proxy.v3.MethodMatch + 8, // 4: envoy.extensions.filters.network.dubbo_proxy.v3.RouteMatch.headers:type_name -> envoy.config.route.v3.HeaderMatcher + 9, // 5: envoy.extensions.filters.network.dubbo_proxy.v3.RouteAction.weighted_clusters:type_name -> envoy.config.route.v3.WeightedCluster + 10, // 6: envoy.extensions.filters.network.dubbo_proxy.v3.RouteAction.metadata_match:type_name -> envoy.config.core.v3.Metadata + 11, // 7: envoy.extensions.filters.network.dubbo_proxy.v3.MethodMatch.name:type_name -> envoy.type.matcher.v3.StringMatcher + 7, // 8: envoy.extensions.filters.network.dubbo_proxy.v3.MethodMatch.params_match:type_name -> envoy.extensions.filters.network.dubbo_proxy.v3.MethodMatch.ParamsMatchEntry + 0, // 9: envoy.extensions.filters.network.dubbo_proxy.v3.MultipleRouteConfiguration.route_config:type_name -> envoy.extensions.filters.network.dubbo_proxy.v3.RouteConfiguration + 12, // 10: envoy.extensions.filters.network.dubbo_proxy.v3.MethodMatch.ParameterMatchSpecifier.range_match:type_name -> envoy.type.v3.Int64Range + 6, // 11: envoy.extensions.filters.network.dubbo_proxy.v3.MethodMatch.ParamsMatchEntry.value:type_name -> envoy.extensions.filters.network.dubbo_proxy.v3.MethodMatch.ParameterMatchSpecifier + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_init() } +func file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_init() { + if File_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RouteConfiguration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Route); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RouteMatch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RouteAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MethodMatch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MultipleRouteConfiguration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MethodMatch_ParameterMatchSpecifier); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*RouteAction_Cluster)(nil), + (*RouteAction_WeightedClusters)(nil), + } + file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*MethodMatch_ParameterMatchSpecifier_ExactMatch)(nil), + (*MethodMatch_ParameterMatchSpecifier_RangeMatch)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto = out.File + file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_rawDesc = nil + file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_goTypes = nil + file_envoy_extensions_filters_network_dubbo_proxy_v3_route_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/dubbo_proxy/v3/route.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/dubbo_proxy/v3/route.pb.validate.go new file mode 100644 index 0000000000000..995361794f2b5 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/dubbo_proxy/v3/route.pb.validate.go @@ -0,0 +1,1144 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/dubbo_proxy/v3/route.proto + +package dubbo_proxyv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RouteConfiguration 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 *RouteConfiguration) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteConfiguration 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 +// RouteConfigurationMultiError, or nil if none found. +func (m *RouteConfiguration) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteConfiguration) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + // no validation rules for Interface + + // no validation rules for Group + + // no validation rules for Version + + for idx, item := range m.GetRoutes() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("Routes[%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 RouteConfigurationValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return RouteConfigurationMultiError(errors) + } + return nil +} + +// RouteConfigurationMultiError is an error wrapping multiple validation errors +// returned by RouteConfiguration.ValidateAll() if the designated constraints +// aren't met. +type RouteConfigurationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteConfigurationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteConfigurationMultiError) AllErrors() []error { return m } + +// RouteConfigurationValidationError is the validation error returned by +// RouteConfiguration.Validate if the designated constraints aren't met. +type RouteConfigurationValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RouteConfigurationValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RouteConfigurationValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RouteConfigurationValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RouteConfigurationValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RouteConfigurationValidationError) ErrorName() string { + return "RouteConfigurationValidationError" +} + +// Error satisfies the builtin error interface +func (e RouteConfigurationValidationError) 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 %sRouteConfiguration.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RouteConfigurationValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RouteConfigurationValidationError{} + +// Validate checks the field values on Route 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 *Route) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Route 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 RouteMultiError, or nil if none found. +func (m *Route) ValidateAll() error { + return m.validate(true) +} + +func (m *Route) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetMatch() == nil { + err := RouteValidationError{ + field: "Match", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetRoute() == nil { + err := RouteValidationError{ + field: "Route", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetRoute()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RouteMultiError(errors) + } + return nil +} + +// RouteMultiError is an error wrapping multiple validation errors returned by +// Route.ValidateAll() if the designated constraints aren't met. +type RouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteMultiError) AllErrors() []error { return m } + +// RouteValidationError is the validation error returned by Route.Validate if +// the designated constraints aren't met. +type RouteValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RouteValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RouteValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RouteValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RouteValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RouteValidationError) ErrorName() string { return "RouteValidationError" } + +// Error satisfies the builtin error interface +func (e RouteValidationError) 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 %sRoute.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RouteValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RouteValidationError{} + +// Validate checks the field values on RouteMatch 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 *RouteMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteMatch 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 RouteMatchMultiError, or +// nil if none found. +func (m *RouteMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteMatch) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetMethod()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "Method", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: "Method", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMethod()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteMatchValidationError{ + field: "Method", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetHeaders() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: fmt.Sprintf("Headers[%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 RouteMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return RouteMatchMultiError(errors) + } + return nil +} + +// RouteMatchMultiError is an error wrapping multiple validation errors +// returned by RouteMatch.ValidateAll() if the designated constraints aren't met. +type RouteMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteMatchMultiError) AllErrors() []error { return m } + +// RouteMatchValidationError is the validation error returned by +// RouteMatch.Validate if the designated constraints aren't met. +type RouteMatchValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RouteMatchValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RouteMatchValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RouteMatchValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RouteMatchValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RouteMatchValidationError) ErrorName() string { return "RouteMatchValidationError" } + +// Error satisfies the builtin error interface +func (e RouteMatchValidationError) 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 %sRouteMatch.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RouteMatchValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RouteMatchValidationError{} + +// Validate checks the field values on RouteAction 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 *RouteAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction 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 RouteActionMultiError, or +// nil if none found. +func (m *RouteAction) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetMetadataMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteActionValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.ClusterSpecifier.(type) { + + case *RouteAction_Cluster: + // no validation rules for Cluster + + case *RouteAction_WeightedClusters: + + if all { + switch v := interface{}(m.GetWeightedClusters()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWeightedClusters()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := RouteActionValidationError{ + field: "ClusterSpecifier", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return RouteActionMultiError(errors) + } + return nil +} + +// RouteActionMultiError is an error wrapping multiple validation errors +// returned by RouteAction.ValidateAll() if the designated constraints aren't met. +type RouteActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteActionMultiError) AllErrors() []error { return m } + +// RouteActionValidationError is the validation error returned by +// RouteAction.Validate if the designated constraints aren't met. +type RouteActionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RouteActionValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RouteActionValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RouteActionValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RouteActionValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RouteActionValidationError) ErrorName() string { return "RouteActionValidationError" } + +// Error satisfies the builtin error interface +func (e RouteActionValidationError) 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 %sRouteAction.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RouteActionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RouteActionValidationError{} + +// Validate checks the field values on MethodMatch 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 *MethodMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MethodMatch 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 MethodMatchMultiError, or +// nil if none found. +func (m *MethodMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *MethodMatch) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetName()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MethodMatchValidationError{ + field: "Name", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MethodMatchValidationError{ + field: "Name", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetName()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MethodMatchValidationError{ + field: "Name", + reason: "embedded message failed validation", + cause: err, + } + } + } + + { + sorted_keys := make([]uint32, len(m.GetParamsMatch())) + i := 0 + for key := range m.GetParamsMatch() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetParamsMatch()[key] + _ = val + + // no validation rules for ParamsMatch[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MethodMatchValidationError{ + field: fmt.Sprintf("ParamsMatch[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MethodMatchValidationError{ + field: fmt.Sprintf("ParamsMatch[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MethodMatchValidationError{ + field: fmt.Sprintf("ParamsMatch[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if len(errors) > 0 { + return MethodMatchMultiError(errors) + } + return nil +} + +// MethodMatchMultiError is an error wrapping multiple validation errors +// returned by MethodMatch.ValidateAll() if the designated constraints aren't met. +type MethodMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MethodMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MethodMatchMultiError) AllErrors() []error { return m } + +// MethodMatchValidationError is the validation error returned by +// MethodMatch.Validate if the designated constraints aren't met. +type MethodMatchValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MethodMatchValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MethodMatchValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MethodMatchValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MethodMatchValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MethodMatchValidationError) ErrorName() string { return "MethodMatchValidationError" } + +// Error satisfies the builtin error interface +func (e MethodMatchValidationError) 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 %sMethodMatch.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MethodMatchValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MethodMatchValidationError{} + +// Validate checks the field values on MultipleRouteConfiguration 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 *MultipleRouteConfiguration) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MultipleRouteConfiguration 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 +// MultipleRouteConfigurationMultiError, or nil if none found. +func (m *MultipleRouteConfiguration) ValidateAll() error { + return m.validate(true) +} + +func (m *MultipleRouteConfiguration) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + for idx, item := range m.GetRouteConfig() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MultipleRouteConfigurationValidationError{ + field: fmt.Sprintf("RouteConfig[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MultipleRouteConfigurationValidationError{ + field: fmt.Sprintf("RouteConfig[%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 MultipleRouteConfigurationValidationError{ + field: fmt.Sprintf("RouteConfig[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return MultipleRouteConfigurationMultiError(errors) + } + return nil +} + +// MultipleRouteConfigurationMultiError is an error wrapping multiple +// validation errors returned by MultipleRouteConfiguration.ValidateAll() if +// the designated constraints aren't met. +type MultipleRouteConfigurationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MultipleRouteConfigurationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MultipleRouteConfigurationMultiError) AllErrors() []error { return m } + +// MultipleRouteConfigurationValidationError is the validation error returned +// by MultipleRouteConfiguration.Validate if the designated constraints aren't met. +type MultipleRouteConfigurationValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MultipleRouteConfigurationValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MultipleRouteConfigurationValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MultipleRouteConfigurationValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MultipleRouteConfigurationValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MultipleRouteConfigurationValidationError) ErrorName() string { + return "MultipleRouteConfigurationValidationError" +} + +// Error satisfies the builtin error interface +func (e MultipleRouteConfigurationValidationError) 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 %sMultipleRouteConfiguration.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MultipleRouteConfigurationValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MultipleRouteConfigurationValidationError{} + +// Validate checks the field values on MethodMatch_ParameterMatchSpecifier 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 *MethodMatch_ParameterMatchSpecifier) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MethodMatch_ParameterMatchSpecifier +// 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 +// MethodMatch_ParameterMatchSpecifierMultiError, or nil if none found. +func (m *MethodMatch_ParameterMatchSpecifier) ValidateAll() error { + return m.validate(true) +} + +func (m *MethodMatch_ParameterMatchSpecifier) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.ParameterMatchSpecifier.(type) { + + case *MethodMatch_ParameterMatchSpecifier_ExactMatch: + // no validation rules for ExactMatch + + case *MethodMatch_ParameterMatchSpecifier_RangeMatch: + + if all { + switch v := interface{}(m.GetRangeMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MethodMatch_ParameterMatchSpecifierValidationError{ + field: "RangeMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MethodMatch_ParameterMatchSpecifierValidationError{ + field: "RangeMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRangeMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MethodMatch_ParameterMatchSpecifierValidationError{ + field: "RangeMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return MethodMatch_ParameterMatchSpecifierMultiError(errors) + } + return nil +} + +// MethodMatch_ParameterMatchSpecifierMultiError is an error wrapping multiple +// validation errors returned by +// MethodMatch_ParameterMatchSpecifier.ValidateAll() if the designated +// constraints aren't met. +type MethodMatch_ParameterMatchSpecifierMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MethodMatch_ParameterMatchSpecifierMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MethodMatch_ParameterMatchSpecifierMultiError) AllErrors() []error { return m } + +// MethodMatch_ParameterMatchSpecifierValidationError is the validation error +// returned by MethodMatch_ParameterMatchSpecifier.Validate if the designated +// constraints aren't met. +type MethodMatch_ParameterMatchSpecifierValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MethodMatch_ParameterMatchSpecifierValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MethodMatch_ParameterMatchSpecifierValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MethodMatch_ParameterMatchSpecifierValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MethodMatch_ParameterMatchSpecifierValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MethodMatch_ParameterMatchSpecifierValidationError) ErrorName() string { + return "MethodMatch_ParameterMatchSpecifierValidationError" +} + +// Error satisfies the builtin error interface +func (e MethodMatch_ParameterMatchSpecifierValidationError) 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 %sMethodMatch_ParameterMatchSpecifier.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MethodMatch_ParameterMatchSpecifierValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MethodMatch_ParameterMatchSpecifierValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/echo/v3/echo.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/echo/v3/echo.pb.go new file mode 100644 index 0000000000000..0e053dc6ed3b8 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/echo/v3/echo.pb.go @@ -0,0 +1,158 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/echo/v3/echo.proto + +package echov3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Echo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Echo) Reset() { + *x = Echo{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_echo_v3_echo_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Echo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Echo) ProtoMessage() {} + +func (x *Echo) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_echo_v3_echo_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Echo.ProtoReflect.Descriptor instead. +func (*Echo) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_echo_v3_echo_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_filters_network_echo_v3_echo_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_echo_v3_echo_proto_rawDesc = []byte{ + 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x65, 0x63, 0x68, 0x6f, 0x2e, 0x76, 0x33, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x37, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, + 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x65, 0x63, + 0x68, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x42, 0xa5, 0x01, 0x0a, 0x36, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x65, 0x63, + 0x68, 0x6f, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x45, 0x63, 0x68, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x56, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x65, 0x63, 0x68, 0x6f, + 0x2f, 0x76, 0x33, 0x3b, 0x65, 0x63, 0x68, 0x6f, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_network_echo_v3_echo_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_echo_v3_echo_proto_rawDescData = file_envoy_extensions_filters_network_echo_v3_echo_proto_rawDesc +) + +func file_envoy_extensions_filters_network_echo_v3_echo_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_echo_v3_echo_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_echo_v3_echo_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_echo_v3_echo_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_echo_v3_echo_proto_rawDescData +} + +var file_envoy_extensions_filters_network_echo_v3_echo_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_network_echo_v3_echo_proto_goTypes = []interface{}{ + (*Echo)(nil), // 0: envoy.extensions.filters.network.echo.v3.Echo +} +var file_envoy_extensions_filters_network_echo_v3_echo_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_network_echo_v3_echo_proto_init() } +func file_envoy_extensions_filters_network_echo_v3_echo_proto_init() { + if File_envoy_extensions_filters_network_echo_v3_echo_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_echo_v3_echo_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Echo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_echo_v3_echo_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_echo_v3_echo_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_echo_v3_echo_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_network_echo_v3_echo_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_echo_v3_echo_proto = out.File + file_envoy_extensions_filters_network_echo_v3_echo_proto_rawDesc = nil + file_envoy_extensions_filters_network_echo_v3_echo_proto_goTypes = nil + file_envoy_extensions_filters_network_echo_v3_echo_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/echo/v3/echo.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/echo/v3/echo.pb.validate.go new file mode 100644 index 0000000000000..d8042a8566ac8 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/echo/v3/echo.pb.validate.go @@ -0,0 +1,133 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/echo/v3/echo.proto + +package echov3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Echo 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 *Echo) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Echo 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 EchoMultiError, or nil if none found. +func (m *Echo) ValidateAll() error { + return m.validate(true) +} + +func (m *Echo) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return EchoMultiError(errors) + } + return nil +} + +// EchoMultiError is an error wrapping multiple validation errors returned by +// Echo.ValidateAll() if the designated constraints aren't met. +type EchoMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EchoMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EchoMultiError) AllErrors() []error { return m } + +// EchoValidationError is the validation error returned by Echo.Validate if the +// designated constraints aren't met. +type EchoValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e EchoValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e EchoValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e EchoValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e EchoValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e EchoValidationError) ErrorName() string { return "EchoValidationError" } + +// Error satisfies the builtin error interface +func (e EchoValidationError) 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 %sEcho.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = EchoValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = EchoValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/matcher/action/v3/action.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/matcher/action/v3/action.pb.go new file mode 100644 index 0000000000000..7fadf44869b92 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/matcher/action/v3/action.pb.go @@ -0,0 +1,237 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/meta_protocol_proxy/matcher/action/v3/action.proto + +package actionv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/route/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for the route match action. +// [#not-implemented-hide:] +type RouteAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to ClusterSpecifier: + // + // *RouteAction_Cluster + // *RouteAction_WeightedClusters + ClusterSpecifier isRouteAction_ClusterSpecifier `protobuf_oneof:"cluster_specifier"` +} + +func (x *RouteAction) Reset() { + *x = RouteAction{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RouteAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RouteAction) ProtoMessage() {} + +func (x *RouteAction) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RouteAction.ProtoReflect.Descriptor instead. +func (*RouteAction) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDescGZIP(), []int{0} +} + +func (m *RouteAction) GetClusterSpecifier() isRouteAction_ClusterSpecifier { + if m != nil { + return m.ClusterSpecifier + } + return nil +} + +func (x *RouteAction) GetCluster() string { + if x, ok := x.GetClusterSpecifier().(*RouteAction_Cluster); ok { + return x.Cluster + } + return "" +} + +func (x *RouteAction) GetWeightedClusters() *v3.WeightedCluster { + if x, ok := x.GetClusterSpecifier().(*RouteAction_WeightedClusters); ok { + return x.WeightedClusters + } + return nil +} + +type isRouteAction_ClusterSpecifier interface { + isRouteAction_ClusterSpecifier() +} + +type RouteAction_Cluster struct { + // Indicates the upstream cluster to which the request should be routed. + Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3,oneof"` +} + +type RouteAction_WeightedClusters struct { + // Multiple upstream clusters can be specified for a given route. The request is routed to one + // of the upstream clusters based on weights assigned to each cluster. + // Currently ClusterWeight only supports the name and weight fields. + WeightedClusters *v3.WeightedCluster `protobuf:"bytes,2,opt,name=weighted_clusters,json=weightedClusters,proto3,oneof"` +} + +func (*RouteAction_Cluster) isRouteAction_ClusterSpecifier() {} + +func (*RouteAction_WeightedClusters) isRouteAction_ClusterSpecifier() {} + +var File_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDesc = []byte{ + 0x0a, 0x53, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x46, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x1a, 0x2c, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x9a, 0x01, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x12, 0x55, 0x0a, 0x11, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x42, 0x18, 0x0a, 0x11, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, + 0x01, 0x42, 0xed, 0x01, 0x0a, 0x54, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x2e, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x76, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, + 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDescData = file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDesc +) + +func file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDescData +} + +var file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_goTypes = []interface{}{ + (*RouteAction)(nil), // 0: envoy.extensions.filters.network.meta_protocol_proxy.matcher.action.v3.RouteAction + (*v3.WeightedCluster)(nil), // 1: envoy.config.route.v3.WeightedCluster +} +var file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.network.meta_protocol_proxy.matcher.action.v3.RouteAction.weighted_clusters:type_name -> envoy.config.route.v3.WeightedCluster + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_init() +} +func file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_init() { + if File_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RouteAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*RouteAction_Cluster)(nil), + (*RouteAction_WeightedClusters)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto = out.File + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_rawDesc = nil + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_goTypes = nil + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_action_v3_action_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/matcher/action/v3/action.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/matcher/action/v3/action.pb.validate.go new file mode 100644 index 0000000000000..ce6531a060d91 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/matcher/action/v3/action.pb.validate.go @@ -0,0 +1,182 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/meta_protocol_proxy/matcher/action/v3/action.proto + +package actionv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RouteAction 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 *RouteAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction 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 RouteActionMultiError, or +// nil if none found. +func (m *RouteAction) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.ClusterSpecifier.(type) { + + case *RouteAction_Cluster: + // no validation rules for Cluster + + case *RouteAction_WeightedClusters: + + if all { + switch v := interface{}(m.GetWeightedClusters()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWeightedClusters()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := RouteActionValidationError{ + field: "ClusterSpecifier", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return RouteActionMultiError(errors) + } + return nil +} + +// RouteActionMultiError is an error wrapping multiple validation errors +// returned by RouteAction.ValidateAll() if the designated constraints aren't met. +type RouteActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteActionMultiError) AllErrors() []error { return m } + +// RouteActionValidationError is the validation error returned by +// RouteAction.Validate if the designated constraints aren't met. +type RouteActionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RouteActionValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RouteActionValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RouteActionValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RouteActionValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RouteActionValidationError) ErrorName() string { return "RouteActionValidationError" } + +// Error satisfies the builtin error interface +func (e RouteActionValidationError) 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 %sRouteAction.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RouteActionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RouteActionValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/matcher/v3/matcher.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/matcher/v3/matcher.pb.go new file mode 100644 index 0000000000000..f365882a2e4f9 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/matcher/v3/matcher.pb.go @@ -0,0 +1,295 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/meta_protocol_proxy/matcher/v3/matcher.proto + +package matcherv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Used to match request service of the downstream request. Only applicable if a service provided +// by the application protocol. +// [#not-implemented-hide:] +type ServiceMatchInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ServiceMatchInput) Reset() { + *x = ServiceMatchInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServiceMatchInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceMatchInput) ProtoMessage() {} + +func (x *ServiceMatchInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServiceMatchInput.ProtoReflect.Descriptor instead. +func (*ServiceMatchInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDescGZIP(), []int{0} +} + +// Used to match request method of the downstream request. Only applicable if a method provided +// by the application protocol. +// [#not-implemented-hide:] +type MethodMatchInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MethodMatchInput) Reset() { + *x = MethodMatchInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MethodMatchInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MethodMatchInput) ProtoMessage() {} + +func (x *MethodMatchInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MethodMatchInput.ProtoReflect.Descriptor instead. +func (*MethodMatchInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDescGZIP(), []int{1} +} + +// Used to match an arbitrary property of the downstream request. +// These properties are populated by the codecs of application protocols. +// [#not-implemented-hide:] +type PropertyMatchInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The property name to match on. + PropertyName string `protobuf:"bytes,1,opt,name=property_name,json=propertyName,proto3" json:"property_name,omitempty"` +} + +func (x *PropertyMatchInput) Reset() { + *x = PropertyMatchInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PropertyMatchInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PropertyMatchInput) ProtoMessage() {} + +func (x *PropertyMatchInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PropertyMatchInput.ProtoReflect.Descriptor instead. +func (*PropertyMatchInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDescGZIP(), []int{2} +} + +func (x *PropertyMatchInput) GetPropertyName() string { + if x != nil { + return x.PropertyName + } + return "" +} + +var File_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDesc = []byte{ + 0x0a, 0x4d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, + 0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x13, 0x0a, 0x11, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x12, + 0x0a, 0x10, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x70, + 0x75, 0x74, 0x22, 0x42, 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x2c, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0xe1, 0x01, 0x0a, 0x4d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x70, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, + 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDescData = file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDesc +) + +func file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDescData +} + +var file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_goTypes = []interface{}{ + (*ServiceMatchInput)(nil), // 0: envoy.extensions.filters.network.meta_protocol_proxy.matcher.v3.ServiceMatchInput + (*MethodMatchInput)(nil), // 1: envoy.extensions.filters.network.meta_protocol_proxy.matcher.v3.MethodMatchInput + (*PropertyMatchInput)(nil), // 2: envoy.extensions.filters.network.meta_protocol_proxy.matcher.v3.PropertyMatchInput +} +var file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_init() +} +func file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_init() { + if File_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServiceMatchInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MethodMatchInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PropertyMatchInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto = out.File + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_rawDesc = nil + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_goTypes = nil + file_envoy_extensions_filters_network_meta_protocol_proxy_matcher_v3_matcher_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/matcher/v3/matcher.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/matcher/v3/matcher.pb.validate.go new file mode 100644 index 0000000000000..a132130b47312 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/matcher/v3/matcher.pb.validate.go @@ -0,0 +1,348 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/meta_protocol_proxy/matcher/v3/matcher.proto + +package matcherv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ServiceMatchInput 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 *ServiceMatchInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ServiceMatchInput 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 +// ServiceMatchInputMultiError, or nil if none found. +func (m *ServiceMatchInput) ValidateAll() error { + return m.validate(true) +} + +func (m *ServiceMatchInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return ServiceMatchInputMultiError(errors) + } + return nil +} + +// ServiceMatchInputMultiError is an error wrapping multiple validation errors +// returned by ServiceMatchInput.ValidateAll() if the designated constraints +// aren't met. +type ServiceMatchInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ServiceMatchInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ServiceMatchInputMultiError) AllErrors() []error { return m } + +// ServiceMatchInputValidationError is the validation error returned by +// ServiceMatchInput.Validate if the designated constraints aren't met. +type ServiceMatchInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ServiceMatchInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ServiceMatchInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ServiceMatchInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ServiceMatchInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ServiceMatchInputValidationError) ErrorName() string { + return "ServiceMatchInputValidationError" +} + +// Error satisfies the builtin error interface +func (e ServiceMatchInputValidationError) 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 %sServiceMatchInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ServiceMatchInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ServiceMatchInputValidationError{} + +// Validate checks the field values on MethodMatchInput 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 *MethodMatchInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MethodMatchInput 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 +// MethodMatchInputMultiError, or nil if none found. +func (m *MethodMatchInput) ValidateAll() error { + return m.validate(true) +} + +func (m *MethodMatchInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return MethodMatchInputMultiError(errors) + } + return nil +} + +// MethodMatchInputMultiError is an error wrapping multiple validation errors +// returned by MethodMatchInput.ValidateAll() if the designated constraints +// aren't met. +type MethodMatchInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MethodMatchInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MethodMatchInputMultiError) AllErrors() []error { return m } + +// MethodMatchInputValidationError is the validation error returned by +// MethodMatchInput.Validate if the designated constraints aren't met. +type MethodMatchInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MethodMatchInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MethodMatchInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MethodMatchInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MethodMatchInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MethodMatchInputValidationError) ErrorName() string { return "MethodMatchInputValidationError" } + +// Error satisfies the builtin error interface +func (e MethodMatchInputValidationError) 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 %sMethodMatchInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MethodMatchInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MethodMatchInputValidationError{} + +// Validate checks the field values on PropertyMatchInput 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 *PropertyMatchInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PropertyMatchInput 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 +// PropertyMatchInputMultiError, or nil if none found. +func (m *PropertyMatchInput) ValidateAll() error { + return m.validate(true) +} + +func (m *PropertyMatchInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetPropertyName()) < 1 { + err := PropertyMatchInputValidationError{ + field: "PropertyName", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return PropertyMatchInputMultiError(errors) + } + return nil +} + +// PropertyMatchInputMultiError is an error wrapping multiple validation errors +// returned by PropertyMatchInput.ValidateAll() if the designated constraints +// aren't met. +type PropertyMatchInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PropertyMatchInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PropertyMatchInputMultiError) AllErrors() []error { return m } + +// PropertyMatchInputValidationError is the validation error returned by +// PropertyMatchInput.Validate if the designated constraints aren't met. +type PropertyMatchInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PropertyMatchInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PropertyMatchInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PropertyMatchInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PropertyMatchInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PropertyMatchInputValidationError) ErrorName() string { + return "PropertyMatchInputValidationError" +} + +// Error satisfies the builtin error interface +func (e PropertyMatchInputValidationError) 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 %sPropertyMatchInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PropertyMatchInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PropertyMatchInputValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/v3/meta_protocol_proxy.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/v3/meta_protocol_proxy.pb.go new file mode 100644 index 0000000000000..2c0bb05257bcc --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/v3/meta_protocol_proxy.pb.go @@ -0,0 +1,460 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/meta_protocol_proxy/v3/meta_protocol_proxy.proto + +package meta_protocol_proxyv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// [#not-implemented-hide:] +// [#next-free-field: 6] +type MetaProtocolProxy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The human readable prefix to use when emitting statistics. + StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` + // The application protocol built on top of the meta protocol proxy. + ApplicationProtocol *ApplicationProtocol `protobuf:"bytes,2,opt,name=application_protocol,json=applicationProtocol,proto3" json:"application_protocol,omitempty"` + // Types that are assignable to RouteSpecifier: + // + // *MetaProtocolProxy_Rds + // *MetaProtocolProxy_RouteConfig + RouteSpecifier isMetaProtocolProxy_RouteSpecifier `protobuf_oneof:"route_specifier"` + // A list of individual Layer-7 filters that make up the filter chain for requests made to the + // meta protocol proxy. Order matters as the filters are processed sequentially as request events + // happen. + MetaProtocolFilters []*v3.TypedExtensionConfig `protobuf:"bytes,5,rep,name=meta_protocol_filters,json=metaProtocolFilters,proto3" json:"meta_protocol_filters,omitempty"` +} + +func (x *MetaProtocolProxy) Reset() { + *x = MetaProtocolProxy{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MetaProtocolProxy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetaProtocolProxy) ProtoMessage() {} + +func (x *MetaProtocolProxy) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetaProtocolProxy.ProtoReflect.Descriptor instead. +func (*MetaProtocolProxy) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDescGZIP(), []int{0} +} + +func (x *MetaProtocolProxy) GetStatPrefix() string { + if x != nil { + return x.StatPrefix + } + return "" +} + +func (x *MetaProtocolProxy) GetApplicationProtocol() *ApplicationProtocol { + if x != nil { + return x.ApplicationProtocol + } + return nil +} + +func (m *MetaProtocolProxy) GetRouteSpecifier() isMetaProtocolProxy_RouteSpecifier { + if m != nil { + return m.RouteSpecifier + } + return nil +} + +func (x *MetaProtocolProxy) GetRds() *MetaRds { + if x, ok := x.GetRouteSpecifier().(*MetaProtocolProxy_Rds); ok { + return x.Rds + } + return nil +} + +func (x *MetaProtocolProxy) GetRouteConfig() *RouteConfiguration { + if x, ok := x.GetRouteSpecifier().(*MetaProtocolProxy_RouteConfig); ok { + return x.RouteConfig + } + return nil +} + +func (x *MetaProtocolProxy) GetMetaProtocolFilters() []*v3.TypedExtensionConfig { + if x != nil { + return x.MetaProtocolFilters + } + return nil +} + +type isMetaProtocolProxy_RouteSpecifier interface { + isMetaProtocolProxy_RouteSpecifier() +} + +type MetaProtocolProxy_Rds struct { + // The meta protocol proxies route table will be dynamically loaded via the meta RDS API. + Rds *MetaRds `protobuf:"bytes,3,opt,name=rds,proto3,oneof"` +} + +type MetaProtocolProxy_RouteConfig struct { + // The route table for the meta protocol proxy is static and is specified in this property. + RouteConfig *RouteConfiguration `protobuf:"bytes,4,opt,name=route_config,json=routeConfig,proto3,oneof"` +} + +func (*MetaProtocolProxy_Rds) isMetaProtocolProxy_RouteSpecifier() {} + +func (*MetaProtocolProxy_RouteConfig) isMetaProtocolProxy_RouteSpecifier() {} + +// [#not-implemented-hide:] +type ApplicationProtocol struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the application protocol. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The codec which encodes and decodes the application protocol. + Codec *v3.TypedExtensionConfig `protobuf:"bytes,2,opt,name=codec,proto3" json:"codec,omitempty"` +} + +func (x *ApplicationProtocol) Reset() { + *x = ApplicationProtocol{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ApplicationProtocol) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApplicationProtocol) ProtoMessage() {} + +func (x *ApplicationProtocol) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApplicationProtocol.ProtoReflect.Descriptor instead. +func (*ApplicationProtocol) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDescGZIP(), []int{1} +} + +func (x *ApplicationProtocol) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ApplicationProtocol) GetCodec() *v3.TypedExtensionConfig { + if x != nil { + return x.Codec + } + return nil +} + +// [#not-implemented-hide:] +type MetaRds struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Configuration source specifier for RDS. + ConfigSource *v3.ConfigSource `protobuf:"bytes,1,opt,name=config_source,json=configSource,proto3" json:"config_source,omitempty"` + // The name of the route configuration. This name will be passed to the RDS API. This allows an + // Envoy configuration with multiple meta protocol proxies to use different route configurations. + RouteConfigName string `protobuf:"bytes,2,opt,name=route_config_name,json=routeConfigName,proto3" json:"route_config_name,omitempty"` +} + +func (x *MetaRds) Reset() { + *x = MetaRds{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MetaRds) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetaRds) ProtoMessage() {} + +func (x *MetaRds) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetaRds.ProtoReflect.Descriptor instead. +func (*MetaRds) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDescGZIP(), []int{2} +} + +func (x *MetaRds) GetConfigSource() *v3.ConfigSource { + if x != nil { + return x.ConfigSource + } + return nil +} + +func (x *MetaRds) GetRouteConfigName() string { + if x != nil { + return x.RouteConfigName + } + return "" +} + +var File_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDesc = []byte{ + 0x0a, 0x51, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x28, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x43, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6d, + 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x89, 0x04, 0x0a, 0x11, 0x4d, + 0x65, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x78, 0x79, + 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, + 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x89, 0x01, 0x0a, 0x14, 0x61, + 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x65, 0x74, + 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x13, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x54, 0x0a, 0x03, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, + 0x74, 0x61, 0x52, 0x64, 0x73, 0x48, 0x00, 0x52, 0x03, 0x72, 0x64, 0x73, 0x12, 0x70, 0x0a, 0x0c, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, + 0x00, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5e, + 0x0a, 0x15, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x13, 0x6d, 0x65, 0x74, 0x61, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x42, 0x16, + 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x7e, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x1b, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4a, 0x0a, 0x05, 0x63, 0x6f, + 0x64, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x22, 0x91, 0x01, 0x0a, 0x07, 0x4d, 0x65, 0x74, 0x61, 0x52, + 0x64, 0x73, 0x12, 0x51, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x11, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0xe7, 0x01, 0x0a, 0x45, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x65, + 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x76, 0x33, 0x42, 0x16, 0x4d, 0x65, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x74, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x6d, + 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0xd2, 0xc6, 0xa4, 0xe1, + 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDescData = file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDesc +) + +func file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDescData +} + +var file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_goTypes = []interface{}{ + (*MetaProtocolProxy)(nil), // 0: envoy.extensions.filters.network.meta_protocol_proxy.v3.MetaProtocolProxy + (*ApplicationProtocol)(nil), // 1: envoy.extensions.filters.network.meta_protocol_proxy.v3.ApplicationProtocol + (*MetaRds)(nil), // 2: envoy.extensions.filters.network.meta_protocol_proxy.v3.MetaRds + (*RouteConfiguration)(nil), // 3: envoy.extensions.filters.network.meta_protocol_proxy.v3.RouteConfiguration + (*v3.TypedExtensionConfig)(nil), // 4: envoy.config.core.v3.TypedExtensionConfig + (*v3.ConfigSource)(nil), // 5: envoy.config.core.v3.ConfigSource +} +var file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.network.meta_protocol_proxy.v3.MetaProtocolProxy.application_protocol:type_name -> envoy.extensions.filters.network.meta_protocol_proxy.v3.ApplicationProtocol + 2, // 1: envoy.extensions.filters.network.meta_protocol_proxy.v3.MetaProtocolProxy.rds:type_name -> envoy.extensions.filters.network.meta_protocol_proxy.v3.MetaRds + 3, // 2: envoy.extensions.filters.network.meta_protocol_proxy.v3.MetaProtocolProxy.route_config:type_name -> envoy.extensions.filters.network.meta_protocol_proxy.v3.RouteConfiguration + 4, // 3: envoy.extensions.filters.network.meta_protocol_proxy.v3.MetaProtocolProxy.meta_protocol_filters:type_name -> envoy.config.core.v3.TypedExtensionConfig + 4, // 4: envoy.extensions.filters.network.meta_protocol_proxy.v3.ApplicationProtocol.codec:type_name -> envoy.config.core.v3.TypedExtensionConfig + 5, // 5: envoy.extensions.filters.network.meta_protocol_proxy.v3.MetaRds.config_source:type_name -> envoy.config.core.v3.ConfigSource + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_init() +} +func file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_init() { + if File_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto != nil { + return + } + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_init() + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MetaProtocolProxy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ApplicationProtocol); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MetaRds); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*MetaProtocolProxy_Rds)(nil), + (*MetaProtocolProxy_RouteConfig)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto = out.File + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_rawDesc = nil + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_goTypes = nil + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_meta_protocol_proxy_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/v3/meta_protocol_proxy.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/v3/meta_protocol_proxy.pb.validate.go new file mode 100644 index 0000000000000..d0022c6b91386 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/v3/meta_protocol_proxy.pb.validate.go @@ -0,0 +1,598 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/meta_protocol_proxy/v3/meta_protocol_proxy.proto + +package meta_protocol_proxyv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on MetaProtocolProxy 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 *MetaProtocolProxy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetaProtocolProxy 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 +// MetaProtocolProxyMultiError, or nil if none found. +func (m *MetaProtocolProxy) ValidateAll() error { + return m.validate(true) +} + +func (m *MetaProtocolProxy) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { + err := MetaProtocolProxyValidationError{ + field: "StatPrefix", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetApplicationProtocol() == nil { + err := MetaProtocolProxyValidationError{ + field: "ApplicationProtocol", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetApplicationProtocol()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetaProtocolProxyValidationError{ + field: "ApplicationProtocol", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetaProtocolProxyValidationError{ + field: "ApplicationProtocol", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetApplicationProtocol()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MetaProtocolProxyValidationError{ + field: "ApplicationProtocol", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetMetaProtocolFilters() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetaProtocolProxyValidationError{ + field: fmt.Sprintf("MetaProtocolFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetaProtocolProxyValidationError{ + field: fmt.Sprintf("MetaProtocolFilters[%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 MetaProtocolProxyValidationError{ + field: fmt.Sprintf("MetaProtocolFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + switch m.RouteSpecifier.(type) { + + case *MetaProtocolProxy_Rds: + + if all { + switch v := interface{}(m.GetRds()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetaProtocolProxyValidationError{ + field: "Rds", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetaProtocolProxyValidationError{ + field: "Rds", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRds()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MetaProtocolProxyValidationError{ + field: "Rds", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *MetaProtocolProxy_RouteConfig: + + if all { + switch v := interface{}(m.GetRouteConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetaProtocolProxyValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetaProtocolProxyValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MetaProtocolProxyValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := MetaProtocolProxyValidationError{ + field: "RouteSpecifier", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return MetaProtocolProxyMultiError(errors) + } + return nil +} + +// MetaProtocolProxyMultiError is an error wrapping multiple validation errors +// returned by MetaProtocolProxy.ValidateAll() if the designated constraints +// aren't met. +type MetaProtocolProxyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetaProtocolProxyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetaProtocolProxyMultiError) AllErrors() []error { return m } + +// MetaProtocolProxyValidationError is the validation error returned by +// MetaProtocolProxy.Validate if the designated constraints aren't met. +type MetaProtocolProxyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MetaProtocolProxyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MetaProtocolProxyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MetaProtocolProxyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MetaProtocolProxyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MetaProtocolProxyValidationError) ErrorName() string { + return "MetaProtocolProxyValidationError" +} + +// Error satisfies the builtin error interface +func (e MetaProtocolProxyValidationError) 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 %sMetaProtocolProxy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MetaProtocolProxyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MetaProtocolProxyValidationError{} + +// Validate checks the field values on ApplicationProtocol 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 *ApplicationProtocol) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ApplicationProtocol 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 +// ApplicationProtocolMultiError, or nil if none found. +func (m *ApplicationProtocol) ValidateAll() error { + return m.validate(true) +} + +func (m *ApplicationProtocol) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetName()) < 1 { + err := ApplicationProtocolValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetCodec() == nil { + err := ApplicationProtocolValidationError{ + field: "Codec", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetCodec()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ApplicationProtocolValidationError{ + field: "Codec", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ApplicationProtocolValidationError{ + field: "Codec", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCodec()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ApplicationProtocolValidationError{ + field: "Codec", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ApplicationProtocolMultiError(errors) + } + return nil +} + +// ApplicationProtocolMultiError is an error wrapping multiple validation +// errors returned by ApplicationProtocol.ValidateAll() if the designated +// constraints aren't met. +type ApplicationProtocolMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ApplicationProtocolMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ApplicationProtocolMultiError) AllErrors() []error { return m } + +// ApplicationProtocolValidationError is the validation error returned by +// ApplicationProtocol.Validate if the designated constraints aren't met. +type ApplicationProtocolValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ApplicationProtocolValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ApplicationProtocolValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ApplicationProtocolValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ApplicationProtocolValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ApplicationProtocolValidationError) ErrorName() string { + return "ApplicationProtocolValidationError" +} + +// Error satisfies the builtin error interface +func (e ApplicationProtocolValidationError) 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 %sApplicationProtocol.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ApplicationProtocolValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ApplicationProtocolValidationError{} + +// Validate checks the field values on MetaRds 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 *MetaRds) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetaRds 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 MetaRdsMultiError, or nil if none found. +func (m *MetaRds) ValidateAll() error { + return m.validate(true) +} + +func (m *MetaRds) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetConfigSource() == nil { + err := MetaRdsValidationError{ + field: "ConfigSource", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetConfigSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetaRdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetaRdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfigSource()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MetaRdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if utf8.RuneCountInString(m.GetRouteConfigName()) < 1 { + err := MetaRdsValidationError{ + field: "RouteConfigName", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return MetaRdsMultiError(errors) + } + return nil +} + +// MetaRdsMultiError is an error wrapping multiple validation errors returned +// by MetaRds.ValidateAll() if the designated constraints aren't met. +type MetaRdsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetaRdsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetaRdsMultiError) AllErrors() []error { return m } + +// MetaRdsValidationError is the validation error returned by MetaRds.Validate +// if the designated constraints aren't met. +type MetaRdsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MetaRdsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MetaRdsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MetaRdsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MetaRdsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MetaRdsValidationError) ErrorName() string { return "MetaRdsValidationError" } + +// Error satisfies the builtin error interface +func (e MetaRdsValidationError) 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 %sMetaRds.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MetaRdsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MetaRdsValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/v3/route.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/v3/route.pb.go new file mode 100644 index 0000000000000..6b7ac0de8ee8f --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/v3/route.pb.go @@ -0,0 +1,243 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/meta_protocol_proxy/v3/route.proto + +package meta_protocol_proxyv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + v3 "github.com/cncf/xds/go/xds/type/matcher/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// [#protodoc-title: Meta Protocol Proxy Route Configuration] +// The meta protocol proxy makes use of the `xds matching API` for routing configurations. +// +// In the below example, we combine a top level tree matcher with a linear matcher to match +// the incoming requests, and send the matching requests to v1 of the upstream service. +// +// name: demo-v1 +// route: +// +// matcher_tree: +// input: +// name: request-service +// typed_config: +// "@type": type.googleapis.com/envoy.extensions.filters.network.meta_protocol_proxy.matcher.v3.ServiceMatchInput +// exact_match_map: +// map: +// org.apache.dubbo.samples.basic.api.DemoService: +// matcher: +// matcher_list: +// matchers: +// - predicate: +// and_matcher: +// predicate: +// - single_predicate: +// input: +// name: request-properties +// typed_config: +// "@type": type.googleapis.com/envoy.extensions.filters.network.meta_protocol_proxy.matcher.v3.PropertyMatchInput +// property_name: version +// value_match: +// exact: v1 +// - single_predicate: +// input: +// name: request-properties +// typed_config: +// "@type": type.googleapis.com/envoy.extensions.filters.network.meta_protocol_proxy.matcher.v3.PropertyMatchInput +// property_name: user +// value_match: +// exact: john +// on_match: +// action: +// name: route +// typed_config: +// "@type": type.googleapis.com/envoy.extensions.filters.network.meta_protocol_proxy.matcher.action.v3.routeAction +// cluster: outbound|20880|v1|org.apache.dubbo.samples.basic.api.demoservice +// +// [#not-implemented-hide:] +type RouteConfiguration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the route configuration. For example, it might match route_config_name in + // envoy.extensions.filters.network.meta_protocol_proxy.v3.Rds. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The match tree to use when resolving route actions for incoming requests. + Route *v3.Matcher `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` +} + +func (x *RouteConfiguration) Reset() { + *x = RouteConfiguration{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RouteConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RouteConfiguration) ProtoMessage() {} + +func (x *RouteConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RouteConfiguration.ProtoReflect.Descriptor instead. +func (*RouteConfiguration) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDescGZIP(), []int{0} +} + +func (x *RouteConfiguration) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RouteConfiguration) GetRoute() *v3.Matcher { + if x != nil { + return x.Route + } + return nil +} + +var File_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDesc = []byte{ + 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x1f, + 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x6f, 0x0a, 0x12, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, + 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, + 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x42, 0xdb, 0x01, 0x0a, 0x45, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x6d, + 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x74, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6d, 0x65, 0x74, + 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x02, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDescData = file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDesc +) + +func file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDescData +} + +var file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_goTypes = []interface{}{ + (*RouteConfiguration)(nil), // 0: envoy.extensions.filters.network.meta_protocol_proxy.v3.RouteConfiguration + (*v3.Matcher)(nil), // 1: xds.type.matcher.v3.Matcher +} +var file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.network.meta_protocol_proxy.v3.RouteConfiguration.route:type_name -> xds.type.matcher.v3.Matcher + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_init() } +func file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_init() { + if File_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RouteConfiguration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto = out.File + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_rawDesc = nil + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_goTypes = nil + file_envoy_extensions_filters_network_meta_protocol_proxy_v3_route_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/v3/route.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/v3/route.pb.validate.go new file mode 100644 index 0000000000000..efb83ed1e285c --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/v3/route.pb.validate.go @@ -0,0 +1,188 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/meta_protocol_proxy/v3/route.proto + +package meta_protocol_proxyv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RouteConfiguration 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 *RouteConfiguration) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteConfiguration 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 +// RouteConfigurationMultiError, or nil if none found. +func (m *RouteConfiguration) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteConfiguration) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetName()) < 1 { + err := RouteConfigurationValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetRoute() == nil { + err := RouteConfigurationValidationError{ + field: "Route", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetRoute()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteConfigurationValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RouteConfigurationMultiError(errors) + } + return nil +} + +// RouteConfigurationMultiError is an error wrapping multiple validation errors +// returned by RouteConfiguration.ValidateAll() if the designated constraints +// aren't met. +type RouteConfigurationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteConfigurationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteConfigurationMultiError) AllErrors() []error { return m } + +// RouteConfigurationValidationError is the validation error returned by +// RouteConfiguration.Validate if the designated constraints aren't met. +type RouteConfigurationValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RouteConfigurationValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RouteConfigurationValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RouteConfigurationValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RouteConfigurationValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RouteConfigurationValidationError) ErrorName() string { + return "RouteConfigurationValidationError" +} + +// Error satisfies the builtin error interface +func (e RouteConfigurationValidationError) 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 %sRouteConfiguration.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RouteConfigurationValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RouteConfigurationValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/rbac/v3/rbac.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/rbac/v3/rbac.pb.go new file mode 100644 index 0000000000000..bcd468579ef59 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/rbac/v3/rbac.pb.go @@ -0,0 +1,359 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/rbac/v3/rbac.proto + +package rbacv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/rbac/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + v31 "github.com/cncf/xds/go/xds/type/matcher/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type RBAC_EnforcementType int32 + +const ( + // Apply RBAC policies when the first byte of data arrives on the connection. + RBAC_ONE_TIME_ON_FIRST_BYTE RBAC_EnforcementType = 0 + // Continuously apply RBAC policies as data arrives. Use this mode when + // using RBAC with message oriented protocols such as Mongo, MySQL, Kafka, + // etc. when the protocol decoders emit dynamic metadata such as the + // resources being accessed and the operations on the resources. + RBAC_CONTINUOUS RBAC_EnforcementType = 1 +) + +// Enum value maps for RBAC_EnforcementType. +var ( + RBAC_EnforcementType_name = map[int32]string{ + 0: "ONE_TIME_ON_FIRST_BYTE", + 1: "CONTINUOUS", + } + RBAC_EnforcementType_value = map[string]int32{ + "ONE_TIME_ON_FIRST_BYTE": 0, + "CONTINUOUS": 1, + } +) + +func (x RBAC_EnforcementType) Enum() *RBAC_EnforcementType { + p := new(RBAC_EnforcementType) + *p = x + return p +} + +func (x RBAC_EnforcementType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RBAC_EnforcementType) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_network_rbac_v3_rbac_proto_enumTypes[0].Descriptor() +} + +func (RBAC_EnforcementType) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_network_rbac_v3_rbac_proto_enumTypes[0] +} + +func (x RBAC_EnforcementType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RBAC_EnforcementType.Descriptor instead. +func (RBAC_EnforcementType) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_rbac_v3_rbac_proto_rawDescGZIP(), []int{0, 0} +} + +// RBAC network filter config. +// +// Header should not be used in rules/shadow_rules in RBAC network filter as +// this information is only available in :ref:`RBAC http filter `. +// [#next-free-field: 8] +type RBAC struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specify the RBAC rules to be applied globally. + // If absent, no enforcing RBAC policy will be applied. + // If present and empty, DENY. + // If both rules and matcher are configured, rules will be ignored. + Rules *v3.RBAC `protobuf:"bytes,1,opt,name=rules,proto3" json:"rules,omitempty"` + // The match tree to use when resolving RBAC action for incoming connections. Connections do + // not match any matcher will be denied. + // If absent, no enforcing RBAC matcher will be applied. + // If present and empty, deny all connections. + Matcher *v31.Matcher `protobuf:"bytes,6,opt,name=matcher,proto3" json:"matcher,omitempty"` + // Shadow rules are not enforced by the filter but will emit stats and logs + // and can be used for rule testing. + // If absent, no shadow RBAC policy will be applied. + // If both shadow rules and shadow matcher are configured, shadow rules will be ignored. + ShadowRules *v3.RBAC `protobuf:"bytes,2,opt,name=shadow_rules,json=shadowRules,proto3" json:"shadow_rules,omitempty"` + // The match tree to use for emitting stats and logs which can be used for rule testing for + // incoming connections. + // If absent, no shadow matcher will be applied. + ShadowMatcher *v31.Matcher `protobuf:"bytes,7,opt,name=shadow_matcher,json=shadowMatcher,proto3" json:"shadow_matcher,omitempty"` + // If specified, shadow rules will emit stats with the given prefix. + // This is useful to distinguish the stat when there are more than 1 RBAC filter configured with + // shadow rules. + ShadowRulesStatPrefix string `protobuf:"bytes,5,opt,name=shadow_rules_stat_prefix,json=shadowRulesStatPrefix,proto3" json:"shadow_rules_stat_prefix,omitempty"` + // The prefix to use when emitting statistics. + StatPrefix string `protobuf:"bytes,3,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` + // RBAC enforcement strategy. By default RBAC will be enforced only once + // when the first byte of data arrives from the downstream. When used in + // conjunction with filters that emit dynamic metadata after decoding + // every payload (e.g., Mongo, MySQL, Kafka) set the enforcement type to + // CONTINUOUS to enforce RBAC policies on every message boundary. + EnforcementType RBAC_EnforcementType `protobuf:"varint,4,opt,name=enforcement_type,json=enforcementType,proto3,enum=envoy.extensions.filters.network.rbac.v3.RBAC_EnforcementType" json:"enforcement_type,omitempty"` +} + +func (x *RBAC) Reset() { + *x = RBAC{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_rbac_v3_rbac_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RBAC) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RBAC) ProtoMessage() {} + +func (x *RBAC) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_rbac_v3_rbac_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RBAC.ProtoReflect.Descriptor instead. +func (*RBAC) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_rbac_v3_rbac_proto_rawDescGZIP(), []int{0} +} + +func (x *RBAC) GetRules() *v3.RBAC { + if x != nil { + return x.Rules + } + return nil +} + +func (x *RBAC) GetMatcher() *v31.Matcher { + if x != nil { + return x.Matcher + } + return nil +} + +func (x *RBAC) GetShadowRules() *v3.RBAC { + if x != nil { + return x.ShadowRules + } + return nil +} + +func (x *RBAC) GetShadowMatcher() *v31.Matcher { + if x != nil { + return x.ShadowMatcher + } + return nil +} + +func (x *RBAC) GetShadowRulesStatPrefix() string { + if x != nil { + return x.ShadowRulesStatPrefix + } + return "" +} + +func (x *RBAC) GetStatPrefix() string { + if x != nil { + return x.StatPrefix + } + return "" +} + +func (x *RBAC) GetEnforcementType() RBAC_EnforcementType { + if x != nil { + return x.EnforcementType + } + return RBAC_ONE_TIME_ON_FIRST_BYTE +} + +var File_envoy_extensions_filters_network_rbac_v3_rbac_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_rbac_v3_rbac_proto_rawDesc = []byte{ + 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x1a, + 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x62, + 0x61, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, + 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, + 0xb4, 0x05, 0x0a, 0x04, 0x52, 0x42, 0x41, 0x43, 0x12, 0x49, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x42, 0x41, 0x43, 0x42, 0x17, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x11, 0x12, 0x0f, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x05, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x12, 0x57, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x42, 0x1f, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x11, 0x12, 0x0f, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, + 0x02, 0x08, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x5d, 0x0a, 0x0c, + 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x42, 0x1e, + 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x18, 0x12, 0x16, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x5f, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0b, + 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x6b, 0x0a, 0x0e, 0x73, + 0x68, 0x61, 0x64, 0x6f, 0x77, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x42, 0x26, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x18, 0x12, 0x16, 0x73, 0x68, 0x61, 0x64, 0x6f, + 0x77, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x72, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x52, 0x0d, 0x73, 0x68, 0x61, 0x64, 0x6f, + 0x77, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x18, 0x73, 0x68, 0x61, 0x64, + 0x6f, 0x77, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x73, 0x68, 0x61, 0x64, + 0x6f, 0x77, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x53, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, + 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x69, 0x0a, 0x10, 0x65, + 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, 0x33, + 0x2e, 0x52, 0x42, 0x41, 0x43, 0x2e, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x3d, 0x0a, 0x0f, 0x45, 0x6e, 0x66, 0x6f, 0x72, 0x63, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x4f, 0x4e, 0x45, + 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x4f, 0x4e, 0x5f, 0x46, 0x49, 0x52, 0x53, 0x54, 0x5f, 0x42, + 0x59, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x4e, 0x55, + 0x4f, 0x55, 0x53, 0x10, 0x01, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, + 0x32, 0x2e, 0x52, 0x42, 0x41, 0x43, 0x42, 0xa5, 0x01, 0x0a, 0x36, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x76, + 0x33, 0x42, 0x09, 0x52, 0x62, 0x61, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x56, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2f, 0x76, 0x33, 0x3b, + 0x72, 0x62, 0x61, 0x63, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_network_rbac_v3_rbac_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_rbac_v3_rbac_proto_rawDescData = file_envoy_extensions_filters_network_rbac_v3_rbac_proto_rawDesc +) + +func file_envoy_extensions_filters_network_rbac_v3_rbac_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_rbac_v3_rbac_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_rbac_v3_rbac_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_rbac_v3_rbac_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_rbac_v3_rbac_proto_rawDescData +} + +var file_envoy_extensions_filters_network_rbac_v3_rbac_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_extensions_filters_network_rbac_v3_rbac_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_network_rbac_v3_rbac_proto_goTypes = []interface{}{ + (RBAC_EnforcementType)(0), // 0: envoy.extensions.filters.network.rbac.v3.RBAC.EnforcementType + (*RBAC)(nil), // 1: envoy.extensions.filters.network.rbac.v3.RBAC + (*v3.RBAC)(nil), // 2: envoy.config.rbac.v3.RBAC + (*v31.Matcher)(nil), // 3: xds.type.matcher.v3.Matcher +} +var file_envoy_extensions_filters_network_rbac_v3_rbac_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.filters.network.rbac.v3.RBAC.rules:type_name -> envoy.config.rbac.v3.RBAC + 3, // 1: envoy.extensions.filters.network.rbac.v3.RBAC.matcher:type_name -> xds.type.matcher.v3.Matcher + 2, // 2: envoy.extensions.filters.network.rbac.v3.RBAC.shadow_rules:type_name -> envoy.config.rbac.v3.RBAC + 3, // 3: envoy.extensions.filters.network.rbac.v3.RBAC.shadow_matcher:type_name -> xds.type.matcher.v3.Matcher + 0, // 4: envoy.extensions.filters.network.rbac.v3.RBAC.enforcement_type:type_name -> envoy.extensions.filters.network.rbac.v3.RBAC.EnforcementType + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_network_rbac_v3_rbac_proto_init() } +func file_envoy_extensions_filters_network_rbac_v3_rbac_proto_init() { + if File_envoy_extensions_filters_network_rbac_v3_rbac_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_rbac_v3_rbac_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RBAC); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_rbac_v3_rbac_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_rbac_v3_rbac_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_rbac_v3_rbac_proto_depIdxs, + EnumInfos: file_envoy_extensions_filters_network_rbac_v3_rbac_proto_enumTypes, + MessageInfos: file_envoy_extensions_filters_network_rbac_v3_rbac_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_rbac_v3_rbac_proto = out.File + file_envoy_extensions_filters_network_rbac_v3_rbac_proto_rawDesc = nil + file_envoy_extensions_filters_network_rbac_v3_rbac_proto_goTypes = nil + file_envoy_extensions_filters_network_rbac_v3_rbac_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/rbac/v3/rbac.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/rbac/v3/rbac.pb.validate.go new file mode 100644 index 0000000000000..e5cdc66ad868c --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/rbac/v3/rbac.pb.validate.go @@ -0,0 +1,264 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/rbac/v3/rbac.proto + +package rbacv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RBAC 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 *RBAC) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RBAC 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 RBACMultiError, or nil if none found. +func (m *RBAC) ValidateAll() error { + return m.validate(true) +} + +func (m *RBAC) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RBACValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RBACValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRules()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RBACValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RBACValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RBACValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RBACValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetShadowRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RBACValidationError{ + field: "ShadowRules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RBACValidationError{ + field: "ShadowRules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetShadowRules()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RBACValidationError{ + field: "ShadowRules", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetShadowMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RBACValidationError{ + field: "ShadowMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RBACValidationError{ + field: "ShadowMatcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetShadowMatcher()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RBACValidationError{ + field: "ShadowMatcher", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ShadowRulesStatPrefix + + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { + err := RBACValidationError{ + field: "StatPrefix", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for EnforcementType + + if len(errors) > 0 { + return RBACMultiError(errors) + } + return nil +} + +// RBACMultiError is an error wrapping multiple validation errors returned by +// RBAC.ValidateAll() if the designated constraints aren't met. +type RBACMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RBACMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RBACMultiError) AllErrors() []error { return m } + +// RBACValidationError is the validation error returned by RBAC.Validate if the +// designated constraints aren't met. +type RBACValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RBACValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RBACValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RBACValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RBACValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RBACValidationError) ErrorName() string { return "RBACValidationError" } + +// Error satisfies the builtin error interface +func (e RBACValidationError) 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 %sRBAC.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RBACValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RBACValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.pb.go new file mode 100644 index 0000000000000..9eddb269a0eea --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.pb.go @@ -0,0 +1,1268 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.proto + +package redis_proxyv3 + +import ( + _ "github.com/cilium/proxy/go/envoy/annotations" + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// ReadPolicy controls how Envoy routes read commands to Redis nodes. This is currently +// supported for Redis Cluster. All ReadPolicy settings except MASTER may return stale data +// because replication is asynchronous and requires some delay. You need to ensure that your +// application can tolerate stale data. +type RedisProxy_ConnPoolSettings_ReadPolicy int32 + +const ( + // Default mode. Read from the current primary node. + RedisProxy_ConnPoolSettings_MASTER RedisProxy_ConnPoolSettings_ReadPolicy = 0 + // Read from the primary, but if it is unavailable, read from replica nodes. + RedisProxy_ConnPoolSettings_PREFER_MASTER RedisProxy_ConnPoolSettings_ReadPolicy = 1 + // Read from replica nodes. If multiple replica nodes are present within a shard, a random + // node is selected. Healthy nodes have precedent over unhealthy nodes. + RedisProxy_ConnPoolSettings_REPLICA RedisProxy_ConnPoolSettings_ReadPolicy = 2 + // Read from the replica nodes (similar to REPLICA), but if all replicas are unavailable (not + // present or unhealthy), read from the primary. + RedisProxy_ConnPoolSettings_PREFER_REPLICA RedisProxy_ConnPoolSettings_ReadPolicy = 3 + // Read from any node of the cluster. A random node is selected among the primary and + // replicas, healthy nodes have precedent over unhealthy nodes. + RedisProxy_ConnPoolSettings_ANY RedisProxy_ConnPoolSettings_ReadPolicy = 4 +) + +// Enum value maps for RedisProxy_ConnPoolSettings_ReadPolicy. +var ( + RedisProxy_ConnPoolSettings_ReadPolicy_name = map[int32]string{ + 0: "MASTER", + 1: "PREFER_MASTER", + 2: "REPLICA", + 3: "PREFER_REPLICA", + 4: "ANY", + } + RedisProxy_ConnPoolSettings_ReadPolicy_value = map[string]int32{ + "MASTER": 0, + "PREFER_MASTER": 1, + "REPLICA": 2, + "PREFER_REPLICA": 3, + "ANY": 4, + } +) + +func (x RedisProxy_ConnPoolSettings_ReadPolicy) Enum() *RedisProxy_ConnPoolSettings_ReadPolicy { + p := new(RedisProxy_ConnPoolSettings_ReadPolicy) + *p = x + return p +} + +func (x RedisProxy_ConnPoolSettings_ReadPolicy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RedisProxy_ConnPoolSettings_ReadPolicy) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_enumTypes[0].Descriptor() +} + +func (RedisProxy_ConnPoolSettings_ReadPolicy) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_enumTypes[0] +} + +func (x RedisProxy_ConnPoolSettings_ReadPolicy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RedisProxy_ConnPoolSettings_ReadPolicy.Descriptor instead. +func (RedisProxy_ConnPoolSettings_ReadPolicy) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_rawDescGZIP(), []int{0, 0, 0} +} + +type RedisProxy_RedisFault_RedisFaultType int32 + +const ( + // Delays requests. This is the base fault; other faults can have delays added. + RedisProxy_RedisFault_DELAY RedisProxy_RedisFault_RedisFaultType = 0 + // Returns errors on requests. + RedisProxy_RedisFault_ERROR RedisProxy_RedisFault_RedisFaultType = 1 +) + +// Enum value maps for RedisProxy_RedisFault_RedisFaultType. +var ( + RedisProxy_RedisFault_RedisFaultType_name = map[int32]string{ + 0: "DELAY", + 1: "ERROR", + } + RedisProxy_RedisFault_RedisFaultType_value = map[string]int32{ + "DELAY": 0, + "ERROR": 1, + } +) + +func (x RedisProxy_RedisFault_RedisFaultType) Enum() *RedisProxy_RedisFault_RedisFaultType { + p := new(RedisProxy_RedisFault_RedisFaultType) + *p = x + return p +} + +func (x RedisProxy_RedisFault_RedisFaultType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RedisProxy_RedisFault_RedisFaultType) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_enumTypes[1].Descriptor() +} + +func (RedisProxy_RedisFault_RedisFaultType) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_enumTypes[1] +} + +func (x RedisProxy_RedisFault_RedisFaultType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RedisProxy_RedisFault_RedisFaultType.Descriptor instead. +func (RedisProxy_RedisFault_RedisFaultType) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_rawDescGZIP(), []int{0, 2, 0} +} + +// [#next-free-field: 10] +type RedisProxy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The prefix to use when emitting :ref:`statistics `. + StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` + // Network settings for the connection pool to the upstream clusters. + Settings *RedisProxy_ConnPoolSettings `protobuf:"bytes,3,opt,name=settings,proto3" json:"settings,omitempty"` + // Indicates that latency stat should be computed in microseconds. By default it is computed in + // milliseconds. This does not apply to upstream command stats currently. + LatencyInMicros bool `protobuf:"varint,4,opt,name=latency_in_micros,json=latencyInMicros,proto3" json:"latency_in_micros,omitempty"` + // List of **unique** prefixes used to separate keys from different workloads to different + // clusters. Envoy will always favor the longest match first in case of overlap. A catch-all + // cluster can be used to forward commands when there is no match. Time complexity of the + // lookups are in O(min(longest key prefix, key length)). + // + // Example: + // + // .. code-block:: yaml + // + // prefix_routes: + // routes: + // - prefix: "ab" + // cluster: "cluster_a" + // - prefix: "abc" + // cluster: "cluster_b" + // + // When using the above routes, the following prefixes would be sent to: + // + // - “get abc:users“ would retrieve the key 'abc:users' from cluster_b. + // - “get ab:users“ would retrieve the key 'ab:users' from cluster_a. + // - “get z:users“ would return a NoUpstreamHost error. A :ref:`catch-all + // route` + // would have retrieved the key from that cluster instead. + // + // See the :ref:`configuration section + // ` of the architecture overview for recommendations on + // configuring the backing clusters. + PrefixRoutes *RedisProxy_PrefixRoutes `protobuf:"bytes,5,opt,name=prefix_routes,json=prefixRoutes,proto3" json:"prefix_routes,omitempty"` + // Authenticate Redis client connections locally by forcing downstream clients to issue a `Redis + // AUTH command `_ with this password before enabling any other + // command. If an AUTH command's password matches this password, an "OK" response will be returned + // to the client. If the AUTH command password does not match this password, then an "ERR invalid + // password" error will be returned. If any other command is received before AUTH when this + // password is set, then a "NOAUTH Authentication required." error response will be sent to the + // client. If an AUTH command is received when the password is not set, then an "ERR Client sent + // AUTH, but no password is set" error will be returned. + // + // .. attention:: + // + // This field is deprecated. Use :ref:`downstream_auth_passwords + // `. + // + // Deprecated: Do not use. + DownstreamAuthPassword *v3.DataSource `protobuf:"bytes,6,opt,name=downstream_auth_password,json=downstreamAuthPassword,proto3" json:"downstream_auth_password,omitempty"` + // Authenticate Redis client connections locally by forcing downstream clients to issue a `Redis + // AUTH command `_ with one of these passwords before enabling any other + // command. If an AUTH command's password matches one of these passwords, an "OK" response will be returned + // to the client. If the AUTH command password does not match, then an "ERR invalid + // password" error will be returned. If any other command is received before AUTH when the + // password(s) are set, then a "NOAUTH Authentication required." error response will be sent to the + // client. If an AUTH command is received when the password is not set, then an "ERR Client sent + // AUTH, but no password is set" error will be returned. + DownstreamAuthPasswords []*v3.DataSource `protobuf:"bytes,9,rep,name=downstream_auth_passwords,json=downstreamAuthPasswords,proto3" json:"downstream_auth_passwords,omitempty"` + // List of faults to inject. Faults currently come in two flavors: + // - Delay, which delays a request. + // - Error, which responds to a request with an error. Errors can also have delays attached. + // + // Example: + // + // .. code-block:: yaml + // + // faults: + // - fault_type: ERROR + // fault_enabled: + // default_value: + // numerator: 10 + // denominator: HUNDRED + // runtime_key: "bogus_key" + // commands: + // - GET + // - fault_type: DELAY + // fault_enabled: + // default_value: + // numerator: 10 + // denominator: HUNDRED + // runtime_key: "bogus_key" + // delay: 2s + // + // See the :ref:`fault injection section + // ` for more information on how to configure this. + Faults []*RedisProxy_RedisFault `protobuf:"bytes,8,rep,name=faults,proto3" json:"faults,omitempty"` + // If a username is provided an ACL style AUTH command will be required with a username and password. + // Authenticate Redis client connections locally by forcing downstream clients to issue a `Redis + // AUTH command `_ with this username and the “downstream_auth_password“ + // before enabling any other command. If an AUTH command's username and password matches this username + // and the “downstream_auth_password“ , an "OK" response will be returned to the client. If the AUTH + // command username or password does not match this username or the “downstream_auth_password“, then an + // "WRONGPASS invalid username-password pair" error will be returned. If any other command is received before AUTH when this + // password is set, then a "NOAUTH Authentication required." error response will be sent to the + // client. If an AUTH command is received when the password is not set, then an "ERR Client sent + // AUTH, but no ACL is set" error will be returned. + DownstreamAuthUsername *v3.DataSource `protobuf:"bytes,7,opt,name=downstream_auth_username,json=downstreamAuthUsername,proto3" json:"downstream_auth_username,omitempty"` +} + +func (x *RedisProxy) Reset() { + *x = RedisProxy{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RedisProxy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RedisProxy) ProtoMessage() {} + +func (x *RedisProxy) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RedisProxy.ProtoReflect.Descriptor instead. +func (*RedisProxy) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_rawDescGZIP(), []int{0} +} + +func (x *RedisProxy) GetStatPrefix() string { + if x != nil { + return x.StatPrefix + } + return "" +} + +func (x *RedisProxy) GetSettings() *RedisProxy_ConnPoolSettings { + if x != nil { + return x.Settings + } + return nil +} + +func (x *RedisProxy) GetLatencyInMicros() bool { + if x != nil { + return x.LatencyInMicros + } + return false +} + +func (x *RedisProxy) GetPrefixRoutes() *RedisProxy_PrefixRoutes { + if x != nil { + return x.PrefixRoutes + } + return nil +} + +// Deprecated: Do not use. +func (x *RedisProxy) GetDownstreamAuthPassword() *v3.DataSource { + if x != nil { + return x.DownstreamAuthPassword + } + return nil +} + +func (x *RedisProxy) GetDownstreamAuthPasswords() []*v3.DataSource { + if x != nil { + return x.DownstreamAuthPasswords + } + return nil +} + +func (x *RedisProxy) GetFaults() []*RedisProxy_RedisFault { + if x != nil { + return x.Faults + } + return nil +} + +func (x *RedisProxy) GetDownstreamAuthUsername() *v3.DataSource { + if x != nil { + return x.DownstreamAuthUsername + } + return nil +} + +// RedisProtocolOptions specifies Redis upstream protocol options. This object is used in +// :ref:`typed_extension_protocol_options`, +// keyed by the name “envoy.filters.network.redis_proxy“. +type RedisProtocolOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Upstream server password as defined by the “requirepass“ directive + // ``_ in the server's configuration file. + AuthPassword *v3.DataSource `protobuf:"bytes,1,opt,name=auth_password,json=authPassword,proto3" json:"auth_password,omitempty"` + // Upstream server username as defined by the “user“ directive + // ``_ in the server's configuration file. + AuthUsername *v3.DataSource `protobuf:"bytes,2,opt,name=auth_username,json=authUsername,proto3" json:"auth_username,omitempty"` +} + +func (x *RedisProtocolOptions) Reset() { + *x = RedisProtocolOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RedisProtocolOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RedisProtocolOptions) ProtoMessage() {} + +func (x *RedisProtocolOptions) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RedisProtocolOptions.ProtoReflect.Descriptor instead. +func (*RedisProtocolOptions) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_rawDescGZIP(), []int{1} +} + +func (x *RedisProtocolOptions) GetAuthPassword() *v3.DataSource { + if x != nil { + return x.AuthPassword + } + return nil +} + +func (x *RedisProtocolOptions) GetAuthUsername() *v3.DataSource { + if x != nil { + return x.AuthUsername + } + return nil +} + +// Redis connection pool settings. +// [#next-free-field: 9] +type RedisProxy_ConnPoolSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Per-operation timeout in milliseconds. The timer starts when the first + // command of a pipeline is written to the backend connection. Each response received from Redis + // resets the timer since it signifies that the next command is being processed by the backend. + // The only exception to this behavior is when a connection to a backend is not yet established. + // In that case, the connect timeout on the cluster will govern the timeout until the connection + // is ready. + OpTimeout *durationpb.Duration `protobuf:"bytes,1,opt,name=op_timeout,json=opTimeout,proto3" json:"op_timeout,omitempty"` + // Use hash tagging on every redis key to guarantee that keys with the same hash tag will be + // forwarded to the same upstream. The hash key used for determining the upstream in a + // consistent hash ring configuration will be computed from the hash tagged key instead of the + // whole key. The algorithm used to compute the hash tag is identical to the `redis-cluster + // implementation `_. + // + // Examples: + // + // * '{user1000}.following' and '{user1000}.followers' **will** be sent to the same upstream + // * '{user1000}.following' and '{user1001}.following' **might** be sent to the same upstream + EnableHashtagging bool `protobuf:"varint,2,opt,name=enable_hashtagging,json=enableHashtagging,proto3" json:"enable_hashtagging,omitempty"` + // Accept `moved and ask redirection + // `_ errors from upstream + // redis servers, and retry commands to the specified target server. The target server does not + // need to be known to the cluster manager. If the command cannot be redirected, then the + // original error is passed downstream unchanged. By default, this support is not enabled. + EnableRedirection bool `protobuf:"varint,3,opt,name=enable_redirection,json=enableRedirection,proto3" json:"enable_redirection,omitempty"` + // Maximum size of encoded request buffer before flush is triggered and encoded requests + // are sent upstream. If this is unset, the buffer flushes whenever it receives data + // and performs no batching. + // This feature makes it possible for multiple clients to send requests to Envoy and have + // them batched- for example if one is running several worker processes, each with its own + // Redis connection. There is no benefit to using this with a single downstream process. + // Recommended size (if enabled) is 1024 bytes. + MaxBufferSizeBeforeFlush uint32 `protobuf:"varint,4,opt,name=max_buffer_size_before_flush,json=maxBufferSizeBeforeFlush,proto3" json:"max_buffer_size_before_flush,omitempty"` + // The encoded request buffer is flushed N milliseconds after the first request has been + // encoded, unless the buffer size has already exceeded “max_buffer_size_before_flush“. + // If “max_buffer_size_before_flush“ is not set, this flush timer is not used. Otherwise, + // the timer should be set according to the number of clients, overall request rate and + // desired maximum latency for a single command. For example, if there are many requests + // being batched together at a high rate, the buffer will likely be filled before the timer + // fires. Alternatively, if the request rate is lower the buffer will not be filled as often + // before the timer fires. + // If “max_buffer_size_before_flush“ is set, but “buffer_flush_timeout“ is not, the latter + // defaults to 3ms. + BufferFlushTimeout *durationpb.Duration `protobuf:"bytes,5,opt,name=buffer_flush_timeout,json=bufferFlushTimeout,proto3" json:"buffer_flush_timeout,omitempty"` + // “max_upstream_unknown_connections“ controls how many upstream connections to unknown hosts + // can be created at any given time by any given worker thread (see “enable_redirection“ for + // more details). If the host is unknown and a connection cannot be created due to enforcing + // this limit, then redirection will fail and the original redirection error will be passed + // downstream unchanged. This limit defaults to 100. + MaxUpstreamUnknownConnections *wrapperspb.UInt32Value `protobuf:"bytes,6,opt,name=max_upstream_unknown_connections,json=maxUpstreamUnknownConnections,proto3" json:"max_upstream_unknown_connections,omitempty"` + // Enable per-command statistics per upstream cluster, in addition to the filter level aggregate + // count. These commands are measured in microseconds. + EnableCommandStats bool `protobuf:"varint,8,opt,name=enable_command_stats,json=enableCommandStats,proto3" json:"enable_command_stats,omitempty"` + // Read policy. The default is to read from the primary. + ReadPolicy RedisProxy_ConnPoolSettings_ReadPolicy `protobuf:"varint,7,opt,name=read_policy,json=readPolicy,proto3,enum=envoy.extensions.filters.network.redis_proxy.v3.RedisProxy_ConnPoolSettings_ReadPolicy" json:"read_policy,omitempty"` +} + +func (x *RedisProxy_ConnPoolSettings) Reset() { + *x = RedisProxy_ConnPoolSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RedisProxy_ConnPoolSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RedisProxy_ConnPoolSettings) ProtoMessage() {} + +func (x *RedisProxy_ConnPoolSettings) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RedisProxy_ConnPoolSettings.ProtoReflect.Descriptor instead. +func (*RedisProxy_ConnPoolSettings) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *RedisProxy_ConnPoolSettings) GetOpTimeout() *durationpb.Duration { + if x != nil { + return x.OpTimeout + } + return nil +} + +func (x *RedisProxy_ConnPoolSettings) GetEnableHashtagging() bool { + if x != nil { + return x.EnableHashtagging + } + return false +} + +func (x *RedisProxy_ConnPoolSettings) GetEnableRedirection() bool { + if x != nil { + return x.EnableRedirection + } + return false +} + +func (x *RedisProxy_ConnPoolSettings) GetMaxBufferSizeBeforeFlush() uint32 { + if x != nil { + return x.MaxBufferSizeBeforeFlush + } + return 0 +} + +func (x *RedisProxy_ConnPoolSettings) GetBufferFlushTimeout() *durationpb.Duration { + if x != nil { + return x.BufferFlushTimeout + } + return nil +} + +func (x *RedisProxy_ConnPoolSettings) GetMaxUpstreamUnknownConnections() *wrapperspb.UInt32Value { + if x != nil { + return x.MaxUpstreamUnknownConnections + } + return nil +} + +func (x *RedisProxy_ConnPoolSettings) GetEnableCommandStats() bool { + if x != nil { + return x.EnableCommandStats + } + return false +} + +func (x *RedisProxy_ConnPoolSettings) GetReadPolicy() RedisProxy_ConnPoolSettings_ReadPolicy { + if x != nil { + return x.ReadPolicy + } + return RedisProxy_ConnPoolSettings_MASTER +} + +type RedisProxy_PrefixRoutes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of prefix routes. + Routes []*RedisProxy_PrefixRoutes_Route `protobuf:"bytes,1,rep,name=routes,proto3" json:"routes,omitempty"` + // Indicates that prefix matching should be case insensitive. + CaseInsensitive bool `protobuf:"varint,2,opt,name=case_insensitive,json=caseInsensitive,proto3" json:"case_insensitive,omitempty"` + // Optional catch-all route to forward commands that doesn't match any of the routes. The + // catch-all route becomes required when no routes are specified. + CatchAllRoute *RedisProxy_PrefixRoutes_Route `protobuf:"bytes,4,opt,name=catch_all_route,json=catchAllRoute,proto3" json:"catch_all_route,omitempty"` +} + +func (x *RedisProxy_PrefixRoutes) Reset() { + *x = RedisProxy_PrefixRoutes{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RedisProxy_PrefixRoutes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RedisProxy_PrefixRoutes) ProtoMessage() {} + +func (x *RedisProxy_PrefixRoutes) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RedisProxy_PrefixRoutes.ProtoReflect.Descriptor instead. +func (*RedisProxy_PrefixRoutes) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *RedisProxy_PrefixRoutes) GetRoutes() []*RedisProxy_PrefixRoutes_Route { + if x != nil { + return x.Routes + } + return nil +} + +func (x *RedisProxy_PrefixRoutes) GetCaseInsensitive() bool { + if x != nil { + return x.CaseInsensitive + } + return false +} + +func (x *RedisProxy_PrefixRoutes) GetCatchAllRoute() *RedisProxy_PrefixRoutes_Route { + if x != nil { + return x.CatchAllRoute + } + return nil +} + +// RedisFault defines faults used for fault injection. +type RedisProxy_RedisFault struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Fault type. + FaultType RedisProxy_RedisFault_RedisFaultType `protobuf:"varint,1,opt,name=fault_type,json=faultType,proto3,enum=envoy.extensions.filters.network.redis_proxy.v3.RedisProxy_RedisFault_RedisFaultType" json:"fault_type,omitempty"` + // Percentage of requests fault applies to. + FaultEnabled *v3.RuntimeFractionalPercent `protobuf:"bytes,2,opt,name=fault_enabled,json=faultEnabled,proto3" json:"fault_enabled,omitempty"` + // Delay for all faults. If not set, defaults to zero + Delay *durationpb.Duration `protobuf:"bytes,3,opt,name=delay,proto3" json:"delay,omitempty"` + // Commands fault is restricted to, if any. If not set, fault applies to all commands + // other than auth and ping (due to special handling of those commands in Envoy). + Commands []string `protobuf:"bytes,4,rep,name=commands,proto3" json:"commands,omitempty"` +} + +func (x *RedisProxy_RedisFault) Reset() { + *x = RedisProxy_RedisFault{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RedisProxy_RedisFault) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RedisProxy_RedisFault) ProtoMessage() {} + +func (x *RedisProxy_RedisFault) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RedisProxy_RedisFault.ProtoReflect.Descriptor instead. +func (*RedisProxy_RedisFault) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_rawDescGZIP(), []int{0, 2} +} + +func (x *RedisProxy_RedisFault) GetFaultType() RedisProxy_RedisFault_RedisFaultType { + if x != nil { + return x.FaultType + } + return RedisProxy_RedisFault_DELAY +} + +func (x *RedisProxy_RedisFault) GetFaultEnabled() *v3.RuntimeFractionalPercent { + if x != nil { + return x.FaultEnabled + } + return nil +} + +func (x *RedisProxy_RedisFault) GetDelay() *durationpb.Duration { + if x != nil { + return x.Delay + } + return nil +} + +func (x *RedisProxy_RedisFault) GetCommands() []string { + if x != nil { + return x.Commands + } + return nil +} + +type RedisProxy_PrefixRoutes_Route struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // String prefix that must match the beginning of the keys. Envoy will always favor the + // longest match. + Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` + // Indicates if the prefix needs to be removed from the key when forwarded. + RemovePrefix bool `protobuf:"varint,2,opt,name=remove_prefix,json=removePrefix,proto3" json:"remove_prefix,omitempty"` + // Upstream cluster to forward the command to. + Cluster string `protobuf:"bytes,3,opt,name=cluster,proto3" json:"cluster,omitempty"` + // Indicates that the route has a request mirroring policy. + RequestMirrorPolicy []*RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy `protobuf:"bytes,4,rep,name=request_mirror_policy,json=requestMirrorPolicy,proto3" json:"request_mirror_policy,omitempty"` +} + +func (x *RedisProxy_PrefixRoutes_Route) Reset() { + *x = RedisProxy_PrefixRoutes_Route{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RedisProxy_PrefixRoutes_Route) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RedisProxy_PrefixRoutes_Route) ProtoMessage() {} + +func (x *RedisProxy_PrefixRoutes_Route) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RedisProxy_PrefixRoutes_Route.ProtoReflect.Descriptor instead. +func (*RedisProxy_PrefixRoutes_Route) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_rawDescGZIP(), []int{0, 1, 0} +} + +func (x *RedisProxy_PrefixRoutes_Route) GetPrefix() string { + if x != nil { + return x.Prefix + } + return "" +} + +func (x *RedisProxy_PrefixRoutes_Route) GetRemovePrefix() bool { + if x != nil { + return x.RemovePrefix + } + return false +} + +func (x *RedisProxy_PrefixRoutes_Route) GetCluster() string { + if x != nil { + return x.Cluster + } + return "" +} + +func (x *RedisProxy_PrefixRoutes_Route) GetRequestMirrorPolicy() []*RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy { + if x != nil { + return x.RequestMirrorPolicy + } + return nil +} + +// The router is capable of shadowing traffic from one cluster to another. The current +// implementation is "fire and forget," meaning Envoy will not wait for the shadow cluster to +// respond before returning the response from the primary cluster. All normal statistics are +// collected for the shadow cluster making this feature useful for testing. +type RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies the cluster that requests will be mirrored to. The cluster must + // exist in the cluster manager configuration. + Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` + // If not specified or the runtime key is not present, all requests to the target cluster + // will be mirrored. + // + // If specified, Envoy will lookup the runtime key to get the percentage of requests to the + // mirror. + RuntimeFraction *v3.RuntimeFractionalPercent `protobuf:"bytes,2,opt,name=runtime_fraction,json=runtimeFraction,proto3" json:"runtime_fraction,omitempty"` + // Set this to TRUE to only mirror write commands, this is effectively replicating the + // writes in a "fire and forget" manner. + ExcludeReadCommands bool `protobuf:"varint,3,opt,name=exclude_read_commands,json=excludeReadCommands,proto3" json:"exclude_read_commands,omitempty"` +} + +func (x *RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy) Reset() { + *x = RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy) ProtoMessage() {} + +func (x *RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy.ProtoReflect.Descriptor instead. +func (*RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_rawDescGZIP(), []int{0, 1, 0, 0} +} + +func (x *RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy) GetCluster() string { + if x != nil { + return x.Cluster + } + return "" +} + +func (x *RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy) GetRuntimeFraction() *v3.RuntimeFractionalPercent { + if x != nil { + return x.RuntimeFraction + } + return nil +} + +func (x *RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy) GetExcludeReadCommands() bool { + if x != nil { + return x.ExcludeReadCommands + } + return false +} + +var File_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_rawDesc = []byte{ + 0x0a, 0x41, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, + 0x33, 0x2f, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, + 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x6e, + 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0xcc, 0x17, 0x0a, 0x0a, 0x52, 0x65, 0x64, 0x69, + 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x12, 0x72, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x43, 0x6f, 0x6e, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, + 0x69, 0x6e, 0x5f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0f, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x49, 0x6e, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, + 0x12, 0x6d, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x73, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, + 0x6d, 0x0a, 0x18, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x61, 0x75, + 0x74, 0x68, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x42, 0x11, 0x18, 0x01, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x92, 0xc7, 0x86, + 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x16, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x41, 0x75, 0x74, 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x64, + 0x0a, 0x19, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x61, 0x75, 0x74, + 0x68, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, 0x17, 0x64, 0x6f, 0x77, + 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x75, 0x74, 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x73, 0x12, 0x5e, 0x0a, 0x06, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x08, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x73, 0x12, 0x62, 0x0a, 0x18, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, + 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, + 0x52, 0x16, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x75, 0x74, 0x68, + 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0xae, 0x06, 0x0a, 0x10, 0x43, 0x6f, 0x6e, + 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x42, 0x0a, + 0x0a, 0x6f, 0x70, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0xaa, 0x01, 0x02, 0x08, 0x01, 0x52, 0x09, 0x6f, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x74, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x48, 0x61, 0x73, 0x68, 0x74, 0x61, 0x67, 0x67, 0x69, 0x6e, 0x67, + 0x12, 0x2d, 0x0a, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x3e, 0x0a, 0x1c, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x18, 0x6d, 0x61, 0x78, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, + 0x53, 0x69, 0x7a, 0x65, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x12, + 0x4b, 0x0a, 0x14, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, + 0x46, 0x6c, 0x75, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x65, 0x0a, 0x20, + 0x6d, 0x61, 0x78, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x75, 0x6e, 0x6b, + 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1d, 0x6d, 0x61, 0x78, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x82, 0x01, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x57, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, + 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, + 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x50, 0x6f, 0x6f, + 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, + 0x72, 0x65, 0x61, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x7e, 0x0a, 0x0a, 0x52, 0x65, + 0x61, 0x64, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1b, 0x0a, 0x06, 0x4d, 0x41, 0x53, 0x54, + 0x45, 0x52, 0x10, 0x00, 0x1a, 0x0f, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x09, 0x0a, 0x07, 0x50, 0x52, + 0x49, 0x4d, 0x41, 0x52, 0x59, 0x12, 0x29, 0x0a, 0x0d, 0x50, 0x52, 0x45, 0x46, 0x45, 0x52, 0x5f, + 0x4d, 0x41, 0x53, 0x54, 0x45, 0x52, 0x10, 0x01, 0x1a, 0x16, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x10, + 0x0a, 0x0e, 0x50, 0x52, 0x45, 0x46, 0x45, 0x52, 0x5f, 0x50, 0x52, 0x49, 0x4d, 0x41, 0x52, 0x59, + 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x10, 0x02, 0x12, 0x12, 0x0a, + 0x0e, 0x50, 0x52, 0x45, 0x46, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x10, + 0x03, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4e, 0x59, 0x10, 0x04, 0x3a, 0x4d, 0x9a, 0xc5, 0x88, 0x1e, + 0x48, 0x0a, 0x46, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, + 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, + 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x50, 0x6f, 0x6f, + 0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x8a, 0x08, 0x0a, 0x0c, 0x50, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x66, 0x0a, 0x06, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, + 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x64, + 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x73, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x65, 0x6e, + 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x63, 0x61, + 0x73, 0x65, 0x49, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x12, 0x76, 0x0a, + 0x0f, 0x63, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, + 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x0d, 0x63, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6c, 0x6c, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x1a, 0x8a, 0x05, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, + 0x20, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0x28, 0xe8, 0x07, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x21, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x96, 0x01, 0x0a, 0x15, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x62, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, + 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x64, 0x69, + 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x73, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x13, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x1a, 0xac, 0x02, 0x0a, 0x13, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, + 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x21, 0x0a, 0x07, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x59, 0x0a, + 0x10, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x78, 0x63, 0x6c, + 0x75, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x52, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x3a, 0x63, 0x9a, 0xc5, + 0x88, 0x1e, 0x5e, 0x0a, 0x5c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x2e, + 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x50, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x3a, 0x4f, 0x9a, 0xc5, 0x88, 0x1e, 0x4a, 0x0a, 0x48, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x3a, 0x49, 0x9a, 0xc5, 0x88, 0x1e, 0x44, 0x0a, 0x42, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x4a, 0x04, 0x08, + 0x03, 0x10, 0x04, 0x52, 0x11, 0x63, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0xe0, 0x02, 0x0a, 0x0a, 0x52, 0x65, 0x64, 0x69, 0x73, + 0x46, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x7e, 0x0a, 0x0a, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x55, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, + 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x64, 0x69, + 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x46, 0x61, 0x75, 0x6c, + 0x74, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x5d, 0x0a, 0x0d, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, + 0x64, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x73, 0x22, 0x26, 0x0a, 0x0e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x45, 0x4c, 0x41, 0x59, 0x10, 0x00, 0x12, 0x09, + 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, 0x37, + 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, + 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x64, + 0x69, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x07, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0xfc, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x64, 0x69, 0x73, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x4d, 0x0a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, + 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, + 0x52, 0x0c, 0x61, 0x75, 0x74, 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x4d, + 0x0a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, + 0x0c, 0x61, 0x75, 0x74, 0x68, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x46, 0x9a, + 0xc5, 0x88, 0x1e, 0x41, 0x0a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, + 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0xc0, 0x01, 0x0a, 0x3d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, + 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x64, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2f, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x76, 0x33, 0x3b, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_rawDescData = file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_rawDesc +) + +func file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_rawDescData +} + +var file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_goTypes = []interface{}{ + (RedisProxy_ConnPoolSettings_ReadPolicy)(0), // 0: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.ConnPoolSettings.ReadPolicy + (RedisProxy_RedisFault_RedisFaultType)(0), // 1: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.RedisFault.RedisFaultType + (*RedisProxy)(nil), // 2: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy + (*RedisProtocolOptions)(nil), // 3: envoy.extensions.filters.network.redis_proxy.v3.RedisProtocolOptions + (*RedisProxy_ConnPoolSettings)(nil), // 4: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.ConnPoolSettings + (*RedisProxy_PrefixRoutes)(nil), // 5: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.PrefixRoutes + (*RedisProxy_RedisFault)(nil), // 6: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.RedisFault + (*RedisProxy_PrefixRoutes_Route)(nil), // 7: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.PrefixRoutes.Route + (*RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy)(nil), // 8: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.PrefixRoutes.Route.RequestMirrorPolicy + (*v3.DataSource)(nil), // 9: envoy.config.core.v3.DataSource + (*durationpb.Duration)(nil), // 10: google.protobuf.Duration + (*wrapperspb.UInt32Value)(nil), // 11: google.protobuf.UInt32Value + (*v3.RuntimeFractionalPercent)(nil), // 12: envoy.config.core.v3.RuntimeFractionalPercent +} +var file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_depIdxs = []int32{ + 4, // 0: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.settings:type_name -> envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.ConnPoolSettings + 5, // 1: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.prefix_routes:type_name -> envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.PrefixRoutes + 9, // 2: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.downstream_auth_password:type_name -> envoy.config.core.v3.DataSource + 9, // 3: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.downstream_auth_passwords:type_name -> envoy.config.core.v3.DataSource + 6, // 4: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.faults:type_name -> envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.RedisFault + 9, // 5: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.downstream_auth_username:type_name -> envoy.config.core.v3.DataSource + 9, // 6: envoy.extensions.filters.network.redis_proxy.v3.RedisProtocolOptions.auth_password:type_name -> envoy.config.core.v3.DataSource + 9, // 7: envoy.extensions.filters.network.redis_proxy.v3.RedisProtocolOptions.auth_username:type_name -> envoy.config.core.v3.DataSource + 10, // 8: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.ConnPoolSettings.op_timeout:type_name -> google.protobuf.Duration + 10, // 9: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.ConnPoolSettings.buffer_flush_timeout:type_name -> google.protobuf.Duration + 11, // 10: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.ConnPoolSettings.max_upstream_unknown_connections:type_name -> google.protobuf.UInt32Value + 0, // 11: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.ConnPoolSettings.read_policy:type_name -> envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.ConnPoolSettings.ReadPolicy + 7, // 12: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.PrefixRoutes.routes:type_name -> envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.PrefixRoutes.Route + 7, // 13: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.PrefixRoutes.catch_all_route:type_name -> envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.PrefixRoutes.Route + 1, // 14: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.RedisFault.fault_type:type_name -> envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.RedisFault.RedisFaultType + 12, // 15: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.RedisFault.fault_enabled:type_name -> envoy.config.core.v3.RuntimeFractionalPercent + 10, // 16: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.RedisFault.delay:type_name -> google.protobuf.Duration + 8, // 17: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.PrefixRoutes.Route.request_mirror_policy:type_name -> envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.PrefixRoutes.Route.RequestMirrorPolicy + 12, // 18: envoy.extensions.filters.network.redis_proxy.v3.RedisProxy.PrefixRoutes.Route.RequestMirrorPolicy.runtime_fraction:type_name -> envoy.config.core.v3.RuntimeFractionalPercent + 19, // [19:19] is the sub-list for method output_type + 19, // [19:19] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_init() } +func file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_init() { + if File_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RedisProxy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RedisProtocolOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RedisProxy_ConnPoolSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RedisProxy_PrefixRoutes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RedisProxy_RedisFault); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RedisProxy_PrefixRoutes_Route); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_rawDesc, + NumEnums: 2, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_depIdxs, + EnumInfos: file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_enumTypes, + MessageInfos: file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto = out.File + file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_rawDesc = nil + file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_goTypes = nil + file_envoy_extensions_filters_network_redis_proxy_v3_redis_proxy_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.pb.validate.go new file mode 100644 index 0000000000000..ec063293694e0 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.pb.validate.go @@ -0,0 +1,1352 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/redis_proxy/v3/redis_proxy.proto + +package redis_proxyv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RedisProxy 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 *RedisProxy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RedisProxy 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 RedisProxyMultiError, or +// nil if none found. +func (m *RedisProxy) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisProxy) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { + err := RedisProxyValidationError{ + field: "StatPrefix", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetSettings() == nil { + err := RedisProxyValidationError{ + field: "Settings", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetSettings()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: "Settings", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: "Settings", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSettings()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RedisProxyValidationError{ + field: "Settings", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for LatencyInMicros + + if all { + switch v := interface{}(m.GetPrefixRoutes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: "PrefixRoutes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: "PrefixRoutes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPrefixRoutes()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RedisProxyValidationError{ + field: "PrefixRoutes", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetDownstreamAuthPassword()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: "DownstreamAuthPassword", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: "DownstreamAuthPassword", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDownstreamAuthPassword()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RedisProxyValidationError{ + field: "DownstreamAuthPassword", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetDownstreamAuthPasswords() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: fmt.Sprintf("DownstreamAuthPasswords[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: fmt.Sprintf("DownstreamAuthPasswords[%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 RedisProxyValidationError{ + field: fmt.Sprintf("DownstreamAuthPasswords[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetFaults() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: fmt.Sprintf("Faults[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: fmt.Sprintf("Faults[%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 RedisProxyValidationError{ + field: fmt.Sprintf("Faults[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetDownstreamAuthUsername()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: "DownstreamAuthUsername", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxyValidationError{ + field: "DownstreamAuthUsername", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDownstreamAuthUsername()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RedisProxyValidationError{ + field: "DownstreamAuthUsername", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RedisProxyMultiError(errors) + } + return nil +} + +// RedisProxyMultiError is an error wrapping multiple validation errors +// returned by RedisProxy.ValidateAll() if the designated constraints aren't met. +type RedisProxyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisProxyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisProxyMultiError) AllErrors() []error { return m } + +// RedisProxyValidationError is the validation error returned by +// RedisProxy.Validate if the designated constraints aren't met. +type RedisProxyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RedisProxyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RedisProxyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RedisProxyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RedisProxyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RedisProxyValidationError) ErrorName() string { return "RedisProxyValidationError" } + +// Error satisfies the builtin error interface +func (e RedisProxyValidationError) 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 %sRedisProxy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RedisProxyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RedisProxyValidationError{} + +// Validate checks the field values on RedisProtocolOptions 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 *RedisProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RedisProtocolOptions 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 +// RedisProtocolOptionsMultiError, or nil if none found. +func (m *RedisProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisProtocolOptions) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetAuthPassword()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProtocolOptionsValidationError{ + field: "AuthPassword", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProtocolOptionsValidationError{ + field: "AuthPassword", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAuthPassword()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RedisProtocolOptionsValidationError{ + field: "AuthPassword", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetAuthUsername()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProtocolOptionsValidationError{ + field: "AuthUsername", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProtocolOptionsValidationError{ + field: "AuthUsername", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAuthUsername()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RedisProtocolOptionsValidationError{ + field: "AuthUsername", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RedisProtocolOptionsMultiError(errors) + } + return nil +} + +// RedisProtocolOptionsMultiError is an error wrapping multiple validation +// errors returned by RedisProtocolOptions.ValidateAll() if the designated +// constraints aren't met. +type RedisProtocolOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisProtocolOptionsMultiError) AllErrors() []error { return m } + +// RedisProtocolOptionsValidationError is the validation error returned by +// RedisProtocolOptions.Validate if the designated constraints aren't met. +type RedisProtocolOptionsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RedisProtocolOptionsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RedisProtocolOptionsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RedisProtocolOptionsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RedisProtocolOptionsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RedisProtocolOptionsValidationError) ErrorName() string { + return "RedisProtocolOptionsValidationError" +} + +// Error satisfies the builtin error interface +func (e RedisProtocolOptionsValidationError) 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 %sRedisProtocolOptions.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RedisProtocolOptionsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RedisProtocolOptionsValidationError{} + +// Validate checks the field values on RedisProxy_ConnPoolSettings 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 *RedisProxy_ConnPoolSettings) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RedisProxy_ConnPoolSettings 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 +// RedisProxy_ConnPoolSettingsMultiError, or nil if none found. +func (m *RedisProxy_ConnPoolSettings) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisProxy_ConnPoolSettings) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetOpTimeout() == nil { + err := RedisProxy_ConnPoolSettingsValidationError{ + field: "OpTimeout", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for EnableHashtagging + + // no validation rules for EnableRedirection + + // no validation rules for MaxBufferSizeBeforeFlush + + if all { + switch v := interface{}(m.GetBufferFlushTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxy_ConnPoolSettingsValidationError{ + field: "BufferFlushTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxy_ConnPoolSettingsValidationError{ + field: "BufferFlushTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBufferFlushTimeout()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RedisProxy_ConnPoolSettingsValidationError{ + field: "BufferFlushTimeout", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetMaxUpstreamUnknownConnections()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxy_ConnPoolSettingsValidationError{ + field: "MaxUpstreamUnknownConnections", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxy_ConnPoolSettingsValidationError{ + field: "MaxUpstreamUnknownConnections", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxUpstreamUnknownConnections()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RedisProxy_ConnPoolSettingsValidationError{ + field: "MaxUpstreamUnknownConnections", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for EnableCommandStats + + if _, ok := RedisProxy_ConnPoolSettings_ReadPolicy_name[int32(m.GetReadPolicy())]; !ok { + err := RedisProxy_ConnPoolSettingsValidationError{ + field: "ReadPolicy", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RedisProxy_ConnPoolSettingsMultiError(errors) + } + return nil +} + +// RedisProxy_ConnPoolSettingsMultiError is an error wrapping multiple +// validation errors returned by RedisProxy_ConnPoolSettings.ValidateAll() if +// the designated constraints aren't met. +type RedisProxy_ConnPoolSettingsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisProxy_ConnPoolSettingsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisProxy_ConnPoolSettingsMultiError) AllErrors() []error { return m } + +// RedisProxy_ConnPoolSettingsValidationError is the validation error returned +// by RedisProxy_ConnPoolSettings.Validate if the designated constraints +// aren't met. +type RedisProxy_ConnPoolSettingsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RedisProxy_ConnPoolSettingsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RedisProxy_ConnPoolSettingsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RedisProxy_ConnPoolSettingsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RedisProxy_ConnPoolSettingsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RedisProxy_ConnPoolSettingsValidationError) ErrorName() string { + return "RedisProxy_ConnPoolSettingsValidationError" +} + +// Error satisfies the builtin error interface +func (e RedisProxy_ConnPoolSettingsValidationError) 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 %sRedisProxy_ConnPoolSettings.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RedisProxy_ConnPoolSettingsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RedisProxy_ConnPoolSettingsValidationError{} + +// Validate checks the field values on RedisProxy_PrefixRoutes 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 *RedisProxy_PrefixRoutes) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RedisProxy_PrefixRoutes 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 +// RedisProxy_PrefixRoutesMultiError, or nil if none found. +func (m *RedisProxy_PrefixRoutes) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisProxy_PrefixRoutes) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetRoutes() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutesValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutesValidationError{ + field: fmt.Sprintf("Routes[%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 RedisProxy_PrefixRoutesValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for CaseInsensitive + + if all { + switch v := interface{}(m.GetCatchAllRoute()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutesValidationError{ + field: "CatchAllRoute", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutesValidationError{ + field: "CatchAllRoute", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCatchAllRoute()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RedisProxy_PrefixRoutesValidationError{ + field: "CatchAllRoute", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RedisProxy_PrefixRoutesMultiError(errors) + } + return nil +} + +// RedisProxy_PrefixRoutesMultiError is an error wrapping multiple validation +// errors returned by RedisProxy_PrefixRoutes.ValidateAll() if the designated +// constraints aren't met. +type RedisProxy_PrefixRoutesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisProxy_PrefixRoutesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisProxy_PrefixRoutesMultiError) AllErrors() []error { return m } + +// RedisProxy_PrefixRoutesValidationError is the validation error returned by +// RedisProxy_PrefixRoutes.Validate if the designated constraints aren't met. +type RedisProxy_PrefixRoutesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RedisProxy_PrefixRoutesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RedisProxy_PrefixRoutesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RedisProxy_PrefixRoutesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RedisProxy_PrefixRoutesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RedisProxy_PrefixRoutesValidationError) ErrorName() string { + return "RedisProxy_PrefixRoutesValidationError" +} + +// Error satisfies the builtin error interface +func (e RedisProxy_PrefixRoutesValidationError) 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 %sRedisProxy_PrefixRoutes.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RedisProxy_PrefixRoutesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RedisProxy_PrefixRoutesValidationError{} + +// Validate checks the field values on RedisProxy_RedisFault 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 *RedisProxy_RedisFault) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RedisProxy_RedisFault 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 +// RedisProxy_RedisFaultMultiError, or nil if none found. +func (m *RedisProxy_RedisFault) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisProxy_RedisFault) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if _, ok := RedisProxy_RedisFault_RedisFaultType_name[int32(m.GetFaultType())]; !ok { + err := RedisProxy_RedisFaultValidationError{ + field: "FaultType", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetFaultEnabled() == nil { + err := RedisProxy_RedisFaultValidationError{ + field: "FaultEnabled", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetFaultEnabled()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxy_RedisFaultValidationError{ + field: "FaultEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxy_RedisFaultValidationError{ + field: "FaultEnabled", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFaultEnabled()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RedisProxy_RedisFaultValidationError{ + field: "FaultEnabled", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetDelay()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxy_RedisFaultValidationError{ + field: "Delay", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxy_RedisFaultValidationError{ + field: "Delay", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDelay()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RedisProxy_RedisFaultValidationError{ + field: "Delay", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RedisProxy_RedisFaultMultiError(errors) + } + return nil +} + +// RedisProxy_RedisFaultMultiError is an error wrapping multiple validation +// errors returned by RedisProxy_RedisFault.ValidateAll() if the designated +// constraints aren't met. +type RedisProxy_RedisFaultMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisProxy_RedisFaultMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisProxy_RedisFaultMultiError) AllErrors() []error { return m } + +// RedisProxy_RedisFaultValidationError is the validation error returned by +// RedisProxy_RedisFault.Validate if the designated constraints aren't met. +type RedisProxy_RedisFaultValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RedisProxy_RedisFaultValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RedisProxy_RedisFaultValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RedisProxy_RedisFaultValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RedisProxy_RedisFaultValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RedisProxy_RedisFaultValidationError) ErrorName() string { + return "RedisProxy_RedisFaultValidationError" +} + +// Error satisfies the builtin error interface +func (e RedisProxy_RedisFaultValidationError) 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 %sRedisProxy_RedisFault.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RedisProxy_RedisFaultValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RedisProxy_RedisFaultValidationError{} + +// Validate checks the field values on RedisProxy_PrefixRoutes_Route 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 *RedisProxy_PrefixRoutes_Route) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RedisProxy_PrefixRoutes_Route 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 +// RedisProxy_PrefixRoutes_RouteMultiError, or nil if none found. +func (m *RedisProxy_PrefixRoutes_Route) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisProxy_PrefixRoutes_Route) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetPrefix()) > 1000 { + err := RedisProxy_PrefixRoutes_RouteValidationError{ + field: "Prefix", + reason: "value length must be at most 1000 bytes", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for RemovePrefix + + if utf8.RuneCountInString(m.GetCluster()) < 1 { + err := RedisProxy_PrefixRoutes_RouteValidationError{ + field: "Cluster", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetRequestMirrorPolicy() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutes_RouteValidationError{ + field: fmt.Sprintf("RequestMirrorPolicy[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutes_RouteValidationError{ + field: fmt.Sprintf("RequestMirrorPolicy[%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 RedisProxy_PrefixRoutes_RouteValidationError{ + field: fmt.Sprintf("RequestMirrorPolicy[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return RedisProxy_PrefixRoutes_RouteMultiError(errors) + } + return nil +} + +// RedisProxy_PrefixRoutes_RouteMultiError is an error wrapping multiple +// validation errors returned by RedisProxy_PrefixRoutes_Route.ValidateAll() +// if the designated constraints aren't met. +type RedisProxy_PrefixRoutes_RouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisProxy_PrefixRoutes_RouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisProxy_PrefixRoutes_RouteMultiError) AllErrors() []error { return m } + +// RedisProxy_PrefixRoutes_RouteValidationError is the validation error +// returned by RedisProxy_PrefixRoutes_Route.Validate if the designated +// constraints aren't met. +type RedisProxy_PrefixRoutes_RouteValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RedisProxy_PrefixRoutes_RouteValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RedisProxy_PrefixRoutes_RouteValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RedisProxy_PrefixRoutes_RouteValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RedisProxy_PrefixRoutes_RouteValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RedisProxy_PrefixRoutes_RouteValidationError) ErrorName() string { + return "RedisProxy_PrefixRoutes_RouteValidationError" +} + +// Error satisfies the builtin error interface +func (e RedisProxy_PrefixRoutes_RouteValidationError) 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 %sRedisProxy_PrefixRoutes_Route.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RedisProxy_PrefixRoutes_RouteValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RedisProxy_PrefixRoutes_RouteValidationError{} + +// Validate checks the field values on +// RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy 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 *RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy 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 +// RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyMultiError, or nil if none found. +func (m *RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetCluster()) < 1 { + err := RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError{ + field: "Cluster", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetRuntimeFraction()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError{ + field: "RuntimeFraction", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError{ + field: "RuntimeFraction", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRuntimeFraction()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError{ + field: "RuntimeFraction", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ExcludeReadCommands + + if len(errors) > 0 { + return RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyMultiError(errors) + } + return nil +} + +// RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyMultiError is an error +// wrapping multiple validation errors returned by +// RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy.ValidateAll() if the +// designated constraints aren't met. +type RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyMultiError) AllErrors() []error { return m } + +// RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError is the +// validation error returned by +// RedisProxy_PrefixRoutes_Route_RequestMirrorPolicy.Validate if the +// designated constraints aren't met. +type RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError) Field() string { + return e.field +} + +// Reason function returns reason value. +func (e RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError) Cause() error { + return e.cause +} + +// Key function returns key value. +func (e RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError) ErrorName() string { + return "RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError" +} + +// Error satisfies the builtin error interface +func (e RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError) 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 %sRedisProxy_PrefixRoutes_Route_RequestMirrorPolicy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RedisProxy_PrefixRoutes_Route_RequestMirrorPolicyValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3/header_to_metadata.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3/header_to_metadata.pb.go new file mode 100644 index 0000000000000..74963fa834c37 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3/header_to_metadata.pb.go @@ -0,0 +1,613 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3/header_to_metadata.proto + +package header_to_metadatav3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/type/matcher/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type HeaderToMetadata_ValueType int32 + +const ( + HeaderToMetadata_STRING HeaderToMetadata_ValueType = 0 + HeaderToMetadata_NUMBER HeaderToMetadata_ValueType = 1 + // The value is a serialized `protobuf.Value + // `_. + HeaderToMetadata_PROTOBUF_VALUE HeaderToMetadata_ValueType = 2 +) + +// Enum value maps for HeaderToMetadata_ValueType. +var ( + HeaderToMetadata_ValueType_name = map[int32]string{ + 0: "STRING", + 1: "NUMBER", + 2: "PROTOBUF_VALUE", + } + HeaderToMetadata_ValueType_value = map[string]int32{ + "STRING": 0, + "NUMBER": 1, + "PROTOBUF_VALUE": 2, + } +) + +func (x HeaderToMetadata_ValueType) Enum() *HeaderToMetadata_ValueType { + p := new(HeaderToMetadata_ValueType) + *p = x + return p +} + +func (x HeaderToMetadata_ValueType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HeaderToMetadata_ValueType) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_enumTypes[0].Descriptor() +} + +func (HeaderToMetadata_ValueType) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_enumTypes[0] +} + +func (x HeaderToMetadata_ValueType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HeaderToMetadata_ValueType.Descriptor instead. +func (HeaderToMetadata_ValueType) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescGZIP(), []int{0, 0} +} + +// ValueEncode defines the encoding algorithm. +type HeaderToMetadata_ValueEncode int32 + +const ( + // The value is not encoded. + HeaderToMetadata_NONE HeaderToMetadata_ValueEncode = 0 + // The value is encoded in `Base64 `_. + // Note: this is mostly used for STRING and PROTOBUF_VALUE to escape the + // non-ASCII characters in the header. + HeaderToMetadata_BASE64 HeaderToMetadata_ValueEncode = 1 +) + +// Enum value maps for HeaderToMetadata_ValueEncode. +var ( + HeaderToMetadata_ValueEncode_name = map[int32]string{ + 0: "NONE", + 1: "BASE64", + } + HeaderToMetadata_ValueEncode_value = map[string]int32{ + "NONE": 0, + "BASE64": 1, + } +) + +func (x HeaderToMetadata_ValueEncode) Enum() *HeaderToMetadata_ValueEncode { + p := new(HeaderToMetadata_ValueEncode) + *p = x + return p +} + +func (x HeaderToMetadata_ValueEncode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HeaderToMetadata_ValueEncode) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_enumTypes[1].Descriptor() +} + +func (HeaderToMetadata_ValueEncode) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_enumTypes[1] +} + +func (x HeaderToMetadata_ValueEncode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HeaderToMetadata_ValueEncode.Descriptor instead. +func (HeaderToMetadata_ValueEncode) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescGZIP(), []int{0, 1} +} + +type HeaderToMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of rules to apply to requests. + RequestRules []*HeaderToMetadata_Rule `protobuf:"bytes,1,rep,name=request_rules,json=requestRules,proto3" json:"request_rules,omitempty"` +} + +func (x *HeaderToMetadata) Reset() { + *x = HeaderToMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeaderToMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeaderToMetadata) ProtoMessage() {} + +func (x *HeaderToMetadata) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HeaderToMetadata.ProtoReflect.Descriptor instead. +func (*HeaderToMetadata) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescGZIP(), []int{0} +} + +func (x *HeaderToMetadata) GetRequestRules() []*HeaderToMetadata_Rule { + if x != nil { + return x.RequestRules + } + return nil +} + +// [#next-free-field: 7] +type HeaderToMetadata_KeyValuePair struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The namespace — if this is empty, the filter's namespace will be used. + MetadataNamespace string `protobuf:"bytes,1,opt,name=metadata_namespace,json=metadataNamespace,proto3" json:"metadata_namespace,omitempty"` + // The key to use within the namespace. + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + // Types that are assignable to ValueType: + // + // *HeaderToMetadata_KeyValuePair_Value + // *HeaderToMetadata_KeyValuePair_RegexValueRewrite + ValueType isHeaderToMetadata_KeyValuePair_ValueType `protobuf_oneof:"value_type"` + // The value's type — defaults to string. + Type HeaderToMetadata_ValueType `protobuf:"varint,5,opt,name=type,proto3,enum=envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata_ValueType" json:"type,omitempty"` + // How is the value encoded, default is NONE (not encoded). + // The value will be decoded accordingly before storing to metadata. + Encode HeaderToMetadata_ValueEncode `protobuf:"varint,6,opt,name=encode,proto3,enum=envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata_ValueEncode" json:"encode,omitempty"` +} + +func (x *HeaderToMetadata_KeyValuePair) Reset() { + *x = HeaderToMetadata_KeyValuePair{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeaderToMetadata_KeyValuePair) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeaderToMetadata_KeyValuePair) ProtoMessage() {} + +func (x *HeaderToMetadata_KeyValuePair) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HeaderToMetadata_KeyValuePair.ProtoReflect.Descriptor instead. +func (*HeaderToMetadata_KeyValuePair) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *HeaderToMetadata_KeyValuePair) GetMetadataNamespace() string { + if x != nil { + return x.MetadataNamespace + } + return "" +} + +func (x *HeaderToMetadata_KeyValuePair) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (m *HeaderToMetadata_KeyValuePair) GetValueType() isHeaderToMetadata_KeyValuePair_ValueType { + if m != nil { + return m.ValueType + } + return nil +} + +func (x *HeaderToMetadata_KeyValuePair) GetValue() string { + if x, ok := x.GetValueType().(*HeaderToMetadata_KeyValuePair_Value); ok { + return x.Value + } + return "" +} + +func (x *HeaderToMetadata_KeyValuePair) GetRegexValueRewrite() *v3.RegexMatchAndSubstitute { + if x, ok := x.GetValueType().(*HeaderToMetadata_KeyValuePair_RegexValueRewrite); ok { + return x.RegexValueRewrite + } + return nil +} + +func (x *HeaderToMetadata_KeyValuePair) GetType() HeaderToMetadata_ValueType { + if x != nil { + return x.Type + } + return HeaderToMetadata_STRING +} + +func (x *HeaderToMetadata_KeyValuePair) GetEncode() HeaderToMetadata_ValueEncode { + if x != nil { + return x.Encode + } + return HeaderToMetadata_NONE +} + +type isHeaderToMetadata_KeyValuePair_ValueType interface { + isHeaderToMetadata_KeyValuePair_ValueType() +} + +type HeaderToMetadata_KeyValuePair_Value struct { + // The value to pair with the given key. + // + // When used for on_present case, if value is non-empty it'll be used instead + // of the header value. If both are empty, no metadata is added. + // + // When used for on_missing case, a non-empty value must be provided otherwise + // no metadata is added. + Value string `protobuf:"bytes,3,opt,name=value,proto3,oneof"` +} + +type HeaderToMetadata_KeyValuePair_RegexValueRewrite struct { + // If present, the header's value will be matched and substituted with this. + // If there is no match or substitution, the header value + // is used as-is. + // + // This is only used for on_present. + // + // Note: if the “value“ field is non-empty this field should be empty. + RegexValueRewrite *v3.RegexMatchAndSubstitute `protobuf:"bytes,4,opt,name=regex_value_rewrite,json=regexValueRewrite,proto3,oneof"` +} + +func (*HeaderToMetadata_KeyValuePair_Value) isHeaderToMetadata_KeyValuePair_ValueType() {} + +func (*HeaderToMetadata_KeyValuePair_RegexValueRewrite) isHeaderToMetadata_KeyValuePair_ValueType() {} + +// A Rule defines what metadata to apply when a header is present or missing. +type HeaderToMetadata_Rule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies that a match will be performed on the value of a header. + // + // The header to be extracted. + Header string `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + // If the header is present, apply this metadata KeyValuePair. + // + // If the value in the KeyValuePair is non-empty, it'll be used instead + // of the header value. + OnPresent *HeaderToMetadata_KeyValuePair `protobuf:"bytes,2,opt,name=on_present,json=onPresent,proto3" json:"on_present,omitempty"` + // If the header is not present, apply this metadata KeyValuePair. + // + // The value in the KeyValuePair must be set, since it'll be used in lieu + // of the missing header value. + OnMissing *HeaderToMetadata_KeyValuePair `protobuf:"bytes,3,opt,name=on_missing,json=onMissing,proto3" json:"on_missing,omitempty"` + // Whether or not to remove the header after a rule is applied. + // + // This prevents headers from leaking. + Remove bool `protobuf:"varint,4,opt,name=remove,proto3" json:"remove,omitempty"` +} + +func (x *HeaderToMetadata_Rule) Reset() { + *x = HeaderToMetadata_Rule{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeaderToMetadata_Rule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeaderToMetadata_Rule) ProtoMessage() {} + +func (x *HeaderToMetadata_Rule) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HeaderToMetadata_Rule.ProtoReflect.Descriptor instead. +func (*HeaderToMetadata_Rule) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *HeaderToMetadata_Rule) GetHeader() string { + if x != nil { + return x.Header + } + return "" +} + +func (x *HeaderToMetadata_Rule) GetOnPresent() *HeaderToMetadata_KeyValuePair { + if x != nil { + return x.OnPresent + } + return nil +} + +func (x *HeaderToMetadata_Rule) GetOnMissing() *HeaderToMetadata_KeyValuePair { + if x != nil { + return x.OnMissing + } + return nil +} + +func (x *HeaderToMetadata_Rule) GetRemove() bool { + if x != nil { + return x.Remove + } + return false +} + +var File_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDesc = []byte{ + 0x0a, 0x64, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, + 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x4b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x76, 0x33, 0x1a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xd3, + 0x08, 0x0a, 0x10, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x91, 0x01, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x62, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, + 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x54, 0x6f, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x1a, 0xec, 0x03, 0x0a, 0x0c, 0x4b, 0x65, 0x79, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x12, 0x2d, 0x0a, 0x12, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x19, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x16, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x60, 0x0a, 0x13, 0x72, 0x65, + 0x67, 0x65, 0x78, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, + 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, + 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, 0x67, 0x65, 0x78, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x85, 0x01, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x67, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, + 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x54, 0x6f, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x06, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x69, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, + 0x52, 0x06, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x1a, 0xdd, 0x02, 0x0a, 0x04, 0x52, 0x75, 0x6c, 0x65, 0x12, + 0x25, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x01, 0xc8, 0x01, 0x00, 0x52, 0x06, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x89, 0x01, 0x0a, 0x0a, 0x6f, 0x6e, 0x5f, 0x70, 0x72, + 0x65, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x6a, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, + 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x54, 0x6f, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x09, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x73, 0x65, + 0x6e, 0x74, 0x12, 0x89, 0x01, 0x0a, 0x0a, 0x6f, 0x6e, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, + 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x6a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, + 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, + 0x61, 0x69, 0x72, 0x52, 0x09, 0x6f, 0x6e, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x12, 0x16, + 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x22, 0x37, 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, + 0x0a, 0x0a, 0x06, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x50, + 0x52, 0x4f, 0x54, 0x4f, 0x42, 0x55, 0x46, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x02, 0x22, + 0x23, 0x0a, 0x0b, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x08, + 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x41, 0x53, 0x45, + 0x36, 0x34, 0x10, 0x01, 0x42, 0x86, 0x02, 0x0a, 0x59, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x76, 0x33, 0x42, 0x15, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x87, 0x01, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, + 0x3b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescData = file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDesc +) + +func file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDescData +} + +var file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_goTypes = []interface{}{ + (HeaderToMetadata_ValueType)(0), // 0: envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.ValueType + (HeaderToMetadata_ValueEncode)(0), // 1: envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.ValueEncode + (*HeaderToMetadata)(nil), // 2: envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata + (*HeaderToMetadata_KeyValuePair)(nil), // 3: envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.KeyValuePair + (*HeaderToMetadata_Rule)(nil), // 4: envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.Rule + (*v3.RegexMatchAndSubstitute)(nil), // 5: envoy.type.matcher.v3.RegexMatchAndSubstitute +} +var file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_depIdxs = []int32{ + 4, // 0: envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.request_rules:type_name -> envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.Rule + 5, // 1: envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.KeyValuePair.regex_value_rewrite:type_name -> envoy.type.matcher.v3.RegexMatchAndSubstitute + 0, // 2: envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.KeyValuePair.type:type_name -> envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.ValueType + 1, // 3: envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.KeyValuePair.encode:type_name -> envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.ValueEncode + 3, // 4: envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.Rule.on_present:type_name -> envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.KeyValuePair + 3, // 5: envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.Rule.on_missing:type_name -> envoy.extensions.filters.network.thrift_proxy.filters.header_to_metadata.v3.HeaderToMetadata.KeyValuePair + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_init() +} +func file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_init() { + if File_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeaderToMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeaderToMetadata_KeyValuePair); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeaderToMetadata_Rule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*HeaderToMetadata_KeyValuePair_Value)(nil), + (*HeaderToMetadata_KeyValuePair_RegexValueRewrite)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDesc, + NumEnums: 2, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_depIdxs, + EnumInfos: file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_enumTypes, + MessageInfos: file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto = out.File + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_rawDesc = nil + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_goTypes = nil + file_envoy_extensions_filters_network_thrift_proxy_filters_header_to_metadata_v3_header_to_metadata_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3/header_to_metadata.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3/header_to_metadata.pb.validate.go new file mode 100644 index 0000000000000..6c82fddfb3c8f --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3/header_to_metadata.pb.validate.go @@ -0,0 +1,531 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3/header_to_metadata.proto + +package header_to_metadatav3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on HeaderToMetadata 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 *HeaderToMetadata) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeaderToMetadata 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 +// HeaderToMetadataMultiError, or nil if none found. +func (m *HeaderToMetadata) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderToMetadata) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetRequestRules()) < 1 { + err := HeaderToMetadataValidationError{ + field: "RequestRules", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetRequestRules() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderToMetadataValidationError{ + field: fmt.Sprintf("RequestRules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderToMetadataValidationError{ + field: fmt.Sprintf("RequestRules[%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 HeaderToMetadataValidationError{ + field: fmt.Sprintf("RequestRules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return HeaderToMetadataMultiError(errors) + } + return nil +} + +// HeaderToMetadataMultiError is an error wrapping multiple validation errors +// returned by HeaderToMetadata.ValidateAll() if the designated constraints +// aren't met. +type HeaderToMetadataMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderToMetadataMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderToMetadataMultiError) AllErrors() []error { return m } + +// HeaderToMetadataValidationError is the validation error returned by +// HeaderToMetadata.Validate if the designated constraints aren't met. +type HeaderToMetadataValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HeaderToMetadataValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HeaderToMetadataValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HeaderToMetadataValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HeaderToMetadataValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HeaderToMetadataValidationError) ErrorName() string { return "HeaderToMetadataValidationError" } + +// Error satisfies the builtin error interface +func (e HeaderToMetadataValidationError) 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 %sHeaderToMetadata.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HeaderToMetadataValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HeaderToMetadataValidationError{} + +// Validate checks the field values on HeaderToMetadata_KeyValuePair 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 *HeaderToMetadata_KeyValuePair) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeaderToMetadata_KeyValuePair 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 +// HeaderToMetadata_KeyValuePairMultiError, or nil if none found. +func (m *HeaderToMetadata_KeyValuePair) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderToMetadata_KeyValuePair) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for MetadataNamespace + + if utf8.RuneCountInString(m.GetKey()) < 1 { + err := HeaderToMetadata_KeyValuePairValidationError{ + field: "Key", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := HeaderToMetadata_ValueType_name[int32(m.GetType())]; !ok { + err := HeaderToMetadata_KeyValuePairValidationError{ + field: "Type", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for Encode + + switch m.ValueType.(type) { + + case *HeaderToMetadata_KeyValuePair_Value: + // no validation rules for Value + + case *HeaderToMetadata_KeyValuePair_RegexValueRewrite: + + if all { + switch v := interface{}(m.GetRegexValueRewrite()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderToMetadata_KeyValuePairValidationError{ + field: "RegexValueRewrite", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderToMetadata_KeyValuePairValidationError{ + field: "RegexValueRewrite", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRegexValueRewrite()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderToMetadata_KeyValuePairValidationError{ + field: "RegexValueRewrite", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return HeaderToMetadata_KeyValuePairMultiError(errors) + } + return nil +} + +// HeaderToMetadata_KeyValuePairMultiError is an error wrapping multiple +// validation errors returned by HeaderToMetadata_KeyValuePair.ValidateAll() +// if the designated constraints aren't met. +type HeaderToMetadata_KeyValuePairMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderToMetadata_KeyValuePairMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderToMetadata_KeyValuePairMultiError) AllErrors() []error { return m } + +// HeaderToMetadata_KeyValuePairValidationError is the validation error +// returned by HeaderToMetadata_KeyValuePair.Validate if the designated +// constraints aren't met. +type HeaderToMetadata_KeyValuePairValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HeaderToMetadata_KeyValuePairValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HeaderToMetadata_KeyValuePairValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HeaderToMetadata_KeyValuePairValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HeaderToMetadata_KeyValuePairValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HeaderToMetadata_KeyValuePairValidationError) ErrorName() string { + return "HeaderToMetadata_KeyValuePairValidationError" +} + +// Error satisfies the builtin error interface +func (e HeaderToMetadata_KeyValuePairValidationError) 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 %sHeaderToMetadata_KeyValuePair.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HeaderToMetadata_KeyValuePairValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HeaderToMetadata_KeyValuePairValidationError{} + +// Validate checks the field values on HeaderToMetadata_Rule 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 *HeaderToMetadata_Rule) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeaderToMetadata_Rule 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 +// HeaderToMetadata_RuleMultiError, or nil if none found. +func (m *HeaderToMetadata_Rule) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderToMetadata_Rule) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetHeader()) < 1 { + err := HeaderToMetadata_RuleValidationError{ + field: "Header", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if !_HeaderToMetadata_Rule_Header_Pattern.MatchString(m.GetHeader()) { + err := HeaderToMetadata_RuleValidationError{ + field: "Header", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetOnPresent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderToMetadata_RuleValidationError{ + field: "OnPresent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderToMetadata_RuleValidationError{ + field: "OnPresent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOnPresent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderToMetadata_RuleValidationError{ + field: "OnPresent", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetOnMissing()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderToMetadata_RuleValidationError{ + field: "OnMissing", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderToMetadata_RuleValidationError{ + field: "OnMissing", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOnMissing()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderToMetadata_RuleValidationError{ + field: "OnMissing", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Remove + + if len(errors) > 0 { + return HeaderToMetadata_RuleMultiError(errors) + } + return nil +} + +// HeaderToMetadata_RuleMultiError is an error wrapping multiple validation +// errors returned by HeaderToMetadata_Rule.ValidateAll() if the designated +// constraints aren't met. +type HeaderToMetadata_RuleMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderToMetadata_RuleMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderToMetadata_RuleMultiError) AllErrors() []error { return m } + +// HeaderToMetadata_RuleValidationError is the validation error returned by +// HeaderToMetadata_Rule.Validate if the designated constraints aren't met. +type HeaderToMetadata_RuleValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HeaderToMetadata_RuleValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HeaderToMetadata_RuleValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HeaderToMetadata_RuleValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HeaderToMetadata_RuleValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HeaderToMetadata_RuleValidationError) ErrorName() string { + return "HeaderToMetadata_RuleValidationError" +} + +// Error satisfies the builtin error interface +func (e HeaderToMetadata_RuleValidationError) 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 %sHeaderToMetadata_Rule.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HeaderToMetadata_RuleValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HeaderToMetadata_RuleValidationError{} + +var _HeaderToMetadata_Rule_Header_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.pb.go new file mode 100644 index 0000000000000..21c49046e878b --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.pb.go @@ -0,0 +1,260 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.proto + +package ratelimitv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/ratelimit/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// [#next-free-field: 6] +type RateLimit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The rate limit domain to use in the rate limit service request. + Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` + // Specifies the rate limit configuration stage. Each configured rate limit filter performs a + // rate limit check using descriptors configured in the + // :ref:`envoy_v3_api_msg_extensions.filters.network.thrift_proxy.v3.RouteAction` for the request. + // Only those entries with a matching stage number are used for a given filter. If not set, the + // default stage number is 0. + // + // .. note:: + // + // The filter supports a range of 0 - 10 inclusively for stage numbers. + Stage uint32 `protobuf:"varint,2,opt,name=stage,proto3" json:"stage,omitempty"` + // The timeout in milliseconds for the rate limit service RPC. If not + // set, this defaults to 20ms. + Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"` + // The filter's behaviour in case the rate limiting service does + // not respond back. When it is set to true, Envoy will not allow traffic in case of + // communication failure between rate limiting service and the proxy. + // Defaults to false. + FailureModeDeny bool `protobuf:"varint,4,opt,name=failure_mode_deny,json=failureModeDeny,proto3" json:"failure_mode_deny,omitempty"` + // Configuration for an external rate limit service provider. If not + // specified, any calls to the rate limit service will immediately return + // success. + RateLimitService *v3.RateLimitServiceConfig `protobuf:"bytes,5,opt,name=rate_limit_service,json=rateLimitService,proto3" json:"rate_limit_service,omitempty"` +} + +func (x *RateLimit) Reset() { + *x = RateLimit{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimit) ProtoMessage() {} + +func (x *RateLimit) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimit.ProtoReflect.Descriptor instead. +func (*RateLimit) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{0} +} + +func (x *RateLimit) GetDomain() string { + if x != nil { + return x.Domain + } + return "" +} + +func (x *RateLimit) GetStage() uint32 { + if x != nil { + return x.Stage + } + return 0 +} + +func (x *RateLimit) GetTimeout() *durationpb.Duration { + if x != nil { + return x.Timeout + } + return nil +} + +func (x *RateLimit) GetFailureModeDeny() bool { + if x != nil { + return x.FailureModeDeny + } + return false +} + +func (x *RateLimit) GetRateLimitService() *v3.RateLimitServiceConfig { + if x != nil { + return x.RateLimitService + } + return nil +} + +var File_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_rawDesc = []byte{ + 0x0a, 0x53, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x42, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x72, 0x61, 0x74, + 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0xd8, 0x02, 0x0a, 0x09, 0x52, 0x61, + 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x0a, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x2a, 0x0a, 0x11, + 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x5f, 0x64, 0x65, 0x6e, + 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, + 0x4d, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x6e, 0x79, 0x12, 0x69, 0x0a, 0x12, 0x72, 0x61, 0x74, 0x65, + 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, + 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x10, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x3a, 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, + 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x42, 0xe3, 0x01, 0x0a, 0x50, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x72, 0x61, 0x74, + 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x52, 0x61, 0x74, 0x65, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x75, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_rawDescData = file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_rawDesc +) + +func file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_rawDescData +} + +var file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_goTypes = []interface{}{ + (*RateLimit)(nil), // 0: envoy.extensions.filters.network.thrift_proxy.filters.ratelimit.v3.RateLimit + (*durationpb.Duration)(nil), // 1: google.protobuf.Duration + (*v3.RateLimitServiceConfig)(nil), // 2: envoy.config.ratelimit.v3.RateLimitServiceConfig +} +var file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.network.thrift_proxy.filters.ratelimit.v3.RateLimit.timeout:type_name -> google.protobuf.Duration + 2, // 1: envoy.extensions.filters.network.thrift_proxy.filters.ratelimit.v3.RateLimit.rate_limit_service:type_name -> envoy.config.ratelimit.v3.RateLimitServiceConfig + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_init() +} +func file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_init() { + if File_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto = out.File + file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_rawDesc = nil + file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_goTypes = nil + file_envoy_extensions_filters_network_thrift_proxy_filters_ratelimit_v3_rate_limit_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.pb.validate.go new file mode 100644 index 0000000000000..8b4def1068319 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.pb.validate.go @@ -0,0 +1,227 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3/rate_limit.proto + +package ratelimitv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RateLimit 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 *RateLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimit 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 RateLimitMultiError, or nil +// if none found. +func (m *RateLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimit) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetDomain()) < 1 { + err := RateLimitValidationError{ + field: "Domain", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetStage() > 10 { + err := RateLimitValidationError{ + field: "Stage", + reason: "value must be less than or equal to 10", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimeout()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitValidationError{ + field: "Timeout", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for FailureModeDeny + + if m.GetRateLimitService() == nil { + err := RateLimitValidationError{ + field: "RateLimitService", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetRateLimitService()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "RateLimitService", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitValidationError{ + field: "RateLimitService", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRateLimitService()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitValidationError{ + field: "RateLimitService", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RateLimitMultiError(errors) + } + return nil +} + +// RateLimitMultiError is an error wrapping multiple validation errors returned +// by RateLimit.ValidateAll() if the designated constraints aren't met. +type RateLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitMultiError) AllErrors() []error { return m } + +// RateLimitValidationError is the validation error returned by +// RateLimit.Validate if the designated constraints aren't met. +type RateLimitValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitValidationError) ErrorName() string { return "RateLimitValidationError" } + +// Error satisfies the builtin error interface +func (e RateLimitValidationError) 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 %sRateLimit.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/router/v3/router.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/router/v3/router.pb.go new file mode 100644 index 0000000000000..aa19736f598e9 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/router/v3/router.pb.go @@ -0,0 +1,184 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/thrift_proxy/router/v3/router.proto + +package routerv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Router struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Close downstream connection in case of routing or upstream connection problem. Default: true + CloseDownstreamOnUpstreamError *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=close_downstream_on_upstream_error,json=closeDownstreamOnUpstreamError,proto3" json:"close_downstream_on_upstream_error,omitempty"` +} + +func (x *Router) Reset() { + *x = Router{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Router) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Router) ProtoMessage() {} + +func (x *Router) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Router.ProtoReflect.Descriptor instead. +func (*Router) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDescGZIP(), []int{0} +} + +func (x *Router) GetCloseDownstreamOnUpstreamError() *wrapperspb.BoolValue { + if x != nil { + return x.CloseDownstreamOnUpstreamError + } + return nil +} + +var File_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDesc = []byte{ + 0x0a, 0x44, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, + 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xaa, 0x01, 0x0a, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x66, 0x0a, 0x22, + 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x5f, 0x6f, 0x6e, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1e, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x6e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x76, + 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x42, 0xc7, + 0x01, 0x0a, 0x45, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x67, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDescData = file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDesc +) + +func file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDescData +} + +var file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_goTypes = []interface{}{ + (*Router)(nil), // 0: envoy.extensions.filters.network.thrift_proxy.router.v3.Router + (*wrapperspb.BoolValue)(nil), // 1: google.protobuf.BoolValue +} +var file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.network.thrift_proxy.router.v3.Router.close_downstream_on_upstream_error:type_name -> google.protobuf.BoolValue + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_init() } +func file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_init() { + if File_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Router); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto = out.File + file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_rawDesc = nil + file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_goTypes = nil + file_envoy_extensions_filters_network_thrift_proxy_router_v3_router_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/router/v3/router.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/router/v3/router.pb.validate.go new file mode 100644 index 0000000000000..cdf0792483f29 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/router/v3/router.pb.validate.go @@ -0,0 +1,162 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/thrift_proxy/router/v3/router.proto + +package routerv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Router 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 *Router) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Router 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 RouterMultiError, or nil if none found. +func (m *Router) ValidateAll() error { + return m.validate(true) +} + +func (m *Router) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetCloseDownstreamOnUpstreamError()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouterValidationError{ + field: "CloseDownstreamOnUpstreamError", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouterValidationError{ + field: "CloseDownstreamOnUpstreamError", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCloseDownstreamOnUpstreamError()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouterValidationError{ + field: "CloseDownstreamOnUpstreamError", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RouterMultiError(errors) + } + return nil +} + +// RouterMultiError is an error wrapping multiple validation errors returned by +// Router.ValidateAll() if the designated constraints aren't met. +type RouterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouterMultiError) AllErrors() []error { return m } + +// RouterValidationError is the validation error returned by Router.Validate if +// the designated constraints aren't met. +type RouterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RouterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RouterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RouterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RouterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RouterValidationError) ErrorName() string { return "RouterValidationError" } + +// Error satisfies the builtin error interface +func (e RouterValidationError) 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 %sRouter.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RouterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RouterValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/v3/route.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/v3/route.pb.go new file mode 100644 index 0000000000000..b4981cffb23e9 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/v3/route.pb.go @@ -0,0 +1,972 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/thrift_proxy/v3/route.proto + +package thrift_proxyv3 + +import ( + v31 "github.com/cilium/proxy/go/envoy/config/core/v3" + v3 "github.com/cilium/proxy/go/envoy/config/route/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type RouteConfiguration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the route configuration. This name is used in asynchronous route discovery. + // For example, it might match + // :ref:`route_config_name + // ` in + // :ref:`envoy_v3_api_msg_extensions.filters.network.thrift_proxy.v3.Trds`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The list of routes that will be matched, in order, against incoming requests. The first route + // that matches will be used. + Routes []*Route `protobuf:"bytes,2,rep,name=routes,proto3" json:"routes,omitempty"` + // An optional boolean that specifies whether the clusters that the route + // table refers to will be validated by the cluster manager. If set to true + // and a route refers to a non-existent cluster, the route table will not + // load. If set to false and a route refers to a non-existent cluster, the + // route table will load and the router filter will return a INTERNAL_ERROR + // if the route is selected at runtime. This setting defaults to true if the route table + // is statically defined via the :ref:`route_config + // ` + // option. This setting default to false if the route table is loaded dynamically via the + // :ref:`trds + // ` + // option. Users may wish to override the default behavior in certain cases (for example when + // using CDS with a static route table). + ValidateClusters *wrapperspb.BoolValue `protobuf:"bytes,3,opt,name=validate_clusters,json=validateClusters,proto3" json:"validate_clusters,omitempty"` +} + +func (x *RouteConfiguration) Reset() { + *x = RouteConfiguration{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RouteConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RouteConfiguration) ProtoMessage() {} + +func (x *RouteConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RouteConfiguration.ProtoReflect.Descriptor instead. +func (*RouteConfiguration) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDescGZIP(), []int{0} +} + +func (x *RouteConfiguration) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RouteConfiguration) GetRoutes() []*Route { + if x != nil { + return x.Routes + } + return nil +} + +func (x *RouteConfiguration) GetValidateClusters() *wrapperspb.BoolValue { + if x != nil { + return x.ValidateClusters + } + return nil +} + +type Route struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Route matching parameters. + Match *RouteMatch `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"` + // Route request to some upstream cluster. + Route *RouteAction `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"` +} + +func (x *Route) Reset() { + *x = Route{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Route) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Route) ProtoMessage() {} + +func (x *Route) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Route.ProtoReflect.Descriptor instead. +func (*Route) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDescGZIP(), []int{1} +} + +func (x *Route) GetMatch() *RouteMatch { + if x != nil { + return x.Match + } + return nil +} + +func (x *Route) GetRoute() *RouteAction { + if x != nil { + return x.Route + } + return nil +} + +type RouteMatch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to MatchSpecifier: + // + // *RouteMatch_MethodName + // *RouteMatch_ServiceName + MatchSpecifier isRouteMatch_MatchSpecifier `protobuf_oneof:"match_specifier"` + // Inverts whatever matching is done in the :ref:`method_name + // ` or + // :ref:`service_name + // ` fields. + // Cannot be combined with wildcard matching as that would result in routes never being matched. + // + // .. note:: + // + // This does not invert matching done as part of the :ref:`headers field + // ` field. To + // invert header matching, see :ref:`invert_match + // `. + Invert bool `protobuf:"varint,3,opt,name=invert,proto3" json:"invert,omitempty"` + // Specifies a set of headers that the route should match on. The router will check the request’s + // headers against all the specified headers in the route config. A match will happen if all the + // headers in the route are present in the request with the same values (or based on presence if + // the value field is not in the config). Note that this only applies for Thrift transports and/or + // protocols that support headers. + Headers []*v3.HeaderMatcher `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty"` +} + +func (x *RouteMatch) Reset() { + *x = RouteMatch{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RouteMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RouteMatch) ProtoMessage() {} + +func (x *RouteMatch) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RouteMatch.ProtoReflect.Descriptor instead. +func (*RouteMatch) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDescGZIP(), []int{2} +} + +func (m *RouteMatch) GetMatchSpecifier() isRouteMatch_MatchSpecifier { + if m != nil { + return m.MatchSpecifier + } + return nil +} + +func (x *RouteMatch) GetMethodName() string { + if x, ok := x.GetMatchSpecifier().(*RouteMatch_MethodName); ok { + return x.MethodName + } + return "" +} + +func (x *RouteMatch) GetServiceName() string { + if x, ok := x.GetMatchSpecifier().(*RouteMatch_ServiceName); ok { + return x.ServiceName + } + return "" +} + +func (x *RouteMatch) GetInvert() bool { + if x != nil { + return x.Invert + } + return false +} + +func (x *RouteMatch) GetHeaders() []*v3.HeaderMatcher { + if x != nil { + return x.Headers + } + return nil +} + +type isRouteMatch_MatchSpecifier interface { + isRouteMatch_MatchSpecifier() +} + +type RouteMatch_MethodName struct { + // If specified, the route must exactly match the request method name. As a special case, an + // empty string matches any request method name. + MethodName string `protobuf:"bytes,1,opt,name=method_name,json=methodName,proto3,oneof"` +} + +type RouteMatch_ServiceName struct { + // If specified, the route must have the service name as the request method name prefix. As a + // special case, an empty string matches any service name. Only relevant when service + // multiplexing. + ServiceName string `protobuf:"bytes,2,opt,name=service_name,json=serviceName,proto3,oneof"` +} + +func (*RouteMatch_MethodName) isRouteMatch_MatchSpecifier() {} + +func (*RouteMatch_ServiceName) isRouteMatch_MatchSpecifier() {} + +// [#next-free-field: 8] +type RouteAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to ClusterSpecifier: + // + // *RouteAction_Cluster + // *RouteAction_WeightedClusters + // *RouteAction_ClusterHeader + ClusterSpecifier isRouteAction_ClusterSpecifier `protobuf_oneof:"cluster_specifier"` + // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in + // the upstream cluster with metadata matching what is set in this field will be considered. + // Note that this will be merged with what's provided in :ref:`WeightedCluster.metadata_match + // `, + // with values there taking precedence. Keys and values should be provided under the "envoy.lb" + // metadata key. + MetadataMatch *v31.Metadata `protobuf:"bytes,3,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` + // Specifies a set of rate limit configurations that could be applied to the route. + // N.B. Thrift service or method name matching can be achieved by specifying a RequestHeaders + // action with the header name ":method-name". + RateLimits []*v3.RateLimit `protobuf:"bytes,4,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"` + // Strip the service prefix from the method name, if there's a prefix. For + // example, the method call Service:method would end up being just method. + StripServiceName bool `protobuf:"varint,5,opt,name=strip_service_name,json=stripServiceName,proto3" json:"strip_service_name,omitempty"` + // Indicates that the route has request mirroring policies. + RequestMirrorPolicies []*RouteAction_RequestMirrorPolicy `protobuf:"bytes,7,rep,name=request_mirror_policies,json=requestMirrorPolicies,proto3" json:"request_mirror_policies,omitempty"` +} + +func (x *RouteAction) Reset() { + *x = RouteAction{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RouteAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RouteAction) ProtoMessage() {} + +func (x *RouteAction) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RouteAction.ProtoReflect.Descriptor instead. +func (*RouteAction) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDescGZIP(), []int{3} +} + +func (m *RouteAction) GetClusterSpecifier() isRouteAction_ClusterSpecifier { + if m != nil { + return m.ClusterSpecifier + } + return nil +} + +func (x *RouteAction) GetCluster() string { + if x, ok := x.GetClusterSpecifier().(*RouteAction_Cluster); ok { + return x.Cluster + } + return "" +} + +func (x *RouteAction) GetWeightedClusters() *WeightedCluster { + if x, ok := x.GetClusterSpecifier().(*RouteAction_WeightedClusters); ok { + return x.WeightedClusters + } + return nil +} + +func (x *RouteAction) GetClusterHeader() string { + if x, ok := x.GetClusterSpecifier().(*RouteAction_ClusterHeader); ok { + return x.ClusterHeader + } + return "" +} + +func (x *RouteAction) GetMetadataMatch() *v31.Metadata { + if x != nil { + return x.MetadataMatch + } + return nil +} + +func (x *RouteAction) GetRateLimits() []*v3.RateLimit { + if x != nil { + return x.RateLimits + } + return nil +} + +func (x *RouteAction) GetStripServiceName() bool { + if x != nil { + return x.StripServiceName + } + return false +} + +func (x *RouteAction) GetRequestMirrorPolicies() []*RouteAction_RequestMirrorPolicy { + if x != nil { + return x.RequestMirrorPolicies + } + return nil +} + +type isRouteAction_ClusterSpecifier interface { + isRouteAction_ClusterSpecifier() +} + +type RouteAction_Cluster struct { + // Indicates a single upstream cluster to which the request should be routed + // to. + Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3,oneof"` +} + +type RouteAction_WeightedClusters struct { + // Multiple upstream clusters can be specified for a given route. The + // request is routed to one of the upstream clusters based on weights + // assigned to each cluster. + WeightedClusters *WeightedCluster `protobuf:"bytes,2,opt,name=weighted_clusters,json=weightedClusters,proto3,oneof"` +} + +type RouteAction_ClusterHeader struct { + // Envoy will determine the cluster to route to by reading the value of the + // Thrift header named by cluster_header from the request headers. If the + // header is not found or the referenced cluster does not exist Envoy will + // respond with an unknown method exception or an internal error exception, + // respectively. + ClusterHeader string `protobuf:"bytes,6,opt,name=cluster_header,json=clusterHeader,proto3,oneof"` +} + +func (*RouteAction_Cluster) isRouteAction_ClusterSpecifier() {} + +func (*RouteAction_WeightedClusters) isRouteAction_ClusterSpecifier() {} + +func (*RouteAction_ClusterHeader) isRouteAction_ClusterSpecifier() {} + +// Allows for specification of multiple upstream clusters along with weights that indicate the +// percentage of traffic to be forwarded to each cluster. The router selects an upstream cluster +// based on these weights. +type WeightedCluster struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies one or more upstream clusters associated with the route. + Clusters []*WeightedCluster_ClusterWeight `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"` +} + +func (x *WeightedCluster) Reset() { + *x = WeightedCluster{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WeightedCluster) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WeightedCluster) ProtoMessage() {} + +func (x *WeightedCluster) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WeightedCluster.ProtoReflect.Descriptor instead. +func (*WeightedCluster) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDescGZIP(), []int{4} +} + +func (x *WeightedCluster) GetClusters() []*WeightedCluster_ClusterWeight { + if x != nil { + return x.Clusters + } + return nil +} + +// The router is capable of shadowing traffic from one cluster to another. The current +// implementation is "fire and forget," meaning Envoy will not wait for the shadow cluster to +// respond before returning the response from the primary cluster. All normal statistics are +// collected for the shadow cluster making this feature useful for testing. +// +// .. note:: +// +// Shadowing will not be triggered if the primary cluster does not exist. +type RouteAction_RequestMirrorPolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies the cluster that requests will be mirrored to. The cluster must + // exist in the cluster manager configuration when the route configuration is loaded. + // If it disappears at runtime, the shadow request will silently be ignored. + Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` + // If not specified, all requests to the target cluster will be mirrored. + // + // For some fraction N/D, a random number in the range [0,D) is selected. If the + // number is <= the value of the numerator N, or if the key is not present, the default + // value, the request will be mirrored. + RuntimeFraction *v31.RuntimeFractionalPercent `protobuf:"bytes,2,opt,name=runtime_fraction,json=runtimeFraction,proto3" json:"runtime_fraction,omitempty"` +} + +func (x *RouteAction_RequestMirrorPolicy) Reset() { + *x = RouteAction_RequestMirrorPolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RouteAction_RequestMirrorPolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RouteAction_RequestMirrorPolicy) ProtoMessage() {} + +func (x *RouteAction_RequestMirrorPolicy) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RouteAction_RequestMirrorPolicy.ProtoReflect.Descriptor instead. +func (*RouteAction_RequestMirrorPolicy) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *RouteAction_RequestMirrorPolicy) GetCluster() string { + if x != nil { + return x.Cluster + } + return "" +} + +func (x *RouteAction_RequestMirrorPolicy) GetRuntimeFraction() *v31.RuntimeFractionalPercent { + if x != nil { + return x.RuntimeFraction + } + return nil +} + +type WeightedCluster_ClusterWeight struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of the upstream cluster. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // When a request matches the route, the choice of an upstream cluster is determined by its + // weight. The sum of weights across all entries in the clusters array determines the total + // weight. + Weight *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"` + // Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in + // the upstream cluster with metadata matching what is set in this field, combined with what's + // provided in :ref:`RouteAction's metadata_match + // `, + // will be considered. Values here will take precedence. Keys and values should be provided + // under the "envoy.lb" metadata key. + MetadataMatch *v31.Metadata `protobuf:"bytes,3,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` +} + +func (x *WeightedCluster_ClusterWeight) Reset() { + *x = WeightedCluster_ClusterWeight{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WeightedCluster_ClusterWeight) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WeightedCluster_ClusterWeight) ProtoMessage() {} + +func (x *WeightedCluster_ClusterWeight) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WeightedCluster_ClusterWeight.ProtoReflect.Descriptor instead. +func (*WeightedCluster_ClusterWeight) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDescGZIP(), []int{4, 0} +} + +func (x *WeightedCluster_ClusterWeight) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *WeightedCluster_ClusterWeight) GetWeight() *wrapperspb.UInt32Value { + if x != nil { + return x.Weight + } + return nil +} + +func (x *WeightedCluster_ClusterWeight) GetMetadataMatch() *v31.Metadata { + if x != nil { + return x.MetadataMatch + } + return nil +} + +var File_envoy_extensions_filters_network_thrift_proxy_v3_route_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDesc = []byte{ + 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x30, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, + 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0x8f, 0x02, 0x0a, 0x12, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4f, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x06, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x10, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x3a, + 0x4b, 0x9a, 0xc5, 0x88, 0x1e, 0x46, 0x0a, 0x44, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x84, 0x02, 0x0a, + 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x5c, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x12, 0x5d, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x3a, 0x3e, 0x9a, 0xc5, 0x88, 0x1e, 0x39, 0x0a, 0x37, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x22, 0x89, 0x02, 0x0a, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x12, 0x21, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x6d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, + 0x76, 0x65, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x6e, 0x76, 0x65, + 0x72, 0x74, 0x12, 0x3e, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x3a, 0x43, 0x9a, 0xc5, 0x88, 0x1e, 0x3e, 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x16, 0x0a, 0x0f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, + 0x96, 0x06, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x23, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x12, 0x70, 0x0a, 0x11, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, + 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x41, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x76, 0x33, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x48, 0x00, 0x52, 0x10, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x36, 0x0a, 0x0e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, + 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, 0x02, 0xc8, 0x01, 0x00, 0x48, 0x00, 0x52, + 0x0d, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x45, + 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x41, 0x0a, 0x0b, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, + 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x0a, 0x72, 0x61, + 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x74, 0x72, 0x69, + 0x70, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x73, 0x74, 0x72, 0x69, 0x70, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x89, 0x01, 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, + 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x51, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, + 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, + 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x15, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, + 0x65, 0x73, 0x1a, 0x93, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x69, + 0x72, 0x72, 0x6f, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x21, 0x0a, 0x07, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x59, 0x0a, + 0x10, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x44, 0x9a, 0xc5, 0x88, 0x1e, 0x3f, 0x0a, + 0x3d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, + 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x18, + 0x0a, 0x11, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xdf, 0x03, 0x0a, 0x0f, 0x57, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x75, 0x0a, 0x08, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, + 0x33, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x73, 0x1a, 0x8a, 0x02, 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x01, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x12, 0x45, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x56, 0x9a, 0xc5, 0x88, 0x1e, 0x51, 0x0a, + 0x4f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, + 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x3a, 0x48, 0x9a, 0xc5, 0x88, 0x1e, 0x43, 0x0a, 0x41, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0xbe, 0x01, 0x0a, 0x3e, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, + 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDescData = file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDesc +) + +func file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDescData +} + +var file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_goTypes = []interface{}{ + (*RouteConfiguration)(nil), // 0: envoy.extensions.filters.network.thrift_proxy.v3.RouteConfiguration + (*Route)(nil), // 1: envoy.extensions.filters.network.thrift_proxy.v3.Route + (*RouteMatch)(nil), // 2: envoy.extensions.filters.network.thrift_proxy.v3.RouteMatch + (*RouteAction)(nil), // 3: envoy.extensions.filters.network.thrift_proxy.v3.RouteAction + (*WeightedCluster)(nil), // 4: envoy.extensions.filters.network.thrift_proxy.v3.WeightedCluster + (*RouteAction_RequestMirrorPolicy)(nil), // 5: envoy.extensions.filters.network.thrift_proxy.v3.RouteAction.RequestMirrorPolicy + (*WeightedCluster_ClusterWeight)(nil), // 6: envoy.extensions.filters.network.thrift_proxy.v3.WeightedCluster.ClusterWeight + (*wrapperspb.BoolValue)(nil), // 7: google.protobuf.BoolValue + (*v3.HeaderMatcher)(nil), // 8: envoy.config.route.v3.HeaderMatcher + (*v31.Metadata)(nil), // 9: envoy.config.core.v3.Metadata + (*v3.RateLimit)(nil), // 10: envoy.config.route.v3.RateLimit + (*v31.RuntimeFractionalPercent)(nil), // 11: envoy.config.core.v3.RuntimeFractionalPercent + (*wrapperspb.UInt32Value)(nil), // 12: google.protobuf.UInt32Value +} +var file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.network.thrift_proxy.v3.RouteConfiguration.routes:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.Route + 7, // 1: envoy.extensions.filters.network.thrift_proxy.v3.RouteConfiguration.validate_clusters:type_name -> google.protobuf.BoolValue + 2, // 2: envoy.extensions.filters.network.thrift_proxy.v3.Route.match:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.RouteMatch + 3, // 3: envoy.extensions.filters.network.thrift_proxy.v3.Route.route:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.RouteAction + 8, // 4: envoy.extensions.filters.network.thrift_proxy.v3.RouteMatch.headers:type_name -> envoy.config.route.v3.HeaderMatcher + 4, // 5: envoy.extensions.filters.network.thrift_proxy.v3.RouteAction.weighted_clusters:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.WeightedCluster + 9, // 6: envoy.extensions.filters.network.thrift_proxy.v3.RouteAction.metadata_match:type_name -> envoy.config.core.v3.Metadata + 10, // 7: envoy.extensions.filters.network.thrift_proxy.v3.RouteAction.rate_limits:type_name -> envoy.config.route.v3.RateLimit + 5, // 8: envoy.extensions.filters.network.thrift_proxy.v3.RouteAction.request_mirror_policies:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.RouteAction.RequestMirrorPolicy + 6, // 9: envoy.extensions.filters.network.thrift_proxy.v3.WeightedCluster.clusters:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.WeightedCluster.ClusterWeight + 11, // 10: envoy.extensions.filters.network.thrift_proxy.v3.RouteAction.RequestMirrorPolicy.runtime_fraction:type_name -> envoy.config.core.v3.RuntimeFractionalPercent + 12, // 11: envoy.extensions.filters.network.thrift_proxy.v3.WeightedCluster.ClusterWeight.weight:type_name -> google.protobuf.UInt32Value + 9, // 12: envoy.extensions.filters.network.thrift_proxy.v3.WeightedCluster.ClusterWeight.metadata_match:type_name -> envoy.config.core.v3.Metadata + 13, // [13:13] is the sub-list for method output_type + 13, // [13:13] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_init() } +func file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_init() { + if File_envoy_extensions_filters_network_thrift_proxy_v3_route_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RouteConfiguration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Route); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RouteMatch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RouteAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WeightedCluster); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RouteAction_RequestMirrorPolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WeightedCluster_ClusterWeight); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*RouteMatch_MethodName)(nil), + (*RouteMatch_ServiceName)(nil), + } + file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*RouteAction_Cluster)(nil), + (*RouteAction_WeightedClusters)(nil), + (*RouteAction_ClusterHeader)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_thrift_proxy_v3_route_proto = out.File + file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_rawDesc = nil + file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_goTypes = nil + file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/v3/route.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/v3/route.pb.validate.go new file mode 100644 index 0000000000000..3dec467342319 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/v3/route.pb.validate.go @@ -0,0 +1,1257 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/thrift_proxy/v3/route.proto + +package thrift_proxyv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RouteConfiguration 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 *RouteConfiguration) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteConfiguration 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 +// RouteConfigurationMultiError, or nil if none found. +func (m *RouteConfiguration) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteConfiguration) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + for idx, item := range m.GetRoutes() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: fmt.Sprintf("Routes[%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 RouteConfigurationValidationError{ + field: fmt.Sprintf("Routes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetValidateClusters()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: "ValidateClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteConfigurationValidationError{ + field: "ValidateClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidateClusters()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteConfigurationValidationError{ + field: "ValidateClusters", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RouteConfigurationMultiError(errors) + } + return nil +} + +// RouteConfigurationMultiError is an error wrapping multiple validation errors +// returned by RouteConfiguration.ValidateAll() if the designated constraints +// aren't met. +type RouteConfigurationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteConfigurationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteConfigurationMultiError) AllErrors() []error { return m } + +// RouteConfigurationValidationError is the validation error returned by +// RouteConfiguration.Validate if the designated constraints aren't met. +type RouteConfigurationValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RouteConfigurationValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RouteConfigurationValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RouteConfigurationValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RouteConfigurationValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RouteConfigurationValidationError) ErrorName() string { + return "RouteConfigurationValidationError" +} + +// Error satisfies the builtin error interface +func (e RouteConfigurationValidationError) 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 %sRouteConfiguration.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RouteConfigurationValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RouteConfigurationValidationError{} + +// Validate checks the field values on Route 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 *Route) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Route 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 RouteMultiError, or nil if none found. +func (m *Route) ValidateAll() error { + return m.validate(true) +} + +func (m *Route) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetMatch() == nil { + err := RouteValidationError{ + field: "Match", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteValidationError{ + field: "Match", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetRoute() == nil { + err := RouteValidationError{ + field: "Route", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetRoute()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteValidationError{ + field: "Route", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RouteMultiError(errors) + } + return nil +} + +// RouteMultiError is an error wrapping multiple validation errors returned by +// Route.ValidateAll() if the designated constraints aren't met. +type RouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteMultiError) AllErrors() []error { return m } + +// RouteValidationError is the validation error returned by Route.Validate if +// the designated constraints aren't met. +type RouteValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RouteValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RouteValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RouteValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RouteValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RouteValidationError) ErrorName() string { return "RouteValidationError" } + +// Error satisfies the builtin error interface +func (e RouteValidationError) 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 %sRoute.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RouteValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RouteValidationError{} + +// Validate checks the field values on RouteMatch 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 *RouteMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteMatch 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 RouteMatchMultiError, or +// nil if none found. +func (m *RouteMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteMatch) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Invert + + for idx, item := range m.GetHeaders() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteMatchValidationError{ + field: fmt.Sprintf("Headers[%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 RouteMatchValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + switch m.MatchSpecifier.(type) { + + case *RouteMatch_MethodName: + // no validation rules for MethodName + + case *RouteMatch_ServiceName: + // no validation rules for ServiceName + + default: + err := RouteMatchValidationError{ + field: "MatchSpecifier", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return RouteMatchMultiError(errors) + } + return nil +} + +// RouteMatchMultiError is an error wrapping multiple validation errors +// returned by RouteMatch.ValidateAll() if the designated constraints aren't met. +type RouteMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteMatchMultiError) AllErrors() []error { return m } + +// RouteMatchValidationError is the validation error returned by +// RouteMatch.Validate if the designated constraints aren't met. +type RouteMatchValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RouteMatchValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RouteMatchValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RouteMatchValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RouteMatchValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RouteMatchValidationError) ErrorName() string { return "RouteMatchValidationError" } + +// Error satisfies the builtin error interface +func (e RouteMatchValidationError) 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 %sRouteMatch.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RouteMatchValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RouteMatchValidationError{} + +// Validate checks the field values on RouteAction 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 *RouteAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction 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 RouteActionMultiError, or +// nil if none found. +func (m *RouteAction) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetMetadataMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteActionValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetRateLimits() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("RateLimits[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("RateLimits[%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 RouteActionValidationError{ + field: fmt.Sprintf("RateLimits[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for StripServiceName + + for idx, item := range m.GetRequestMirrorPolicies() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: fmt.Sprintf("RequestMirrorPolicies[%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 RouteActionValidationError{ + field: fmt.Sprintf("RequestMirrorPolicies[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + switch m.ClusterSpecifier.(type) { + + case *RouteAction_Cluster: + + if utf8.RuneCountInString(m.GetCluster()) < 1 { + err := RouteActionValidationError{ + field: "Cluster", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *RouteAction_WeightedClusters: + + if all { + switch v := interface{}(m.GetWeightedClusters()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWeightedClusters()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteActionValidationError{ + field: "WeightedClusters", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *RouteAction_ClusterHeader: + + if utf8.RuneCountInString(m.GetClusterHeader()) < 1 { + err := RouteActionValidationError{ + field: "ClusterHeader", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if !_RouteAction_ClusterHeader_Pattern.MatchString(m.GetClusterHeader()) { + err := RouteActionValidationError{ + field: "ClusterHeader", + reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + default: + err := RouteActionValidationError{ + field: "ClusterSpecifier", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return RouteActionMultiError(errors) + } + return nil +} + +// RouteActionMultiError is an error wrapping multiple validation errors +// returned by RouteAction.ValidateAll() if the designated constraints aren't met. +type RouteActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteActionMultiError) AllErrors() []error { return m } + +// RouteActionValidationError is the validation error returned by +// RouteAction.Validate if the designated constraints aren't met. +type RouteActionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RouteActionValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RouteActionValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RouteActionValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RouteActionValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RouteActionValidationError) ErrorName() string { return "RouteActionValidationError" } + +// Error satisfies the builtin error interface +func (e RouteActionValidationError) 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 %sRouteAction.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RouteActionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RouteActionValidationError{} + +var _RouteAction_ClusterHeader_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") + +// Validate checks the field values on WeightedCluster 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 *WeightedCluster) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on WeightedCluster 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 +// WeightedClusterMultiError, or nil if none found. +func (m *WeightedCluster) ValidateAll() error { + return m.validate(true) +} + +func (m *WeightedCluster) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetClusters()) < 1 { + err := WeightedClusterValidationError{ + field: "Clusters", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetClusters() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WeightedClusterValidationError{ + field: fmt.Sprintf("Clusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WeightedClusterValidationError{ + field: fmt.Sprintf("Clusters[%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 WeightedClusterValidationError{ + field: fmt.Sprintf("Clusters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return WeightedClusterMultiError(errors) + } + return nil +} + +// WeightedClusterMultiError is an error wrapping multiple validation errors +// returned by WeightedCluster.ValidateAll() if the designated constraints +// aren't met. +type WeightedClusterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WeightedClusterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WeightedClusterMultiError) AllErrors() []error { return m } + +// WeightedClusterValidationError is the validation error returned by +// WeightedCluster.Validate if the designated constraints aren't met. +type WeightedClusterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e WeightedClusterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e WeightedClusterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e WeightedClusterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e WeightedClusterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e WeightedClusterValidationError) ErrorName() string { return "WeightedClusterValidationError" } + +// Error satisfies the builtin error interface +func (e WeightedClusterValidationError) 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 %sWeightedCluster.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = WeightedClusterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = WeightedClusterValidationError{} + +// Validate checks the field values on RouteAction_RequestMirrorPolicy 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 *RouteAction_RequestMirrorPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RouteAction_RequestMirrorPolicy 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 +// RouteAction_RequestMirrorPolicyMultiError, or nil if none found. +func (m *RouteAction_RequestMirrorPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *RouteAction_RequestMirrorPolicy) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetCluster()) < 1 { + err := RouteAction_RequestMirrorPolicyValidationError{ + field: "Cluster", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetRuntimeFraction()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RouteAction_RequestMirrorPolicyValidationError{ + field: "RuntimeFraction", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RouteAction_RequestMirrorPolicyValidationError{ + field: "RuntimeFraction", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRuntimeFraction()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RouteAction_RequestMirrorPolicyValidationError{ + field: "RuntimeFraction", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RouteAction_RequestMirrorPolicyMultiError(errors) + } + return nil +} + +// RouteAction_RequestMirrorPolicyMultiError is an error wrapping multiple +// validation errors returned by RouteAction_RequestMirrorPolicy.ValidateAll() +// if the designated constraints aren't met. +type RouteAction_RequestMirrorPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteAction_RequestMirrorPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteAction_RequestMirrorPolicyMultiError) AllErrors() []error { return m } + +// RouteAction_RequestMirrorPolicyValidationError is the validation error +// returned by RouteAction_RequestMirrorPolicy.Validate if the designated +// constraints aren't met. +type RouteAction_RequestMirrorPolicyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RouteAction_RequestMirrorPolicyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RouteAction_RequestMirrorPolicyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RouteAction_RequestMirrorPolicyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RouteAction_RequestMirrorPolicyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RouteAction_RequestMirrorPolicyValidationError) ErrorName() string { + return "RouteAction_RequestMirrorPolicyValidationError" +} + +// Error satisfies the builtin error interface +func (e RouteAction_RequestMirrorPolicyValidationError) 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 %sRouteAction_RequestMirrorPolicy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RouteAction_RequestMirrorPolicyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RouteAction_RequestMirrorPolicyValidationError{} + +// Validate checks the field values on WeightedCluster_ClusterWeight 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 *WeightedCluster_ClusterWeight) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on WeightedCluster_ClusterWeight 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 +// WeightedCluster_ClusterWeightMultiError, or nil if none found. +func (m *WeightedCluster_ClusterWeight) ValidateAll() error { + return m.validate(true) +} + +func (m *WeightedCluster_ClusterWeight) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetName()) < 1 { + err := WeightedCluster_ClusterWeightValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if wrapper := m.GetWeight(); wrapper != nil { + + if wrapper.GetValue() < 1 { + err := WeightedCluster_ClusterWeightValidationError{ + field: "Weight", + reason: "value must be greater than or equal to 1", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if all { + switch v := interface{}(m.GetMetadataMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WeightedCluster_ClusterWeightValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return WeightedCluster_ClusterWeightValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return WeightedCluster_ClusterWeightMultiError(errors) + } + return nil +} + +// WeightedCluster_ClusterWeightMultiError is an error wrapping multiple +// validation errors returned by WeightedCluster_ClusterWeight.ValidateAll() +// if the designated constraints aren't met. +type WeightedCluster_ClusterWeightMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WeightedCluster_ClusterWeightMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WeightedCluster_ClusterWeightMultiError) AllErrors() []error { return m } + +// WeightedCluster_ClusterWeightValidationError is the validation error +// returned by WeightedCluster_ClusterWeight.Validate if the designated +// constraints aren't met. +type WeightedCluster_ClusterWeightValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e WeightedCluster_ClusterWeightValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e WeightedCluster_ClusterWeightValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e WeightedCluster_ClusterWeightValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e WeightedCluster_ClusterWeightValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e WeightedCluster_ClusterWeightValidationError) ErrorName() string { + return "WeightedCluster_ClusterWeightValidationError" +} + +// Error satisfies the builtin error interface +func (e WeightedCluster_ClusterWeightValidationError) 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 %sWeightedCluster_ClusterWeight.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = WeightedCluster_ClusterWeightValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = WeightedCluster_ClusterWeightValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.pb.go new file mode 100644 index 0000000000000..6778bad25a39b --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.pb.go @@ -0,0 +1,800 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.proto + +package thrift_proxyv3 + +import ( + _ "github.com/cilium/proxy/go/envoy/annotations" + v31 "github.com/cilium/proxy/go/envoy/config/accesslog/v3" + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Thrift transport types supported by Envoy. +type TransportType int32 + +const ( + // For downstream connections, the Thrift proxy will attempt to determine which transport to use. + // For upstream connections, the Thrift proxy will use same transport as the downstream + // connection. + TransportType_AUTO_TRANSPORT TransportType = 0 + // The Thrift proxy will use the Thrift framed transport. + TransportType_FRAMED TransportType = 1 + // The Thrift proxy will use the Thrift unframed transport. + TransportType_UNFRAMED TransportType = 2 + // The Thrift proxy will assume the client is using the Thrift header transport. + TransportType_HEADER TransportType = 3 +) + +// Enum value maps for TransportType. +var ( + TransportType_name = map[int32]string{ + 0: "AUTO_TRANSPORT", + 1: "FRAMED", + 2: "UNFRAMED", + 3: "HEADER", + } + TransportType_value = map[string]int32{ + "AUTO_TRANSPORT": 0, + "FRAMED": 1, + "UNFRAMED": 2, + "HEADER": 3, + } +) + +func (x TransportType) Enum() *TransportType { + p := new(TransportType) + *p = x + return p +} + +func (x TransportType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TransportType) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_enumTypes[0].Descriptor() +} + +func (TransportType) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_enumTypes[0] +} + +func (x TransportType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TransportType.Descriptor instead. +func (TransportType) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDescGZIP(), []int{0} +} + +// Thrift Protocol types supported by Envoy. +type ProtocolType int32 + +const ( + // For downstream connections, the Thrift proxy will attempt to determine which protocol to use. + // Note that the older, non-strict (or lax) binary protocol is not included in automatic protocol + // detection. For upstream connections, the Thrift proxy will use the same protocol as the + // downstream connection. + ProtocolType_AUTO_PROTOCOL ProtocolType = 0 + // The Thrift proxy will use the Thrift binary protocol. + ProtocolType_BINARY ProtocolType = 1 + // The Thrift proxy will use Thrift non-strict binary protocol. + ProtocolType_LAX_BINARY ProtocolType = 2 + // The Thrift proxy will use the Thrift compact protocol. + ProtocolType_COMPACT ProtocolType = 3 + // The Thrift proxy will use the Thrift "Twitter" protocol implemented by the finagle library. + // + // Deprecated: Do not use. + ProtocolType_TWITTER ProtocolType = 4 +) + +// Enum value maps for ProtocolType. +var ( + ProtocolType_name = map[int32]string{ + 0: "AUTO_PROTOCOL", + 1: "BINARY", + 2: "LAX_BINARY", + 3: "COMPACT", + 4: "TWITTER", + } + ProtocolType_value = map[string]int32{ + "AUTO_PROTOCOL": 0, + "BINARY": 1, + "LAX_BINARY": 2, + "COMPACT": 3, + "TWITTER": 4, + } +) + +func (x ProtocolType) Enum() *ProtocolType { + p := new(ProtocolType) + *p = x + return p +} + +func (x ProtocolType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ProtocolType) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_enumTypes[1].Descriptor() +} + +func (ProtocolType) Type() protoreflect.EnumType { + return &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_enumTypes[1] +} + +func (x ProtocolType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ProtocolType.Descriptor instead. +func (ProtocolType) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDescGZIP(), []int{1} +} + +type Trds struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Configuration source specifier. + // In case of “api_config_source“ only aggregated “api_type“ is supported. + ConfigSource *v3.ConfigSource `protobuf:"bytes,1,opt,name=config_source,json=configSource,proto3" json:"config_source,omitempty"` + // The name of the route configuration. This allows to use different route + // configurations. Tells which route configuration should be fetched from the configuration source. + // Leave unspecified is also valid and means the unnamed route configuration. + RouteConfigName string `protobuf:"bytes,2,opt,name=route_config_name,json=routeConfigName,proto3" json:"route_config_name,omitempty"` +} + +func (x *Trds) Reset() { + *x = Trds{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Trds) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Trds) ProtoMessage() {} + +func (x *Trds) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Trds.ProtoReflect.Descriptor instead. +func (*Trds) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDescGZIP(), []int{0} +} + +func (x *Trds) GetConfigSource() *v3.ConfigSource { + if x != nil { + return x.ConfigSource + } + return nil +} + +func (x *Trds) GetRouteConfigName() string { + if x != nil { + return x.RouteConfigName + } + return "" +} + +// [#next-free-field: 11] +type ThriftProxy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Supplies the type of transport that the Thrift proxy should use. Defaults to + // :ref:`AUTO_TRANSPORT`. + Transport TransportType `protobuf:"varint,2,opt,name=transport,proto3,enum=envoy.extensions.filters.network.thrift_proxy.v3.TransportType" json:"transport,omitempty"` + // Supplies the type of protocol that the Thrift proxy should use. Defaults to + // :ref:`AUTO_PROTOCOL`. + Protocol ProtocolType `protobuf:"varint,3,opt,name=protocol,proto3,enum=envoy.extensions.filters.network.thrift_proxy.v3.ProtocolType" json:"protocol,omitempty"` + // The human readable prefix to use when emitting statistics. + StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` + // The route table for the connection manager is static and is specified in this property. + // It is invalid to define both “route_config“ and “trds“. + RouteConfig *RouteConfiguration `protobuf:"bytes,4,opt,name=route_config,json=routeConfig,proto3" json:"route_config,omitempty"` + // Use xDS to fetch the route configuration. It is invalid to define both “route_config“ and “trds“. + Trds *Trds `protobuf:"bytes,8,opt,name=trds,proto3" json:"trds,omitempty"` + // A list of individual Thrift filters that make up the filter chain for requests made to the + // Thrift proxy. Order matters as the filters are processed sequentially. For backwards + // compatibility, if no thrift_filters are specified, a default Thrift router filter + // (“envoy.filters.thrift.router“) is used. + // [#extension-category: envoy.thrift_proxy.filters] + ThriftFilters []*ThriftFilter `protobuf:"bytes,5,rep,name=thrift_filters,json=thriftFilters,proto3" json:"thrift_filters,omitempty"` + // If set to true, Envoy will try to skip decode data after metadata in the Thrift message. + // This mode will only work if the upstream and downstream protocols are the same and the transports + // are Framed or Header, and the protocol is not Twitter. Otherwise Envoy will + // fallback to decode the data. + PayloadPassthrough bool `protobuf:"varint,6,opt,name=payload_passthrough,json=payloadPassthrough,proto3" json:"payload_passthrough,omitempty"` + // Optional maximum requests for a single downstream connection. If not specified, there is no limit. + MaxRequestsPerConnection *wrapperspb.UInt32Value `protobuf:"bytes,7,opt,name=max_requests_per_connection,json=maxRequestsPerConnection,proto3" json:"max_requests_per_connection,omitempty"` + // Configuration for :ref:`access logs ` + // emitted by Thrift proxy. + AccessLog []*v31.AccessLog `protobuf:"bytes,9,rep,name=access_log,json=accessLog,proto3" json:"access_log,omitempty"` + // If set to true, Envoy will preserve the case of Thrift header keys instead of serializing them to + // lower case as per the default behavior. Note that NUL, CR and LF characters will also be preserved + // as mandated by the Thrift spec. + // + // More info: https://github.com/apache/thrift/commit/e165fa3c85d00cb984f4d9635ed60909a1266ce1. + HeaderKeysPreserveCase bool `protobuf:"varint,10,opt,name=header_keys_preserve_case,json=headerKeysPreserveCase,proto3" json:"header_keys_preserve_case,omitempty"` +} + +func (x *ThriftProxy) Reset() { + *x = ThriftProxy{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ThriftProxy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ThriftProxy) ProtoMessage() {} + +func (x *ThriftProxy) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ThriftProxy.ProtoReflect.Descriptor instead. +func (*ThriftProxy) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDescGZIP(), []int{1} +} + +func (x *ThriftProxy) GetTransport() TransportType { + if x != nil { + return x.Transport + } + return TransportType_AUTO_TRANSPORT +} + +func (x *ThriftProxy) GetProtocol() ProtocolType { + if x != nil { + return x.Protocol + } + return ProtocolType_AUTO_PROTOCOL +} + +func (x *ThriftProxy) GetStatPrefix() string { + if x != nil { + return x.StatPrefix + } + return "" +} + +func (x *ThriftProxy) GetRouteConfig() *RouteConfiguration { + if x != nil { + return x.RouteConfig + } + return nil +} + +func (x *ThriftProxy) GetTrds() *Trds { + if x != nil { + return x.Trds + } + return nil +} + +func (x *ThriftProxy) GetThriftFilters() []*ThriftFilter { + if x != nil { + return x.ThriftFilters + } + return nil +} + +func (x *ThriftProxy) GetPayloadPassthrough() bool { + if x != nil { + return x.PayloadPassthrough + } + return false +} + +func (x *ThriftProxy) GetMaxRequestsPerConnection() *wrapperspb.UInt32Value { + if x != nil { + return x.MaxRequestsPerConnection + } + return nil +} + +func (x *ThriftProxy) GetAccessLog() []*v31.AccessLog { + if x != nil { + return x.AccessLog + } + return nil +} + +func (x *ThriftProxy) GetHeaderKeysPreserveCase() bool { + if x != nil { + return x.HeaderKeysPreserveCase + } + return false +} + +// ThriftFilter configures a Thrift filter. +type ThriftFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the filter to instantiate. The name must match a supported + // filter. The built-in filters are: + // + // [#comment:TODO(zuercher): Auto generate the following list] + // * :ref:`envoy.filters.thrift.router ` + // * :ref:`envoy.filters.thrift.rate_limit ` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Filter specific configuration which depends on the filter being instantiated. See the supported + // filters for further documentation. + // + // Types that are assignable to ConfigType: + // + // *ThriftFilter_TypedConfig + ConfigType isThriftFilter_ConfigType `protobuf_oneof:"config_type"` +} + +func (x *ThriftFilter) Reset() { + *x = ThriftFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ThriftFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ThriftFilter) ProtoMessage() {} + +func (x *ThriftFilter) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ThriftFilter.ProtoReflect.Descriptor instead. +func (*ThriftFilter) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDescGZIP(), []int{2} +} + +func (x *ThriftFilter) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (m *ThriftFilter) GetConfigType() isThriftFilter_ConfigType { + if m != nil { + return m.ConfigType + } + return nil +} + +func (x *ThriftFilter) GetTypedConfig() *anypb.Any { + if x, ok := x.GetConfigType().(*ThriftFilter_TypedConfig); ok { + return x.TypedConfig + } + return nil +} + +type isThriftFilter_ConfigType interface { + isThriftFilter_ConfigType() +} + +type ThriftFilter_TypedConfig struct { + TypedConfig *anypb.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"` +} + +func (*ThriftFilter_TypedConfig) isThriftFilter_ConfigType() {} + +// ThriftProtocolOptions specifies Thrift upstream protocol options. This object is used in +// in +// :ref:`typed_extension_protocol_options`, +// keyed by the name “envoy.filters.network.thrift_proxy“. +type ThriftProtocolOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Supplies the type of transport that the Thrift proxy should use for upstream connections. + // Selecting + // :ref:`AUTO_TRANSPORT`, + // which is the default, causes the proxy to use the same transport as the downstream connection. + Transport TransportType `protobuf:"varint,1,opt,name=transport,proto3,enum=envoy.extensions.filters.network.thrift_proxy.v3.TransportType" json:"transport,omitempty"` + // Supplies the type of protocol that the Thrift proxy should use for upstream connections. + // Selecting + // :ref:`AUTO_PROTOCOL`, + // which is the default, causes the proxy to use the same protocol as the downstream connection. + Protocol ProtocolType `protobuf:"varint,2,opt,name=protocol,proto3,enum=envoy.extensions.filters.network.thrift_proxy.v3.ProtocolType" json:"protocol,omitempty"` +} + +func (x *ThriftProtocolOptions) Reset() { + *x = ThriftProtocolOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ThriftProtocolOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ThriftProtocolOptions) ProtoMessage() {} + +func (x *ThriftProtocolOptions) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ThriftProtocolOptions.ProtoReflect.Descriptor instead. +func (*ThriftProtocolOptions) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDescGZIP(), []int{3} +} + +func (x *ThriftProtocolOptions) GetTransport() TransportType { + if x != nil { + return x.Transport + } + return TransportType_AUTO_TRANSPORT +} + +func (x *ThriftProtocolOptions) GetProtocol() ProtocolType { + if x != nil { + return x.Protocol + } + return ProtocolType_AUTO_PROTOCOL +} + +var File_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDesc = []byte{ + 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x76, 0x33, 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2f, + 0x76, 0x33, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3c, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x74, + 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x72, + 0x6f, 0x75, 0x74, 0x65, 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, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, + 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0x85, 0x01, 0x0a, 0x04, 0x54, 0x72, 0x64, 0x73, 0x12, 0x51, + 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, + 0x02, 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xa9, 0x07, + 0x0a, 0x0b, 0x54, 0x68, 0x72, 0x69, 0x66, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x67, 0x0a, + 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x64, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, + 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, + 0x10, 0x01, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x28, 0x0a, 0x0b, + 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, + 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x80, 0x01, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, + 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x17, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x11, 0x12, 0x0f, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0b, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x63, 0x0a, 0x04, 0x74, 0x72, 0x64, + 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, + 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x64, 0x73, 0x42, + 0x17, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x11, 0x12, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x04, 0x74, 0x72, 0x64, 0x73, 0x12, 0x65, + 0x0a, 0x0e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x68, 0x72, 0x69, 0x66, 0x74, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0d, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2f, 0x0a, 0x13, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x5f, 0x70, 0x61, 0x73, 0x73, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x12, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x61, 0x73, 0x73, 0x74, + 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x12, 0x5b, 0x0a, 0x1b, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, + 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x18, 0x6d, 0x61, 0x78, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x50, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, + 0x67, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, + 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x09, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x39, 0x0a, 0x19, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x5f, 0x63, 0x61, 0x73, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x73, 0x50, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x43, + 0x61, 0x73, 0x65, 0x3a, 0x44, 0x9a, 0xc5, 0x88, 0x1e, 0x3f, 0x0a, 0x3d, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x68, + 0x72, 0x69, 0x66, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x22, 0xca, 0x01, 0x0a, 0x0c, 0x54, 0x68, + 0x72, 0x69, 0x66, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, + 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x3a, 0x45, 0x9a, 0xc5, 0x88, 0x1e, 0x40, 0x0a, 0x3e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x68, 0x72, + 0x69, 0x66, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xb6, 0x02, 0x0a, 0x15, 0x54, 0x68, 0x72, 0x69, 0x66, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x67, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x64, 0x0a, 0x08, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x74, + 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x3a, + 0x4e, 0x9a, 0xc5, 0x88, 0x1e, 0x49, 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x68, 0x72, 0x69, 0x66, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2a, + 0x49, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x50, 0x4f, + 0x52, 0x54, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x52, 0x41, 0x4d, 0x45, 0x44, 0x10, 0x01, + 0x12, 0x0c, 0x0a, 0x08, 0x55, 0x4e, 0x46, 0x52, 0x41, 0x4d, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0a, + 0x0a, 0x06, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x64, 0x0a, 0x0c, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x55, + 0x54, 0x4f, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x10, 0x00, 0x12, 0x0a, 0x0a, + 0x06, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x41, 0x58, + 0x5f, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x4d, + 0x50, 0x41, 0x43, 0x54, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x57, 0x49, 0x54, 0x54, 0x45, + 0x52, 0x10, 0x04, 0x1a, 0x0b, 0x08, 0x01, 0x8a, 0xf4, 0x9b, 0xb3, 0x05, 0x03, 0x33, 0x2e, 0x30, + 0x42, 0xc4, 0x01, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2e, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x76, 0x33, 0x42, 0x10, 0x54, 0x68, 0x72, 0x69, 0x66, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x2f, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, + 0x3b, 0x74, 0x68, 0x72, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDescData = file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDesc +) + +func file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDescData +} + +var file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_goTypes = []interface{}{ + (TransportType)(0), // 0: envoy.extensions.filters.network.thrift_proxy.v3.TransportType + (ProtocolType)(0), // 1: envoy.extensions.filters.network.thrift_proxy.v3.ProtocolType + (*Trds)(nil), // 2: envoy.extensions.filters.network.thrift_proxy.v3.Trds + (*ThriftProxy)(nil), // 3: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProxy + (*ThriftFilter)(nil), // 4: envoy.extensions.filters.network.thrift_proxy.v3.ThriftFilter + (*ThriftProtocolOptions)(nil), // 5: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProtocolOptions + (*v3.ConfigSource)(nil), // 6: envoy.config.core.v3.ConfigSource + (*RouteConfiguration)(nil), // 7: envoy.extensions.filters.network.thrift_proxy.v3.RouteConfiguration + (*wrapperspb.UInt32Value)(nil), // 8: google.protobuf.UInt32Value + (*v31.AccessLog)(nil), // 9: envoy.config.accesslog.v3.AccessLog + (*anypb.Any)(nil), // 10: google.protobuf.Any +} +var file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_depIdxs = []int32{ + 6, // 0: envoy.extensions.filters.network.thrift_proxy.v3.Trds.config_source:type_name -> envoy.config.core.v3.ConfigSource + 0, // 1: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProxy.transport:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.TransportType + 1, // 2: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProxy.protocol:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.ProtocolType + 7, // 3: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProxy.route_config:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.RouteConfiguration + 2, // 4: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProxy.trds:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.Trds + 4, // 5: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProxy.thrift_filters:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.ThriftFilter + 8, // 6: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProxy.max_requests_per_connection:type_name -> google.protobuf.UInt32Value + 9, // 7: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProxy.access_log:type_name -> envoy.config.accesslog.v3.AccessLog + 10, // 8: envoy.extensions.filters.network.thrift_proxy.v3.ThriftFilter.typed_config:type_name -> google.protobuf.Any + 0, // 9: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProtocolOptions.transport:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.TransportType + 1, // 10: envoy.extensions.filters.network.thrift_proxy.v3.ThriftProtocolOptions.protocol:type_name -> envoy.extensions.filters.network.thrift_proxy.v3.ProtocolType + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_init() } +func file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_init() { + if File_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto != nil { + return + } + file_envoy_extensions_filters_network_thrift_proxy_v3_route_proto_init() + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Trds); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ThriftProxy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ThriftFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ThriftProtocolOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*ThriftFilter_TypedConfig)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDesc, + NumEnums: 2, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_depIdxs, + EnumInfos: file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_enumTypes, + MessageInfos: file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto = out.File + file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_rawDesc = nil + file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_goTypes = nil + file_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.pb.validate.go new file mode 100644 index 0000000000000..6ffd84f377b75 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.pb.validate.go @@ -0,0 +1,732 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.proto + +package thrift_proxyv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Trds 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 *Trds) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Trds 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 TrdsMultiError, or nil if none found. +func (m *Trds) ValidateAll() error { + return m.validate(true) +} + +func (m *Trds) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetConfigSource() == nil { + err := TrdsValidationError{ + field: "ConfigSource", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetConfigSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TrdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TrdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfigSource()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TrdsValidationError{ + field: "ConfigSource", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for RouteConfigName + + if len(errors) > 0 { + return TrdsMultiError(errors) + } + return nil +} + +// TrdsMultiError is an error wrapping multiple validation errors returned by +// Trds.ValidateAll() if the designated constraints aren't met. +type TrdsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TrdsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TrdsMultiError) AllErrors() []error { return m } + +// TrdsValidationError is the validation error returned by Trds.Validate if the +// designated constraints aren't met. +type TrdsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TrdsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TrdsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TrdsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TrdsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TrdsValidationError) ErrorName() string { return "TrdsValidationError" } + +// Error satisfies the builtin error interface +func (e TrdsValidationError) 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 %sTrds.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TrdsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TrdsValidationError{} + +// Validate checks the field values on ThriftProxy 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 *ThriftProxy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ThriftProxy 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 ThriftProxyMultiError, or +// nil if none found. +func (m *ThriftProxy) ValidateAll() error { + return m.validate(true) +} + +func (m *ThriftProxy) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if _, ok := TransportType_name[int32(m.GetTransport())]; !ok { + err := ThriftProxyValidationError{ + field: "Transport", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := ProtocolType_name[int32(m.GetProtocol())]; !ok { + err := ThriftProxyValidationError{ + field: "Protocol", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { + err := ThriftProxyValidationError{ + field: "StatPrefix", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetRouteConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ThriftProxyValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ThriftProxyValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ThriftProxyValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetTrds()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ThriftProxyValidationError{ + field: "Trds", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ThriftProxyValidationError{ + field: "Trds", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTrds()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ThriftProxyValidationError{ + field: "Trds", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetThriftFilters() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ThriftProxyValidationError{ + field: fmt.Sprintf("ThriftFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ThriftProxyValidationError{ + field: fmt.Sprintf("ThriftFilters[%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 ThriftProxyValidationError{ + field: fmt.Sprintf("ThriftFilters[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for PayloadPassthrough + + if all { + switch v := interface{}(m.GetMaxRequestsPerConnection()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ThriftProxyValidationError{ + field: "MaxRequestsPerConnection", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ThriftProxyValidationError{ + field: "MaxRequestsPerConnection", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxRequestsPerConnection()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ThriftProxyValidationError{ + field: "MaxRequestsPerConnection", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetAccessLog() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ThriftProxyValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ThriftProxyValidationError{ + field: fmt.Sprintf("AccessLog[%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 ThriftProxyValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for HeaderKeysPreserveCase + + if len(errors) > 0 { + return ThriftProxyMultiError(errors) + } + return nil +} + +// ThriftProxyMultiError is an error wrapping multiple validation errors +// returned by ThriftProxy.ValidateAll() if the designated constraints aren't met. +type ThriftProxyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ThriftProxyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ThriftProxyMultiError) AllErrors() []error { return m } + +// ThriftProxyValidationError is the validation error returned by +// ThriftProxy.Validate if the designated constraints aren't met. +type ThriftProxyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ThriftProxyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ThriftProxyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ThriftProxyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ThriftProxyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ThriftProxyValidationError) ErrorName() string { return "ThriftProxyValidationError" } + +// Error satisfies the builtin error interface +func (e ThriftProxyValidationError) 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 %sThriftProxy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ThriftProxyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ThriftProxyValidationError{} + +// Validate checks the field values on ThriftFilter 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 *ThriftFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ThriftFilter 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 ThriftFilterMultiError, or +// nil if none found. +func (m *ThriftFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *ThriftFilter) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetName()) < 1 { + err := ThriftFilterValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + switch m.ConfigType.(type) { + + case *ThriftFilter_TypedConfig: + + if all { + switch v := interface{}(m.GetTypedConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ThriftFilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ThriftFilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ThriftFilterValidationError{ + field: "TypedConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ThriftFilterMultiError(errors) + } + return nil +} + +// ThriftFilterMultiError is an error wrapping multiple validation errors +// returned by ThriftFilter.ValidateAll() if the designated constraints aren't met. +type ThriftFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ThriftFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ThriftFilterMultiError) AllErrors() []error { return m } + +// ThriftFilterValidationError is the validation error returned by +// ThriftFilter.Validate if the designated constraints aren't met. +type ThriftFilterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ThriftFilterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ThriftFilterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ThriftFilterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ThriftFilterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ThriftFilterValidationError) ErrorName() string { return "ThriftFilterValidationError" } + +// Error satisfies the builtin error interface +func (e ThriftFilterValidationError) 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 %sThriftFilter.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ThriftFilterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ThriftFilterValidationError{} + +// Validate checks the field values on ThriftProtocolOptions 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 *ThriftProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ThriftProtocolOptions 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 +// ThriftProtocolOptionsMultiError, or nil if none found. +func (m *ThriftProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *ThriftProtocolOptions) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if _, ok := TransportType_name[int32(m.GetTransport())]; !ok { + err := ThriftProtocolOptionsValidationError{ + field: "Transport", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := ProtocolType_name[int32(m.GetProtocol())]; !ok { + err := ThriftProtocolOptionsValidationError{ + field: "Protocol", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return ThriftProtocolOptionsMultiError(errors) + } + return nil +} + +// ThriftProtocolOptionsMultiError is an error wrapping multiple validation +// errors returned by ThriftProtocolOptions.ValidateAll() if the designated +// constraints aren't met. +type ThriftProtocolOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ThriftProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ThriftProtocolOptionsMultiError) AllErrors() []error { return m } + +// ThriftProtocolOptionsValidationError is the validation error returned by +// ThriftProtocolOptions.Validate if the designated constraints aren't met. +type ThriftProtocolOptionsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ThriftProtocolOptionsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ThriftProtocolOptionsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ThriftProtocolOptionsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ThriftProtocolOptionsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ThriftProtocolOptionsValidationError) ErrorName() string { + return "ThriftProtocolOptionsValidationError" +} + +// Error satisfies the builtin error interface +func (e ThriftProtocolOptionsValidationError) 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 %sThriftProtocolOptions.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ThriftProtocolOptionsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ThriftProtocolOptionsValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/wasm/v3/wasm.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/wasm/v3/wasm.pb.go new file mode 100644 index 0000000000000..300c28f89530a --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/wasm/v3/wasm.pb.go @@ -0,0 +1,172 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/wasm/v3/wasm.proto + +package wasmv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/extensions/wasm/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Wasm struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // General Plugin configuration. + Config *v3.PluginConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *Wasm) Reset() { + *x = Wasm{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_wasm_v3_wasm_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Wasm) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Wasm) ProtoMessage() {} + +func (x *Wasm) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_wasm_v3_wasm_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Wasm.ProtoReflect.Descriptor instead. +func (*Wasm) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_wasm_v3_wasm_proto_rawDescGZIP(), []int{0} +} + +func (x *Wasm) GetConfig() *v3.PluginConfig { + if x != nil { + return x.Config + } + return nil +} + +var File_envoy_extensions_filters_network_wasm_v3_wasm_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_wasm_v3_wasm_proto_rawDesc = []byte{ + 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2f, 0x76, 0x33, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x1a, + 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2f, 0x76, 0x33, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x46, 0x0a, 0x04, 0x57, 0x61, 0x73, 0x6d, 0x12, 0x3e, 0x0a, 0x06, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, + 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xa5, 0x01, 0x0a, 0x36, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x77, + 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x57, 0x61, 0x73, 0x6d, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x56, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x77, 0x61, 0x73, + 0x6d, 0x2f, 0x76, 0x33, 0x3b, 0x77, 0x61, 0x73, 0x6d, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_network_wasm_v3_wasm_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_wasm_v3_wasm_proto_rawDescData = file_envoy_extensions_filters_network_wasm_v3_wasm_proto_rawDesc +) + +func file_envoy_extensions_filters_network_wasm_v3_wasm_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_wasm_v3_wasm_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_wasm_v3_wasm_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_wasm_v3_wasm_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_wasm_v3_wasm_proto_rawDescData +} + +var file_envoy_extensions_filters_network_wasm_v3_wasm_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_network_wasm_v3_wasm_proto_goTypes = []interface{}{ + (*Wasm)(nil), // 0: envoy.extensions.filters.network.wasm.v3.Wasm + (*v3.PluginConfig)(nil), // 1: envoy.extensions.wasm.v3.PluginConfig +} +var file_envoy_extensions_filters_network_wasm_v3_wasm_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.network.wasm.v3.Wasm.config:type_name -> envoy.extensions.wasm.v3.PluginConfig + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_network_wasm_v3_wasm_proto_init() } +func file_envoy_extensions_filters_network_wasm_v3_wasm_proto_init() { + if File_envoy_extensions_filters_network_wasm_v3_wasm_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_wasm_v3_wasm_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Wasm); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_wasm_v3_wasm_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_wasm_v3_wasm_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_wasm_v3_wasm_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_network_wasm_v3_wasm_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_wasm_v3_wasm_proto = out.File + file_envoy_extensions_filters_network_wasm_v3_wasm_proto_rawDesc = nil + file_envoy_extensions_filters_network_wasm_v3_wasm_proto_goTypes = nil + file_envoy_extensions_filters_network_wasm_v3_wasm_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/wasm/v3/wasm.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/wasm/v3/wasm.pb.validate.go new file mode 100644 index 0000000000000..dffaedecd6aed --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/wasm/v3/wasm.pb.validate.go @@ -0,0 +1,162 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/wasm/v3/wasm.proto + +package wasmv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Wasm 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 *Wasm) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Wasm 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 WasmMultiError, or nil if none found. +func (m *Wasm) ValidateAll() error { + return m.validate(true) +} + +func (m *Wasm) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WasmValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WasmValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return WasmValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return WasmMultiError(errors) + } + return nil +} + +// WasmMultiError is an error wrapping multiple validation errors returned by +// Wasm.ValidateAll() if the designated constraints aren't met. +type WasmMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WasmMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WasmMultiError) AllErrors() []error { return m } + +// WasmValidationError is the validation error returned by Wasm.Validate if the +// designated constraints aren't met. +type WasmValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e WasmValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e WasmValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e WasmValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e WasmValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e WasmValidationError) ErrorName() string { return "WasmValidationError" } + +// Error satisfies the builtin error interface +func (e WasmValidationError) 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 %sWasm.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = WasmValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = WasmValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.pb.go new file mode 100644 index 0000000000000..5306bb9d100a8 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.pb.go @@ -0,0 +1,219 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.proto + +package zookeeper_proxyv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type ZooKeeperProxy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The human readable prefix to use when emitting :ref:`statistics + // `. + StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` + // [#not-implemented-hide:] The optional path to use for writing ZooKeeper access logs. + // If the access log field is empty, access logs will not be written. + AccessLog string `protobuf:"bytes,2,opt,name=access_log,json=accessLog,proto3" json:"access_log,omitempty"` + // Messages — requests, responses and events — that are bigger than this value will + // be ignored. If it is not set, the default value is 1Mb. + // + // The value here should match the jute.maxbuffer property in your cluster configuration: + // + // https://zookeeper.apache.org/doc/r3.4.10/zookeeperAdmin.html#Unsafe+Options + // + // if that is set. If it isn't, ZooKeeper's default is also 1Mb. + MaxPacketBytes *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=max_packet_bytes,json=maxPacketBytes,proto3" json:"max_packet_bytes,omitempty"` +} + +func (x *ZooKeeperProxy) Reset() { + *x = ZooKeeperProxy{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ZooKeeperProxy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ZooKeeperProxy) ProtoMessage() {} + +func (x *ZooKeeperProxy) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ZooKeeperProxy.ProtoReflect.Descriptor instead. +func (*ZooKeeperProxy) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_rawDescGZIP(), []int{0} +} + +func (x *ZooKeeperProxy) GetStatPrefix() string { + if x != nil { + return x.StatPrefix + } + return "" +} + +func (x *ZooKeeperProxy) GetAccessLog() string { + if x != nil { + return x.AccessLog + } + return "" +} + +func (x *ZooKeeperProxy) GetMaxPacketBytes() *wrapperspb.UInt32Value { + if x != nil { + return x.MaxPacketBytes + } + return nil +} + +var File_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_rawDesc = []byte{ + 0x0a, 0x49, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x7a, 0x6f, 0x6f, 0x6b, 0x65, 0x65, 0x70, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x7a, 0x6f, 0x6f, 0x6b, 0x65, 0x65, 0x70, 0x65, 0x72, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x33, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x7a, 0x6f, + 0x6f, 0x6b, 0x65, 0x65, 0x70, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, + 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0xed, 0x01, 0x0a, 0x0e, + 0x5a, 0x6f, 0x6f, 0x4b, 0x65, 0x65, 0x70, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x28, + 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, + 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x46, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x70, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x0e, 0x6d, 0x61, 0x78, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x3a, + 0x4a, 0x9a, 0xc5, 0x88, 0x1e, 0x45, 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2e, 0x7a, 0x6f, 0x6f, 0x6b, 0x65, 0x65, 0x70, 0x65, 0x72, 0x5f, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x5a, 0x6f, 0x6f, + 0x4b, 0x65, 0x65, 0x70, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x42, 0xd0, 0x01, 0x0a, 0x41, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x7a, + 0x6f, 0x6f, 0x6b, 0x65, 0x65, 0x70, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, + 0x33, 0x42, 0x13, 0x5a, 0x6f, 0x6f, 0x6b, 0x65, 0x65, 0x70, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2f, 0x7a, 0x6f, 0x6f, 0x6b, 0x65, 0x65, 0x70, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x7a, 0x6f, 0x6f, 0x6b, 0x65, 0x65, 0x70, 0x65, 0x72, 0x5f, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_rawDescData = file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_rawDesc +) + +func file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_rawDescData) + }) + return file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_rawDescData +} + +var file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_goTypes = []interface{}{ + (*ZooKeeperProxy)(nil), // 0: envoy.extensions.filters.network.zookeeper_proxy.v3.ZooKeeperProxy + (*wrapperspb.UInt32Value)(nil), // 1: google.protobuf.UInt32Value +} +var file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.network.zookeeper_proxy.v3.ZooKeeperProxy.max_packet_bytes:type_name -> google.protobuf.UInt32Value + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_init() } +func file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_init() { + if File_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ZooKeeperProxy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto = out.File + file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_rawDesc = nil + file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_goTypes = nil + file_envoy_extensions_filters_network_zookeeper_proxy_v3_zookeeper_proxy_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.pb.validate.go new file mode 100644 index 0000000000000..fe4761533c934 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.pb.validate.go @@ -0,0 +1,177 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/network/zookeeper_proxy/v3/zookeeper_proxy.proto + +package zookeeper_proxyv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ZooKeeperProxy 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 *ZooKeeperProxy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ZooKeeperProxy 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 ZooKeeperProxyMultiError, +// or nil if none found. +func (m *ZooKeeperProxy) ValidateAll() error { + return m.validate(true) +} + +func (m *ZooKeeperProxy) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { + err := ZooKeeperProxyValidationError{ + field: "StatPrefix", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for AccessLog + + if all { + switch v := interface{}(m.GetMaxPacketBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ZooKeeperProxyValidationError{ + field: "MaxPacketBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ZooKeeperProxyValidationError{ + field: "MaxPacketBytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxPacketBytes()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ZooKeeperProxyValidationError{ + field: "MaxPacketBytes", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ZooKeeperProxyMultiError(errors) + } + return nil +} + +// ZooKeeperProxyMultiError is an error wrapping multiple validation errors +// returned by ZooKeeperProxy.ValidateAll() if the designated constraints +// aren't met. +type ZooKeeperProxyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ZooKeeperProxyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ZooKeeperProxyMultiError) AllErrors() []error { return m } + +// ZooKeeperProxyValidationError is the validation error returned by +// ZooKeeperProxy.Validate if the designated constraints aren't met. +type ZooKeeperProxyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ZooKeeperProxyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ZooKeeperProxyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ZooKeeperProxyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ZooKeeperProxyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ZooKeeperProxyValidationError) ErrorName() string { return "ZooKeeperProxyValidationError" } + +// Error satisfies the builtin error interface +func (e ZooKeeperProxyValidationError) 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 %sZooKeeperProxy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ZooKeeperProxyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ZooKeeperProxyValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/udp/dns_filter/v3/dns_filter.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/udp/dns_filter/v3/dns_filter.pb.go new file mode 100644 index 0000000000000..3338c147211b2 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/udp/dns_filter/v3/dns_filter.pb.go @@ -0,0 +1,523 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/udp/dns_filter/v3/dns_filter.proto + +package dns_filterv3 + +import ( + _ "github.com/cilium/proxy/go/envoy/annotations" + v31 "github.com/cilium/proxy/go/envoy/config/core/v3" + v3 "github.com/cilium/proxy/go/envoy/data/dns/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for the DNS filter. +type DnsFilterConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The stat prefix used when emitting DNS filter statistics + StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` + // Server context configuration contains the data that the filter uses to respond + // to DNS requests. + ServerConfig *DnsFilterConfig_ServerContextConfig `protobuf:"bytes,2,opt,name=server_config,json=serverConfig,proto3" json:"server_config,omitempty"` + // Client context configuration controls Envoy's behavior when it must use external + // resolvers to answer a query. This object is optional and if omitted instructs + // the filter to resolve queries from the data in the server_config + ClientConfig *DnsFilterConfig_ClientContextConfig `protobuf:"bytes,3,opt,name=client_config,json=clientConfig,proto3" json:"client_config,omitempty"` +} + +func (x *DnsFilterConfig) Reset() { + *x = DnsFilterConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DnsFilterConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DnsFilterConfig) ProtoMessage() {} + +func (x *DnsFilterConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DnsFilterConfig.ProtoReflect.Descriptor instead. +func (*DnsFilterConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDescGZIP(), []int{0} +} + +func (x *DnsFilterConfig) GetStatPrefix() string { + if x != nil { + return x.StatPrefix + } + return "" +} + +func (x *DnsFilterConfig) GetServerConfig() *DnsFilterConfig_ServerContextConfig { + if x != nil { + return x.ServerConfig + } + return nil +} + +func (x *DnsFilterConfig) GetClientConfig() *DnsFilterConfig_ClientContextConfig { + if x != nil { + return x.ClientConfig + } + return nil +} + +// This message contains the configuration for the DNS Filter operating +// in a server context. This message will contain the virtual hosts and +// associated addresses with which Envoy will respond to queries +type DnsFilterConfig_ServerContextConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to ConfigSource: + // + // *DnsFilterConfig_ServerContextConfig_InlineDnsTable + // *DnsFilterConfig_ServerContextConfig_ExternalDnsTable + ConfigSource isDnsFilterConfig_ServerContextConfig_ConfigSource `protobuf_oneof:"config_source"` +} + +func (x *DnsFilterConfig_ServerContextConfig) Reset() { + *x = DnsFilterConfig_ServerContextConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DnsFilterConfig_ServerContextConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DnsFilterConfig_ServerContextConfig) ProtoMessage() {} + +func (x *DnsFilterConfig_ServerContextConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DnsFilterConfig_ServerContextConfig.ProtoReflect.Descriptor instead. +func (*DnsFilterConfig_ServerContextConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDescGZIP(), []int{0, 0} +} + +func (m *DnsFilterConfig_ServerContextConfig) GetConfigSource() isDnsFilterConfig_ServerContextConfig_ConfigSource { + if m != nil { + return m.ConfigSource + } + return nil +} + +func (x *DnsFilterConfig_ServerContextConfig) GetInlineDnsTable() *v3.DnsTable { + if x, ok := x.GetConfigSource().(*DnsFilterConfig_ServerContextConfig_InlineDnsTable); ok { + return x.InlineDnsTable + } + return nil +} + +func (x *DnsFilterConfig_ServerContextConfig) GetExternalDnsTable() *v31.DataSource { + if x, ok := x.GetConfigSource().(*DnsFilterConfig_ServerContextConfig_ExternalDnsTable); ok { + return x.ExternalDnsTable + } + return nil +} + +type isDnsFilterConfig_ServerContextConfig_ConfigSource interface { + isDnsFilterConfig_ServerContextConfig_ConfigSource() +} + +type DnsFilterConfig_ServerContextConfig_InlineDnsTable struct { + // Load the configuration specified from the control plane + InlineDnsTable *v3.DnsTable `protobuf:"bytes,1,opt,name=inline_dns_table,json=inlineDnsTable,proto3,oneof"` +} + +type DnsFilterConfig_ServerContextConfig_ExternalDnsTable struct { + // Seed the filter configuration from an external path. This source + // is a yaml formatted file that contains the DnsTable driving Envoy's + // responses to DNS queries + ExternalDnsTable *v31.DataSource `protobuf:"bytes,2,opt,name=external_dns_table,json=externalDnsTable,proto3,oneof"` +} + +func (*DnsFilterConfig_ServerContextConfig_InlineDnsTable) isDnsFilterConfig_ServerContextConfig_ConfigSource() { +} + +func (*DnsFilterConfig_ServerContextConfig_ExternalDnsTable) isDnsFilterConfig_ServerContextConfig_ConfigSource() { +} + +// This message contains the configuration for the DNS Filter operating +// in a client context. This message will contain the timeouts, retry, +// and forwarding configuration for Envoy to make DNS requests to other +// resolvers +// +// [#next-free-field: 6] +type DnsFilterConfig_ClientContextConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Sets the maximum time we will wait for the upstream query to complete + // We allow 5s for the upstream resolution to complete, so the minimum + // value here is 1. Note that the total latency for a failed query is the + // number of retries multiplied by the resolver_timeout. + ResolverTimeout *durationpb.Duration `protobuf:"bytes,1,opt,name=resolver_timeout,json=resolverTimeout,proto3" json:"resolver_timeout,omitempty"` + // This field was used for `dns_resolution_config` in Envoy 1.19.0 and + // 1.19.1. + // Control planes that need to set this field for Envoy 1.19.0 and + // 1.19.1 clients should fork the protobufs and change the field type + // to `DnsResolutionConfig`. + // Control planes that need to simultaneously support Envoy 1.18.x and + // Envoy 1.19.x should avoid Envoy 1.19.0 and 1.19.1. + // + // [#not-implemented-hide:] + // + // Deprecated: Do not use. + UpstreamResolvers []*v31.Address `protobuf:"bytes,2,rep,name=upstream_resolvers,json=upstreamResolvers,proto3" json:"upstream_resolvers,omitempty"` + // DNS resolution configuration which includes the underlying dns resolver addresses and options. + // This field is deprecated in favor of + // :ref:`typed_dns_resolver_config `. + // + // Deprecated: Do not use. + DnsResolutionConfig *v31.DnsResolutionConfig `protobuf:"bytes,5,opt,name=dns_resolution_config,json=dnsResolutionConfig,proto3" json:"dns_resolution_config,omitempty"` + // DNS resolver type configuration extension. This extension can be used to configure c-ares, apple, + // or any other DNS resolver types and the related parameters. + // For example, an object of + // :ref:`CaresDnsResolverConfig ` + // can be packed into this “typed_dns_resolver_config“. This configuration replaces the + // :ref:`dns_resolution_config ` + // configuration. + // During the transition period when both “dns_resolution_config“ and “typed_dns_resolver_config“ exists, + // when “typed_dns_resolver_config“ is in place, Envoy will use it and ignore “dns_resolution_config“. + // When “typed_dns_resolver_config“ is missing, the default behavior is in place. + // [#extension-category: envoy.network.dns_resolver] + TypedDnsResolverConfig *v31.TypedExtensionConfig `protobuf:"bytes,4,opt,name=typed_dns_resolver_config,json=typedDnsResolverConfig,proto3" json:"typed_dns_resolver_config,omitempty"` + // Controls how many outstanding external lookup contexts the filter tracks. + // The context structure allows the filter to respond to every query even if the external + // resolution times out or is otherwise unsuccessful + MaxPendingLookups uint64 `protobuf:"varint,3,opt,name=max_pending_lookups,json=maxPendingLookups,proto3" json:"max_pending_lookups,omitempty"` +} + +func (x *DnsFilterConfig_ClientContextConfig) Reset() { + *x = DnsFilterConfig_ClientContextConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DnsFilterConfig_ClientContextConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DnsFilterConfig_ClientContextConfig) ProtoMessage() {} + +func (x *DnsFilterConfig_ClientContextConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DnsFilterConfig_ClientContextConfig.ProtoReflect.Descriptor instead. +func (*DnsFilterConfig_ClientContextConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *DnsFilterConfig_ClientContextConfig) GetResolverTimeout() *durationpb.Duration { + if x != nil { + return x.ResolverTimeout + } + return nil +} + +// Deprecated: Do not use. +func (x *DnsFilterConfig_ClientContextConfig) GetUpstreamResolvers() []*v31.Address { + if x != nil { + return x.UpstreamResolvers + } + return nil +} + +// Deprecated: Do not use. +func (x *DnsFilterConfig_ClientContextConfig) GetDnsResolutionConfig() *v31.DnsResolutionConfig { + if x != nil { + return x.DnsResolutionConfig + } + return nil +} + +func (x *DnsFilterConfig_ClientContextConfig) GetTypedDnsResolverConfig() *v31.TypedExtensionConfig { + if x != nil { + return x.TypedDnsResolverConfig + } + return nil +} + +func (x *DnsFilterConfig_ClientContextConfig) GetMaxPendingLookups() uint64 { + if x != nil { + return x.MaxPendingLookups + } + return 0 +} + +var File_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDesc = []byte{ + 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x75, 0x64, 0x70, 0x2f, 0x64, + 0x6e, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x6e, 0x73, + 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x64, 0x6e, 0x73, 0x5f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x64, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x6e, 0x73, + 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xc1, 0x07, 0x0a, 0x0f, 0x44, 0x6e, + 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x28, 0x0a, + 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, + 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x74, 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x64, 0x6e, + 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x74, 0x0a, + 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x75, 0x64, 0x70, 0x2e, 0x64, 0x6e, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x1a, 0xc6, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x47, 0x0a, 0x10, 0x69, + 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x6e, 0x73, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x12, 0x50, 0x0a, 0x12, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x48, 0x00, 0x52, 0x10, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6e, + 0x73, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x14, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xce, 0x03, 0x0a, + 0x13, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x50, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, + 0x04, 0x32, 0x02, 0x08, 0x01, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x54, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x59, 0x0a, 0x12, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x11, + 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, + 0x73, 0x12, 0x6a, 0x0a, 0x15, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0b, 0x18, 0x01, 0x92, + 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x13, 0x64, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x65, 0x0a, + 0x19, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x16, 0x74, 0x79, + 0x70, 0x65, 0x64, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x65, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x28, 0x01, 0x52, 0x11, 0x6d, 0x61, 0x78, 0x50, + 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x73, 0x42, 0xb4, 0x01, + 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x64, 0x6e, 0x73, + 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x44, 0x6e, 0x73, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5e, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x75, 0x64, + 0x70, 0x2f, 0x64, 0x6e, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, + 0x64, 0x6e, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDescData = file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDesc +) + +func file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDescData) + }) + return file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDescData +} + +var file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_goTypes = []interface{}{ + (*DnsFilterConfig)(nil), // 0: envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig + (*DnsFilterConfig_ServerContextConfig)(nil), // 1: envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.ServerContextConfig + (*DnsFilterConfig_ClientContextConfig)(nil), // 2: envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.ClientContextConfig + (*v3.DnsTable)(nil), // 3: envoy.data.dns.v3.DnsTable + (*v31.DataSource)(nil), // 4: envoy.config.core.v3.DataSource + (*durationpb.Duration)(nil), // 5: google.protobuf.Duration + (*v31.Address)(nil), // 6: envoy.config.core.v3.Address + (*v31.DnsResolutionConfig)(nil), // 7: envoy.config.core.v3.DnsResolutionConfig + (*v31.TypedExtensionConfig)(nil), // 8: envoy.config.core.v3.TypedExtensionConfig +} +var file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.server_config:type_name -> envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.ServerContextConfig + 2, // 1: envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.client_config:type_name -> envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.ClientContextConfig + 3, // 2: envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.ServerContextConfig.inline_dns_table:type_name -> envoy.data.dns.v3.DnsTable + 4, // 3: envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.ServerContextConfig.external_dns_table:type_name -> envoy.config.core.v3.DataSource + 5, // 4: envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.ClientContextConfig.resolver_timeout:type_name -> google.protobuf.Duration + 6, // 5: envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.ClientContextConfig.upstream_resolvers:type_name -> envoy.config.core.v3.Address + 7, // 6: envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.ClientContextConfig.dns_resolution_config:type_name -> envoy.config.core.v3.DnsResolutionConfig + 8, // 7: envoy.extensions.filters.udp.dns_filter.v3.DnsFilterConfig.ClientContextConfig.typed_dns_resolver_config:type_name -> envoy.config.core.v3.TypedExtensionConfig + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_init() } +func file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_init() { + if File_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DnsFilterConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DnsFilterConfig_ServerContextConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DnsFilterConfig_ClientContextConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*DnsFilterConfig_ServerContextConfig_InlineDnsTable)(nil), + (*DnsFilterConfig_ServerContextConfig_ExternalDnsTable)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto = out.File + file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_rawDesc = nil + file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_goTypes = nil + file_envoy_extensions_filters_udp_dns_filter_v3_dns_filter_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/udp/dns_filter/v3/dns_filter.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/udp/dns_filter/v3/dns_filter.pb.validate.go new file mode 100644 index 0000000000000..5eb8804c6f75c --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/udp/dns_filter/v3/dns_filter.pb.validate.go @@ -0,0 +1,621 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/udp/dns_filter/v3/dns_filter.proto + +package dns_filterv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on DnsFilterConfig 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 *DnsFilterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsFilterConfig 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 +// DnsFilterConfigMultiError, or nil if none found. +func (m *DnsFilterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsFilterConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { + err := DnsFilterConfigValidationError{ + field: "StatPrefix", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetServerConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsFilterConfigValidationError{ + field: "ServerConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsFilterConfigValidationError{ + field: "ServerConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetServerConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsFilterConfigValidationError{ + field: "ServerConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetClientConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsFilterConfigValidationError{ + field: "ClientConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsFilterConfigValidationError{ + field: "ClientConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetClientConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsFilterConfigValidationError{ + field: "ClientConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return DnsFilterConfigMultiError(errors) + } + return nil +} + +// DnsFilterConfigMultiError is an error wrapping multiple validation errors +// returned by DnsFilterConfig.ValidateAll() if the designated constraints +// aren't met. +type DnsFilterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsFilterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsFilterConfigMultiError) AllErrors() []error { return m } + +// DnsFilterConfigValidationError is the validation error returned by +// DnsFilterConfig.Validate if the designated constraints aren't met. +type DnsFilterConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DnsFilterConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DnsFilterConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DnsFilterConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DnsFilterConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DnsFilterConfigValidationError) ErrorName() string { return "DnsFilterConfigValidationError" } + +// Error satisfies the builtin error interface +func (e DnsFilterConfigValidationError) 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 %sDnsFilterConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DnsFilterConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DnsFilterConfigValidationError{} + +// Validate checks the field values on DnsFilterConfig_ServerContextConfig 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 *DnsFilterConfig_ServerContextConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsFilterConfig_ServerContextConfig +// 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 +// DnsFilterConfig_ServerContextConfigMultiError, or nil if none found. +func (m *DnsFilterConfig_ServerContextConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsFilterConfig_ServerContextConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.ConfigSource.(type) { + + case *DnsFilterConfig_ServerContextConfig_InlineDnsTable: + + if all { + switch v := interface{}(m.GetInlineDnsTable()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsFilterConfig_ServerContextConfigValidationError{ + field: "InlineDnsTable", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsFilterConfig_ServerContextConfigValidationError{ + field: "InlineDnsTable", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInlineDnsTable()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsFilterConfig_ServerContextConfigValidationError{ + field: "InlineDnsTable", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *DnsFilterConfig_ServerContextConfig_ExternalDnsTable: + + if all { + switch v := interface{}(m.GetExternalDnsTable()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsFilterConfig_ServerContextConfigValidationError{ + field: "ExternalDnsTable", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsFilterConfig_ServerContextConfigValidationError{ + field: "ExternalDnsTable", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExternalDnsTable()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsFilterConfig_ServerContextConfigValidationError{ + field: "ExternalDnsTable", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := DnsFilterConfig_ServerContextConfigValidationError{ + field: "ConfigSource", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return DnsFilterConfig_ServerContextConfigMultiError(errors) + } + return nil +} + +// DnsFilterConfig_ServerContextConfigMultiError is an error wrapping multiple +// validation errors returned by +// DnsFilterConfig_ServerContextConfig.ValidateAll() if the designated +// constraints aren't met. +type DnsFilterConfig_ServerContextConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsFilterConfig_ServerContextConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsFilterConfig_ServerContextConfigMultiError) AllErrors() []error { return m } + +// DnsFilterConfig_ServerContextConfigValidationError is the validation error +// returned by DnsFilterConfig_ServerContextConfig.Validate if the designated +// constraints aren't met. +type DnsFilterConfig_ServerContextConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DnsFilterConfig_ServerContextConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DnsFilterConfig_ServerContextConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DnsFilterConfig_ServerContextConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DnsFilterConfig_ServerContextConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DnsFilterConfig_ServerContextConfigValidationError) ErrorName() string { + return "DnsFilterConfig_ServerContextConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e DnsFilterConfig_ServerContextConfigValidationError) 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 %sDnsFilterConfig_ServerContextConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DnsFilterConfig_ServerContextConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DnsFilterConfig_ServerContextConfigValidationError{} + +// Validate checks the field values on DnsFilterConfig_ClientContextConfig 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 *DnsFilterConfig_ClientContextConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsFilterConfig_ClientContextConfig +// 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 +// DnsFilterConfig_ClientContextConfigMultiError, or nil if none found. +func (m *DnsFilterConfig_ClientContextConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsFilterConfig_ClientContextConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if d := m.GetResolverTimeout(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = DnsFilterConfig_ClientContextConfigValidationError{ + field: "ResolverTimeout", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gte := time.Duration(1*time.Second + 0*time.Nanosecond) + + if dur < gte { + err := DnsFilterConfig_ClientContextConfigValidationError{ + field: "ResolverTimeout", + reason: "value must be greater than or equal to 1s", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + for idx, item := range m.GetUpstreamResolvers() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsFilterConfig_ClientContextConfigValidationError{ + field: fmt.Sprintf("UpstreamResolvers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsFilterConfig_ClientContextConfigValidationError{ + field: fmt.Sprintf("UpstreamResolvers[%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 DnsFilterConfig_ClientContextConfigValidationError{ + field: fmt.Sprintf("UpstreamResolvers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetDnsResolutionConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsFilterConfig_ClientContextConfigValidationError{ + field: "DnsResolutionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsFilterConfig_ClientContextConfigValidationError{ + field: "DnsResolutionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDnsResolutionConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsFilterConfig_ClientContextConfigValidationError{ + field: "DnsResolutionConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetTypedDnsResolverConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DnsFilterConfig_ClientContextConfigValidationError{ + field: "TypedDnsResolverConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DnsFilterConfig_ClientContextConfigValidationError{ + field: "TypedDnsResolverConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTypedDnsResolverConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DnsFilterConfig_ClientContextConfigValidationError{ + field: "TypedDnsResolverConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetMaxPendingLookups() < 1 { + err := DnsFilterConfig_ClientContextConfigValidationError{ + field: "MaxPendingLookups", + reason: "value must be greater than or equal to 1", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return DnsFilterConfig_ClientContextConfigMultiError(errors) + } + return nil +} + +// DnsFilterConfig_ClientContextConfigMultiError is an error wrapping multiple +// validation errors returned by +// DnsFilterConfig_ClientContextConfig.ValidateAll() if the designated +// constraints aren't met. +type DnsFilterConfig_ClientContextConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsFilterConfig_ClientContextConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsFilterConfig_ClientContextConfigMultiError) AllErrors() []error { return m } + +// DnsFilterConfig_ClientContextConfigValidationError is the validation error +// returned by DnsFilterConfig_ClientContextConfig.Validate if the designated +// constraints aren't met. +type DnsFilterConfig_ClientContextConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DnsFilterConfig_ClientContextConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DnsFilterConfig_ClientContextConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DnsFilterConfig_ClientContextConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DnsFilterConfig_ClientContextConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DnsFilterConfig_ClientContextConfigValidationError) ErrorName() string { + return "DnsFilterConfig_ClientContextConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e DnsFilterConfig_ClientContextConfigValidationError) 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 %sDnsFilterConfig_ClientContextConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DnsFilterConfig_ClientContextConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DnsFilterConfig_ClientContextConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/udp/udp_proxy/v3/route.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/udp/udp_proxy/v3/route.pb.go new file mode 100644 index 0000000000000..718daf64cc4bb --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/udp/udp_proxy/v3/route.pb.go @@ -0,0 +1,168 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/udp/udp_proxy/v3/route.proto + +package udp_proxyv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Route struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Indicates the upstream cluster to which the request should be routed. + Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` +} + +func (x *Route) Reset() { + *x = Route{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Route) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Route) ProtoMessage() {} + +func (x *Route) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Route.ProtoReflect.Descriptor instead. +func (*Route) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDescGZIP(), []int{0} +} + +func (x *Route) GetCluster() string { + if x != nil { + return x.Cluster + } + return "" +} + +var File_envoy_extensions_filters_udp_udp_proxy_v3_route_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDesc = []byte{ + 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x75, 0x64, 0x70, 0x2f, 0x75, + 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x2a, 0x0a, 0x05, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0xad, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x76, 0x33, 0x42, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x5c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2f, 0x75, 0x64, 0x70, 0x2f, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x76, 0x33, 0x3b, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDescData = file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDesc +) + +func file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDescData) + }) + return file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDescData +} + +var file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_goTypes = []interface{}{ + (*Route)(nil), // 0: envoy.extensions.filters.udp.udp_proxy.v3.Route +} +var file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_init() } +func file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_init() { + if File_envoy_extensions_filters_udp_udp_proxy_v3_route_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Route); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_udp_udp_proxy_v3_route_proto = out.File + file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_rawDesc = nil + file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_goTypes = nil + file_envoy_extensions_filters_udp_udp_proxy_v3_route_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/udp/udp_proxy/v3/route.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/udp/udp_proxy/v3/route.pb.validate.go new file mode 100644 index 0000000000000..2f8aae7940831 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/udp/udp_proxy/v3/route.pb.validate.go @@ -0,0 +1,144 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/udp/udp_proxy/v3/route.proto + +package udp_proxyv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Route 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 *Route) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Route 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 RouteMultiError, or nil if none found. +func (m *Route) ValidateAll() error { + return m.validate(true) +} + +func (m *Route) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetCluster()) < 1 { + err := RouteValidationError{ + field: "Cluster", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return RouteMultiError(errors) + } + return nil +} + +// RouteMultiError is an error wrapping multiple validation errors returned by +// Route.ValidateAll() if the designated constraints aren't met. +type RouteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RouteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RouteMultiError) AllErrors() []error { return m } + +// RouteValidationError is the validation error returned by Route.Validate if +// the designated constraints aren't met. +type RouteValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RouteValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RouteValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RouteValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RouteValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RouteValidationError) ErrorName() string { return "RouteValidationError" } + +// Error satisfies the builtin error interface +func (e RouteValidationError) 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 %sRoute.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RouteValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RouteValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.pb.go new file mode 100644 index 0000000000000..b7563a551df61 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.pb.go @@ -0,0 +1,485 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.proto + +package udp_proxyv3 + +import ( + _ "github.com/cilium/proxy/go/envoy/annotations" + v31 "github.com/cilium/proxy/go/envoy/config/accesslog/v3" + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + v32 "github.com/cncf/xds/go/xds/type/matcher/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for the UDP proxy filter. +// [#next-free-field: 10] +type UdpProxyConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The stat prefix used when emitting UDP proxy filter stats. + StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` + // Types that are assignable to RouteSpecifier: + // + // *UdpProxyConfig_Cluster + // *UdpProxyConfig_Matcher + RouteSpecifier isUdpProxyConfig_RouteSpecifier `protobuf_oneof:"route_specifier"` + // The idle timeout for sessions. Idle is defined as no datagrams between received or sent by + // the session. The default if not specified is 1 minute. + IdleTimeout *durationpb.Duration `protobuf:"bytes,3,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"` + // Use the remote downstream IP address as the sender IP address when sending packets to upstream hosts. + // This option requires Envoy to be run with the “CAP_NET_ADMIN“ capability on Linux. + // And the IPv6 stack must be enabled on Linux kernel. + // This option does not preserve the remote downstream port. + // If this option is enabled, the IP address of sent datagrams will be changed to the remote downstream IP address. + // This means that Envoy will not receive packets that are sent by upstream hosts because the upstream hosts + // will send the packets with the remote downstream IP address as the destination. All packets will be routed + // to the remote downstream directly if there are route rules on the upstream host side. + // There are two options to return the packets back to the remote downstream. + // The first one is to use DSR (Direct Server Return). + // The other one is to configure routing rules on the upstream hosts to forward + // all packets back to Envoy and configure iptables rules on the host running Envoy to + // forward all packets from upstream hosts to the Envoy process so that Envoy can forward the packets to the downstream. + // If the platform does not support this option, Envoy will raise a configuration error. + UseOriginalSrcIp bool `protobuf:"varint,4,opt,name=use_original_src_ip,json=useOriginalSrcIp,proto3" json:"use_original_src_ip,omitempty"` + // Optional configuration for UDP proxy hash policies. If hash_policies is not set, the hash-based + // load balancing algorithms will select a host randomly. Currently the number of hash policies is + // limited to 1. + HashPolicies []*UdpProxyConfig_HashPolicy `protobuf:"bytes,5,rep,name=hash_policies,json=hashPolicies,proto3" json:"hash_policies,omitempty"` + // UDP socket configuration for upstream sockets. The default for + // :ref:`prefer_gro ` is true for upstream + // sockets as the assumption is datagrams will be received from a single source. + UpstreamSocketConfig *v3.UdpSocketConfig `protobuf:"bytes,6,opt,name=upstream_socket_config,json=upstreamSocketConfig,proto3" json:"upstream_socket_config,omitempty"` + // Perform per packet load balancing (upstream host selection) on each received data chunk. + // The default if not specified is false, that means each data chunk is forwarded + // to upstream host selected on first chunk receival for that "session" (identified by source IP/port and local IP/port). + UsePerPacketLoadBalancing bool `protobuf:"varint,7,opt,name=use_per_packet_load_balancing,json=usePerPacketLoadBalancing,proto3" json:"use_per_packet_load_balancing,omitempty"` + // Configuration for access logs emitted by the UDP proxy. Note that certain UDP specific data is emitted as :ref:`Dynamic Metadata `. + AccessLog []*v31.AccessLog `protobuf:"bytes,8,rep,name=access_log,json=accessLog,proto3" json:"access_log,omitempty"` +} + +func (x *UdpProxyConfig) Reset() { + *x = UdpProxyConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UdpProxyConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UdpProxyConfig) ProtoMessage() {} + +func (x *UdpProxyConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UdpProxyConfig.ProtoReflect.Descriptor instead. +func (*UdpProxyConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_rawDescGZIP(), []int{0} +} + +func (x *UdpProxyConfig) GetStatPrefix() string { + if x != nil { + return x.StatPrefix + } + return "" +} + +func (m *UdpProxyConfig) GetRouteSpecifier() isUdpProxyConfig_RouteSpecifier { + if m != nil { + return m.RouteSpecifier + } + return nil +} + +// Deprecated: Do not use. +func (x *UdpProxyConfig) GetCluster() string { + if x, ok := x.GetRouteSpecifier().(*UdpProxyConfig_Cluster); ok { + return x.Cluster + } + return "" +} + +func (x *UdpProxyConfig) GetMatcher() *v32.Matcher { + if x, ok := x.GetRouteSpecifier().(*UdpProxyConfig_Matcher); ok { + return x.Matcher + } + return nil +} + +func (x *UdpProxyConfig) GetIdleTimeout() *durationpb.Duration { + if x != nil { + return x.IdleTimeout + } + return nil +} + +func (x *UdpProxyConfig) GetUseOriginalSrcIp() bool { + if x != nil { + return x.UseOriginalSrcIp + } + return false +} + +func (x *UdpProxyConfig) GetHashPolicies() []*UdpProxyConfig_HashPolicy { + if x != nil { + return x.HashPolicies + } + return nil +} + +func (x *UdpProxyConfig) GetUpstreamSocketConfig() *v3.UdpSocketConfig { + if x != nil { + return x.UpstreamSocketConfig + } + return nil +} + +func (x *UdpProxyConfig) GetUsePerPacketLoadBalancing() bool { + if x != nil { + return x.UsePerPacketLoadBalancing + } + return false +} + +func (x *UdpProxyConfig) GetAccessLog() []*v31.AccessLog { + if x != nil { + return x.AccessLog + } + return nil +} + +type isUdpProxyConfig_RouteSpecifier interface { + isUdpProxyConfig_RouteSpecifier() +} + +type UdpProxyConfig_Cluster struct { + // The upstream cluster to connect to. + // This field is deprecated in favor of + // :ref:`matcher `. + // + // Deprecated: Do not use. + Cluster string `protobuf:"bytes,2,opt,name=cluster,proto3,oneof"` +} + +type UdpProxyConfig_Matcher struct { + // The match tree to use when resolving route actions for incoming requests. + // See :ref:`Routing ` for more information. + Matcher *v32.Matcher `protobuf:"bytes,9,opt,name=matcher,proto3,oneof"` +} + +func (*UdpProxyConfig_Cluster) isUdpProxyConfig_RouteSpecifier() {} + +func (*UdpProxyConfig_Matcher) isUdpProxyConfig_RouteSpecifier() {} + +// Specifies the UDP hash policy. +// The packets can be routed by hash policy. +type UdpProxyConfig_HashPolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to PolicySpecifier: + // + // *UdpProxyConfig_HashPolicy_SourceIp + // *UdpProxyConfig_HashPolicy_Key + PolicySpecifier isUdpProxyConfig_HashPolicy_PolicySpecifier `protobuf_oneof:"policy_specifier"` +} + +func (x *UdpProxyConfig_HashPolicy) Reset() { + *x = UdpProxyConfig_HashPolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UdpProxyConfig_HashPolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UdpProxyConfig_HashPolicy) ProtoMessage() {} + +func (x *UdpProxyConfig_HashPolicy) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UdpProxyConfig_HashPolicy.ProtoReflect.Descriptor instead. +func (*UdpProxyConfig_HashPolicy) Descriptor() ([]byte, []int) { + return file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_rawDescGZIP(), []int{0, 0} +} + +func (m *UdpProxyConfig_HashPolicy) GetPolicySpecifier() isUdpProxyConfig_HashPolicy_PolicySpecifier { + if m != nil { + return m.PolicySpecifier + } + return nil +} + +func (x *UdpProxyConfig_HashPolicy) GetSourceIp() bool { + if x, ok := x.GetPolicySpecifier().(*UdpProxyConfig_HashPolicy_SourceIp); ok { + return x.SourceIp + } + return false +} + +func (x *UdpProxyConfig_HashPolicy) GetKey() string { + if x, ok := x.GetPolicySpecifier().(*UdpProxyConfig_HashPolicy_Key); ok { + return x.Key + } + return "" +} + +type isUdpProxyConfig_HashPolicy_PolicySpecifier interface { + isUdpProxyConfig_HashPolicy_PolicySpecifier() +} + +type UdpProxyConfig_HashPolicy_SourceIp struct { + // The source IP will be used to compute the hash used by hash-based load balancing algorithms. + SourceIp bool `protobuf:"varint,1,opt,name=source_ip,json=sourceIp,proto3,oneof"` +} + +type UdpProxyConfig_HashPolicy_Key struct { + // A given key will be used to compute the hash used by hash-based load balancing algorithms. + // In certain cases there is a need to direct different UDP streams jointly towards the selected set of endpoints. + // A possible use-case is VoIP telephony, where media (RTP) and its corresponding control (RTCP) belong to the same logical session, + // although they travel in separate streams. To ensure that these pair of streams are load-balanced on session level + // (instead of individual stream level), dynamically created listeners can use the same hash key for each stream in the session. + Key string `protobuf:"bytes,2,opt,name=key,proto3,oneof"` +} + +func (*UdpProxyConfig_HashPolicy_SourceIp) isUdpProxyConfig_HashPolicy_PolicySpecifier() {} + +func (*UdpProxyConfig_HashPolicy_Key) isUdpProxyConfig_HashPolicy_PolicySpecifier() {} + +var File_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto protoreflect.FileDescriptor + +var file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_rawDesc = []byte{ + 0x0a, 0x39, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x75, 0x64, 0x70, 0x2f, 0x75, + 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x64, 0x70, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2f, 0x76, + 0x33, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x64, 0x70, 0x5f, 0x73, 0x6f, 0x63, 0x6b, + 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x69, 0x6e, 0x67, 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, 0xb9, 0x06, 0x0a, 0x0e, 0x55, 0x64, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x12, 0x18, 0x01, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x92, 0xc7, 0x86, 0xd8, + 0x04, 0x03, 0x33, 0x2e, 0x30, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x12, 0x42, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, + 0x08, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x0c, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x69, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x12, 0x2d, 0x0a, 0x13, 0x75, 0x73, 0x65, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x61, 0x6c, 0x5f, 0x73, 0x72, 0x63, 0x5f, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x10, 0x75, 0x73, 0x65, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x53, 0x72, 0x63, 0x49, + 0x70, 0x12, 0x73, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, + 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x64, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x68, 0x61, 0x73, 0x68, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x5b, 0x0a, 0x16, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x64, + 0x70, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x14, 0x75, + 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x40, 0x0a, 0x1d, 0x75, 0x73, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x70, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x75, 0x73, 0x65, 0x50, + 0x65, 0x72, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x43, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, + 0x6c, 0x6f, 0x67, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, + 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, + 0x09, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x1a, 0x6a, 0x0a, 0x0a, 0x48, 0x61, + 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x26, 0x0a, 0x09, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x6a, 0x02, 0x08, 0x01, 0x48, 0x00, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, + 0x12, 0x1b, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x42, 0x17, 0x0a, + 0x10, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x64, 0x70, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x16, 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, + 0xb0, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x64, 0x70, 0x2e, 0x75, + 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x55, 0x64, 0x70, + 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5c, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x75, 0x64, + 0x70, 0x2f, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x75, + 0x64, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_rawDescData = file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_rawDesc +) + +func file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_rawDescData) + }) + return file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_rawDescData +} + +var file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_goTypes = []interface{}{ + (*UdpProxyConfig)(nil), // 0: envoy.extensions.filters.udp.udp_proxy.v3.UdpProxyConfig + (*UdpProxyConfig_HashPolicy)(nil), // 1: envoy.extensions.filters.udp.udp_proxy.v3.UdpProxyConfig.HashPolicy + (*v32.Matcher)(nil), // 2: xds.type.matcher.v3.Matcher + (*durationpb.Duration)(nil), // 3: google.protobuf.Duration + (*v3.UdpSocketConfig)(nil), // 4: envoy.config.core.v3.UdpSocketConfig + (*v31.AccessLog)(nil), // 5: envoy.config.accesslog.v3.AccessLog +} +var file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.filters.udp.udp_proxy.v3.UdpProxyConfig.matcher:type_name -> xds.type.matcher.v3.Matcher + 3, // 1: envoy.extensions.filters.udp.udp_proxy.v3.UdpProxyConfig.idle_timeout:type_name -> google.protobuf.Duration + 1, // 2: envoy.extensions.filters.udp.udp_proxy.v3.UdpProxyConfig.hash_policies:type_name -> envoy.extensions.filters.udp.udp_proxy.v3.UdpProxyConfig.HashPolicy + 4, // 3: envoy.extensions.filters.udp.udp_proxy.v3.UdpProxyConfig.upstream_socket_config:type_name -> envoy.config.core.v3.UdpSocketConfig + 5, // 4: envoy.extensions.filters.udp.udp_proxy.v3.UdpProxyConfig.access_log:type_name -> envoy.config.accesslog.v3.AccessLog + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_init() } +func file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_init() { + if File_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UdpProxyConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UdpProxyConfig_HashPolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*UdpProxyConfig_Cluster)(nil), + (*UdpProxyConfig_Matcher)(nil), + } + file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*UdpProxyConfig_HashPolicy_SourceIp)(nil), + (*UdpProxyConfig_HashPolicy_Key)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_goTypes, + DependencyIndexes: file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_depIdxs, + MessageInfos: file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_msgTypes, + }.Build() + File_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto = out.File + file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_rawDesc = nil + file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_goTypes = nil + file_envoy_extensions_filters_udp_udp_proxy_v3_udp_proxy_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.pb.validate.go new file mode 100644 index 0000000000000..204dea47830ec --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.pb.validate.go @@ -0,0 +1,486 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.proto + +package udp_proxyv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on UdpProxyConfig 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 *UdpProxyConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UdpProxyConfig 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 UdpProxyConfigMultiError, +// or nil if none found. +func (m *UdpProxyConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *UdpProxyConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { + err := UdpProxyConfigValidationError{ + field: "StatPrefix", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetIdleTimeout()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UdpProxyConfigValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UdpProxyConfigValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdleTimeout()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UdpProxyConfigValidationError{ + field: "IdleTimeout", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for UseOriginalSrcIp + + if len(m.GetHashPolicies()) > 1 { + err := UdpProxyConfigValidationError{ + field: "HashPolicies", + reason: "value must contain no more than 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetHashPolicies() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UdpProxyConfigValidationError{ + field: fmt.Sprintf("HashPolicies[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UdpProxyConfigValidationError{ + field: fmt.Sprintf("HashPolicies[%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 UdpProxyConfigValidationError{ + field: fmt.Sprintf("HashPolicies[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetUpstreamSocketConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UdpProxyConfigValidationError{ + field: "UpstreamSocketConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UdpProxyConfigValidationError{ + field: "UpstreamSocketConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamSocketConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UdpProxyConfigValidationError{ + field: "UpstreamSocketConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for UsePerPacketLoadBalancing + + for idx, item := range m.GetAccessLog() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UdpProxyConfigValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UdpProxyConfigValidationError{ + field: fmt.Sprintf("AccessLog[%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 UdpProxyConfigValidationError{ + field: fmt.Sprintf("AccessLog[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + switch m.RouteSpecifier.(type) { + + case *UdpProxyConfig_Cluster: + + if utf8.RuneCountInString(m.GetCluster()) < 1 { + err := UdpProxyConfigValidationError{ + field: "Cluster", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *UdpProxyConfig_Matcher: + + if all { + switch v := interface{}(m.GetMatcher()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UdpProxyConfigValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UdpProxyConfigValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UdpProxyConfigValidationError{ + field: "Matcher", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := UdpProxyConfigValidationError{ + field: "RouteSpecifier", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return UdpProxyConfigMultiError(errors) + } + return nil +} + +// UdpProxyConfigMultiError is an error wrapping multiple validation errors +// returned by UdpProxyConfig.ValidateAll() if the designated constraints +// aren't met. +type UdpProxyConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UdpProxyConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UdpProxyConfigMultiError) AllErrors() []error { return m } + +// UdpProxyConfigValidationError is the validation error returned by +// UdpProxyConfig.Validate if the designated constraints aren't met. +type UdpProxyConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e UdpProxyConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e UdpProxyConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e UdpProxyConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e UdpProxyConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e UdpProxyConfigValidationError) ErrorName() string { return "UdpProxyConfigValidationError" } + +// Error satisfies the builtin error interface +func (e UdpProxyConfigValidationError) 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 %sUdpProxyConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = UdpProxyConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = UdpProxyConfigValidationError{} + +// Validate checks the field values on UdpProxyConfig_HashPolicy 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 *UdpProxyConfig_HashPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UdpProxyConfig_HashPolicy 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 +// UdpProxyConfig_HashPolicyMultiError, or nil if none found. +func (m *UdpProxyConfig_HashPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *UdpProxyConfig_HashPolicy) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.PolicySpecifier.(type) { + + case *UdpProxyConfig_HashPolicy_SourceIp: + + if m.GetSourceIp() != true { + err := UdpProxyConfig_HashPolicyValidationError{ + field: "SourceIp", + reason: "value must equal true", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *UdpProxyConfig_HashPolicy_Key: + + if utf8.RuneCountInString(m.GetKey()) < 1 { + err := UdpProxyConfig_HashPolicyValidationError{ + field: "Key", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + default: + err := UdpProxyConfig_HashPolicyValidationError{ + field: "PolicySpecifier", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return UdpProxyConfig_HashPolicyMultiError(errors) + } + return nil +} + +// UdpProxyConfig_HashPolicyMultiError is an error wrapping multiple validation +// errors returned by UdpProxyConfig_HashPolicy.ValidateAll() if the +// designated constraints aren't met. +type UdpProxyConfig_HashPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UdpProxyConfig_HashPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UdpProxyConfig_HashPolicyMultiError) AllErrors() []error { return m } + +// UdpProxyConfig_HashPolicyValidationError is the validation error returned by +// UdpProxyConfig_HashPolicy.Validate if the designated constraints aren't met. +type UdpProxyConfig_HashPolicyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e UdpProxyConfig_HashPolicyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e UdpProxyConfig_HashPolicyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e UdpProxyConfig_HashPolicyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e UdpProxyConfig_HashPolicyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e UdpProxyConfig_HashPolicyValidationError) ErrorName() string { + return "UdpProxyConfig_HashPolicyValidationError" +} + +// Error satisfies the builtin error interface +func (e UdpProxyConfig_HashPolicyValidationError) 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 %sUdpProxyConfig_HashPolicy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = UdpProxyConfig_HashPolicyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = UdpProxyConfig_HashPolicyValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/formatter/metadata/v3/metadata.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/formatter/metadata/v3/metadata.pb.go new file mode 100644 index 0000000000000..30da0f31fdb81 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/formatter/metadata/v3/metadata.pb.go @@ -0,0 +1,153 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/formatter/metadata/v3/metadata.proto + +package metadatav3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Metadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Metadata) Reset() { + *x = Metadata{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_formatter_metadata_v3_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Metadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Metadata) ProtoMessage() {} + +func (x *Metadata) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_formatter_metadata_v3_metadata_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Metadata.ProtoReflect.Descriptor instead. +func (*Metadata) Descriptor() ([]byte, []int) { + return file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_formatter_metadata_v3_metadata_proto protoreflect.FileDescriptor + +var file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDesc = []byte{ + 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x2f, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0a, + 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0xa9, 0x01, 0x0a, 0x34, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDescOnce sync.Once + file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDescData = file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDesc +) + +func file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDescGZIP() []byte { + file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDescOnce.Do(func() { + file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDescData) + }) + return file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDescData +} + +var file_envoy_extensions_formatter_metadata_v3_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_formatter_metadata_v3_metadata_proto_goTypes = []interface{}{ + (*Metadata)(nil), // 0: envoy.extensions.formatter.metadata.v3.Metadata +} +var file_envoy_extensions_formatter_metadata_v3_metadata_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_formatter_metadata_v3_metadata_proto_init() } +func file_envoy_extensions_formatter_metadata_v3_metadata_proto_init() { + if File_envoy_extensions_formatter_metadata_v3_metadata_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_formatter_metadata_v3_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Metadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_formatter_metadata_v3_metadata_proto_goTypes, + DependencyIndexes: file_envoy_extensions_formatter_metadata_v3_metadata_proto_depIdxs, + MessageInfos: file_envoy_extensions_formatter_metadata_v3_metadata_proto_msgTypes, + }.Build() + File_envoy_extensions_formatter_metadata_v3_metadata_proto = out.File + file_envoy_extensions_formatter_metadata_v3_metadata_proto_rawDesc = nil + file_envoy_extensions_formatter_metadata_v3_metadata_proto_goTypes = nil + file_envoy_extensions_formatter_metadata_v3_metadata_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/formatter/metadata/v3/metadata.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/formatter/metadata/v3/metadata.pb.validate.go new file mode 100644 index 0000000000000..9bb1790dafbc3 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/formatter/metadata/v3/metadata.pb.validate.go @@ -0,0 +1,134 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/formatter/metadata/v3/metadata.proto + +package metadatav3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Metadata 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 *Metadata) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Metadata 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 MetadataMultiError, or nil +// if none found. +func (m *Metadata) ValidateAll() error { + return m.validate(true) +} + +func (m *Metadata) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return MetadataMultiError(errors) + } + return nil +} + +// MetadataMultiError is an error wrapping multiple validation errors returned +// by Metadata.ValidateAll() if the designated constraints aren't met. +type MetadataMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataMultiError) AllErrors() []error { return m } + +// MetadataValidationError is the validation error returned by +// Metadata.Validate if the designated constraints aren't met. +type MetadataValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MetadataValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MetadataValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MetadataValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MetadataValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MetadataValidationError) ErrorName() string { return "MetadataValidationError" } + +// Error satisfies the builtin error interface +func (e MetadataValidationError) 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 %sMetadata.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MetadataValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MetadataValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/formatter/req_without_query/v3/req_without_query.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/formatter/req_without_query/v3/req_without_query.pb.go new file mode 100644 index 0000000000000..906eb15ac58cc --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/formatter/req_without_query/v3/req_without_query.pb.go @@ -0,0 +1,159 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/formatter/req_without_query/v3/req_without_query.proto + +package req_without_queryv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for the request without query formatter. +type ReqWithoutQuery struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ReqWithoutQuery) Reset() { + *x = ReqWithoutQuery{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReqWithoutQuery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReqWithoutQuery) ProtoMessage() {} + +func (x *ReqWithoutQuery) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReqWithoutQuery.ProtoReflect.Descriptor instead. +func (*ReqWithoutQuery) Descriptor() ([]byte, []int) { + return file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto protoreflect.FileDescriptor + +var file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDesc = []byte{ + 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x71, + 0x5f, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, + 0x33, 0x2f, 0x72, 0x65, 0x71, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x71, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, + 0x74, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x11, 0x0a, 0x0f, 0x52, 0x65, 0x71, + 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0xcb, 0x01, 0x0a, + 0x3d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x71, 0x5f, 0x77, 0x69, + 0x74, 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x14, + 0x52, 0x65, 0x71, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x71, 0x5f, 0x77, 0x69, + 0x74, 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x72, + 0x65, 0x71, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDescOnce sync.Once + file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDescData = file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDesc +) + +func file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDescGZIP() []byte { + file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDescOnce.Do(func() { + file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDescData) + }) + return file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDescData +} + +var file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_goTypes = []interface{}{ + (*ReqWithoutQuery)(nil), // 0: envoy.extensions.formatter.req_without_query.v3.ReqWithoutQuery +} +var file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_init() } +func file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_init() { + if File_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReqWithoutQuery); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_goTypes, + DependencyIndexes: file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_depIdxs, + MessageInfos: file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_msgTypes, + }.Build() + File_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto = out.File + file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_rawDesc = nil + file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_goTypes = nil + file_envoy_extensions_formatter_req_without_query_v3_req_without_query_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/formatter/req_without_query/v3/req_without_query.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/formatter/req_without_query/v3/req_without_query.pb.validate.go new file mode 100644 index 0000000000000..692aba9a0f662 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/formatter/req_without_query/v3/req_without_query.pb.validate.go @@ -0,0 +1,135 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/formatter/req_without_query/v3/req_without_query.proto + +package req_without_queryv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ReqWithoutQuery 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 *ReqWithoutQuery) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ReqWithoutQuery 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 +// ReqWithoutQueryMultiError, or nil if none found. +func (m *ReqWithoutQuery) ValidateAll() error { + return m.validate(true) +} + +func (m *ReqWithoutQuery) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return ReqWithoutQueryMultiError(errors) + } + return nil +} + +// ReqWithoutQueryMultiError is an error wrapping multiple validation errors +// returned by ReqWithoutQuery.ValidateAll() if the designated constraints +// aren't met. +type ReqWithoutQueryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ReqWithoutQueryMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ReqWithoutQueryMultiError) AllErrors() []error { return m } + +// ReqWithoutQueryValidationError is the validation error returned by +// ReqWithoutQuery.Validate if the designated constraints aren't met. +type ReqWithoutQueryValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ReqWithoutQueryValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ReqWithoutQueryValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ReqWithoutQueryValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ReqWithoutQueryValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ReqWithoutQueryValidationError) ErrorName() string { return "ReqWithoutQueryValidationError" } + +// Error satisfies the builtin error interface +func (e ReqWithoutQueryValidationError) 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 %sReqWithoutQuery.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ReqWithoutQueryValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ReqWithoutQueryValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/health_checkers/redis/v3/redis.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/health_checkers/redis/v3/redis.pb.go new file mode 100644 index 0000000000000..fc5683c4d2dc8 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/health_checkers/redis/v3/redis.pb.go @@ -0,0 +1,173 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/health_checkers/redis/v3/redis.proto + +package redisv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Redis struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If set, optionally perform “EXISTS “ instead of “PING“. A return value + // from Redis of 0 (does not exist) is considered a passing healthcheck. A return value other + // than 0 is considered a failure. This allows the user to mark a Redis instance for maintenance + // by setting the specified key to any value and waiting for traffic to drain. + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` +} + +func (x *Redis) Reset() { + *x = Redis{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_health_checkers_redis_v3_redis_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Redis) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Redis) ProtoMessage() {} + +func (x *Redis) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_health_checkers_redis_v3_redis_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Redis.ProtoReflect.Descriptor instead. +func (*Redis) Descriptor() ([]byte, []int) { + return file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDescGZIP(), []int{0} +} + +func (x *Redis) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +var File_envoy_extensions_health_checkers_redis_v3_redis_proto protoreflect.FileDescriptor + +var file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDesc = []byte{ + 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, + 0x72, 0x73, 0x2f, 0x72, 0x65, 0x64, 0x69, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x64, 0x69, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x2e, + 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4c, 0x0a, 0x05, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, + 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x64, + 0x69, 0x73, 0x42, 0xa9, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x65, 0x72, 0x73, 0x2e, 0x72, 0x65, 0x64, 0x69, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x0a, + 0x52, 0x65, 0x64, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x65, 0x72, 0x73, 0x2f, 0x72, 0x65, 0x64, 0x69, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x72, + 0x65, 0x64, 0x69, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDescOnce sync.Once + file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDescData = file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDesc +) + +func file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDescGZIP() []byte { + file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDescOnce.Do(func() { + file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDescData) + }) + return file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDescData +} + +var file_envoy_extensions_health_checkers_redis_v3_redis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_health_checkers_redis_v3_redis_proto_goTypes = []interface{}{ + (*Redis)(nil), // 0: envoy.extensions.health_checkers.redis.v3.Redis +} +var file_envoy_extensions_health_checkers_redis_v3_redis_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_health_checkers_redis_v3_redis_proto_init() } +func file_envoy_extensions_health_checkers_redis_v3_redis_proto_init() { + if File_envoy_extensions_health_checkers_redis_v3_redis_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_health_checkers_redis_v3_redis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Redis); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_health_checkers_redis_v3_redis_proto_goTypes, + DependencyIndexes: file_envoy_extensions_health_checkers_redis_v3_redis_proto_depIdxs, + MessageInfos: file_envoy_extensions_health_checkers_redis_v3_redis_proto_msgTypes, + }.Build() + File_envoy_extensions_health_checkers_redis_v3_redis_proto = out.File + file_envoy_extensions_health_checkers_redis_v3_redis_proto_rawDesc = nil + file_envoy_extensions_health_checkers_redis_v3_redis_proto_goTypes = nil + file_envoy_extensions_health_checkers_redis_v3_redis_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/health_checkers/redis/v3/redis.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/health_checkers/redis/v3/redis.pb.validate.go new file mode 100644 index 0000000000000..2667edc7fdc82 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/health_checkers/redis/v3/redis.pb.validate.go @@ -0,0 +1,135 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/health_checkers/redis/v3/redis.proto + +package redisv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Redis 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 *Redis) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Redis 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 RedisMultiError, or nil if none found. +func (m *Redis) ValidateAll() error { + return m.validate(true) +} + +func (m *Redis) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Key + + if len(errors) > 0 { + return RedisMultiError(errors) + } + return nil +} + +// RedisMultiError is an error wrapping multiple validation errors returned by +// Redis.ValidateAll() if the designated constraints aren't met. +type RedisMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RedisMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RedisMultiError) AllErrors() []error { return m } + +// RedisValidationError is the validation error returned by Redis.Validate if +// the designated constraints aren't met. +type RedisValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RedisValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RedisValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RedisValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RedisValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RedisValidationError) ErrorName() string { return "RedisValidationError" } + +// Error satisfies the builtin error interface +func (e RedisValidationError) 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 %sRedis.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RedisValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RedisValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/http/header_formatters/preserve_case/v3/preserve_case.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/http/header_formatters/preserve_case/v3/preserve_case.pb.go new file mode 100644 index 0000000000000..09c343269ad27 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/http/header_formatters/preserve_case/v3/preserve_case.pb.go @@ -0,0 +1,260 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/http/header_formatters/preserve_case/v3/preserve_case.proto + +package preserve_casev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type PreserveCaseFormatterConfig_FormatterTypeOnEnvoyHeaders int32 + +const ( + // Use LowerCase on Envoy added headers. + PreserveCaseFormatterConfig_DEFAULT PreserveCaseFormatterConfig_FormatterTypeOnEnvoyHeaders = 0 + // Use ProperCaseHeaderKeyFormatter on Envoy added headers that upper cases the first character + // in each word. The first character as well as any alpha character following a special + // character is upper cased. + PreserveCaseFormatterConfig_PROPER_CASE PreserveCaseFormatterConfig_FormatterTypeOnEnvoyHeaders = 1 +) + +// Enum value maps for PreserveCaseFormatterConfig_FormatterTypeOnEnvoyHeaders. +var ( + PreserveCaseFormatterConfig_FormatterTypeOnEnvoyHeaders_name = map[int32]string{ + 0: "DEFAULT", + 1: "PROPER_CASE", + } + PreserveCaseFormatterConfig_FormatterTypeOnEnvoyHeaders_value = map[string]int32{ + "DEFAULT": 0, + "PROPER_CASE": 1, + } +) + +func (x PreserveCaseFormatterConfig_FormatterTypeOnEnvoyHeaders) Enum() *PreserveCaseFormatterConfig_FormatterTypeOnEnvoyHeaders { + p := new(PreserveCaseFormatterConfig_FormatterTypeOnEnvoyHeaders) + *p = x + return p +} + +func (x PreserveCaseFormatterConfig_FormatterTypeOnEnvoyHeaders) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PreserveCaseFormatterConfig_FormatterTypeOnEnvoyHeaders) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_enumTypes[0].Descriptor() +} + +func (PreserveCaseFormatterConfig_FormatterTypeOnEnvoyHeaders) Type() protoreflect.EnumType { + return &file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_enumTypes[0] +} + +func (x PreserveCaseFormatterConfig_FormatterTypeOnEnvoyHeaders) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PreserveCaseFormatterConfig_FormatterTypeOnEnvoyHeaders.Descriptor instead. +func (PreserveCaseFormatterConfig_FormatterTypeOnEnvoyHeaders) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDescGZIP(), []int{0, 0} +} + +// Configuration for the preserve case header formatter. +// See the :ref:`header casing ` configuration guide for more +// information. +type PreserveCaseFormatterConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Allows forwarding reason phrase text. + // This is off by default, and a standard reason phrase is used for a corresponding HTTP response code. + ForwardReasonPhrase bool `protobuf:"varint,1,opt,name=forward_reason_phrase,json=forwardReasonPhrase,proto3" json:"forward_reason_phrase,omitempty"` + // Type of formatter to use on headers which are added by Envoy (which are lower case by default). + // The default type is DEFAULT, use LowerCase on Envoy headers. + FormatterTypeOnEnvoyHeaders PreserveCaseFormatterConfig_FormatterTypeOnEnvoyHeaders `protobuf:"varint,2,opt,name=formatter_type_on_envoy_headers,json=formatterTypeOnEnvoyHeaders,proto3,enum=envoy.extensions.http.header_formatters.preserve_case.v3.PreserveCaseFormatterConfig_FormatterTypeOnEnvoyHeaders" json:"formatter_type_on_envoy_headers,omitempty"` +} + +func (x *PreserveCaseFormatterConfig) Reset() { + *x = PreserveCaseFormatterConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PreserveCaseFormatterConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreserveCaseFormatterConfig) ProtoMessage() {} + +func (x *PreserveCaseFormatterConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreserveCaseFormatterConfig.ProtoReflect.Descriptor instead. +func (*PreserveCaseFormatterConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDescGZIP(), []int{0} +} + +func (x *PreserveCaseFormatterConfig) GetForwardReasonPhrase() bool { + if x != nil { + return x.ForwardReasonPhrase + } + return false +} + +func (x *PreserveCaseFormatterConfig) GetFormatterTypeOnEnvoyHeaders() PreserveCaseFormatterConfig_FormatterTypeOnEnvoyHeaders { + if x != nil { + return x.FormatterTypeOnEnvoyHeaders + } + return PreserveCaseFormatterConfig_DEFAULT +} + +var File_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto protoreflect.FileDescriptor + +var file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDesc = []byte{ + 0x0a, 0x4c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x38, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x5f, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 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, 0x02, 0x0a, 0x1b, 0x50, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x43, 0x61, 0x73, + 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x32, 0x0a, 0x15, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x72, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x5f, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x13, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x50, 0x68, + 0x72, 0x61, 0x73, 0x65, 0x12, 0xc1, 0x01, 0x0a, 0x1f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x71, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x43, 0x61, 0x73, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x54, + 0x79, 0x70, 0x65, 0x4f, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x1b, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x4f, 0x6e, 0x45, 0x6e, 0x76, 0x6f, + 0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0x3b, 0x0a, 0x1b, 0x46, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x4f, 0x6e, 0x45, 0x6e, 0x76, 0x6f, 0x79, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, + 0x4c, 0x54, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x52, 0x4f, 0x50, 0x45, 0x52, 0x5f, 0x43, + 0x41, 0x53, 0x45, 0x10, 0x01, 0x42, 0xd6, 0x01, 0x0a, 0x46, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x73, 0x2e, + 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x33, + 0x42, 0x11, 0x50, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x43, 0x61, 0x73, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x68, + 0x74, 0x74, 0x70, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x63, + 0x61, 0x73, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, + 0x63, 0x61, 0x73, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDescOnce sync.Once + file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDescData = file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDesc +) + +func file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDescGZIP() []byte { + file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDescOnce.Do(func() { + file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDescData) + }) + return file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDescData +} + +var file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_goTypes = []interface{}{ + (PreserveCaseFormatterConfig_FormatterTypeOnEnvoyHeaders)(0), // 0: envoy.extensions.http.header_formatters.preserve_case.v3.PreserveCaseFormatterConfig.FormatterTypeOnEnvoyHeaders + (*PreserveCaseFormatterConfig)(nil), // 1: envoy.extensions.http.header_formatters.preserve_case.v3.PreserveCaseFormatterConfig +} +var file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_depIdxs = []int32{ + 0, // 0: envoy.extensions.http.header_formatters.preserve_case.v3.PreserveCaseFormatterConfig.formatter_type_on_envoy_headers:type_name -> envoy.extensions.http.header_formatters.preserve_case.v3.PreserveCaseFormatterConfig.FormatterTypeOnEnvoyHeaders + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_init() } +func file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_init() { + if File_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PreserveCaseFormatterConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_goTypes, + DependencyIndexes: file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_depIdxs, + EnumInfos: file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_enumTypes, + MessageInfos: file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_msgTypes, + }.Build() + File_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto = out.File + file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_rawDesc = nil + file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_goTypes = nil + file_envoy_extensions_http_header_formatters_preserve_case_v3_preserve_case_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/http/header_formatters/preserve_case/v3/preserve_case.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/http/header_formatters/preserve_case/v3/preserve_case.pb.validate.go new file mode 100644 index 0000000000000..585f534e4a48e --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/http/header_formatters/preserve_case/v3/preserve_case.pb.validate.go @@ -0,0 +1,151 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/http/header_formatters/preserve_case/v3/preserve_case.proto + +package preserve_casev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on PreserveCaseFormatterConfig 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 *PreserveCaseFormatterConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PreserveCaseFormatterConfig 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 +// PreserveCaseFormatterConfigMultiError, or nil if none found. +func (m *PreserveCaseFormatterConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *PreserveCaseFormatterConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for ForwardReasonPhrase + + if _, ok := PreserveCaseFormatterConfig_FormatterTypeOnEnvoyHeaders_name[int32(m.GetFormatterTypeOnEnvoyHeaders())]; !ok { + err := PreserveCaseFormatterConfigValidationError{ + field: "FormatterTypeOnEnvoyHeaders", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return PreserveCaseFormatterConfigMultiError(errors) + } + return nil +} + +// PreserveCaseFormatterConfigMultiError is an error wrapping multiple +// validation errors returned by PreserveCaseFormatterConfig.ValidateAll() if +// the designated constraints aren't met. +type PreserveCaseFormatterConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PreserveCaseFormatterConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PreserveCaseFormatterConfigMultiError) AllErrors() []error { return m } + +// PreserveCaseFormatterConfigValidationError is the validation error returned +// by PreserveCaseFormatterConfig.Validate if the designated constraints +// aren't met. +type PreserveCaseFormatterConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PreserveCaseFormatterConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PreserveCaseFormatterConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PreserveCaseFormatterConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PreserveCaseFormatterConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PreserveCaseFormatterConfigValidationError) ErrorName() string { + return "PreserveCaseFormatterConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e PreserveCaseFormatterConfigValidationError) 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 %sPreserveCaseFormatterConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PreserveCaseFormatterConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PreserveCaseFormatterConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/http/header_validators/envoy_default/v3/header_validator.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/http/header_validators/envoy_default/v3/header_validator.pb.go new file mode 100644 index 0000000000000..7f0933cc1a3db --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/http/header_validators/envoy_default/v3/header_validator.pb.go @@ -0,0 +1,519 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/http/header_validators/envoy_default/v3/header_validator.proto + +package envoy_defaultv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Determines the action for requests that contain “%2F“, “%2f“, “%5C“ or “%5c“ sequences in the URI path. +// This operation occurs before URL normalization and the merge slashes transformations if they were enabled. +type HeaderValidatorConfig_UriPathNormalizationOptions_PathWithEscapedSlashesAction int32 + +const ( + // Default behavior specific to implementation (i.e. Envoy) of this configuration option. + // Envoy, by default, takes the “KEEP_UNCHANGED“ action. + // NOTE: the implementation may change the default behavior at-will. + HeaderValidatorConfig_UriPathNormalizationOptions_IMPLEMENTATION_SPECIFIC_DEFAULT HeaderValidatorConfig_UriPathNormalizationOptions_PathWithEscapedSlashesAction = 0 + // Keep escaped slashes. + HeaderValidatorConfig_UriPathNormalizationOptions_KEEP_UNCHANGED HeaderValidatorConfig_UriPathNormalizationOptions_PathWithEscapedSlashesAction = 1 + // Reject client request with the 400 status. gRPC requests will be rejected with the “INTERNAL“ (13) error code. + // The “http#.downstream_rq_failed_path_normalization“ counter is incremented for each rejected request. + HeaderValidatorConfig_UriPathNormalizationOptions_REJECT_REQUEST HeaderValidatorConfig_UriPathNormalizationOptions_PathWithEscapedSlashesAction = 2 + // Unescape “%2F“ and “%5C“ sequences and redirect the request to the new path if these sequences were present. + // The redirect occurs after path normalization and merge slashes transformations if they were configured. + // NOTE: gRPC requests will be rejected with the “INTERNAL“ (13) error code. + // This option minimizes possibility of path confusion exploits by forcing request with unescaped slashes to + // traverse all parties: downstream client, intermediate proxies, Envoy and upstream server. + // The “http#.downstream_rq_redirected_with_normalized_path“ counter is incremented for each + // redirected request. + HeaderValidatorConfig_UriPathNormalizationOptions_UNESCAPE_AND_REDIRECT HeaderValidatorConfig_UriPathNormalizationOptions_PathWithEscapedSlashesAction = 3 + // Unescape “%2F“ and “%5C“ sequences. + // Note: this option should not be enabled if intermediaries perform path based access control as + // it may lead to path confusion vulnerabilities. + HeaderValidatorConfig_UriPathNormalizationOptions_UNESCAPE_AND_FORWARD HeaderValidatorConfig_UriPathNormalizationOptions_PathWithEscapedSlashesAction = 4 +) + +// Enum value maps for HeaderValidatorConfig_UriPathNormalizationOptions_PathWithEscapedSlashesAction. +var ( + HeaderValidatorConfig_UriPathNormalizationOptions_PathWithEscapedSlashesAction_name = map[int32]string{ + 0: "IMPLEMENTATION_SPECIFIC_DEFAULT", + 1: "KEEP_UNCHANGED", + 2: "REJECT_REQUEST", + 3: "UNESCAPE_AND_REDIRECT", + 4: "UNESCAPE_AND_FORWARD", + } + HeaderValidatorConfig_UriPathNormalizationOptions_PathWithEscapedSlashesAction_value = map[string]int32{ + "IMPLEMENTATION_SPECIFIC_DEFAULT": 0, + "KEEP_UNCHANGED": 1, + "REJECT_REQUEST": 2, + "UNESCAPE_AND_REDIRECT": 3, + "UNESCAPE_AND_FORWARD": 4, + } +) + +func (x HeaderValidatorConfig_UriPathNormalizationOptions_PathWithEscapedSlashesAction) Enum() *HeaderValidatorConfig_UriPathNormalizationOptions_PathWithEscapedSlashesAction { + p := new(HeaderValidatorConfig_UriPathNormalizationOptions_PathWithEscapedSlashesAction) + *p = x + return p +} + +func (x HeaderValidatorConfig_UriPathNormalizationOptions_PathWithEscapedSlashesAction) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HeaderValidatorConfig_UriPathNormalizationOptions_PathWithEscapedSlashesAction) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_enumTypes[0].Descriptor() +} + +func (HeaderValidatorConfig_UriPathNormalizationOptions_PathWithEscapedSlashesAction) Type() protoreflect.EnumType { + return &file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_enumTypes[0] +} + +func (x HeaderValidatorConfig_UriPathNormalizationOptions_PathWithEscapedSlashesAction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HeaderValidatorConfig_UriPathNormalizationOptions_PathWithEscapedSlashesAction.Descriptor instead. +func (HeaderValidatorConfig_UriPathNormalizationOptions_PathWithEscapedSlashesAction) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_rawDescGZIP(), []int{0, 0, 0} +} + +// This extension validates that HTTP request and response headers are well formed according to respective RFCs. +// +// #. HTTP/1 header map validity according to `RFC 7230 section 3.2 `_ +// #. Syntax of HTTP/1 request target URI and response status +// #. HTTP/2 header map validity according to `RFC 7540 section 8.1.2 `_ +// #. Syntax of HTTP/2 pseudo headers +// #. HTTP/3 header map validity according to `RFC 9114 section 4.3 `_ +// #. Syntax of HTTP/3 pseudo headers +// #. Syntax of Content-Length and Transfer-Encoding +// #. Validation of HTTP/1 requests with both “Content-Length“ and “Transfer-Encoding“ headers +// #. Normalization of the URI path according to `Normalization and Comparison `_ +// +// without `case normalization `_ +type HeaderValidatorConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Http1ProtocolOptions *HeaderValidatorConfig_Http1ProtocolOptions `protobuf:"bytes,1,opt,name=http1_protocol_options,json=http1ProtocolOptions,proto3" json:"http1_protocol_options,omitempty"` + // The URI path normalization options. + // By default Envoy normalizes URI path using the default values of the :ref:`UriPathNormalizationOptions + // `. + // URI path transformations specified by the “uri_path_normalization_options“ configuration can be applied to a portion + // of requests by setting the “envoy_default_header_validator.uri_path_transformations“ runtime value. + // Caution: disabling path normalization may lead to path confusion vulnerabilities in access control or incorrect service + // selection. + UriPathNormalizationOptions *HeaderValidatorConfig_UriPathNormalizationOptions `protobuf:"bytes,2,opt,name=uri_path_normalization_options,json=uriPathNormalizationOptions,proto3" json:"uri_path_normalization_options,omitempty"` + // Restrict HTTP methods to these defined in the `RFC 7231 section 4.1 `_ + // Envoy will respond with 400 to requests with disallowed methods. + // By default methods with arbitrary names are accepted. + RestrictHttpMethods bool `protobuf:"varint,3,opt,name=restrict_http_methods,json=restrictHttpMethods,proto3" json:"restrict_http_methods,omitempty"` +} + +func (x *HeaderValidatorConfig) Reset() { + *x = HeaderValidatorConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeaderValidatorConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeaderValidatorConfig) ProtoMessage() {} + +func (x *HeaderValidatorConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HeaderValidatorConfig.ProtoReflect.Descriptor instead. +func (*HeaderValidatorConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_rawDescGZIP(), []int{0} +} + +func (x *HeaderValidatorConfig) GetHttp1ProtocolOptions() *HeaderValidatorConfig_Http1ProtocolOptions { + if x != nil { + return x.Http1ProtocolOptions + } + return nil +} + +func (x *HeaderValidatorConfig) GetUriPathNormalizationOptions() *HeaderValidatorConfig_UriPathNormalizationOptions { + if x != nil { + return x.UriPathNormalizationOptions + } + return nil +} + +func (x *HeaderValidatorConfig) GetRestrictHttpMethods() bool { + if x != nil { + return x.RestrictHttpMethods + } + return false +} + +type HeaderValidatorConfig_UriPathNormalizationOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Should paths be normalized according to RFC 3986? + // This operation overwrites the original request URI path and the new path is used for processing of + // the request by HTTP filters and proxied to the upstream service. + // Envoy will respond with 400 to requests with malformed paths that fail path normalization. + // The default behavior is to normalize the path. + // This value may be overridden by the runtime variable + // :ref:`http_connection_manager.normalize_path`. + // See `Normalization and Comparison `_ + // for details of normalization. + // Note that Envoy does not perform + // `case normalization `_ + // URI path normalization can be applied to a portion of requests by setting the + // “envoy_default_header_validator.path_normalization“ runtime value. + SkipPathNormalization bool `protobuf:"varint,1,opt,name=skip_path_normalization,json=skipPathNormalization,proto3" json:"skip_path_normalization,omitempty"` + // Determines if adjacent slashes in the path are merged into one. + // This operation overwrites the original request URI path and the new path is used for processing of + // the request by HTTP filters and proxied to the upstream service. + // Setting this option to true will cause incoming requests with path “//dir///file“ to not match against + // route with “prefix“ match set to “/dir“. Defaults to “false“. Note that slash merging is not part of + // `HTTP spec `_ and is provided for convenience. + // Merging of slashes in URI path can be applied to a portion of requests by setting the + // “envoy_default_header_validator.merge_slashes“ runtime value. + SkipMergingSlashes bool `protobuf:"varint,2,opt,name=skip_merging_slashes,json=skipMergingSlashes,proto3" json:"skip_merging_slashes,omitempty"` + // The action to take when request URL path contains escaped slash sequences (“%2F“, “%2f“, “%5C“ and “%5c“). + // This operation may overwrite the original request URI path and the new path is used for processing of + // the request by HTTP filters and proxied to the upstream service. + PathWithEscapedSlashesAction HeaderValidatorConfig_UriPathNormalizationOptions_PathWithEscapedSlashesAction `protobuf:"varint,3,opt,name=path_with_escaped_slashes_action,json=pathWithEscapedSlashesAction,proto3,enum=envoy.extensions.http.header_validators.envoy_default.v3.HeaderValidatorConfig_UriPathNormalizationOptions_PathWithEscapedSlashesAction" json:"path_with_escaped_slashes_action,omitempty"` +} + +func (x *HeaderValidatorConfig_UriPathNormalizationOptions) Reset() { + *x = HeaderValidatorConfig_UriPathNormalizationOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeaderValidatorConfig_UriPathNormalizationOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeaderValidatorConfig_UriPathNormalizationOptions) ProtoMessage() {} + +func (x *HeaderValidatorConfig_UriPathNormalizationOptions) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HeaderValidatorConfig_UriPathNormalizationOptions.ProtoReflect.Descriptor instead. +func (*HeaderValidatorConfig_UriPathNormalizationOptions) Descriptor() ([]byte, []int) { + return file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *HeaderValidatorConfig_UriPathNormalizationOptions) GetSkipPathNormalization() bool { + if x != nil { + return x.SkipPathNormalization + } + return false +} + +func (x *HeaderValidatorConfig_UriPathNormalizationOptions) GetSkipMergingSlashes() bool { + if x != nil { + return x.SkipMergingSlashes + } + return false +} + +func (x *HeaderValidatorConfig_UriPathNormalizationOptions) GetPathWithEscapedSlashesAction() HeaderValidatorConfig_UriPathNormalizationOptions_PathWithEscapedSlashesAction { + if x != nil { + return x.PathWithEscapedSlashesAction + } + return HeaderValidatorConfig_UriPathNormalizationOptions_IMPLEMENTATION_SPECIFIC_DEFAULT +} + +type HeaderValidatorConfig_Http1ProtocolOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Allows Envoy to process HTTP/1 requests/responses with both “Content-Length“ and “Transfer-Encoding“ + // headers set. By default such messages are rejected, but if option is enabled - Envoy will + // remove the “Content-Length“ header and process the message. + // See `RFC7230, sec. 3.3.3 `_ for details. + // + // .. attention:: + // + // Enabling this option might lead to request smuggling vulnerabilities, especially if traffic + // is proxied via multiple layers of proxies. + AllowChunkedLength bool `protobuf:"varint,1,opt,name=allow_chunked_length,json=allowChunkedLength,proto3" json:"allow_chunked_length,omitempty"` +} + +func (x *HeaderValidatorConfig_Http1ProtocolOptions) Reset() { + *x = HeaderValidatorConfig_Http1ProtocolOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeaderValidatorConfig_Http1ProtocolOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeaderValidatorConfig_Http1ProtocolOptions) ProtoMessage() {} + +func (x *HeaderValidatorConfig_Http1ProtocolOptions) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HeaderValidatorConfig_Http1ProtocolOptions.ProtoReflect.Descriptor instead. +func (*HeaderValidatorConfig_Http1ProtocolOptions) Descriptor() ([]byte, []int) { + return file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *HeaderValidatorConfig_Http1ProtocolOptions) GetAllowChunkedLength() bool { + if x != nil { + return x.AllowChunkedLength + } + return false +} + +var File_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto protoreflect.FileDescriptor + +var file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_rawDesc = []byte{ + 0x0a, 0x4f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe6, 0x07, 0x0a, 0x15, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x9a, 0x01, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x64, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x33, + 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x14, 0x68, 0x74, 0x74, + 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0xb0, 0x01, 0x0a, 0x1e, 0x75, 0x72, 0x69, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x6e, + 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x6b, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x55, 0x72, 0x69, 0x50, + 0x61, 0x74, 0x68, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x1b, 0x75, 0x72, 0x69, 0x50, 0x61, 0x74, 0x68, + 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, + 0x5f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x13, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x48, 0x74, 0x74, + 0x70, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x1a, 0xfe, 0x03, 0x0a, 0x1b, 0x55, 0x72, 0x69, + 0x50, 0x61, 0x74, 0x68, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x6b, 0x69, 0x70, + 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x73, 0x6b, 0x69, 0x70, 0x50, + 0x61, 0x74, 0x68, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x30, 0x0a, 0x14, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x6d, 0x65, 0x72, 0x67, 0x69, 0x6e, 0x67, + 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, + 0x73, 0x6b, 0x69, 0x70, 0x4d, 0x65, 0x72, 0x67, 0x69, 0x6e, 0x67, 0x53, 0x6c, 0x61, 0x73, 0x68, + 0x65, 0x73, 0x12, 0xd1, 0x01, 0x0a, 0x20, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x77, 0x69, 0x74, 0x68, + 0x5f, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, + 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x88, 0x01, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x55, 0x72, 0x69, 0x50, 0x61, 0x74, 0x68, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x50, 0x61, 0x74, 0x68, + 0x57, 0x69, 0x74, 0x68, 0x45, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x53, 0x6c, 0x61, 0x73, 0x68, + 0x65, 0x73, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1c, 0x70, 0x61, 0x74, 0x68, 0x57, 0x69, + 0x74, 0x68, 0x45, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa0, 0x01, 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x68, 0x57, + 0x69, 0x74, 0x68, 0x45, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, + 0x73, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x1f, 0x49, 0x4d, 0x50, 0x4c, 0x45, + 0x4d, 0x45, 0x4e, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x43, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, + 0x4b, 0x45, 0x45, 0x50, 0x5f, 0x55, 0x4e, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x01, + 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, + 0x53, 0x54, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x4e, 0x45, 0x53, 0x43, 0x41, 0x50, 0x45, + 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x03, 0x12, + 0x18, 0x0a, 0x14, 0x55, 0x4e, 0x45, 0x53, 0x43, 0x41, 0x50, 0x45, 0x5f, 0x41, 0x4e, 0x44, 0x5f, + 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x10, 0x04, 0x1a, 0x48, 0x0a, 0x14, 0x48, 0x74, 0x74, + 0x70, 0x31, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x30, 0x0a, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x63, 0x68, 0x75, 0x6e, 0x6b, + 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x65, 0x64, 0x4c, 0x65, 0x6e, + 0x67, 0x74, 0x68, 0x42, 0xd9, 0x01, 0x0a, 0x46, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x14, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x68, 0x74, 0x74, 0x70, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_rawDescOnce sync.Once + file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_rawDescData = file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_rawDesc +) + +func file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_rawDescGZIP() []byte { + file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_rawDescOnce.Do(func() { + file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_rawDescData) + }) + return file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_rawDescData +} + +var file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_goTypes = []interface{}{ + (HeaderValidatorConfig_UriPathNormalizationOptions_PathWithEscapedSlashesAction)(0), // 0: envoy.extensions.http.header_validators.envoy_default.v3.HeaderValidatorConfig.UriPathNormalizationOptions.PathWithEscapedSlashesAction + (*HeaderValidatorConfig)(nil), // 1: envoy.extensions.http.header_validators.envoy_default.v3.HeaderValidatorConfig + (*HeaderValidatorConfig_UriPathNormalizationOptions)(nil), // 2: envoy.extensions.http.header_validators.envoy_default.v3.HeaderValidatorConfig.UriPathNormalizationOptions + (*HeaderValidatorConfig_Http1ProtocolOptions)(nil), // 3: envoy.extensions.http.header_validators.envoy_default.v3.HeaderValidatorConfig.Http1ProtocolOptions +} +var file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_depIdxs = []int32{ + 3, // 0: envoy.extensions.http.header_validators.envoy_default.v3.HeaderValidatorConfig.http1_protocol_options:type_name -> envoy.extensions.http.header_validators.envoy_default.v3.HeaderValidatorConfig.Http1ProtocolOptions + 2, // 1: envoy.extensions.http.header_validators.envoy_default.v3.HeaderValidatorConfig.uri_path_normalization_options:type_name -> envoy.extensions.http.header_validators.envoy_default.v3.HeaderValidatorConfig.UriPathNormalizationOptions + 0, // 2: envoy.extensions.http.header_validators.envoy_default.v3.HeaderValidatorConfig.UriPathNormalizationOptions.path_with_escaped_slashes_action:type_name -> envoy.extensions.http.header_validators.envoy_default.v3.HeaderValidatorConfig.UriPathNormalizationOptions.PathWithEscapedSlashesAction + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_init() +} +func file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_init() { + if File_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeaderValidatorConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeaderValidatorConfig_UriPathNormalizationOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeaderValidatorConfig_Http1ProtocolOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_rawDesc, + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_goTypes, + DependencyIndexes: file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_depIdxs, + EnumInfos: file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_enumTypes, + MessageInfos: file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_msgTypes, + }.Build() + File_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto = out.File + file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_rawDesc = nil + file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_goTypes = nil + file_envoy_extensions_http_header_validators_envoy_default_v3_header_validator_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/http/header_validators/envoy_default/v3/header_validator.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/http/header_validators/envoy_default/v3/header_validator.pb.validate.go new file mode 100644 index 0000000000000..70a4de0cfdc2d --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/http/header_validators/envoy_default/v3/header_validator.pb.validate.go @@ -0,0 +1,422 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/http/header_validators/envoy_default/v3/header_validator.proto + +package envoy_defaultv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on HeaderValidatorConfig 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 *HeaderValidatorConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeaderValidatorConfig 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 +// HeaderValidatorConfigMultiError, or nil if none found. +func (m *HeaderValidatorConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderValidatorConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetHttp1ProtocolOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderValidatorConfigValidationError{ + field: "Http1ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderValidatorConfigValidationError{ + field: "Http1ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttp1ProtocolOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderValidatorConfigValidationError{ + field: "Http1ProtocolOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetUriPathNormalizationOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderValidatorConfigValidationError{ + field: "UriPathNormalizationOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderValidatorConfigValidationError{ + field: "UriPathNormalizationOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUriPathNormalizationOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeaderValidatorConfigValidationError{ + field: "UriPathNormalizationOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for RestrictHttpMethods + + if len(errors) > 0 { + return HeaderValidatorConfigMultiError(errors) + } + return nil +} + +// HeaderValidatorConfigMultiError is an error wrapping multiple validation +// errors returned by HeaderValidatorConfig.ValidateAll() if the designated +// constraints aren't met. +type HeaderValidatorConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderValidatorConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderValidatorConfigMultiError) AllErrors() []error { return m } + +// HeaderValidatorConfigValidationError is the validation error returned by +// HeaderValidatorConfig.Validate if the designated constraints aren't met. +type HeaderValidatorConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HeaderValidatorConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HeaderValidatorConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HeaderValidatorConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HeaderValidatorConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HeaderValidatorConfigValidationError) ErrorName() string { + return "HeaderValidatorConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e HeaderValidatorConfigValidationError) 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 %sHeaderValidatorConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HeaderValidatorConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HeaderValidatorConfigValidationError{} + +// Validate checks the field values on +// HeaderValidatorConfig_UriPathNormalizationOptions 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 *HeaderValidatorConfig_UriPathNormalizationOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// HeaderValidatorConfig_UriPathNormalizationOptions 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 +// HeaderValidatorConfig_UriPathNormalizationOptionsMultiError, or nil if none found. +func (m *HeaderValidatorConfig_UriPathNormalizationOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderValidatorConfig_UriPathNormalizationOptions) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for SkipPathNormalization + + // no validation rules for SkipMergingSlashes + + // no validation rules for PathWithEscapedSlashesAction + + if len(errors) > 0 { + return HeaderValidatorConfig_UriPathNormalizationOptionsMultiError(errors) + } + return nil +} + +// HeaderValidatorConfig_UriPathNormalizationOptionsMultiError is an error +// wrapping multiple validation errors returned by +// HeaderValidatorConfig_UriPathNormalizationOptions.ValidateAll() if the +// designated constraints aren't met. +type HeaderValidatorConfig_UriPathNormalizationOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderValidatorConfig_UriPathNormalizationOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderValidatorConfig_UriPathNormalizationOptionsMultiError) AllErrors() []error { return m } + +// HeaderValidatorConfig_UriPathNormalizationOptionsValidationError is the +// validation error returned by +// HeaderValidatorConfig_UriPathNormalizationOptions.Validate if the +// designated constraints aren't met. +type HeaderValidatorConfig_UriPathNormalizationOptionsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HeaderValidatorConfig_UriPathNormalizationOptionsValidationError) Field() string { + return e.field +} + +// Reason function returns reason value. +func (e HeaderValidatorConfig_UriPathNormalizationOptionsValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e HeaderValidatorConfig_UriPathNormalizationOptionsValidationError) Cause() error { + return e.cause +} + +// Key function returns key value. +func (e HeaderValidatorConfig_UriPathNormalizationOptionsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HeaderValidatorConfig_UriPathNormalizationOptionsValidationError) ErrorName() string { + return "HeaderValidatorConfig_UriPathNormalizationOptionsValidationError" +} + +// Error satisfies the builtin error interface +func (e HeaderValidatorConfig_UriPathNormalizationOptionsValidationError) 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 %sHeaderValidatorConfig_UriPathNormalizationOptions.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HeaderValidatorConfig_UriPathNormalizationOptionsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HeaderValidatorConfig_UriPathNormalizationOptionsValidationError{} + +// Validate checks the field values on +// HeaderValidatorConfig_Http1ProtocolOptions 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 *HeaderValidatorConfig_Http1ProtocolOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// HeaderValidatorConfig_Http1ProtocolOptions 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 +// HeaderValidatorConfig_Http1ProtocolOptionsMultiError, or nil if none found. +func (m *HeaderValidatorConfig_Http1ProtocolOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderValidatorConfig_Http1ProtocolOptions) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for AllowChunkedLength + + if len(errors) > 0 { + return HeaderValidatorConfig_Http1ProtocolOptionsMultiError(errors) + } + return nil +} + +// HeaderValidatorConfig_Http1ProtocolOptionsMultiError is an error wrapping +// multiple validation errors returned by +// HeaderValidatorConfig_Http1ProtocolOptions.ValidateAll() if the designated +// constraints aren't met. +type HeaderValidatorConfig_Http1ProtocolOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderValidatorConfig_Http1ProtocolOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderValidatorConfig_Http1ProtocolOptionsMultiError) AllErrors() []error { return m } + +// HeaderValidatorConfig_Http1ProtocolOptionsValidationError is the validation +// error returned by HeaderValidatorConfig_Http1ProtocolOptions.Validate if +// the designated constraints aren't met. +type HeaderValidatorConfig_Http1ProtocolOptionsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HeaderValidatorConfig_Http1ProtocolOptionsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HeaderValidatorConfig_Http1ProtocolOptionsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HeaderValidatorConfig_Http1ProtocolOptionsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HeaderValidatorConfig_Http1ProtocolOptionsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HeaderValidatorConfig_Http1ProtocolOptionsValidationError) ErrorName() string { + return "HeaderValidatorConfig_Http1ProtocolOptionsValidationError" +} + +// Error satisfies the builtin error interface +func (e HeaderValidatorConfig_Http1ProtocolOptionsValidationError) 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 %sHeaderValidatorConfig_Http1ProtocolOptions.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HeaderValidatorConfig_Http1ProtocolOptionsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HeaderValidatorConfig_Http1ProtocolOptionsValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/http/original_ip_detection/custom_header/v3/custom_header.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/http/original_ip_detection/custom_header/v3/custom_header.pb.go new file mode 100644 index 0000000000000..ab8e814fa6f03 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/http/original_ip_detection/custom_header/v3/custom_header.pb.go @@ -0,0 +1,228 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/http/original_ip_detection/custom_header/v3/custom_header.proto + +package custom_headerv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/type/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// This extension allows for the original downstream remote IP to be detected +// by reading the value from a configured header name. If the value is successfully parsed +// as an IP, it'll be treated as the effective downstream remote address and seen as such +// by all filters. See :ref:`original_ip_detection_extensions +// ` +// for an overview of how extensions operate and what happens when an extension fails +// to detect the remote IP. +// +// [#extension: envoy.http.original_ip_detection.custom_header] +type CustomHeaderConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The header name containing the original downstream remote address, if present. + // + // Note: in the case of a multi-valued header, only the first value is tried and the rest are ignored. + HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"` + // If set to true, the extension could decide that the detected address should be treated as + // trusted by the HCM. If the address is considered :ref:`trusted`, + // it might be used as input to determine if the request is internal (among other things). + AllowExtensionToSetAddressAsTrusted bool `protobuf:"varint,2,opt,name=allow_extension_to_set_address_as_trusted,json=allowExtensionToSetAddressAsTrusted,proto3" json:"allow_extension_to_set_address_as_trusted,omitempty"` + // If this is set, the request will be rejected when detection fails using it as the HTTP response status. + // + // .. note:: + // + // If this is set to < 400 or > 511, the default status 403 will be used instead. + RejectWithStatus *v3.HttpStatus `protobuf:"bytes,3,opt,name=reject_with_status,json=rejectWithStatus,proto3" json:"reject_with_status,omitempty"` +} + +func (x *CustomHeaderConfig) Reset() { + *x = CustomHeaderConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CustomHeaderConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CustomHeaderConfig) ProtoMessage() {} + +func (x *CustomHeaderConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CustomHeaderConfig.ProtoReflect.Descriptor instead. +func (*CustomHeaderConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDescGZIP(), []int{0} +} + +func (x *CustomHeaderConfig) GetHeaderName() string { + if x != nil { + return x.HeaderName + } + return "" +} + +func (x *CustomHeaderConfig) GetAllowExtensionToSetAddressAsTrusted() bool { + if x != nil { + return x.AllowExtensionToSetAddressAsTrusted + } + return false +} + +func (x *CustomHeaderConfig) GetRejectWithStatus() *v3.HttpStatus { + if x != nil { + return x.RejectWithStatus + } + return nil +} + +var File_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto protoreflect.FileDescriptor + +var file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDesc = []byte{ + 0x0a, 0x50, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, + 0x5f, 0x69, 0x70, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, + 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xe5, 0x01, 0x0a, 0x12, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x2e, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc0, 0x01, + 0x01, 0xc8, 0x01, 0x01, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x56, 0x0a, 0x29, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x5f, 0x61, 0x73, 0x5f, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x23, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x53, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x41, + 0x73, 0x54, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x12, 0x72, 0x65, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x10, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x57, 0x69, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x42, 0xde, 0x01, 0x0a, 0x4a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x42, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x73, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x68, + 0x74, 0x74, 0x70, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x5f, + 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDescOnce sync.Once + file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDescData = file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDesc +) + +func file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDescGZIP() []byte { + file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDescOnce.Do(func() { + file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDescData) + }) + return file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDescData +} + +var file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_goTypes = []interface{}{ + (*CustomHeaderConfig)(nil), // 0: envoy.extensions.http.original_ip_detection.custom_header.v3.CustomHeaderConfig + (*v3.HttpStatus)(nil), // 1: envoy.type.v3.HttpStatus +} +var file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.http.original_ip_detection.custom_header.v3.CustomHeaderConfig.reject_with_status:type_name -> envoy.type.v3.HttpStatus + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_init() +} +func file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_init() { + if File_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CustomHeaderConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_goTypes, + DependencyIndexes: file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_depIdxs, + MessageInfos: file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_msgTypes, + }.Build() + File_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto = out.File + file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_rawDesc = nil + file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_goTypes = nil + file_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/http/original_ip_detection/custom_header/v3/custom_header.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/http/original_ip_detection/custom_header/v3/custom_header.pb.validate.go new file mode 100644 index 0000000000000..f35312af13812 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/http/original_ip_detection/custom_header/v3/custom_header.pb.validate.go @@ -0,0 +1,192 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/http/original_ip_detection/custom_header/v3/custom_header.proto + +package custom_headerv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on CustomHeaderConfig 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 *CustomHeaderConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CustomHeaderConfig 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 +// CustomHeaderConfigMultiError, or nil if none found. +func (m *CustomHeaderConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *CustomHeaderConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetHeaderName()) < 1 { + err := CustomHeaderConfigValidationError{ + field: "HeaderName", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if !_CustomHeaderConfig_HeaderName_Pattern.MatchString(m.GetHeaderName()) { + err := CustomHeaderConfigValidationError{ + field: "HeaderName", + reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for AllowExtensionToSetAddressAsTrusted + + if all { + switch v := interface{}(m.GetRejectWithStatus()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CustomHeaderConfigValidationError{ + field: "RejectWithStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CustomHeaderConfigValidationError{ + field: "RejectWithStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRejectWithStatus()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CustomHeaderConfigValidationError{ + field: "RejectWithStatus", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return CustomHeaderConfigMultiError(errors) + } + return nil +} + +// CustomHeaderConfigMultiError is an error wrapping multiple validation errors +// returned by CustomHeaderConfig.ValidateAll() if the designated constraints +// aren't met. +type CustomHeaderConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CustomHeaderConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CustomHeaderConfigMultiError) AllErrors() []error { return m } + +// CustomHeaderConfigValidationError is the validation error returned by +// CustomHeaderConfig.Validate if the designated constraints aren't met. +type CustomHeaderConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CustomHeaderConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CustomHeaderConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CustomHeaderConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CustomHeaderConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CustomHeaderConfigValidationError) ErrorName() string { + return "CustomHeaderConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e CustomHeaderConfigValidationError) 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 %sCustomHeaderConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CustomHeaderConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CustomHeaderConfigValidationError{} + +var _CustomHeaderConfig_HeaderName_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$") diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/http/original_ip_detection/xff/v3/xff.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/http/original_ip_detection/xff/v3/xff.pb.go new file mode 100644 index 0000000000000..deb37688f9389 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/http/original_ip_detection/xff/v3/xff.pb.go @@ -0,0 +1,177 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/http/original_ip_detection/xff/v3/xff.proto + +package xffv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// This extension allows for the original downstream remote IP to be detected +// by reading the :ref:`config_http_conn_man_headers_x-forwarded-for` header. +// +// [#extension: envoy.http.original_ip_detection.xff] +type XffConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The number of additional ingress proxy hops from the right side of the + // :ref:`config_http_conn_man_headers_x-forwarded-for` HTTP header to trust when + // determining the origin client's IP address. The default is zero if this option + // is not specified. See the documentation for + // :ref:`config_http_conn_man_headers_x-forwarded-for` for more information. + XffNumTrustedHops uint32 `protobuf:"varint,1,opt,name=xff_num_trusted_hops,json=xffNumTrustedHops,proto3" json:"xff_num_trusted_hops,omitempty"` +} + +func (x *XffConfig) Reset() { + *x = XffConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *XffConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*XffConfig) ProtoMessage() {} + +func (x *XffConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use XffConfig.ProtoReflect.Descriptor instead. +func (*XffConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDescGZIP(), []int{0} +} + +func (x *XffConfig) GetXffNumTrustedHops() uint32 { + if x != nil { + return x.XffNumTrustedHops + } + return 0 +} + +var File_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto protoreflect.FileDescriptor + +var file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDesc = []byte{ + 0x0a, 0x3c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, + 0x5f, 0x69, 0x70, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x66, + 0x66, 0x2f, 0x76, 0x33, 0x2f, 0x78, 0x66, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x32, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x69, + 0x70, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x66, 0x66, 0x2e, + 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x3c, 0x0a, 0x09, 0x58, 0x66, 0x66, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2f, + 0x0a, 0x14, 0x78, 0x66, 0x66, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, + 0x64, 0x5f, 0x68, 0x6f, 0x70, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x78, 0x66, + 0x66, 0x4e, 0x75, 0x6d, 0x54, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x48, 0x6f, 0x70, 0x73, 0x42, + 0xb7, 0x01, 0x0a, 0x40, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, + 0x5f, 0x69, 0x70, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x66, + 0x66, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x58, 0x66, 0x66, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x5f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x70, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x66, 0x66, 0x2f, 0x76, 0x33, 0x3b, 0x78, 0x66, 0x66, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDescOnce sync.Once + file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDescData = file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDesc +) + +func file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDescGZIP() []byte { + file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDescOnce.Do(func() { + file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDescData) + }) + return file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDescData +} + +var file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_goTypes = []interface{}{ + (*XffConfig)(nil), // 0: envoy.extensions.http.original_ip_detection.xff.v3.XffConfig +} +var file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_init() } +func file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_init() { + if File_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*XffConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_goTypes, + DependencyIndexes: file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_depIdxs, + MessageInfos: file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_msgTypes, + }.Build() + File_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto = out.File + file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_rawDesc = nil + file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_goTypes = nil + file_envoy_extensions_http_original_ip_detection_xff_v3_xff_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/http/original_ip_detection/xff/v3/xff.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/http/original_ip_detection/xff/v3/xff.pb.validate.go new file mode 100644 index 0000000000000..740b8c981cc8c --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/http/original_ip_detection/xff/v3/xff.pb.validate.go @@ -0,0 +1,136 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/http/original_ip_detection/xff/v3/xff.proto + +package xffv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on XffConfig 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 *XffConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on XffConfig 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 XffConfigMultiError, or nil +// if none found. +func (m *XffConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *XffConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for XffNumTrustedHops + + if len(errors) > 0 { + return XffConfigMultiError(errors) + } + return nil +} + +// XffConfigMultiError is an error wrapping multiple validation errors returned +// by XffConfig.ValidateAll() if the designated constraints aren't met. +type XffConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m XffConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m XffConfigMultiError) AllErrors() []error { return m } + +// XffConfigValidationError is the validation error returned by +// XffConfig.Validate if the designated constraints aren't met. +type XffConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e XffConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e XffConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e XffConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e XffConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e XffConfigValidationError) ErrorName() string { return "XffConfigValidationError" } + +// Error satisfies the builtin error interface +func (e XffConfigValidationError) 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 %sXffConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = XffConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = XffConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/http/stateful_session/cookie/v3/cookie.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/http/stateful_session/cookie/v3/cookie.pb.go new file mode 100644 index 0000000000000..758c10a143317 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/http/stateful_session/cookie/v3/cookie.pb.go @@ -0,0 +1,200 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/http/stateful_session/cookie/v3/cookie.proto + +package cookiev3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/type/http/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// This extension allows the session state to be tracked via cookies. +// +// This extension first encodes the address of the upstream host selected by the load balancer +// into a “set-cookie“ response header with the :ref:`cookie configuration +// `. +// when new requests are incoming, this extension will try to parse the specific upstream host +// address by the cookie name. If the address parsed from the cookie corresponds to a valid +// upstream host, this upstream host will be selected first. See :ref:`stateful session filter +// `. +// +// For example, if the cookie name is set to “sticky-host“, envoy will prefer “1.2.3.4:80“ +// as the upstream host when the request contains the following header: +// +// .. code-block:: none +// +// cookie: sticky-host="MS4yLjMuNDo4MA==" +// +// When processing the upstream response, if “1.2.3.4:80“ is indeed the final choice the extension +// does nothing. If “1.2.3.4:80“ is not the final choice, the new selected host will be used to +// update the cookie (via the “set-cookie“ response header). +// +// [#extension: envoy.http.stateful_session.cookie] +type CookieBasedSessionState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The cookie configuration used to track session state. + Cookie *v3.Cookie `protobuf:"bytes,1,opt,name=cookie,proto3" json:"cookie,omitempty"` +} + +func (x *CookieBasedSessionState) Reset() { + *x = CookieBasedSessionState{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CookieBasedSessionState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CookieBasedSessionState) ProtoMessage() {} + +func (x *CookieBasedSessionState) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CookieBasedSessionState.ProtoReflect.Descriptor instead. +func (*CookieBasedSessionState) Descriptor() ([]byte, []int) { + return file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDescGZIP(), []int{0} +} + +func (x *CookieBasedSessionState) GetCookie() *v3.Cookie { + if x != nil { + return x.Cookie + } + return nil +} + +var File_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto protoreflect.FileDescriptor + +var file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDesc = []byte{ + 0x0a, 0x3d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, + 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x2f, + 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x5f, + 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x2e, 0x76, + 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x68, 0x74, + 0x74, 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x57, 0x0a, 0x17, 0x43, 0x6f, + 0x6f, 0x6b, 0x69, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6f, 0x6b, 0x69, + 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x63, 0x6f, 0x6f, + 0x6b, 0x69, 0x65, 0x42, 0xb9, 0x01, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x66, 0x75, 0x6c, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x63, 0x6f, 0x6f, + 0x6b, 0x69, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x60, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x68, + 0x74, 0x74, 0x70, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x5f, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x63, + 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDescOnce sync.Once + file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDescData = file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDesc +) + +func file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDescGZIP() []byte { + file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDescOnce.Do(func() { + file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDescData) + }) + return file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDescData +} + +var file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_goTypes = []interface{}{ + (*CookieBasedSessionState)(nil), // 0: envoy.extensions.http.stateful_session.cookie.v3.CookieBasedSessionState + (*v3.Cookie)(nil), // 1: envoy.type.http.v3.Cookie +} +var file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.http.stateful_session.cookie.v3.CookieBasedSessionState.cookie:type_name -> envoy.type.http.v3.Cookie + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_init() } +func file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_init() { + if File_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CookieBasedSessionState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_goTypes, + DependencyIndexes: file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_depIdxs, + MessageInfos: file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_msgTypes, + }.Build() + File_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto = out.File + file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_rawDesc = nil + file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_goTypes = nil + file_envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/http/stateful_session/cookie/v3/cookie.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/http/stateful_session/cookie/v3/cookie.pb.validate.go new file mode 100644 index 0000000000000..a7e73b0188fa2 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/http/stateful_session/cookie/v3/cookie.pb.validate.go @@ -0,0 +1,177 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/http/stateful_session/cookie/v3/cookie.proto + +package cookiev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on CookieBasedSessionState 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 *CookieBasedSessionState) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CookieBasedSessionState 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 +// CookieBasedSessionStateMultiError, or nil if none found. +func (m *CookieBasedSessionState) ValidateAll() error { + return m.validate(true) +} + +func (m *CookieBasedSessionState) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetCookie() == nil { + err := CookieBasedSessionStateValidationError{ + field: "Cookie", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetCookie()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CookieBasedSessionStateValidationError{ + field: "Cookie", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CookieBasedSessionStateValidationError{ + field: "Cookie", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCookie()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CookieBasedSessionStateValidationError{ + field: "Cookie", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return CookieBasedSessionStateMultiError(errors) + } + return nil +} + +// CookieBasedSessionStateMultiError is an error wrapping multiple validation +// errors returned by CookieBasedSessionState.ValidateAll() if the designated +// constraints aren't met. +type CookieBasedSessionStateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CookieBasedSessionStateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CookieBasedSessionStateMultiError) AllErrors() []error { return m } + +// CookieBasedSessionStateValidationError is the validation error returned by +// CookieBasedSessionState.Validate if the designated constraints aren't met. +type CookieBasedSessionStateValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CookieBasedSessionStateValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CookieBasedSessionStateValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CookieBasedSessionStateValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CookieBasedSessionStateValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CookieBasedSessionStateValidationError) ErrorName() string { + return "CookieBasedSessionStateValidationError" +} + +// Error satisfies the builtin error interface +func (e CookieBasedSessionStateValidationError) 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 %sCookieBasedSessionState.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CookieBasedSessionStateValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CookieBasedSessionStateValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.pb.go new file mode 100644 index 0000000000000..a72d322d4ce5e --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.pb.go @@ -0,0 +1,184 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.proto + +package allow_listed_routesv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// An internal redirect predicate that accepts only explicitly allowed target routes. +// [#extension: envoy.internal_redirect_predicates.allow_listed_routes] +type AllowListedRoutesConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of routes that's allowed as redirect target by this predicate, + // identified by the route's :ref:`name `. + // Empty route names are not allowed. + AllowedRouteNames []string `protobuf:"bytes,1,rep,name=allowed_route_names,json=allowedRouteNames,proto3" json:"allowed_route_names,omitempty"` +} + +func (x *AllowListedRoutesConfig) Reset() { + *x = AllowListedRoutesConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AllowListedRoutesConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AllowListedRoutesConfig) ProtoMessage() {} + +func (x *AllowListedRoutesConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AllowListedRoutesConfig.ProtoReflect.Descriptor instead. +func (*AllowListedRoutesConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_rawDescGZIP(), []int{0} +} + +func (x *AllowListedRoutesConfig) GetAllowedRouteNames() []string { + if x != nil { + return x.AllowedRouteNames + } + return nil +} + +var File_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto protoreflect.FileDescriptor + +var file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_rawDesc = []byte{ + 0x0a, 0x5a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x39, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x2e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 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, + 0x57, 0x0a, 0x17, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3c, 0x0a, 0x13, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0x92, 0x01, 0x06, 0x22, + 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x42, 0xe9, 0x01, 0x0a, 0x47, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x2e, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x73, 0x2e, 0x76, 0x33, 0x42, 0x1c, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x4c, 0x69, 0x73, 0x74, 0x65, + 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x76, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x2f, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x6c, 0x69, 0x73, + 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_rawDescOnce sync.Once + file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_rawDescData = file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_rawDesc +) + +func file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_rawDescGZIP() []byte { + file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_rawDescOnce.Do(func() { + file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_rawDescData) + }) + return file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_rawDescData +} + +var file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_goTypes = []interface{}{ + (*AllowListedRoutesConfig)(nil), // 0: envoy.extensions.internal_redirect.allow_listed_routes.v3.AllowListedRoutesConfig +} +var file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_init() +} +func file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_init() { + if File_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AllowListedRoutesConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_goTypes, + DependencyIndexes: file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_depIdxs, + MessageInfos: file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_msgTypes, + }.Build() + File_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto = out.File + file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_rawDesc = nil + file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_goTypes = nil + file_envoy_extensions_internal_redirect_allow_listed_routes_v3_allow_listed_routes_config_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.pb.validate.go new file mode 100644 index 0000000000000..cc63399bbc879 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.pb.validate.go @@ -0,0 +1,153 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/internal_redirect/allow_listed_routes/v3/allow_listed_routes_config.proto + +package allow_listed_routesv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on AllowListedRoutesConfig 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 *AllowListedRoutesConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AllowListedRoutesConfig 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 +// AllowListedRoutesConfigMultiError, or nil if none found. +func (m *AllowListedRoutesConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *AllowListedRoutesConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetAllowedRouteNames() { + _, _ = idx, item + + if utf8.RuneCountInString(item) < 1 { + err := AllowListedRoutesConfigValidationError{ + field: fmt.Sprintf("AllowedRouteNames[%v]", idx), + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if len(errors) > 0 { + return AllowListedRoutesConfigMultiError(errors) + } + return nil +} + +// AllowListedRoutesConfigMultiError is an error wrapping multiple validation +// errors returned by AllowListedRoutesConfig.ValidateAll() if the designated +// constraints aren't met. +type AllowListedRoutesConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AllowListedRoutesConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AllowListedRoutesConfigMultiError) AllErrors() []error { return m } + +// AllowListedRoutesConfigValidationError is the validation error returned by +// AllowListedRoutesConfig.Validate if the designated constraints aren't met. +type AllowListedRoutesConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AllowListedRoutesConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AllowListedRoutesConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AllowListedRoutesConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AllowListedRoutesConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AllowListedRoutesConfigValidationError) ErrorName() string { + return "AllowListedRoutesConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e AllowListedRoutesConfigValidationError) 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 %sAllowListedRoutesConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AllowListedRoutesConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AllowListedRoutesConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.pb.go new file mode 100644 index 0000000000000..0a931f6347bbf --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.pb.go @@ -0,0 +1,165 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.proto + +package previous_routesv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// An internal redirect predicate that rejects redirect targets that are pointing +// to a route that has been followed by a previous redirect from the current route. +// [#extension: envoy.internal_redirect_predicates.previous_routes] +type PreviousRoutesConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PreviousRoutesConfig) Reset() { + *x = PreviousRoutesConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PreviousRoutesConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreviousRoutesConfig) ProtoMessage() {} + +func (x *PreviousRoutesConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreviousRoutesConfig.ProtoReflect.Descriptor instead. +func (*PreviousRoutesConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto protoreflect.FileDescriptor + +var file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_rawDesc = []byte{ + 0x0a, 0x52, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, + 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, + 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, + 0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x16, 0x0a, 0x14, 0x50, 0x72, + 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x42, 0xda, 0x01, 0x0a, 0x43, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, + 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, + 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x19, 0x50, 0x72, 0x65, 0x76, + 0x69, 0x6f, 0x75, 0x73, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x2f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x72, 0x6f, 0x75, 0x74, + 0x65, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_rawDescOnce sync.Once + file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_rawDescData = file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_rawDesc +) + +func file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_rawDescGZIP() []byte { + file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_rawDescOnce.Do(func() { + file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_rawDescData) + }) + return file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_rawDescData +} + +var file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_goTypes = []interface{}{ + (*PreviousRoutesConfig)(nil), // 0: envoy.extensions.internal_redirect.previous_routes.v3.PreviousRoutesConfig +} +var file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_init() +} +func file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_init() { + if File_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PreviousRoutesConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_goTypes, + DependencyIndexes: file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_depIdxs, + MessageInfos: file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_msgTypes, + }.Build() + File_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto = out.File + file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_rawDesc = nil + file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_goTypes = nil + file_envoy_extensions_internal_redirect_previous_routes_v3_previous_routes_config_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.pb.validate.go new file mode 100644 index 0000000000000..17ffb1fc9987a --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.pb.validate.go @@ -0,0 +1,137 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/internal_redirect/previous_routes/v3/previous_routes_config.proto + +package previous_routesv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on PreviousRoutesConfig 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 *PreviousRoutesConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PreviousRoutesConfig 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 +// PreviousRoutesConfigMultiError, or nil if none found. +func (m *PreviousRoutesConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *PreviousRoutesConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return PreviousRoutesConfigMultiError(errors) + } + return nil +} + +// PreviousRoutesConfigMultiError is an error wrapping multiple validation +// errors returned by PreviousRoutesConfig.ValidateAll() if the designated +// constraints aren't met. +type PreviousRoutesConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PreviousRoutesConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PreviousRoutesConfigMultiError) AllErrors() []error { return m } + +// PreviousRoutesConfigValidationError is the validation error returned by +// PreviousRoutesConfig.Validate if the designated constraints aren't met. +type PreviousRoutesConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PreviousRoutesConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PreviousRoutesConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PreviousRoutesConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PreviousRoutesConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PreviousRoutesConfigValidationError) ErrorName() string { + return "PreviousRoutesConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e PreviousRoutesConfigValidationError) 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 %sPreviousRoutesConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PreviousRoutesConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PreviousRoutesConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.pb.go new file mode 100644 index 0000000000000..9b3ff4d5faf63 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.pb.go @@ -0,0 +1,169 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.proto + +package safe_cross_schemev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// An internal redirect predicate that checks the scheme between the +// downstream url and the redirect target url and allows a) same scheme +// redirect and b) safe cross scheme redirect, which means if the downstream +// scheme is HTTPS, both HTTPS and HTTP redirect targets are allowed, but if the +// downstream scheme is HTTP, only HTTP redirect targets are allowed. +// [#extension: envoy.internal_redirect_predicates.safe_cross_scheme] +type SafeCrossSchemeConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SafeCrossSchemeConfig) Reset() { + *x = SafeCrossSchemeConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SafeCrossSchemeConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SafeCrossSchemeConfig) ProtoMessage() {} + +func (x *SafeCrossSchemeConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SafeCrossSchemeConfig.ProtoReflect.Descriptor instead. +func (*SafeCrossSchemeConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto protoreflect.FileDescriptor + +var file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_rawDesc = []byte{ + 0x0a, 0x56, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, + 0x72, 0x65, 0x63, 0x74, 0x2f, 0x73, 0x61, 0x66, 0x65, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x61, 0x66, 0x65, 0x5f, 0x63, + 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x2e, 0x73, 0x61, 0x66, + 0x65, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x76, + 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x17, 0x0a, 0x15, 0x53, 0x61, 0x66, 0x65, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xe1, 0x01, 0x0a, 0x45, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x2e, 0x73, + 0x61, 0x66, 0x65, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, + 0x2e, 0x76, 0x33, 0x42, 0x1a, 0x53, 0x61, 0x66, 0x65, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x72, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x2f, 0x73, 0x61, 0x66, + 0x65, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2f, 0x76, + 0x33, 0x3b, 0x73, 0x61, 0x66, 0x65, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_rawDescOnce sync.Once + file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_rawDescData = file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_rawDesc +) + +func file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_rawDescGZIP() []byte { + file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_rawDescOnce.Do(func() { + file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_rawDescData) + }) + return file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_rawDescData +} + +var file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_goTypes = []interface{}{ + (*SafeCrossSchemeConfig)(nil), // 0: envoy.extensions.internal_redirect.safe_cross_scheme.v3.SafeCrossSchemeConfig +} +var file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_init() +} +func file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_init() { + if File_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SafeCrossSchemeConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_goTypes, + DependencyIndexes: file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_depIdxs, + MessageInfos: file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_msgTypes, + }.Build() + File_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto = out.File + file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_rawDesc = nil + file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_goTypes = nil + file_envoy_extensions_internal_redirect_safe_cross_scheme_v3_safe_cross_scheme_config_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.pb.validate.go new file mode 100644 index 0000000000000..178cca208935b --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.pb.validate.go @@ -0,0 +1,137 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/internal_redirect/safe_cross_scheme/v3/safe_cross_scheme_config.proto + +package safe_cross_schemev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on SafeCrossSchemeConfig 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 *SafeCrossSchemeConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SafeCrossSchemeConfig 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 +// SafeCrossSchemeConfigMultiError, or nil if none found. +func (m *SafeCrossSchemeConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *SafeCrossSchemeConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return SafeCrossSchemeConfigMultiError(errors) + } + return nil +} + +// SafeCrossSchemeConfigMultiError is an error wrapping multiple validation +// errors returned by SafeCrossSchemeConfig.ValidateAll() if the designated +// constraints aren't met. +type SafeCrossSchemeConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SafeCrossSchemeConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SafeCrossSchemeConfigMultiError) AllErrors() []error { return m } + +// SafeCrossSchemeConfigValidationError is the validation error returned by +// SafeCrossSchemeConfig.Validate if the designated constraints aren't met. +type SafeCrossSchemeConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SafeCrossSchemeConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SafeCrossSchemeConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SafeCrossSchemeConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SafeCrossSchemeConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SafeCrossSchemeConfigValidationError) ErrorName() string { + return "SafeCrossSchemeConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e SafeCrossSchemeConfigValidationError) 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 %sSafeCrossSchemeConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SafeCrossSchemeConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SafeCrossSchemeConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/key_value/file_based/v3/config.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/key_value/file_based/v3/config.pb.go new file mode 100644 index 0000000000000..f89c8a7b2acc0 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/key_value/file_based/v3/config.pb.go @@ -0,0 +1,214 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/key_value/file_based/v3/config.proto + +package file_basedv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// [#extension: envoy.key_value.file_based] +// This is configuration to flush a key value store out to disk. +type FileBasedKeyValueStoreConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The filename to read the keys and values from, and write the keys and + // values to. + Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` + // The interval at which the key value store should be flushed to the file. + FlushInterval *durationpb.Duration `protobuf:"bytes,2,opt,name=flush_interval,json=flushInterval,proto3" json:"flush_interval,omitempty"` + // The maximum number of entries to cache, or 0 to allow for unlimited entries. + // Defaults to 1000 if not present. + MaxEntries *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries,omitempty"` +} + +func (x *FileBasedKeyValueStoreConfig) Reset() { + *x = FileBasedKeyValueStoreConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_key_value_file_based_v3_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FileBasedKeyValueStoreConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FileBasedKeyValueStoreConfig) ProtoMessage() {} + +func (x *FileBasedKeyValueStoreConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_key_value_file_based_v3_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FileBasedKeyValueStoreConfig.ProtoReflect.Descriptor instead. +func (*FileBasedKeyValueStoreConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_key_value_file_based_v3_config_proto_rawDescGZIP(), []int{0} +} + +func (x *FileBasedKeyValueStoreConfig) GetFilename() string { + if x != nil { + return x.Filename + } + return "" +} + +func (x *FileBasedKeyValueStoreConfig) GetFlushInterval() *durationpb.Duration { + if x != nil { + return x.FlushInterval + } + return nil +} + +func (x *FileBasedKeyValueStoreConfig) GetMaxEntries() *wrapperspb.UInt32Value { + if x != nil { + return x.MaxEntries + } + return nil +} + +var File_envoy_extensions_key_value_file_based_v3_config_proto protoreflect.FileDescriptor + +var file_envoy_extensions_key_value_file_based_v3_config_proto_rawDesc = []byte{ + 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2f, 0x66, 0x69, 0x6c, + 0x65, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x64, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x64, 0x2e, 0x76, + 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xce, 0x01, 0x0a, 0x1c, 0x46, + 0x69, 0x6c, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x53, 0x74, 0x6f, 0x72, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x23, 0x0a, 0x08, 0x66, + 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x40, 0x0a, 0x0e, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x12, 0x3d, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x3a, 0x08, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x42, 0xad, 0x01, 0x0a, 0x36, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6b, + 0x65, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x61, + 0x73, 0x65, 0x64, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6b, + 0x65, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x61, + 0x73, 0x65, 0x64, 0x2f, 0x76, 0x33, 0x3b, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x73, 0x65, + 0x64, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_key_value_file_based_v3_config_proto_rawDescOnce sync.Once + file_envoy_extensions_key_value_file_based_v3_config_proto_rawDescData = file_envoy_extensions_key_value_file_based_v3_config_proto_rawDesc +) + +func file_envoy_extensions_key_value_file_based_v3_config_proto_rawDescGZIP() []byte { + file_envoy_extensions_key_value_file_based_v3_config_proto_rawDescOnce.Do(func() { + file_envoy_extensions_key_value_file_based_v3_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_key_value_file_based_v3_config_proto_rawDescData) + }) + return file_envoy_extensions_key_value_file_based_v3_config_proto_rawDescData +} + +var file_envoy_extensions_key_value_file_based_v3_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_key_value_file_based_v3_config_proto_goTypes = []interface{}{ + (*FileBasedKeyValueStoreConfig)(nil), // 0: envoy.extensions.key_value.file_based.v3.FileBasedKeyValueStoreConfig + (*durationpb.Duration)(nil), // 1: google.protobuf.Duration + (*wrapperspb.UInt32Value)(nil), // 2: google.protobuf.UInt32Value +} +var file_envoy_extensions_key_value_file_based_v3_config_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.key_value.file_based.v3.FileBasedKeyValueStoreConfig.flush_interval:type_name -> google.protobuf.Duration + 2, // 1: envoy.extensions.key_value.file_based.v3.FileBasedKeyValueStoreConfig.max_entries:type_name -> google.protobuf.UInt32Value + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_key_value_file_based_v3_config_proto_init() } +func file_envoy_extensions_key_value_file_based_v3_config_proto_init() { + if File_envoy_extensions_key_value_file_based_v3_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_key_value_file_based_v3_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FileBasedKeyValueStoreConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_key_value_file_based_v3_config_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_key_value_file_based_v3_config_proto_goTypes, + DependencyIndexes: file_envoy_extensions_key_value_file_based_v3_config_proto_depIdxs, + MessageInfos: file_envoy_extensions_key_value_file_based_v3_config_proto_msgTypes, + }.Build() + File_envoy_extensions_key_value_file_based_v3_config_proto = out.File + file_envoy_extensions_key_value_file_based_v3_config_proto_rawDesc = nil + file_envoy_extensions_key_value_file_based_v3_config_proto_goTypes = nil + file_envoy_extensions_key_value_file_based_v3_config_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/key_value/file_based/v3/config.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/key_value/file_based/v3/config.pb.validate.go new file mode 100644 index 0000000000000..6e653aebf4805 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/key_value/file_based/v3/config.pb.validate.go @@ -0,0 +1,207 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/key_value/file_based/v3/config.proto + +package file_basedv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on FileBasedKeyValueStoreConfig 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 *FileBasedKeyValueStoreConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FileBasedKeyValueStoreConfig 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 +// FileBasedKeyValueStoreConfigMultiError, or nil if none found. +func (m *FileBasedKeyValueStoreConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *FileBasedKeyValueStoreConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetFilename()) < 1 { + err := FileBasedKeyValueStoreConfigValidationError{ + field: "Filename", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetFlushInterval()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FileBasedKeyValueStoreConfigValidationError{ + field: "FlushInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FileBasedKeyValueStoreConfigValidationError{ + field: "FlushInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFlushInterval()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FileBasedKeyValueStoreConfigValidationError{ + field: "FlushInterval", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetMaxEntries()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FileBasedKeyValueStoreConfigValidationError{ + field: "MaxEntries", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FileBasedKeyValueStoreConfigValidationError{ + field: "MaxEntries", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxEntries()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FileBasedKeyValueStoreConfigValidationError{ + field: "MaxEntries", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return FileBasedKeyValueStoreConfigMultiError(errors) + } + return nil +} + +// FileBasedKeyValueStoreConfigMultiError is an error wrapping multiple +// validation errors returned by FileBasedKeyValueStoreConfig.ValidateAll() if +// the designated constraints aren't met. +type FileBasedKeyValueStoreConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FileBasedKeyValueStoreConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FileBasedKeyValueStoreConfigMultiError) AllErrors() []error { return m } + +// FileBasedKeyValueStoreConfigValidationError is the validation error returned +// by FileBasedKeyValueStoreConfig.Validate if the designated constraints +// aren't met. +type FileBasedKeyValueStoreConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FileBasedKeyValueStoreConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FileBasedKeyValueStoreConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FileBasedKeyValueStoreConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FileBasedKeyValueStoreConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FileBasedKeyValueStoreConfigValidationError) ErrorName() string { + return "FileBasedKeyValueStoreConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e FileBasedKeyValueStoreConfigValidationError) 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 %sFileBasedKeyValueStoreConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FileBasedKeyValueStoreConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FileBasedKeyValueStoreConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/least_request/v3/least_request.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/least_request/v3/least_request.pb.go new file mode 100644 index 0000000000000..c9433fe203592 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/least_request/v3/least_request.pb.go @@ -0,0 +1,252 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/load_balancing_policies/least_request/v3/least_request.proto + +package least_requestv3 + +import ( + v31 "github.com/cilium/proxy/go/envoy/config/cluster/v3" + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// This configuration allows the built-in LEAST_REQUEST LB policy to be configured via the LB policy +// extension point. See the :ref:`load balancing architecture overview +// ` for more information. +// [#extension: envoy.clusters.lb_policy] +type LeastRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The number of random healthy hosts from which the host with the fewest active requests will + // be chosen. Defaults to 2 so that we perform two-choice selection if the field is not set. + ChoiceCount *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=choice_count,json=choiceCount,proto3" json:"choice_count,omitempty"` + // The following formula is used to calculate the dynamic weights when hosts have different load + // balancing weights: + // + // `weight = load_balancing_weight / (active_requests + 1)^active_request_bias` + // + // The larger the active request bias is, the more aggressively active requests will lower the + // effective weight when all host weights are not equal. + // + // `active_request_bias` must be greater than or equal to 0.0. + // + // When `active_request_bias == 0.0` the Least Request Load Balancer doesn't consider the number + // of active requests at the time it picks a host and behaves like the Round Robin Load + // Balancer. + // + // When `active_request_bias > 0.0` the Least Request Load Balancer scales the load balancing + // weight by the number of active requests at the time it does a pick. + // + // The value is cached for performance reasons and refreshed whenever one of the Load Balancer's + // host sets changes, e.g., whenever there is a host membership update or a host load balancing + // weight change. + // + // .. note:: + // + // This setting only takes effect if all host weights are not equal. + ActiveRequestBias *v3.RuntimeDouble `protobuf:"bytes,2,opt,name=active_request_bias,json=activeRequestBias,proto3" json:"active_request_bias,omitempty"` + // Configuration for slow start mode. + // If this configuration is not set, slow start will not be not enabled. + SlowStartConfig *v31.Cluster_SlowStartConfig `protobuf:"bytes,3,opt,name=slow_start_config,json=slowStartConfig,proto3" json:"slow_start_config,omitempty"` +} + +func (x *LeastRequest) Reset() { + *x = LeastRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LeastRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LeastRequest) ProtoMessage() {} + +func (x *LeastRequest) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LeastRequest.ProtoReflect.Descriptor instead. +func (*LeastRequest) Descriptor() ([]byte, []int) { + return file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDescGZIP(), []int{0} +} + +func (x *LeastRequest) GetChoiceCount() *wrapperspb.UInt32Value { + if x != nil { + return x.ChoiceCount + } + return nil +} + +func (x *LeastRequest) GetActiveRequestBias() *v3.RuntimeDouble { + if x != nil { + return x.ActiveRequestBias + } + return nil +} + +func (x *LeastRequest) GetSlowStartConfig() *v31.Cluster_SlowStartConfig { + if x != nil { + return x.SlowStartConfig + } + return nil +} + +var File_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto protoreflect.FileDescriptor + +var file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDesc = []byte{ + 0x0a, 0x4d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, + 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x6c, 0x65, 0x61, 0x73, 0x74, + 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x6c, 0x65, 0x61, 0x73, + 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x39, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, + 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x5f, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x33, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x8b, 0x02, 0x0a, 0x0c, 0x4c, + 0x65, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x0c, 0x63, + 0x68, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x02, 0x52, 0x0b, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x53, 0x0a, 0x13, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x11, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x69, 0x61, 0x73, 0x12, 0x5c, 0x0a, 0x11, 0x73, 0x6c, + 0x6f, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0f, 0x73, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xd8, 0x01, 0x0a, 0x47, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, + 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x69, 0x65, 0x73, 0x2e, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x2e, 0x76, 0x33, 0x42, 0x11, 0x4c, 0x65, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x70, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, + 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x6c, 0x65, 0x61, 0x73, 0x74, + 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x6c, 0x65, 0x61, 0x73, + 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDescOnce sync.Once + file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDescData = file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDesc +) + +func file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDescGZIP() []byte { + file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDescOnce.Do(func() { + file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDescData) + }) + return file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDescData +} + +var file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_goTypes = []interface{}{ + (*LeastRequest)(nil), // 0: envoy.extensions.load_balancing_policies.least_request.v3.LeastRequest + (*wrapperspb.UInt32Value)(nil), // 1: google.protobuf.UInt32Value + (*v3.RuntimeDouble)(nil), // 2: envoy.config.core.v3.RuntimeDouble + (*v31.Cluster_SlowStartConfig)(nil), // 3: envoy.config.cluster.v3.Cluster.SlowStartConfig +} +var file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.load_balancing_policies.least_request.v3.LeastRequest.choice_count:type_name -> google.protobuf.UInt32Value + 2, // 1: envoy.extensions.load_balancing_policies.least_request.v3.LeastRequest.active_request_bias:type_name -> envoy.config.core.v3.RuntimeDouble + 3, // 2: envoy.extensions.load_balancing_policies.least_request.v3.LeastRequest.slow_start_config:type_name -> envoy.config.cluster.v3.Cluster.SlowStartConfig + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_init() +} +func file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_init() { + if File_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LeastRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_goTypes, + DependencyIndexes: file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_depIdxs, + MessageInfos: file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_msgTypes, + }.Build() + File_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto = out.File + file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDesc = nil + file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_goTypes = nil + file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/least_request/v3/least_request.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/least_request/v3/least_request.pb.validate.go new file mode 100644 index 0000000000000..8defc1a8d2ce6 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/least_request/v3/least_request.pb.validate.go @@ -0,0 +1,207 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/load_balancing_policies/least_request/v3/least_request.proto + +package least_requestv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on LeastRequest 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 *LeastRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LeastRequest 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 LeastRequestMultiError, or +// nil if none found. +func (m *LeastRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *LeastRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if wrapper := m.GetChoiceCount(); wrapper != nil { + + if wrapper.GetValue() < 2 { + err := LeastRequestValidationError{ + field: "ChoiceCount", + reason: "value must be greater than or equal to 2", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if all { + switch v := interface{}(m.GetActiveRequestBias()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LeastRequestValidationError{ + field: "ActiveRequestBias", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LeastRequestValidationError{ + field: "ActiveRequestBias", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetActiveRequestBias()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LeastRequestValidationError{ + field: "ActiveRequestBias", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetSlowStartConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LeastRequestValidationError{ + field: "SlowStartConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LeastRequestValidationError{ + field: "SlowStartConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSlowStartConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LeastRequestValidationError{ + field: "SlowStartConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return LeastRequestMultiError(errors) + } + return nil +} + +// LeastRequestMultiError is an error wrapping multiple validation errors +// returned by LeastRequest.ValidateAll() if the designated constraints aren't met. +type LeastRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LeastRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LeastRequestMultiError) AllErrors() []error { return m } + +// LeastRequestValidationError is the validation error returned by +// LeastRequest.Validate if the designated constraints aren't met. +type LeastRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e LeastRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e LeastRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e LeastRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e LeastRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e LeastRequestValidationError) ErrorName() string { return "LeastRequestValidationError" } + +// Error satisfies the builtin error interface +func (e LeastRequestValidationError) 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 %sLeastRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = LeastRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = LeastRequestValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.pb.go new file mode 100644 index 0000000000000..1b223ffaa6094 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.pb.go @@ -0,0 +1,332 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto + +package ring_hashv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// The hash function used to hash hosts onto the ketama ring. +type RingHash_HashFunction int32 + +const ( + // Currently defaults to XX_HASH. + RingHash_DEFAULT_HASH RingHash_HashFunction = 0 + // Use `xxHash `_. + RingHash_XX_HASH RingHash_HashFunction = 1 + // Use `MurmurHash2 `_, this is compatible with + // std:hash in GNU libstdc++ 3.4.20 or above. This is typically the case when compiled + // on Linux and not macOS. + RingHash_MURMUR_HASH_2 RingHash_HashFunction = 2 +) + +// Enum value maps for RingHash_HashFunction. +var ( + RingHash_HashFunction_name = map[int32]string{ + 0: "DEFAULT_HASH", + 1: "XX_HASH", + 2: "MURMUR_HASH_2", + } + RingHash_HashFunction_value = map[string]int32{ + "DEFAULT_HASH": 0, + "XX_HASH": 1, + "MURMUR_HASH_2": 2, + } +) + +func (x RingHash_HashFunction) Enum() *RingHash_HashFunction { + p := new(RingHash_HashFunction) + *p = x + return p +} + +func (x RingHash_HashFunction) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RingHash_HashFunction) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_enumTypes[0].Descriptor() +} + +func (RingHash_HashFunction) Type() protoreflect.EnumType { + return &file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_enumTypes[0] +} + +func (x RingHash_HashFunction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RingHash_HashFunction.Descriptor instead. +func (RingHash_HashFunction) EnumDescriptor() ([]byte, []int) { + return file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescGZIP(), []int{0, 0} +} + +// This configuration allows the built-in RING_HASH LB policy to be configured via the LB policy +// extension point. See the :ref:`load balancing architecture overview +// ` for more information. +// [#extension: envoy.clusters.lb_policy] +// [#next-free-field: 6] +type RingHash struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The hash function used to hash hosts onto the ketama ring. The value defaults to + // :ref:`XX_HASH`. + HashFunction RingHash_HashFunction `protobuf:"varint,1,opt,name=hash_function,json=hashFunction,proto3,enum=envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash_HashFunction" json:"hash_function,omitempty"` + // Minimum hash ring size. The larger the ring is (that is, the more hashes there are for each + // provided host) the better the request distribution will reflect the desired weights. Defaults + // to 1024 entries, and limited to 8M entries. See also + // :ref:`maximum_ring_size`. + MinimumRingSize *wrapperspb.UInt64Value `protobuf:"bytes,2,opt,name=minimum_ring_size,json=minimumRingSize,proto3" json:"minimum_ring_size,omitempty"` + // Maximum hash ring size. Defaults to 8M entries, and limited to 8M entries, but can be lowered + // to further constrain resource use. See also + // :ref:`minimum_ring_size`. + MaximumRingSize *wrapperspb.UInt64Value `protobuf:"bytes,3,opt,name=maximum_ring_size,json=maximumRingSize,proto3" json:"maximum_ring_size,omitempty"` + // If set to `true`, the cluster will use hostname instead of the resolved + // address as the key to consistently hash to an upstream host. Only valid for StrictDNS clusters with hostnames which resolve to a single IP address. + UseHostnameForHashing bool `protobuf:"varint,4,opt,name=use_hostname_for_hashing,json=useHostnameForHashing,proto3" json:"use_hostname_for_hashing,omitempty"` + // Configures percentage of average cluster load to bound per upstream host. For example, with a value of 150 + // no upstream host will get a load more than 1.5 times the average load of all the hosts in the cluster. + // If not specified, the load is not bounded for any upstream host. Typical value for this parameter is between 120 and 200. + // Minimum is 100. + // + // This is implemented based on the method described in the paper https://arxiv.org/abs/1608.01350. For the specified + // `hash_balance_factor`, requests to any upstream host are capped at `hash_balance_factor/100` times the average number of requests + // across the cluster. When a request arrives for an upstream host that is currently serving at its max capacity, linear probing + // is used to identify an eligible host. Further, the linear probe is implemented using a random jump in hosts ring/table to identify + // the eligible host (this technique is as described in the paper https://arxiv.org/abs/1908.08762 - the random jump avoids the + // cascading overflow effect when choosing the next host in the ring/table). + // + // If weights are specified on the hosts, they are respected. + // + // This is an O(N) algorithm, unlike other load balancers. Using a lower `hash_balance_factor` results in more hosts + // being probed, so use a higher value if you require better performance. + HashBalanceFactor *wrapperspb.UInt32Value `protobuf:"bytes,5,opt,name=hash_balance_factor,json=hashBalanceFactor,proto3" json:"hash_balance_factor,omitempty"` +} + +func (x *RingHash) Reset() { + *x = RingHash{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RingHash) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RingHash) ProtoMessage() {} + +func (x *RingHash) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RingHash.ProtoReflect.Descriptor instead. +func (*RingHash) Descriptor() ([]byte, []int) { + return file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescGZIP(), []int{0} +} + +func (x *RingHash) GetHashFunction() RingHash_HashFunction { + if x != nil { + return x.HashFunction + } + return RingHash_DEFAULT_HASH +} + +func (x *RingHash) GetMinimumRingSize() *wrapperspb.UInt64Value { + if x != nil { + return x.MinimumRingSize + } + return nil +} + +func (x *RingHash) GetMaximumRingSize() *wrapperspb.UInt64Value { + if x != nil { + return x.MaximumRingSize + } + return nil +} + +func (x *RingHash) GetUseHostnameForHashing() bool { + if x != nil { + return x.UseHostnameForHashing + } + return false +} + +func (x *RingHash) GetHashBalanceFactor() *wrapperspb.UInt32Value { + if x != nil { + return x.HashBalanceFactor + } + return nil +} + +var File_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto protoreflect.FileDescriptor + +var file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDesc = []byte{ + 0x0a, 0x45, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, + 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x72, 0x69, 0x6e, 0x67, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x73, + 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, + 0x73, 0x2e, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x2e, 0x76, 0x33, 0x1a, 0x1e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x85, 0x04, 0x0a, 0x08, 0x52, 0x69, 0x6e, 0x67, 0x48, + 0x61, 0x73, 0x68, 0x12, 0x7b, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x66, 0x75, 0x6e, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4c, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, + 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x2e, + 0x76, 0x33, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x2e, 0x48, 0x61, 0x73, 0x68, + 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, + 0x10, 0x01, 0x52, 0x0c, 0x68, 0x61, 0x73, 0x68, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x54, 0x0a, 0x11, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x72, 0x69, 0x6e, 0x67, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, + 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x32, 0x05, + 0x18, 0x80, 0x80, 0x80, 0x04, 0x52, 0x0f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x69, + 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x54, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, + 0x6d, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, + 0x0a, 0xfa, 0x42, 0x07, 0x32, 0x05, 0x18, 0x80, 0x80, 0x80, 0x04, 0x52, 0x0f, 0x6d, 0x61, 0x78, + 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x37, 0x0a, 0x18, + 0x75, 0x73, 0x65, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x66, 0x6f, 0x72, + 0x5f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, + 0x75, 0x73, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x46, 0x6f, 0x72, 0x48, 0x61, + 0x73, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x55, 0x0a, 0x13, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x62, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x64, 0x52, 0x11, 0x68, 0x61, 0x73, 0x68, 0x42, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x40, 0x0a, 0x0c, + 0x48, 0x61, 0x73, 0x68, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x0c, + 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x00, 0x12, 0x0b, + 0x0a, 0x07, 0x58, 0x58, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4d, + 0x55, 0x52, 0x4d, 0x55, 0x52, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x5f, 0x32, 0x10, 0x02, 0x42, 0xc8, + 0x01, 0x0a, 0x43, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, + 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, + 0x61, 0x73, 0x68, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x68, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescOnce sync.Once + file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescData = file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDesc +) + +func file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescGZIP() []byte { + file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescOnce.Do(func() { + file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescData) + }) + return file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescData +} + +var file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_goTypes = []interface{}{ + (RingHash_HashFunction)(0), // 0: envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash.HashFunction + (*RingHash)(nil), // 1: envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash + (*wrapperspb.UInt64Value)(nil), // 2: google.protobuf.UInt64Value + (*wrapperspb.UInt32Value)(nil), // 3: google.protobuf.UInt32Value +} +var file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_depIdxs = []int32{ + 0, // 0: envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash.hash_function:type_name -> envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash.HashFunction + 2, // 1: envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash.minimum_ring_size:type_name -> google.protobuf.UInt64Value + 2, // 2: envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash.maximum_ring_size:type_name -> google.protobuf.UInt64Value + 3, // 3: envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash.hash_balance_factor:type_name -> google.protobuf.UInt32Value + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_init() } +func file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_init() { + if File_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RingHash); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_goTypes, + DependencyIndexes: file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_depIdxs, + EnumInfos: file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_enumTypes, + MessageInfos: file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_msgTypes, + }.Build() + File_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto = out.File + file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDesc = nil + file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_goTypes = nil + file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.pb.validate.go new file mode 100644 index 0000000000000..fa9a432ad7c12 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.pb.validate.go @@ -0,0 +1,192 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto + +package ring_hashv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RingHash 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 *RingHash) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RingHash 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 RingHashMultiError, or nil +// if none found. +func (m *RingHash) ValidateAll() error { + return m.validate(true) +} + +func (m *RingHash) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if _, ok := RingHash_HashFunction_name[int32(m.GetHashFunction())]; !ok { + err := RingHashValidationError{ + field: "HashFunction", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if wrapper := m.GetMinimumRingSize(); wrapper != nil { + + if wrapper.GetValue() > 8388608 { + err := RingHashValidationError{ + field: "MinimumRingSize", + reason: "value must be less than or equal to 8388608", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if wrapper := m.GetMaximumRingSize(); wrapper != nil { + + if wrapper.GetValue() > 8388608 { + err := RingHashValidationError{ + field: "MaximumRingSize", + reason: "value must be less than or equal to 8388608", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + // no validation rules for UseHostnameForHashing + + if wrapper := m.GetHashBalanceFactor(); wrapper != nil { + + if wrapper.GetValue() < 100 { + err := RingHashValidationError{ + field: "HashBalanceFactor", + reason: "value must be greater than or equal to 100", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if len(errors) > 0 { + return RingHashMultiError(errors) + } + return nil +} + +// RingHashMultiError is an error wrapping multiple validation errors returned +// by RingHash.ValidateAll() if the designated constraints aren't met. +type RingHashMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RingHashMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RingHashMultiError) AllErrors() []error { return m } + +// RingHashValidationError is the validation error returned by +// RingHash.Validate if the designated constraints aren't met. +type RingHashValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RingHashValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RingHashValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RingHashValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RingHashValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RingHashValidationError) ErrorName() string { return "RingHashValidationError" } + +// Error satisfies the builtin error interface +func (e RingHashValidationError) 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 %sRingHash.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RingHashValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RingHashValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.pb.go new file mode 100644 index 0000000000000..2c4bbaada9239 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.pb.go @@ -0,0 +1,185 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.proto + +package round_robinv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/cluster/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// This configuration allows the built-in ROUND_ROBIN LB policy to be configured via the LB policy +// extension point. See the :ref:`load balancing architecture overview +// ` for more information. +// [#extension: envoy.clusters.lb_policy] +type RoundRobin struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Configuration for slow start mode. + // If this configuration is not set, slow start will not be not enabled. + SlowStartConfig *v3.Cluster_SlowStartConfig `protobuf:"bytes,1,opt,name=slow_start_config,json=slowStartConfig,proto3" json:"slow_start_config,omitempty"` +} + +func (x *RoundRobin) Reset() { + *x = RoundRobin{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RoundRobin) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RoundRobin) ProtoMessage() {} + +func (x *RoundRobin) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RoundRobin.ProtoReflect.Descriptor instead. +func (*RoundRobin) Descriptor() ([]byte, []int) { + return file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDescGZIP(), []int{0} +} + +func (x *RoundRobin) GetSlowStartConfig() *v3.Cluster_SlowStartConfig { + if x != nil { + return x.SlowStartConfig + } + return nil +} + +var File_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto protoreflect.FileDescriptor + +var file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDesc = []byte{ + 0x0a, 0x49, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, + 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x72, 0x6f, 0x75, 0x6e, 0x64, + 0x5f, 0x72, 0x6f, 0x62, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, + 0x72, 0x6f, 0x62, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x37, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, + 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x62, 0x69, + 0x6e, 0x2e, 0x76, 0x33, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6a, 0x0a, 0x0a, 0x52, 0x6f, + 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x62, 0x69, 0x6e, 0x12, 0x5c, 0x0a, 0x11, 0x73, 0x6c, 0x6f, 0x77, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0f, 0x73, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xd0, 0x01, 0x0a, 0x45, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, + 0x73, 0x2e, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x62, 0x69, 0x6e, 0x2e, 0x76, 0x33, + 0x42, 0x0f, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x62, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x6c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x61, + 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x69, 0x65, 0x73, 0x2f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x62, 0x69, 0x6e, + 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x62, 0x69, 0x6e, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDescOnce sync.Once + file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDescData = file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDesc +) + +func file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDescGZIP() []byte { + file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDescOnce.Do(func() { + file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDescData) + }) + return file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDescData +} + +var file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_goTypes = []interface{}{ + (*RoundRobin)(nil), // 0: envoy.extensions.load_balancing_policies.round_robin.v3.RoundRobin + (*v3.Cluster_SlowStartConfig)(nil), // 1: envoy.config.cluster.v3.Cluster.SlowStartConfig +} +var file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.load_balancing_policies.round_robin.v3.RoundRobin.slow_start_config:type_name -> envoy.config.cluster.v3.Cluster.SlowStartConfig + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_init() } +func file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_init() { + if File_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RoundRobin); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_goTypes, + DependencyIndexes: file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_depIdxs, + MessageInfos: file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_msgTypes, + }.Build() + File_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto = out.File + file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_rawDesc = nil + file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_goTypes = nil + file_envoy_extensions_load_balancing_policies_round_robin_v3_round_robin_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.pb.validate.go new file mode 100644 index 0000000000000..e55fa13a3fc3b --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.pb.validate.go @@ -0,0 +1,163 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.proto + +package round_robinv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RoundRobin 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 *RoundRobin) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RoundRobin 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 RoundRobinMultiError, or +// nil if none found. +func (m *RoundRobin) ValidateAll() error { + return m.validate(true) +} + +func (m *RoundRobin) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetSlowStartConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RoundRobinValidationError{ + field: "SlowStartConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RoundRobinValidationError{ + field: "SlowStartConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSlowStartConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RoundRobinValidationError{ + field: "SlowStartConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RoundRobinMultiError(errors) + } + return nil +} + +// RoundRobinMultiError is an error wrapping multiple validation errors +// returned by RoundRobin.ValidateAll() if the designated constraints aren't met. +type RoundRobinMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RoundRobinMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RoundRobinMultiError) AllErrors() []error { return m } + +// RoundRobinValidationError is the validation error returned by +// RoundRobin.Validate if the designated constraints aren't met. +type RoundRobinValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RoundRobinValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RoundRobinValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RoundRobinValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RoundRobinValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RoundRobinValidationError) ErrorName() string { return "RoundRobinValidationError" } + +// Error satisfies the builtin error interface +func (e RoundRobinValidationError) 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 %sRoundRobin.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RoundRobinValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RoundRobinValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.pb.go new file mode 100644 index 0000000000000..69f25c8f775d4 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.pb.go @@ -0,0 +1,187 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto + +package wrr_localityv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/cluster/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for the wrr_locality LB policy. See the :ref:`load balancing architecture overview +// ` for more information. +// [#extension: envoy.clusters.lb_policy] +type WrrLocality struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The child LB policy to create for endpoint-picking within the chosen locality. + EndpointPickingPolicy *v3.LoadBalancingPolicy `protobuf:"bytes,1,opt,name=endpoint_picking_policy,json=endpointPickingPolicy,proto3" json:"endpoint_picking_policy,omitempty"` +} + +func (x *WrrLocality) Reset() { + *x = WrrLocality{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WrrLocality) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WrrLocality) ProtoMessage() {} + +func (x *WrrLocality) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WrrLocality.ProtoReflect.Descriptor instead. +func (*WrrLocality) Descriptor() ([]byte, []int) { + return file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescGZIP(), []int{0} +} + +func (x *WrrLocality) GetEndpointPickingPolicy() *v3.LoadBalancingPolicy { + if x != nil { + return x.EndpointPickingPolicy + } + return nil +} + +var File_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto protoreflect.FileDescriptor + +var file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDesc = []byte{ + 0x0a, 0x4b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, + 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x77, 0x72, 0x72, 0x5f, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x77, 0x72, 0x72, 0x5f, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x38, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x77, 0x72, 0x72, 0x5f, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, + 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x7d, 0x0a, 0x0b, 0x57, 0x72, 0x72, 0x4c, 0x6f, 0x63, + 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x6e, 0x0a, 0x17, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x5f, 0x70, 0x69, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x15, + 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x69, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0xd4, 0x01, 0x0a, 0x46, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, + 0x2e, 0x77, 0x72, 0x72, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x33, + 0x42, 0x10, 0x57, 0x72, 0x72, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x6f, + 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x77, 0x72, 0x72, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, + 0x74, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x77, 0x72, 0x72, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, + 0x74, 0x79, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescOnce sync.Once + file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescData = file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDesc +) + +func file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescGZIP() []byte { + file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescOnce.Do(func() { + file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescData) + }) + return file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescData +} + +var file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_goTypes = []interface{}{ + (*WrrLocality)(nil), // 0: envoy.extensions.load_balancing_policies.wrr_locality.v3.WrrLocality + (*v3.LoadBalancingPolicy)(nil), // 1: envoy.config.cluster.v3.LoadBalancingPolicy +} +var file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.load_balancing_policies.wrr_locality.v3.WrrLocality.endpoint_picking_policy:type_name -> envoy.config.cluster.v3.LoadBalancingPolicy + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_init() } +func file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_init() { + if File_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WrrLocality); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_goTypes, + DependencyIndexes: file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_depIdxs, + MessageInfos: file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_msgTypes, + }.Build() + File_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto = out.File + file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDesc = nil + file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_goTypes = nil + file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.pb.validate.go new file mode 100644 index 0000000000000..ad8fb397fad21 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.pb.validate.go @@ -0,0 +1,174 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto + +package wrr_localityv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on WrrLocality 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 *WrrLocality) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on WrrLocality 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 WrrLocalityMultiError, or +// nil if none found. +func (m *WrrLocality) ValidateAll() error { + return m.validate(true) +} + +func (m *WrrLocality) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetEndpointPickingPolicy() == nil { + err := WrrLocalityValidationError{ + field: "EndpointPickingPolicy", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetEndpointPickingPolicy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WrrLocalityValidationError{ + field: "EndpointPickingPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WrrLocalityValidationError{ + field: "EndpointPickingPolicy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEndpointPickingPolicy()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return WrrLocalityValidationError{ + field: "EndpointPickingPolicy", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return WrrLocalityMultiError(errors) + } + return nil +} + +// WrrLocalityMultiError is an error wrapping multiple validation errors +// returned by WrrLocality.ValidateAll() if the designated constraints aren't met. +type WrrLocalityMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WrrLocalityMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WrrLocalityMultiError) AllErrors() []error { return m } + +// WrrLocalityValidationError is the validation error returned by +// WrrLocality.Validate if the designated constraints aren't met. +type WrrLocalityValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e WrrLocalityValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e WrrLocalityValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e WrrLocalityValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e WrrLocalityValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e WrrLocalityValidationError) ErrorName() string { return "WrrLocalityValidationError" } + +// Error satisfies the builtin error interface +func (e WrrLocalityValidationError) 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 %sWrrLocality.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = WrrLocalityValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = WrrLocalityValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/environment_variable/v3/input.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/environment_variable/v3/input.pb.go new file mode 100644 index 0000000000000..b397a3ec49022 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/environment_variable/v3/input.pb.go @@ -0,0 +1,175 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/matching/common_inputs/environment_variable/v3/input.proto + +package environment_variablev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Reads an environment variable to provide an input for matching. +type Config struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of the environment variable to read from. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *Config) Reset() { + *x = Config{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config) ProtoMessage() {} + +func (x *Config) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Config.ProtoReflect.Descriptor instead. +func (*Config) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDescGZIP(), []int{0} +} + +func (x *Config) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto protoreflect.FileDescriptor + +var file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDesc = []byte{ + 0x0a, 0x4b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x2f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x2f, 0x76, + 0x33, 0x2f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x2e, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x25, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0xe4, 0x01, + 0x0a, 0x4d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x2e, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x76, 0x33, 0x42, + 0x0a, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x7d, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x2f, 0x65, 0x6e, + 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, + 0x6c, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDescOnce sync.Once + file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDescData = file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDesc +) + +func file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDescGZIP() []byte { + file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDescOnce.Do(func() { + file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDescData) + }) + return file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDescData +} + +var file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_goTypes = []interface{}{ + (*Config)(nil), // 0: envoy.extensions.matching.common_inputs.environment_variable.v3.Config +} +var file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_init() } +func file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_init() { + if File_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Config); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_goTypes, + DependencyIndexes: file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_depIdxs, + MessageInfos: file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_msgTypes, + }.Build() + File_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto = out.File + file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_rawDesc = nil + file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_goTypes = nil + file_envoy_extensions_matching_common_inputs_environment_variable_v3_input_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/environment_variable/v3/input.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/environment_variable/v3/input.pb.validate.go new file mode 100644 index 0000000000000..4d26cfc674a61 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/environment_variable/v3/input.pb.validate.go @@ -0,0 +1,144 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/matching/common_inputs/environment_variable/v3/input.proto + +package environment_variablev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Config 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 *Config) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config 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 ConfigMultiError, or nil if none found. +func (m *Config) ValidateAll() error { + return m.validate(true) +} + +func (m *Config) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetName()) < 1 { + err := ConfigValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return ConfigMultiError(errors) + } + return nil +} + +// ConfigMultiError is an error wrapping multiple validation errors returned by +// Config.ValidateAll() if the designated constraints aren't met. +type ConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigMultiError) AllErrors() []error { return m } + +// ConfigValidationError is the validation error returned by Config.Validate if +// the designated constraints aren't met. +type ConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConfigValidationError) ErrorName() string { return "ConfigValidationError" } + +// Error satisfies the builtin error interface +func (e ConfigValidationError) 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 %sConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/network/v3/network_inputs.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/network/v3/network_inputs.pb.go new file mode 100644 index 0000000000000..20de1b055cc84 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/network/v3/network_inputs.pb.go @@ -0,0 +1,636 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/matching/common_inputs/network/v3/network_inputs.proto + +package networkv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Specifies that matching should be performed by the destination IP address. +// [#extension: envoy.matching.inputs.destination_ip] +type DestinationIPInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DestinationIPInput) Reset() { + *x = DestinationIPInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DestinationIPInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DestinationIPInput) ProtoMessage() {} + +func (x *DestinationIPInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DestinationIPInput.ProtoReflect.Descriptor instead. +func (*DestinationIPInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{0} +} + +// Specifies that matching should be performed by the destination port. +// [#extension: envoy.matching.inputs.destination_port] +type DestinationPortInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DestinationPortInput) Reset() { + *x = DestinationPortInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DestinationPortInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DestinationPortInput) ProtoMessage() {} + +func (x *DestinationPortInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DestinationPortInput.ProtoReflect.Descriptor instead. +func (*DestinationPortInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{1} +} + +// Specifies that matching should be performed by the source IP address. +// [#extension: envoy.matching.inputs.source_ip] +type SourceIPInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SourceIPInput) Reset() { + *x = SourceIPInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SourceIPInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SourceIPInput) ProtoMessage() {} + +func (x *SourceIPInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SourceIPInput.ProtoReflect.Descriptor instead. +func (*SourceIPInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{2} +} + +// Specifies that matching should be performed by the source port. +// [#extension: envoy.matching.inputs.source_port] +type SourcePortInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SourcePortInput) Reset() { + *x = SourcePortInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SourcePortInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SourcePortInput) ProtoMessage() {} + +func (x *SourcePortInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SourcePortInput.ProtoReflect.Descriptor instead. +func (*SourcePortInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{3} +} + +// Input that matches by the directly connected source IP address (this +// will only be different from the source IP address when using a listener +// filter that overrides the source address, such as the :ref:`Proxy Protocol +// listener filter `). +// [#extension: envoy.matching.inputs.direct_source_ip] +type DirectSourceIPInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DirectSourceIPInput) Reset() { + *x = DirectSourceIPInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DirectSourceIPInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DirectSourceIPInput) ProtoMessage() {} + +func (x *DirectSourceIPInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DirectSourceIPInput.ProtoReflect.Descriptor instead. +func (*DirectSourceIPInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{4} +} + +// Input that matches by the source IP type. +// Specifies the source IP match type. The values include: +// +// * “local“ - matches a connection originating from the same host, +// [#extension: envoy.matching.inputs.source_type] +type SourceTypeInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SourceTypeInput) Reset() { + *x = SourceTypeInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SourceTypeInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SourceTypeInput) ProtoMessage() {} + +func (x *SourceTypeInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SourceTypeInput.ProtoReflect.Descriptor instead. +func (*SourceTypeInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{5} +} + +// Input that matches by the requested server name (e.g. SNI in TLS). +// +// :ref:`TLS Inspector ` provides the requested server name based on SNI, +// when TLS protocol is detected. +// [#extension: envoy.matching.inputs.server_name] +type ServerNameInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ServerNameInput) Reset() { + *x = ServerNameInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerNameInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerNameInput) ProtoMessage() {} + +func (x *ServerNameInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerNameInput.ProtoReflect.Descriptor instead. +func (*ServerNameInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{6} +} + +// Input that matches by the transport protocol. +// +// Suggested values include: +// +// - “raw_buffer“ - default, used when no transport protocol is detected, +// - “tls“ - set by :ref:`envoy.filters.listener.tls_inspector ` +// when TLS protocol is detected. +// +// [#extension: envoy.matching.inputs.transport_protocol] +type TransportProtocolInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *TransportProtocolInput) Reset() { + *x = TransportProtocolInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransportProtocolInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransportProtocolInput) ProtoMessage() {} + +func (x *TransportProtocolInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransportProtocolInput.ProtoReflect.Descriptor instead. +func (*TransportProtocolInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{7} +} + +// List of quoted and comma-separated requested application protocols. The list consists of a +// single negotiated application protocol once the network stream is established. +// +// Examples: +// +// * “'h2','http/1.1'“ +// * “'h2c'“ +// +// Suggested values in the list include: +// +// - “http/1.1“ - set by :ref:`envoy.filters.listener.tls_inspector +// ` and :ref:`envoy.filters.listener.http_inspector +// `, +// - “h2“ - set by :ref:`envoy.filters.listener.tls_inspector ` +// - “h2c“ - set by :ref:`envoy.filters.listener.http_inspector ` +// +// .. attention:: +// +// Currently, :ref:`TLS Inspector ` provides +// application protocol detection based on the requested +// `ALPN `_ values. +// +// However, the use of ALPN is pretty much limited to the HTTP/2 traffic on the Internet, +// and matching on values other than ``h2`` is going to lead to a lot of false negatives, +// unless all connecting clients are known to use ALPN. +// +// [#extension: envoy.matching.inputs.application_protocol] +type ApplicationProtocolInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ApplicationProtocolInput) Reset() { + *x = ApplicationProtocolInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ApplicationProtocolInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApplicationProtocolInput) ProtoMessage() {} + +func (x *ApplicationProtocolInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApplicationProtocolInput.ProtoReflect.Descriptor instead. +func (*ApplicationProtocolInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{8} +} + +var File_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto protoreflect.FileDescriptor + +var file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDesc = []byte{ + 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2f, 0x76, 0x33, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x70, + 0x75, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, + 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x49, 0x6e, 0x70, + 0x75, 0x74, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x0f, 0x0a, 0x0d, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x49, 0x50, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x11, 0x0a, 0x0f, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x15, + 0x0a, 0x13, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x50, + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x18, 0x0a, 0x16, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x1a, 0x0a, 0x18, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x6e, 0x70, 0x75, + 0x74, 0x42, 0xc5, 0x01, 0x0a, 0x40, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2e, 0x76, 0x33, 0x42, 0x12, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, + 0x6e, 0x70, 0x75, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x63, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x2f, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x76, 0x33, 0x3b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescOnce sync.Once + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescData = file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDesc +) + +func file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP() []byte { + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescOnce.Do(func() { + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescData) + }) + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescData +} + +var file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_goTypes = []interface{}{ + (*DestinationIPInput)(nil), // 0: envoy.extensions.matching.common_inputs.network.v3.DestinationIPInput + (*DestinationPortInput)(nil), // 1: envoy.extensions.matching.common_inputs.network.v3.DestinationPortInput + (*SourceIPInput)(nil), // 2: envoy.extensions.matching.common_inputs.network.v3.SourceIPInput + (*SourcePortInput)(nil), // 3: envoy.extensions.matching.common_inputs.network.v3.SourcePortInput + (*DirectSourceIPInput)(nil), // 4: envoy.extensions.matching.common_inputs.network.v3.DirectSourceIPInput + (*SourceTypeInput)(nil), // 5: envoy.extensions.matching.common_inputs.network.v3.SourceTypeInput + (*ServerNameInput)(nil), // 6: envoy.extensions.matching.common_inputs.network.v3.ServerNameInput + (*TransportProtocolInput)(nil), // 7: envoy.extensions.matching.common_inputs.network.v3.TransportProtocolInput + (*ApplicationProtocolInput)(nil), // 8: envoy.extensions.matching.common_inputs.network.v3.ApplicationProtocolInput +} +var file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_init() } +func file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_init() { + if File_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DestinationIPInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DestinationPortInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SourceIPInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SourcePortInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DirectSourceIPInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SourceTypeInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerNameInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransportProtocolInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ApplicationProtocolInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDesc, + NumEnums: 0, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_goTypes, + DependencyIndexes: file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_depIdxs, + MessageInfos: file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes, + }.Build() + File_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto = out.File + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDesc = nil + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_goTypes = nil + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/network/v3/network_inputs.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/network/v3/network_inputs.pb.validate.go new file mode 100644 index 0000000000000..9df6297fea190 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/network/v3/network_inputs.pb.validate.go @@ -0,0 +1,937 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/matching/common_inputs/network/v3/network_inputs.proto + +package networkv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on DestinationIPInput 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 *DestinationIPInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DestinationIPInput 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 +// DestinationIPInputMultiError, or nil if none found. +func (m *DestinationIPInput) ValidateAll() error { + return m.validate(true) +} + +func (m *DestinationIPInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return DestinationIPInputMultiError(errors) + } + return nil +} + +// DestinationIPInputMultiError is an error wrapping multiple validation errors +// returned by DestinationIPInput.ValidateAll() if the designated constraints +// aren't met. +type DestinationIPInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DestinationIPInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DestinationIPInputMultiError) AllErrors() []error { return m } + +// DestinationIPInputValidationError is the validation error returned by +// DestinationIPInput.Validate if the designated constraints aren't met. +type DestinationIPInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DestinationIPInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DestinationIPInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DestinationIPInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DestinationIPInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DestinationIPInputValidationError) ErrorName() string { + return "DestinationIPInputValidationError" +} + +// Error satisfies the builtin error interface +func (e DestinationIPInputValidationError) 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 %sDestinationIPInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DestinationIPInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DestinationIPInputValidationError{} + +// Validate checks the field values on DestinationPortInput 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 *DestinationPortInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DestinationPortInput 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 +// DestinationPortInputMultiError, or nil if none found. +func (m *DestinationPortInput) ValidateAll() error { + return m.validate(true) +} + +func (m *DestinationPortInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return DestinationPortInputMultiError(errors) + } + return nil +} + +// DestinationPortInputMultiError is an error wrapping multiple validation +// errors returned by DestinationPortInput.ValidateAll() if the designated +// constraints aren't met. +type DestinationPortInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DestinationPortInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DestinationPortInputMultiError) AllErrors() []error { return m } + +// DestinationPortInputValidationError is the validation error returned by +// DestinationPortInput.Validate if the designated constraints aren't met. +type DestinationPortInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DestinationPortInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DestinationPortInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DestinationPortInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DestinationPortInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DestinationPortInputValidationError) ErrorName() string { + return "DestinationPortInputValidationError" +} + +// Error satisfies the builtin error interface +func (e DestinationPortInputValidationError) 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 %sDestinationPortInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DestinationPortInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DestinationPortInputValidationError{} + +// Validate checks the field values on SourceIPInput 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 *SourceIPInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SourceIPInput 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 SourceIPInputMultiError, or +// nil if none found. +func (m *SourceIPInput) ValidateAll() error { + return m.validate(true) +} + +func (m *SourceIPInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return SourceIPInputMultiError(errors) + } + return nil +} + +// SourceIPInputMultiError is an error wrapping multiple validation errors +// returned by SourceIPInput.ValidateAll() if the designated constraints +// aren't met. +type SourceIPInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SourceIPInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SourceIPInputMultiError) AllErrors() []error { return m } + +// SourceIPInputValidationError is the validation error returned by +// SourceIPInput.Validate if the designated constraints aren't met. +type SourceIPInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SourceIPInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SourceIPInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SourceIPInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SourceIPInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SourceIPInputValidationError) ErrorName() string { return "SourceIPInputValidationError" } + +// Error satisfies the builtin error interface +func (e SourceIPInputValidationError) 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 %sSourceIPInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SourceIPInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SourceIPInputValidationError{} + +// Validate checks the field values on SourcePortInput 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 *SourcePortInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SourcePortInput 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 +// SourcePortInputMultiError, or nil if none found. +func (m *SourcePortInput) ValidateAll() error { + return m.validate(true) +} + +func (m *SourcePortInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return SourcePortInputMultiError(errors) + } + return nil +} + +// SourcePortInputMultiError is an error wrapping multiple validation errors +// returned by SourcePortInput.ValidateAll() if the designated constraints +// aren't met. +type SourcePortInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SourcePortInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SourcePortInputMultiError) AllErrors() []error { return m } + +// SourcePortInputValidationError is the validation error returned by +// SourcePortInput.Validate if the designated constraints aren't met. +type SourcePortInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SourcePortInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SourcePortInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SourcePortInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SourcePortInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SourcePortInputValidationError) ErrorName() string { return "SourcePortInputValidationError" } + +// Error satisfies the builtin error interface +func (e SourcePortInputValidationError) 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 %sSourcePortInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SourcePortInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SourcePortInputValidationError{} + +// Validate checks the field values on DirectSourceIPInput 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 *DirectSourceIPInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DirectSourceIPInput 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 +// DirectSourceIPInputMultiError, or nil if none found. +func (m *DirectSourceIPInput) ValidateAll() error { + return m.validate(true) +} + +func (m *DirectSourceIPInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return DirectSourceIPInputMultiError(errors) + } + return nil +} + +// DirectSourceIPInputMultiError is an error wrapping multiple validation +// errors returned by DirectSourceIPInput.ValidateAll() if the designated +// constraints aren't met. +type DirectSourceIPInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DirectSourceIPInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DirectSourceIPInputMultiError) AllErrors() []error { return m } + +// DirectSourceIPInputValidationError is the validation error returned by +// DirectSourceIPInput.Validate if the designated constraints aren't met. +type DirectSourceIPInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DirectSourceIPInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DirectSourceIPInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DirectSourceIPInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DirectSourceIPInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DirectSourceIPInputValidationError) ErrorName() string { + return "DirectSourceIPInputValidationError" +} + +// Error satisfies the builtin error interface +func (e DirectSourceIPInputValidationError) 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 %sDirectSourceIPInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DirectSourceIPInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DirectSourceIPInputValidationError{} + +// Validate checks the field values on SourceTypeInput 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 *SourceTypeInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SourceTypeInput 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 +// SourceTypeInputMultiError, or nil if none found. +func (m *SourceTypeInput) ValidateAll() error { + return m.validate(true) +} + +func (m *SourceTypeInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return SourceTypeInputMultiError(errors) + } + return nil +} + +// SourceTypeInputMultiError is an error wrapping multiple validation errors +// returned by SourceTypeInput.ValidateAll() if the designated constraints +// aren't met. +type SourceTypeInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SourceTypeInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SourceTypeInputMultiError) AllErrors() []error { return m } + +// SourceTypeInputValidationError is the validation error returned by +// SourceTypeInput.Validate if the designated constraints aren't met. +type SourceTypeInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SourceTypeInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SourceTypeInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SourceTypeInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SourceTypeInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SourceTypeInputValidationError) ErrorName() string { return "SourceTypeInputValidationError" } + +// Error satisfies the builtin error interface +func (e SourceTypeInputValidationError) 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 %sSourceTypeInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SourceTypeInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SourceTypeInputValidationError{} + +// Validate checks the field values on ServerNameInput 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 *ServerNameInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ServerNameInput 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 +// ServerNameInputMultiError, or nil if none found. +func (m *ServerNameInput) ValidateAll() error { + return m.validate(true) +} + +func (m *ServerNameInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return ServerNameInputMultiError(errors) + } + return nil +} + +// ServerNameInputMultiError is an error wrapping multiple validation errors +// returned by ServerNameInput.ValidateAll() if the designated constraints +// aren't met. +type ServerNameInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ServerNameInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ServerNameInputMultiError) AllErrors() []error { return m } + +// ServerNameInputValidationError is the validation error returned by +// ServerNameInput.Validate if the designated constraints aren't met. +type ServerNameInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ServerNameInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ServerNameInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ServerNameInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ServerNameInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ServerNameInputValidationError) ErrorName() string { return "ServerNameInputValidationError" } + +// Error satisfies the builtin error interface +func (e ServerNameInputValidationError) 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 %sServerNameInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ServerNameInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ServerNameInputValidationError{} + +// Validate checks the field values on TransportProtocolInput 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 *TransportProtocolInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TransportProtocolInput 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 +// TransportProtocolInputMultiError, or nil if none found. +func (m *TransportProtocolInput) ValidateAll() error { + return m.validate(true) +} + +func (m *TransportProtocolInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return TransportProtocolInputMultiError(errors) + } + return nil +} + +// TransportProtocolInputMultiError is an error wrapping multiple validation +// errors returned by TransportProtocolInput.ValidateAll() if the designated +// constraints aren't met. +type TransportProtocolInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TransportProtocolInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TransportProtocolInputMultiError) AllErrors() []error { return m } + +// TransportProtocolInputValidationError is the validation error returned by +// TransportProtocolInput.Validate if the designated constraints aren't met. +type TransportProtocolInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TransportProtocolInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TransportProtocolInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TransportProtocolInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TransportProtocolInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TransportProtocolInputValidationError) ErrorName() string { + return "TransportProtocolInputValidationError" +} + +// Error satisfies the builtin error interface +func (e TransportProtocolInputValidationError) 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 %sTransportProtocolInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TransportProtocolInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TransportProtocolInputValidationError{} + +// Validate checks the field values on ApplicationProtocolInput 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 *ApplicationProtocolInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ApplicationProtocolInput 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 +// ApplicationProtocolInputMultiError, or nil if none found. +func (m *ApplicationProtocolInput) ValidateAll() error { + return m.validate(true) +} + +func (m *ApplicationProtocolInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return ApplicationProtocolInputMultiError(errors) + } + return nil +} + +// ApplicationProtocolInputMultiError is an error wrapping multiple validation +// errors returned by ApplicationProtocolInput.ValidateAll() if the designated +// constraints aren't met. +type ApplicationProtocolInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ApplicationProtocolInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ApplicationProtocolInputMultiError) AllErrors() []error { return m } + +// ApplicationProtocolInputValidationError is the validation error returned by +// ApplicationProtocolInput.Validate if the designated constraints aren't met. +type ApplicationProtocolInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ApplicationProtocolInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ApplicationProtocolInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ApplicationProtocolInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ApplicationProtocolInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ApplicationProtocolInputValidationError) ErrorName() string { + return "ApplicationProtocolInputValidationError" +} + +// Error satisfies the builtin error interface +func (e ApplicationProtocolInputValidationError) 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 %sApplicationProtocolInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ApplicationProtocolInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ApplicationProtocolInputValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/ssl/v3/ssl_inputs.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/ssl/v3/ssl_inputs.pb.go new file mode 100644 index 0000000000000..f8b41eba6616b --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/ssl/v3/ssl_inputs.pb.go @@ -0,0 +1,266 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/matching/common_inputs/ssl/v3/ssl_inputs.proto + +package sslv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// List of comma-delimited URIs in the SAN field of the peer certificate for a downstream. +// [#extension: envoy.matching.inputs.uri_san] +type UriSanInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UriSanInput) Reset() { + *x = UriSanInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UriSanInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UriSanInput) ProtoMessage() {} + +func (x *UriSanInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UriSanInput.ProtoReflect.Descriptor instead. +func (*UriSanInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_rawDescGZIP(), []int{0} +} + +// List of comma-delimited DNS entries in the SAN field of the peer certificate for a downstream. +// [#extension: envoy.matching.inputs.dns_san] +type DnsSanInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DnsSanInput) Reset() { + *x = DnsSanInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DnsSanInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DnsSanInput) ProtoMessage() {} + +func (x *DnsSanInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DnsSanInput.ProtoReflect.Descriptor instead. +func (*DnsSanInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_rawDescGZIP(), []int{1} +} + +// Input that matches the subject field of the peer certificate in RFC 2253 format for a +// downstream. +// [#extension: envoy.matching.inputs.subject] +type SubjectInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SubjectInput) Reset() { + *x = SubjectInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubjectInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubjectInput) ProtoMessage() {} + +func (x *SubjectInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubjectInput.ProtoReflect.Descriptor instead. +func (*SubjectInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_rawDescGZIP(), []int{2} +} + +var File_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto protoreflect.FileDescriptor + +var file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_rawDesc = []byte{ + 0x0a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x2f, 0x73, 0x73, 0x6c, 0x2f, 0x76, 0x33, + 0x2f, 0x73, 0x73, 0x6c, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x2e, 0x73, 0x73, 0x6c, 0x2e, 0x76, + 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x0d, 0x0a, 0x0b, 0x55, 0x72, 0x69, 0x53, 0x61, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, + 0x0d, 0x0a, 0x0b, 0x44, 0x6e, 0x73, 0x53, 0x61, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x0e, + 0x0a, 0x0c, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x42, 0xb5, + 0x01, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x2e, 0x73, 0x73, 0x6c, 0x2e, 0x76, 0x33, 0x42, + 0x0e, 0x53, 0x73, 0x6c, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x69, 0x6e, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, + 0x73, 0x2f, 0x73, 0x73, 0x6c, 0x2f, 0x76, 0x33, 0x3b, 0x73, 0x73, 0x6c, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_rawDescOnce sync.Once + file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_rawDescData = file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_rawDesc +) + +func file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_rawDescGZIP() []byte { + file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_rawDescOnce.Do(func() { + file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_rawDescData) + }) + return file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_rawDescData +} + +var file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_goTypes = []interface{}{ + (*UriSanInput)(nil), // 0: envoy.extensions.matching.common_inputs.ssl.v3.UriSanInput + (*DnsSanInput)(nil), // 1: envoy.extensions.matching.common_inputs.ssl.v3.DnsSanInput + (*SubjectInput)(nil), // 2: envoy.extensions.matching.common_inputs.ssl.v3.SubjectInput +} +var file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_init() } +func file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_init() { + if File_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UriSanInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DnsSanInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubjectInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_goTypes, + DependencyIndexes: file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_depIdxs, + MessageInfos: file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_msgTypes, + }.Build() + File_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto = out.File + file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_rawDesc = nil + file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_goTypes = nil + file_envoy_extensions_matching_common_inputs_ssl_v3_ssl_inputs_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/ssl/v3/ssl_inputs.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/ssl/v3/ssl_inputs.pb.validate.go new file mode 100644 index 0000000000000..bdc0277b4b9ea --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/ssl/v3/ssl_inputs.pb.validate.go @@ -0,0 +1,330 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/matching/common_inputs/ssl/v3/ssl_inputs.proto + +package sslv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on UriSanInput 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 *UriSanInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UriSanInput 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 UriSanInputMultiError, or +// nil if none found. +func (m *UriSanInput) ValidateAll() error { + return m.validate(true) +} + +func (m *UriSanInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return UriSanInputMultiError(errors) + } + return nil +} + +// UriSanInputMultiError is an error wrapping multiple validation errors +// returned by UriSanInput.ValidateAll() if the designated constraints aren't met. +type UriSanInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UriSanInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UriSanInputMultiError) AllErrors() []error { return m } + +// UriSanInputValidationError is the validation error returned by +// UriSanInput.Validate if the designated constraints aren't met. +type UriSanInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e UriSanInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e UriSanInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e UriSanInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e UriSanInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e UriSanInputValidationError) ErrorName() string { return "UriSanInputValidationError" } + +// Error satisfies the builtin error interface +func (e UriSanInputValidationError) 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 %sUriSanInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = UriSanInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = UriSanInputValidationError{} + +// Validate checks the field values on DnsSanInput 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 *DnsSanInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DnsSanInput 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 DnsSanInputMultiError, or +// nil if none found. +func (m *DnsSanInput) ValidateAll() error { + return m.validate(true) +} + +func (m *DnsSanInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return DnsSanInputMultiError(errors) + } + return nil +} + +// DnsSanInputMultiError is an error wrapping multiple validation errors +// returned by DnsSanInput.ValidateAll() if the designated constraints aren't met. +type DnsSanInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DnsSanInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DnsSanInputMultiError) AllErrors() []error { return m } + +// DnsSanInputValidationError is the validation error returned by +// DnsSanInput.Validate if the designated constraints aren't met. +type DnsSanInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DnsSanInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DnsSanInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DnsSanInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DnsSanInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DnsSanInputValidationError) ErrorName() string { return "DnsSanInputValidationError" } + +// Error satisfies the builtin error interface +func (e DnsSanInputValidationError) 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 %sDnsSanInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DnsSanInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DnsSanInputValidationError{} + +// Validate checks the field values on SubjectInput 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 *SubjectInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SubjectInput 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 SubjectInputMultiError, or +// nil if none found. +func (m *SubjectInput) ValidateAll() error { + return m.validate(true) +} + +func (m *SubjectInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return SubjectInputMultiError(errors) + } + return nil +} + +// SubjectInputMultiError is an error wrapping multiple validation errors +// returned by SubjectInput.ValidateAll() if the designated constraints aren't met. +type SubjectInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SubjectInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SubjectInputMultiError) AllErrors() []error { return m } + +// SubjectInputValidationError is the validation error returned by +// SubjectInput.Validate if the designated constraints aren't met. +type SubjectInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SubjectInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SubjectInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SubjectInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SubjectInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SubjectInputValidationError) ErrorName() string { return "SubjectInputValidationError" } + +// Error satisfies the builtin error interface +func (e SubjectInputValidationError) 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 %sSubjectInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SubjectInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SubjectInputValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.pb.go new file mode 100644 index 0000000000000..f4f3d8657db5d --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.pb.go @@ -0,0 +1,211 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.proto + +package consistent_hashingv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// The consistent hashing matchers computes a consistent hash from the input and matches if the resulting hash +// is within the configured threshold. +// More specifically, this matcher evaluates to true if hash(input, seed) % modulo >= threshold. +// Note that the consistency of the match result relies on the internal hash function (xxhash) remaining +// unchanged. While this is unlikely to happen intentionally, this could cause inconsistent match results +// between deployments. +type ConsistentHashing struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The threshold the resulting hash must be over in order for this matcher to evaluate to true. + // This value must be below the configured modulo value. + // Setting this to 0 is equivalent to this matcher always matching. + Threshold uint32 `protobuf:"varint,1,opt,name=threshold,proto3" json:"threshold,omitempty"` + // The value to use for the modulus in the calculation. This effectively bounds the hash output, + // specifying the range of possible values. + // This value must be above the configured threshold. + Modulo uint32 `protobuf:"varint,2,opt,name=modulo,proto3" json:"modulo,omitempty"` + // Optional seed passed through the hash function. This allows using additional information when computing + // the hash value: by changing the seed value, a different partition of matching and non-matching inputs will + // be created that remains consistent for that seed value. + Seed uint64 `protobuf:"varint,3,opt,name=seed,proto3" json:"seed,omitempty"` +} + +func (x *ConsistentHashing) Reset() { + *x = ConsistentHashing{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConsistentHashing) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConsistentHashing) ProtoMessage() {} + +func (x *ConsistentHashing) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConsistentHashing.ProtoReflect.Descriptor instead. +func (*ConsistentHashing) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescGZIP(), []int{0} +} + +func (x *ConsistentHashing) GetThreshold() uint32 { + if x != nil { + return x.Threshold + } + return 0 +} + +func (x *ConsistentHashing) GetModulo() uint32 { + if x != nil { + return x.Modulo + } + return 0 +} + +func (x *ConsistentHashing) GetSeed() uint64 { + if x != nil { + return x.Seed + } + return 0 +} + +var File_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto protoreflect.FileDescriptor + +var file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDesc = []byte{ + 0x0a, 0x57, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, + 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, + 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 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, 0x66, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x48, + 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, + 0x6f, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x1f, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x6f, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x06, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x65, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x65, 0x65, 0x64, 0x42, 0xec, 0x01, 0x0a, 0x4c, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x42, 0x16, 0x43, 0x6f, 0x6e, 0x73, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x7a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, + 0x5f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x6e, 0x73, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescOnce sync.Once + file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescData = file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDesc +) + +func file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescGZIP() []byte { + file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescOnce.Do(func() { + file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescData) + }) + return file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDescData +} + +var file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_goTypes = []interface{}{ + (*ConsistentHashing)(nil), // 0: envoy.extensions.matching.input_matchers.consistent_hashing.v3.ConsistentHashing +} +var file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_init() +} +func file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_init() { + if File_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConsistentHashing); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_goTypes, + DependencyIndexes: file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_depIdxs, + MessageInfos: file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_msgTypes, + }.Build() + File_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto = out.File + file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_rawDesc = nil + file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_goTypes = nil + file_envoy_extensions_matching_input_matchers_consistent_hashing_v3_consistent_hashing_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.pb.validate.go new file mode 100644 index 0000000000000..4efb4eb467b71 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.pb.validate.go @@ -0,0 +1,152 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/matching/input_matchers/consistent_hashing/v3/consistent_hashing.proto + +package consistent_hashingv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ConsistentHashing 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 *ConsistentHashing) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ConsistentHashing 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 +// ConsistentHashingMultiError, or nil if none found. +func (m *ConsistentHashing) ValidateAll() error { + return m.validate(true) +} + +func (m *ConsistentHashing) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Threshold + + if m.GetModulo() <= 0 { + err := ConsistentHashingValidationError{ + field: "Modulo", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for Seed + + if len(errors) > 0 { + return ConsistentHashingMultiError(errors) + } + return nil +} + +// ConsistentHashingMultiError is an error wrapping multiple validation errors +// returned by ConsistentHashing.ValidateAll() if the designated constraints +// aren't met. +type ConsistentHashingMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConsistentHashingMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConsistentHashingMultiError) AllErrors() []error { return m } + +// ConsistentHashingValidationError is the validation error returned by +// ConsistentHashing.Validate if the designated constraints aren't met. +type ConsistentHashingValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConsistentHashingValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConsistentHashingValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConsistentHashingValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConsistentHashingValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConsistentHashingValidationError) ErrorName() string { + return "ConsistentHashingValidationError" +} + +// Error satisfies the builtin error interface +func (e ConsistentHashingValidationError) 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 %sConsistentHashing.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConsistentHashingValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConsistentHashingValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/input_matchers/ip/v3/ip.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/input_matchers/ip/v3/ip.pb.go new file mode 100644 index 0000000000000..0e31779659d86 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/input_matchers/ip/v3/ip.pb.go @@ -0,0 +1,203 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/matching/input_matchers/ip/v3/ip.proto + +package ipv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// This input matcher matches IPv4 or IPv6 addresses against a list of CIDR +// ranges. It returns true if and only if the input IP belongs to at least one +// of these CIDR ranges. Internally, it uses a Level-Compressed trie, as +// described in the paper `IP-address lookup using LC-tries +// `_ +// by S. Nilsson and G. Karlsson. For "big" lists of IPs, this matcher is more +// efficient than multiple single IP matcher, that would have a linear cost. +type Ip struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Match if the IP belongs to any of these CIDR ranges. + CidrRanges []*v3.CidrRange `protobuf:"bytes,1,rep,name=cidr_ranges,json=cidrRanges,proto3" json:"cidr_ranges,omitempty"` + // The human readable prefix to use when emitting statistics for the IP input + // matcher. Names in the table below are concatenated to this prefix. + // + // .. csv-table:: + // + // :header: Name, Type, Description + // :widths: 1, 1, 2 + // + // ip_parsing_failed, Counter, Total number of IP addresses the matcher was unable to parse + StatPrefix string `protobuf:"bytes,2,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` +} + +func (x *Ip) Reset() { + *x = Ip{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Ip) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Ip) ProtoMessage() {} + +func (x *Ip) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Ip.ProtoReflect.Descriptor instead. +func (*Ip) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDescGZIP(), []int{0} +} + +func (x *Ip) GetCidrRanges() []*v3.CidrRange { + if x != nil { + return x.CidrRanges + } + return nil +} + +func (x *Ip) GetStatPrefix() string { + if x != nil { + return x.StatPrefix + } + return "" +} + +var File_envoy_extensions_matching_input_matchers_ip_v3_ip_proto protoreflect.FileDescriptor + +var file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDesc = []byte{ + 0x0a, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x69, 0x70, 0x2f, 0x76, 0x33, + 0x2f, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x73, 0x2e, 0x69, 0x70, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x7a, 0x0a, 0x02, 0x49, 0x70, 0x12, 0x4a, 0x0a, 0x0b, 0x63, + 0x69, 0x64, 0x72, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0a, 0x63, 0x69, 0x64, + 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x42, 0xad, 0x01, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x6e, + 0x70, 0x75, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x2e, 0x69, 0x70, 0x2e, + 0x76, 0x33, 0x42, 0x07, 0x49, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5a, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2f, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x69, + 0x70, 0x2f, 0x76, 0x33, 0x3b, 0x69, 0x70, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDescOnce sync.Once + file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDescData = file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDesc +) + +func file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDescGZIP() []byte { + file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDescOnce.Do(func() { + file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDescData) + }) + return file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDescData +} + +var file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_goTypes = []interface{}{ + (*Ip)(nil), // 0: envoy.extensions.matching.input_matchers.ip.v3.Ip + (*v3.CidrRange)(nil), // 1: envoy.config.core.v3.CidrRange +} +var file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.matching.input_matchers.ip.v3.Ip.cidr_ranges:type_name -> envoy.config.core.v3.CidrRange + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_init() } +func file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_init() { + if File_envoy_extensions_matching_input_matchers_ip_v3_ip_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ip); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_goTypes, + DependencyIndexes: file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_depIdxs, + MessageInfos: file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_msgTypes, + }.Build() + File_envoy_extensions_matching_input_matchers_ip_v3_ip_proto = out.File + file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_rawDesc = nil + file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_goTypes = nil + file_envoy_extensions_matching_input_matchers_ip_v3_ip_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/input_matchers/ip/v3/ip.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/input_matchers/ip/v3/ip.pb.validate.go new file mode 100644 index 0000000000000..f21ae24c4c604 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/matching/input_matchers/ip/v3/ip.pb.validate.go @@ -0,0 +1,189 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/matching/input_matchers/ip/v3/ip.proto + +package ipv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Ip 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 *Ip) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Ip 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 IpMultiError, or nil if none found. +func (m *Ip) ValidateAll() error { + return m.validate(true) +} + +func (m *Ip) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetCidrRanges()) < 1 { + err := IpValidationError{ + field: "CidrRanges", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetCidrRanges() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, IpValidationError{ + field: fmt.Sprintf("CidrRanges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, IpValidationError{ + field: fmt.Sprintf("CidrRanges[%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 IpValidationError{ + field: fmt.Sprintf("CidrRanges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if utf8.RuneCountInString(m.GetStatPrefix()) < 1 { + err := IpValidationError{ + field: "StatPrefix", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return IpMultiError(errors) + } + return nil +} + +// IpMultiError is an error wrapping multiple validation errors returned by +// Ip.ValidateAll() if the designated constraints aren't met. +type IpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m IpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m IpMultiError) AllErrors() []error { return m } + +// IpValidationError is the validation error returned by Ip.Validate if the +// designated constraints aren't met. +type IpValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e IpValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e IpValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e IpValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e IpValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e IpValidationError) ErrorName() string { return "IpValidationError" } + +// Error satisfies the builtin error interface +func (e IpValidationError) 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 %sIp.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = IpValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = IpValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/apple/v3/apple_dns_resolver.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/apple/v3/apple_dns_resolver.pb.go new file mode 100644 index 0000000000000..3bb73920317f4 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/apple/v3/apple_dns_resolver.pb.go @@ -0,0 +1,178 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/network/dns_resolver/apple/v3/apple_dns_resolver.proto + +package applev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for apple DNS resolver. +type AppleDnsResolverConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The resolver will avoid the system's heuristics to only return + // IPv4 or IPv6 addresses that it considers to be "routable", instead + // returning all possible IPv4 or IPv6 addresses. This setting is + // ignored if the DNS lookup family is set to v4-only or v6-only. + // This should remain false in the vast majority of cases, but may be + // useful when performing custom filtering of addresses, such as with + // Happy Eyeballs. + IncludeUnroutableFamilies bool `protobuf:"varint,1,opt,name=include_unroutable_families,json=includeUnroutableFamilies,proto3" json:"include_unroutable_families,omitempty"` +} + +func (x *AppleDnsResolverConfig) Reset() { + *x = AppleDnsResolverConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppleDnsResolverConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppleDnsResolverConfig) ProtoMessage() {} + +func (x *AppleDnsResolverConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AppleDnsResolverConfig.ProtoReflect.Descriptor instead. +func (*AppleDnsResolverConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDescGZIP(), []int{0} +} + +func (x *AppleDnsResolverConfig) GetIncludeUnroutableFamilies() bool { + if x != nil { + return x.IncludeUnroutableFamilies + } + return false +} + +var File_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto protoreflect.FileDescriptor + +var file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDesc = []byte{ + 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x64, 0x6e, 0x73, 0x5f, 0x72, + 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2f, 0x76, 0x33, + 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, + 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x58, 0x0a, 0x16, 0x41, 0x70, 0x70, 0x6c, + 0x65, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x3e, 0x0a, 0x1b, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x75, 0x6e, + 0x72, 0x6f, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x69, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, + 0x55, 0x6e, 0x72, 0x6f, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x69, + 0x65, 0x73, 0x42, 0xbe, 0x01, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x6e, + 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65, + 0x2e, 0x76, 0x33, 0x42, 0x15, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5d, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x64, 0x6e, + 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x65, + 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDescOnce sync.Once + file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDescData = file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDesc +) + +func file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDescGZIP() []byte { + file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDescOnce.Do(func() { + file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDescData) + }) + return file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDescData +} + +var file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_goTypes = []interface{}{ + (*AppleDnsResolverConfig)(nil), // 0: envoy.extensions.network.dns_resolver.apple.v3.AppleDnsResolverConfig +} +var file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_init() } +func file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_init() { + if File_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppleDnsResolverConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_goTypes, + DependencyIndexes: file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_depIdxs, + MessageInfos: file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_msgTypes, + }.Build() + File_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto = out.File + file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_rawDesc = nil + file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_goTypes = nil + file_envoy_extensions_network_dns_resolver_apple_v3_apple_dns_resolver_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/apple/v3/apple_dns_resolver.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/apple/v3/apple_dns_resolver.pb.validate.go new file mode 100644 index 0000000000000..78ed1a0099e9f --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/apple/v3/apple_dns_resolver.pb.validate.go @@ -0,0 +1,139 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/network/dns_resolver/apple/v3/apple_dns_resolver.proto + +package applev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on AppleDnsResolverConfig 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 *AppleDnsResolverConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AppleDnsResolverConfig 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 +// AppleDnsResolverConfigMultiError, or nil if none found. +func (m *AppleDnsResolverConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *AppleDnsResolverConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for IncludeUnroutableFamilies + + if len(errors) > 0 { + return AppleDnsResolverConfigMultiError(errors) + } + return nil +} + +// AppleDnsResolverConfigMultiError is an error wrapping multiple validation +// errors returned by AppleDnsResolverConfig.ValidateAll() if the designated +// constraints aren't met. +type AppleDnsResolverConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AppleDnsResolverConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AppleDnsResolverConfigMultiError) AllErrors() []error { return m } + +// AppleDnsResolverConfigValidationError is the validation error returned by +// AppleDnsResolverConfig.Validate if the designated constraints aren't met. +type AppleDnsResolverConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AppleDnsResolverConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AppleDnsResolverConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AppleDnsResolverConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AppleDnsResolverConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AppleDnsResolverConfigValidationError) ErrorName() string { + return "AppleDnsResolverConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e AppleDnsResolverConfigValidationError) 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 %sAppleDnsResolverConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AppleDnsResolverConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AppleDnsResolverConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.pb.go new file mode 100644 index 0000000000000..08b6ac144d10a --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.pb.go @@ -0,0 +1,236 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.proto + +package caresv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for c-ares DNS resolver. +type CaresDnsResolverConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of dns resolver addresses. + // :ref:`use_resolvers_as_fallback` + // below dictates if the DNS client should override system defaults or only use the provided + // resolvers if the system defaults are not available, i.e., as a fallback. + Resolvers []*v3.Address `protobuf:"bytes,1,rep,name=resolvers,proto3" json:"resolvers,omitempty"` + // If true use the resolvers listed in the + // :ref:`resolvers` + // field only if c-ares is unable to obtain a + // nameserver from the system (e.g., /etc/resolv.conf). + // Otherwise, the resolvers listed in the resolvers list will override the default system + // resolvers. Defaults to false. + UseResolversAsFallback bool `protobuf:"varint,3,opt,name=use_resolvers_as_fallback,json=useResolversAsFallback,proto3" json:"use_resolvers_as_fallback,omitempty"` + // The resolver will query available network interfaces and determine if there are no available + // interfaces for a given IP family. It will then filter these addresses from the results it + // presents. e.g., if there are no available IPv4 network interfaces, the resolver will not + // provide IPv4 addresses. + FilterUnroutableFamilies bool `protobuf:"varint,4,opt,name=filter_unroutable_families,json=filterUnroutableFamilies,proto3" json:"filter_unroutable_families,omitempty"` + // Configuration of DNS resolver option flags which control the behavior of the DNS resolver. + DnsResolverOptions *v3.DnsResolverOptions `protobuf:"bytes,2,opt,name=dns_resolver_options,json=dnsResolverOptions,proto3" json:"dns_resolver_options,omitempty"` +} + +func (x *CaresDnsResolverConfig) Reset() { + *x = CaresDnsResolverConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CaresDnsResolverConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CaresDnsResolverConfig) ProtoMessage() {} + +func (x *CaresDnsResolverConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CaresDnsResolverConfig.ProtoReflect.Descriptor instead. +func (*CaresDnsResolverConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDescGZIP(), []int{0} +} + +func (x *CaresDnsResolverConfig) GetResolvers() []*v3.Address { + if x != nil { + return x.Resolvers + } + return nil +} + +func (x *CaresDnsResolverConfig) GetUseResolversAsFallback() bool { + if x != nil { + return x.UseResolversAsFallback + } + return false +} + +func (x *CaresDnsResolverConfig) GetFilterUnroutableFamilies() bool { + if x != nil { + return x.FilterUnroutableFamilies + } + return false +} + +func (x *CaresDnsResolverConfig) GetDnsResolverOptions() *v3.DnsResolverOptions { + if x != nil { + return x.DnsResolverOptions + } + return nil +} + +var File_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto protoreflect.FileDescriptor + +var file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDesc = []byte{ + 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x64, 0x6e, 0x73, 0x5f, 0x72, + 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2f, 0x63, 0x61, 0x72, 0x65, 0x73, 0x2f, 0x76, 0x33, + 0x2f, 0x63, 0x61, 0x72, 0x65, 0x73, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, + 0x2e, 0x63, 0x61, 0x72, 0x65, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xb4, 0x02, 0x0a, 0x16, 0x43, + 0x61, 0x72, 0x65, 0x73, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, + 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, + 0x01, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x12, 0x39, 0x0a, 0x19, + 0x75, 0x73, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x5f, 0x61, 0x73, + 0x5f, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x16, 0x75, 0x73, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x41, 0x73, 0x46, + 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x3c, 0x0a, 0x1a, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x5f, 0x75, 0x6e, 0x72, 0x6f, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x61, 0x6d, + 0x69, 0x6c, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x55, 0x6e, 0x72, 0x6f, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x61, 0x6d, + 0x69, 0x6c, 0x69, 0x65, 0x73, 0x12, 0x5a, 0x0a, 0x14, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, + 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x64, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x42, 0xbe, 0x01, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x6e, 0x73, + 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x61, 0x72, 0x65, 0x73, 0x2e, + 0x76, 0x33, 0x42, 0x15, 0x43, 0x61, 0x72, 0x65, 0x73, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, + 0x6c, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5d, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x64, 0x6e, 0x73, + 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2f, 0x63, 0x61, 0x72, 0x65, 0x73, 0x2f, + 0x76, 0x33, 0x3b, 0x63, 0x61, 0x72, 0x65, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDescOnce sync.Once + file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDescData = file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDesc +) + +func file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDescGZIP() []byte { + file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDescOnce.Do(func() { + file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDescData) + }) + return file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDescData +} + +var file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_goTypes = []interface{}{ + (*CaresDnsResolverConfig)(nil), // 0: envoy.extensions.network.dns_resolver.cares.v3.CaresDnsResolverConfig + (*v3.Address)(nil), // 1: envoy.config.core.v3.Address + (*v3.DnsResolverOptions)(nil), // 2: envoy.config.core.v3.DnsResolverOptions +} +var file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.network.dns_resolver.cares.v3.CaresDnsResolverConfig.resolvers:type_name -> envoy.config.core.v3.Address + 2, // 1: envoy.extensions.network.dns_resolver.cares.v3.CaresDnsResolverConfig.dns_resolver_options:type_name -> envoy.config.core.v3.DnsResolverOptions + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_init() } +func file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_init() { + if File_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CaresDnsResolverConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_goTypes, + DependencyIndexes: file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_depIdxs, + MessageInfos: file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_msgTypes, + }.Build() + File_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto = out.File + file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_rawDesc = nil + file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_goTypes = nil + file_envoy_extensions_network_dns_resolver_cares_v3_cares_dns_resolver_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.pb.validate.go new file mode 100644 index 0000000000000..64e2f474ded43 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.pb.validate.go @@ -0,0 +1,215 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.proto + +package caresv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on CaresDnsResolverConfig 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 *CaresDnsResolverConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CaresDnsResolverConfig 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 +// CaresDnsResolverConfigMultiError, or nil if none found. +func (m *CaresDnsResolverConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *CaresDnsResolverConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetResolvers()) < 1 { + err := CaresDnsResolverConfigValidationError{ + field: "Resolvers", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetResolvers() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CaresDnsResolverConfigValidationError{ + field: fmt.Sprintf("Resolvers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CaresDnsResolverConfigValidationError{ + field: fmt.Sprintf("Resolvers[%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 CaresDnsResolverConfigValidationError{ + field: fmt.Sprintf("Resolvers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for UseResolversAsFallback + + // no validation rules for FilterUnroutableFamilies + + if all { + switch v := interface{}(m.GetDnsResolverOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CaresDnsResolverConfigValidationError{ + field: "DnsResolverOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CaresDnsResolverConfigValidationError{ + field: "DnsResolverOptions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDnsResolverOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CaresDnsResolverConfigValidationError{ + field: "DnsResolverOptions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return CaresDnsResolverConfigMultiError(errors) + } + return nil +} + +// CaresDnsResolverConfigMultiError is an error wrapping multiple validation +// errors returned by CaresDnsResolverConfig.ValidateAll() if the designated +// constraints aren't met. +type CaresDnsResolverConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CaresDnsResolverConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CaresDnsResolverConfigMultiError) AllErrors() []error { return m } + +// CaresDnsResolverConfigValidationError is the validation error returned by +// CaresDnsResolverConfig.Validate if the designated constraints aren't met. +type CaresDnsResolverConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CaresDnsResolverConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CaresDnsResolverConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CaresDnsResolverConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CaresDnsResolverConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CaresDnsResolverConfigValidationError) ErrorName() string { + return "CaresDnsResolverConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e CaresDnsResolverConfigValidationError) 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 %sCaresDnsResolverConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CaresDnsResolverConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CaresDnsResolverConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/getaddrinfo/v3/getaddrinfo_dns_resolver.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/getaddrinfo/v3/getaddrinfo_dns_resolver.pb.go new file mode 100644 index 0000000000000..cb7e731983cd0 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/getaddrinfo/v3/getaddrinfo_dns_resolver.pb.go @@ -0,0 +1,175 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/network/dns_resolver/getaddrinfo/v3/getaddrinfo_dns_resolver.proto + +package getaddrinfov3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for getaddrinfo DNS resolver. This resolver will use the system's getaddrinfo() +// function to resolve hosts. +// +// .. attention:: +// +// This resolver uses a single background thread to do resolutions. As such, it is not currently +// advised for use in situations requiring a high resolution rate. A thread pool can be added +// in the future if needed. +// +// .. attention:: +// +// Resolutions currently use a hard coded TTL of 60s because the getaddrinfo() API does not +// provide the actual TTL. Configuration for this can be added in the future if needed. +type GetAddrInfoDnsResolverConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetAddrInfoDnsResolverConfig) Reset() { + *x = GetAddrInfoDnsResolverConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAddrInfoDnsResolverConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAddrInfoDnsResolverConfig) ProtoMessage() {} + +func (x *GetAddrInfoDnsResolverConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAddrInfoDnsResolverConfig.ProtoReflect.Descriptor instead. +func (*GetAddrInfoDnsResolverConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto protoreflect.FileDescriptor + +var file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_rawDesc = []byte{ + 0x0a, 0x53, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x64, 0x6e, 0x73, 0x5f, 0x72, + 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x74, 0x61, 0x64, 0x64, 0x72, 0x69, + 0x6e, 0x66, 0x6f, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x65, 0x74, 0x61, 0x64, 0x64, 0x72, 0x69, 0x6e, + 0x66, 0x6f, 0x5f, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, + 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x65, 0x74, + 0x61, 0x64, 0x64, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1e, 0x0a, 0x1c, 0x47, 0x65, + 0x74, 0x41, 0x64, 0x64, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x44, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x6f, + 0x6c, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xd6, 0x01, 0x0a, 0x42, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, + 0x65, 0x72, 0x2e, 0x67, 0x65, 0x74, 0x61, 0x64, 0x64, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x76, + 0x33, 0x42, 0x1b, 0x47, 0x65, 0x74, 0x61, 0x64, 0x64, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x44, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x69, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2f, 0x64, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2f, 0x67, + 0x65, 0x74, 0x61, 0x64, 0x64, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x76, 0x33, 0x3b, 0x67, 0x65, + 0x74, 0x61, 0x64, 0x64, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_rawDescOnce sync.Once + file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_rawDescData = file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_rawDesc +) + +func file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_rawDescGZIP() []byte { + file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_rawDescOnce.Do(func() { + file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_rawDescData) + }) + return file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_rawDescData +} + +var file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_goTypes = []interface{}{ + (*GetAddrInfoDnsResolverConfig)(nil), // 0: envoy.extensions.network.dns_resolver.getaddrinfo.v3.GetAddrInfoDnsResolverConfig +} +var file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_init() +} +func file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_init() { + if File_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAddrInfoDnsResolverConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_goTypes, + DependencyIndexes: file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_depIdxs, + MessageInfos: file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_msgTypes, + }.Build() + File_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto = out.File + file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_rawDesc = nil + file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_goTypes = nil + file_envoy_extensions_network_dns_resolver_getaddrinfo_v3_getaddrinfo_dns_resolver_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/getaddrinfo/v3/getaddrinfo_dns_resolver.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/getaddrinfo/v3/getaddrinfo_dns_resolver.pb.validate.go new file mode 100644 index 0000000000000..5a8fcbc981210 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/getaddrinfo/v3/getaddrinfo_dns_resolver.pb.validate.go @@ -0,0 +1,138 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/network/dns_resolver/getaddrinfo/v3/getaddrinfo_dns_resolver.proto + +package getaddrinfov3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on GetAddrInfoDnsResolverConfig 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 *GetAddrInfoDnsResolverConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GetAddrInfoDnsResolverConfig 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 +// GetAddrInfoDnsResolverConfigMultiError, or nil if none found. +func (m *GetAddrInfoDnsResolverConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *GetAddrInfoDnsResolverConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return GetAddrInfoDnsResolverConfigMultiError(errors) + } + return nil +} + +// GetAddrInfoDnsResolverConfigMultiError is an error wrapping multiple +// validation errors returned by GetAddrInfoDnsResolverConfig.ValidateAll() if +// the designated constraints aren't met. +type GetAddrInfoDnsResolverConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GetAddrInfoDnsResolverConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GetAddrInfoDnsResolverConfigMultiError) AllErrors() []error { return m } + +// GetAddrInfoDnsResolverConfigValidationError is the validation error returned +// by GetAddrInfoDnsResolverConfig.Validate if the designated constraints +// aren't met. +type GetAddrInfoDnsResolverConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetAddrInfoDnsResolverConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetAddrInfoDnsResolverConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetAddrInfoDnsResolverConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetAddrInfoDnsResolverConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetAddrInfoDnsResolverConfigValidationError) ErrorName() string { + return "GetAddrInfoDnsResolverConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e GetAddrInfoDnsResolverConfigValidationError) 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 %sGetAddrInfoDnsResolverConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetAddrInfoDnsResolverConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetAddrInfoDnsResolverConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/network/socket_interface/v3/default_socket_interface.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/network/socket_interface/v3/default_socket_interface.pb.go new file mode 100644 index 0000000000000..6f868effa6d43 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/network/socket_interface/v3/default_socket_interface.pb.go @@ -0,0 +1,160 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/network/socket_interface/v3/default_socket_interface.proto + +package socket_interfacev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for default socket interface that relies on OS dependent syscall to create +// sockets. +type DefaultSocketInterface struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DefaultSocketInterface) Reset() { + *x = DefaultSocketInterface{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DefaultSocketInterface) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DefaultSocketInterface) ProtoMessage() {} + +func (x *DefaultSocketInterface) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DefaultSocketInterface.ProtoReflect.Descriptor instead. +func (*DefaultSocketInterface) Descriptor() ([]byte, []int) { + return file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto protoreflect.FileDescriptor + +var file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_rawDesc = []byte{ + 0x0a, 0x4b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2c, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x42, 0xcb, 0x01, 0x0a, 0x3a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, + 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, + 0x2e, 0x76, 0x33, 0x42, 0x1b, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x6f, 0x63, 0x6b, + 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x66, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_rawDescOnce sync.Once + file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_rawDescData = file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_rawDesc +) + +func file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_rawDescGZIP() []byte { + file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_rawDescOnce.Do(func() { + file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_rawDescData) + }) + return file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_rawDescData +} + +var file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_goTypes = []interface{}{ + (*DefaultSocketInterface)(nil), // 0: envoy.extensions.network.socket_interface.v3.DefaultSocketInterface +} +var file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_init() } +func file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_init() { + if File_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DefaultSocketInterface); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_goTypes, + DependencyIndexes: file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_depIdxs, + MessageInfos: file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_msgTypes, + }.Build() + File_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto = out.File + file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_rawDesc = nil + file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_goTypes = nil + file_envoy_extensions_network_socket_interface_v3_default_socket_interface_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/network/socket_interface/v3/default_socket_interface.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/network/socket_interface/v3/default_socket_interface.pb.validate.go new file mode 100644 index 0000000000000..eb07654f78beb --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/network/socket_interface/v3/default_socket_interface.pb.validate.go @@ -0,0 +1,137 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/network/socket_interface/v3/default_socket_interface.proto + +package socket_interfacev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on DefaultSocketInterface 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 *DefaultSocketInterface) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DefaultSocketInterface 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 +// DefaultSocketInterfaceMultiError, or nil if none found. +func (m *DefaultSocketInterface) ValidateAll() error { + return m.validate(true) +} + +func (m *DefaultSocketInterface) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return DefaultSocketInterfaceMultiError(errors) + } + return nil +} + +// DefaultSocketInterfaceMultiError is an error wrapping multiple validation +// errors returned by DefaultSocketInterface.ValidateAll() if the designated +// constraints aren't met. +type DefaultSocketInterfaceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DefaultSocketInterfaceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DefaultSocketInterfaceMultiError) AllErrors() []error { return m } + +// DefaultSocketInterfaceValidationError is the validation error returned by +// DefaultSocketInterface.Validate if the designated constraints aren't met. +type DefaultSocketInterfaceValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DefaultSocketInterfaceValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DefaultSocketInterfaceValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DefaultSocketInterfaceValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DefaultSocketInterfaceValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DefaultSocketInterfaceValidationError) ErrorName() string { + return "DefaultSocketInterfaceValidationError" +} + +// Error satisfies the builtin error interface +func (e DefaultSocketInterfaceValidationError) 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 %sDefaultSocketInterface.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DefaultSocketInterfaceValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DefaultSocketInterfaceValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/quic/crypto_stream/v3/crypto_stream.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/quic/crypto_stream/v3/crypto_stream.pb.go new file mode 100644 index 0000000000000..260311b3961c4 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/quic/crypto_stream/v3/crypto_stream.pb.go @@ -0,0 +1,156 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/quic/crypto_stream/v3/crypto_stream.proto + +package crypto_streamv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for the default QUIC server crypto stream provided by QUICHE. +type CryptoServerStreamConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CryptoServerStreamConfig) Reset() { + *x = CryptoServerStreamConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CryptoServerStreamConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CryptoServerStreamConfig) ProtoMessage() {} + +func (x *CryptoServerStreamConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CryptoServerStreamConfig.ProtoReflect.Descriptor instead. +func (*CryptoServerStreamConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto protoreflect.FileDescriptor + +var file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDesc = []byte{ + 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x26, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x71, + 0x75, 0x69, 0x63, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x1a, 0x0a, 0x18, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, + 0xb2, 0x01, 0x0a, 0x34, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x5f, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x33, 0x42, 0x11, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5d, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x2f, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDescOnce sync.Once + file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDescData = file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDesc +) + +func file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDescGZIP() []byte { + file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDescOnce.Do(func() { + file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDescData) + }) + return file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDescData +} + +var file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_goTypes = []interface{}{ + (*CryptoServerStreamConfig)(nil), // 0: envoy.extensions.quic.crypto_stream.v3.CryptoServerStreamConfig +} +var file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_init() } +func file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_init() { + if File_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CryptoServerStreamConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_goTypes, + DependencyIndexes: file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_depIdxs, + MessageInfos: file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_msgTypes, + }.Build() + File_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto = out.File + file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_rawDesc = nil + file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_goTypes = nil + file_envoy_extensions_quic_crypto_stream_v3_crypto_stream_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/quic/crypto_stream/v3/crypto_stream.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/quic/crypto_stream/v3/crypto_stream.pb.validate.go new file mode 100644 index 0000000000000..c836c832a152d --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/quic/crypto_stream/v3/crypto_stream.pb.validate.go @@ -0,0 +1,137 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/quic/crypto_stream/v3/crypto_stream.proto + +package crypto_streamv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on CryptoServerStreamConfig 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 *CryptoServerStreamConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CryptoServerStreamConfig 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 +// CryptoServerStreamConfigMultiError, or nil if none found. +func (m *CryptoServerStreamConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *CryptoServerStreamConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return CryptoServerStreamConfigMultiError(errors) + } + return nil +} + +// CryptoServerStreamConfigMultiError is an error wrapping multiple validation +// errors returned by CryptoServerStreamConfig.ValidateAll() if the designated +// constraints aren't met. +type CryptoServerStreamConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CryptoServerStreamConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CryptoServerStreamConfigMultiError) AllErrors() []error { return m } + +// CryptoServerStreamConfigValidationError is the validation error returned by +// CryptoServerStreamConfig.Validate if the designated constraints aren't met. +type CryptoServerStreamConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CryptoServerStreamConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CryptoServerStreamConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CryptoServerStreamConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CryptoServerStreamConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CryptoServerStreamConfigValidationError) ErrorName() string { + return "CryptoServerStreamConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e CryptoServerStreamConfigValidationError) 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 %sCryptoServerStreamConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CryptoServerStreamConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CryptoServerStreamConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/quic/proof_source/v3/proof_source.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/quic/proof_source/v3/proof_source.pb.go new file mode 100644 index 0000000000000..569a0eeec75c2 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/quic/proof_source/v3/proof_source.pb.go @@ -0,0 +1,155 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/quic/proof_source/v3/proof_source.proto + +package proof_sourcev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for the default QUIC proof source. +type ProofSourceConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ProofSourceConfig) Reset() { + *x = ProofSourceConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_quic_proof_source_v3_proof_source_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProofSourceConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProofSourceConfig) ProtoMessage() {} + +func (x *ProofSourceConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_quic_proof_source_v3_proof_source_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProofSourceConfig.ProtoReflect.Descriptor instead. +func (*ProofSourceConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_quic_proof_source_v3_proof_source_proto protoreflect.FileDescriptor + +var file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDesc = []byte{ + 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x25, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x71, 0x75, 0x69, + 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, + 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x13, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xae, 0x01, 0x0a, 0x33, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x2e, 0x70, 0x72, + 0x6f, 0x6f, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x50, + 0x72, 0x6f, 0x6f, 0x66, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x2f, + 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x3b, + 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDescOnce sync.Once + file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDescData = file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDesc +) + +func file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDescGZIP() []byte { + file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDescOnce.Do(func() { + file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDescData) + }) + return file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDescData +} + +var file_envoy_extensions_quic_proof_source_v3_proof_source_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_quic_proof_source_v3_proof_source_proto_goTypes = []interface{}{ + (*ProofSourceConfig)(nil), // 0: envoy.extensions.quic.proof_source.v3.ProofSourceConfig +} +var file_envoy_extensions_quic_proof_source_v3_proof_source_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_quic_proof_source_v3_proof_source_proto_init() } +func file_envoy_extensions_quic_proof_source_v3_proof_source_proto_init() { + if File_envoy_extensions_quic_proof_source_v3_proof_source_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_quic_proof_source_v3_proof_source_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProofSourceConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_quic_proof_source_v3_proof_source_proto_goTypes, + DependencyIndexes: file_envoy_extensions_quic_proof_source_v3_proof_source_proto_depIdxs, + MessageInfos: file_envoy_extensions_quic_proof_source_v3_proof_source_proto_msgTypes, + }.Build() + File_envoy_extensions_quic_proof_source_v3_proof_source_proto = out.File + file_envoy_extensions_quic_proof_source_v3_proof_source_proto_rawDesc = nil + file_envoy_extensions_quic_proof_source_v3_proof_source_proto_goTypes = nil + file_envoy_extensions_quic_proof_source_v3_proof_source_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/quic/proof_source/v3/proof_source.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/quic/proof_source/v3/proof_source.pb.validate.go new file mode 100644 index 0000000000000..647cd3caa6e59 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/quic/proof_source/v3/proof_source.pb.validate.go @@ -0,0 +1,137 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/quic/proof_source/v3/proof_source.proto + +package proof_sourcev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ProofSourceConfig 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 *ProofSourceConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ProofSourceConfig 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 +// ProofSourceConfigMultiError, or nil if none found. +func (m *ProofSourceConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *ProofSourceConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return ProofSourceConfigMultiError(errors) + } + return nil +} + +// ProofSourceConfigMultiError is an error wrapping multiple validation errors +// returned by ProofSourceConfig.ValidateAll() if the designated constraints +// aren't met. +type ProofSourceConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ProofSourceConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ProofSourceConfigMultiError) AllErrors() []error { return m } + +// ProofSourceConfigValidationError is the validation error returned by +// ProofSourceConfig.Validate if the designated constraints aren't met. +type ProofSourceConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ProofSourceConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ProofSourceConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ProofSourceConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ProofSourceConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ProofSourceConfigValidationError) ErrorName() string { + return "ProofSourceConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e ProofSourceConfigValidationError) 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 %sProofSourceConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ProofSourceConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ProofSourceConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/rate_limit_descriptors/expr/v3/expr.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/rate_limit_descriptors/expr/v3/expr.pb.go new file mode 100644 index 0000000000000..01250c3457ecf --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/rate_limit_descriptors/expr/v3/expr.pb.go @@ -0,0 +1,251 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/rate_limit_descriptors/expr/v3/expr.proto + +package exprv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// The following descriptor entry is appended with a value computed +// from a symbolic Common Expression Language expression. +// See :ref:`attributes ` for the set of +// available attributes. +// +// .. code-block:: cpp +// +// ("", "") +type Descriptor struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The key to use in the descriptor entry. + DescriptorKey string `protobuf:"bytes,1,opt,name=descriptor_key,json=descriptorKey,proto3" json:"descriptor_key,omitempty"` + // If set to true, Envoy skips the descriptor if the expression evaluates to an error. + // By default, the rate limit is not applied when an expression produces an error. + SkipIfError bool `protobuf:"varint,2,opt,name=skip_if_error,json=skipIfError,proto3" json:"skip_if_error,omitempty"` + // Types that are assignable to ExprSpecifier: + // + // *Descriptor_Text + // *Descriptor_Parsed + ExprSpecifier isDescriptor_ExprSpecifier `protobuf_oneof:"expr_specifier"` +} + +func (x *Descriptor) Reset() { + *x = Descriptor{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Descriptor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Descriptor) ProtoMessage() {} + +func (x *Descriptor) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Descriptor.ProtoReflect.Descriptor instead. +func (*Descriptor) Descriptor() ([]byte, []int) { + return file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_rawDescGZIP(), []int{0} +} + +func (x *Descriptor) GetDescriptorKey() string { + if x != nil { + return x.DescriptorKey + } + return "" +} + +func (x *Descriptor) GetSkipIfError() bool { + if x != nil { + return x.SkipIfError + } + return false +} + +func (m *Descriptor) GetExprSpecifier() isDescriptor_ExprSpecifier { + if m != nil { + return m.ExprSpecifier + } + return nil +} + +func (x *Descriptor) GetText() string { + if x, ok := x.GetExprSpecifier().(*Descriptor_Text); ok { + return x.Text + } + return "" +} + +func (x *Descriptor) GetParsed() *v1alpha1.Expr { + if x, ok := x.GetExprSpecifier().(*Descriptor_Parsed); ok { + return x.Parsed + } + return nil +} + +type isDescriptor_ExprSpecifier interface { + isDescriptor_ExprSpecifier() +} + +type Descriptor_Text struct { + // Expression in a text form, e.g. "connection.requested_server_name". + Text string `protobuf:"bytes,3,opt,name=text,proto3,oneof"` +} + +type Descriptor_Parsed struct { + // Parsed expression in AST form. + Parsed *v1alpha1.Expr `protobuf:"bytes,4,opt,name=parsed,proto3,oneof"` +} + +func (*Descriptor_Text) isDescriptor_ExprSpecifier() {} + +func (*Descriptor_Parsed) isDescriptor_ExprSpecifier() {} + +var File_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto protoreflect.FileDescriptor + +var file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_rawDesc = []byte{ + 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, + 0x33, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, + 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x25, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xcb, 0x01, 0x0a, + 0x0a, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x2e, 0x0a, 0x0e, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x22, 0x0a, 0x0d, 0x73, + 0x6b, 0x69, 0x70, 0x5f, 0x69, 0x66, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0b, 0x73, 0x6b, 0x69, 0x70, 0x49, 0x66, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, + 0x1d, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x38, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x42, 0x10, 0x0a, 0x0e, 0x65, 0x78, 0x70, 0x72, + 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0xb3, 0x01, 0x0a, 0x3d, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x61, + 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x45, 0x78, + 0x70, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5d, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, + 0x33, 0x3b, 0x65, 0x78, 0x70, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_rawDescOnce sync.Once + file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_rawDescData = file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_rawDesc +) + +func file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_rawDescGZIP() []byte { + file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_rawDescOnce.Do(func() { + file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_rawDescData) + }) + return file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_rawDescData +} + +var file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_goTypes = []interface{}{ + (*Descriptor)(nil), // 0: envoy.extensions.rate_limit_descriptors.expr.v3.Descriptor + (*v1alpha1.Expr)(nil), // 1: google.api.expr.v1alpha1.Expr +} +var file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.rate_limit_descriptors.expr.v3.Descriptor.parsed:type_name -> google.api.expr.v1alpha1.Expr + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_init() } +func file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_init() { + if File_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Descriptor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Descriptor_Text)(nil), + (*Descriptor_Parsed)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_goTypes, + DependencyIndexes: file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_depIdxs, + MessageInfos: file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_msgTypes, + }.Build() + File_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto = out.File + file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_rawDesc = nil + file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_goTypes = nil + file_envoy_extensions_rate_limit_descriptors_expr_v3_expr_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/rate_limit_descriptors/expr/v3/expr.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/rate_limit_descriptors/expr/v3/expr.pb.validate.go new file mode 100644 index 0000000000000..7b265d7180f28 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/rate_limit_descriptors/expr/v3/expr.pb.validate.go @@ -0,0 +1,195 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/rate_limit_descriptors/expr/v3/expr.proto + +package exprv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Descriptor 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 *Descriptor) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Descriptor 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 DescriptorMultiError, or +// nil if none found. +func (m *Descriptor) ValidateAll() error { + return m.validate(true) +} + +func (m *Descriptor) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetDescriptorKey()) < 1 { + err := DescriptorValidationError{ + field: "DescriptorKey", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for SkipIfError + + switch m.ExprSpecifier.(type) { + + case *Descriptor_Text: + + if utf8.RuneCountInString(m.GetText()) < 1 { + err := DescriptorValidationError{ + field: "Text", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *Descriptor_Parsed: + + if all { + switch v := interface{}(m.GetParsed()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DescriptorValidationError{ + field: "Parsed", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DescriptorValidationError{ + field: "Parsed", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetParsed()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DescriptorValidationError{ + field: "Parsed", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return DescriptorMultiError(errors) + } + return nil +} + +// DescriptorMultiError is an error wrapping multiple validation errors +// returned by Descriptor.ValidateAll() if the designated constraints aren't met. +type DescriptorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DescriptorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DescriptorMultiError) AllErrors() []error { return m } + +// DescriptorValidationError is the validation error returned by +// Descriptor.Validate if the designated constraints aren't met. +type DescriptorValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DescriptorValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DescriptorValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DescriptorValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DescriptorValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DescriptorValidationError) ErrorName() string { return "DescriptorValidationError" } + +// Error satisfies the builtin error interface +func (e DescriptorValidationError) 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 %sDescriptor.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DescriptorValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DescriptorValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/rbac/matchers/upstream_ip_port/v3/upstream_ip_port_matcher.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/rbac/matchers/upstream_ip_port/v3/upstream_ip_port_matcher.pb.go new file mode 100644 index 0000000000000..f9f0114ce6d51 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/rbac/matchers/upstream_ip_port/v3/upstream_ip_port_matcher.pb.go @@ -0,0 +1,209 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/rbac/matchers/upstream_ip_port/v3/upstream_ip_port_matcher.proto + +package upstream_ip_portv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + v31 "github.com/cilium/proxy/go/envoy/type/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// This is configuration for matching upstream ip and port. +// Note that although both fields are optional, at least one of IP or port must be supplied. If only +// one is supplied the other is a wildcard match. +// This matcher requires a filter in the chain to have saved the upstream address in the +// filter state before the matcher is executed by RBAC filter. The state should be saved with key +// “envoy.stream.upstream_address“ (See +// :repo:`upstream_address.h`). +// Also, See :repo:`proxy_filter.cc` +// for an example of a filter which populates the FilterState. +type UpstreamIpPortMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A CIDR block that will be used to match the upstream IP. + // Both Ipv4 and Ipv6 ranges can be matched. + UpstreamIp *v3.CidrRange `protobuf:"bytes,1,opt,name=upstream_ip,json=upstreamIp,proto3" json:"upstream_ip,omitempty"` + // A port range that will be used to match the upstream port. + UpstreamPortRange *v31.Int64Range `protobuf:"bytes,2,opt,name=upstream_port_range,json=upstreamPortRange,proto3" json:"upstream_port_range,omitempty"` +} + +func (x *UpstreamIpPortMatcher) Reset() { + *x = UpstreamIpPortMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpstreamIpPortMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpstreamIpPortMatcher) ProtoMessage() {} + +func (x *UpstreamIpPortMatcher) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpstreamIpPortMatcher.ProtoReflect.Descriptor instead. +func (*UpstreamIpPortMatcher) Descriptor() ([]byte, []int) { + return file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDescGZIP(), []int{0} +} + +func (x *UpstreamIpPortMatcher) GetUpstreamIp() *v3.CidrRange { + if x != nil { + return x.UpstreamIp + } + return nil +} + +func (x *UpstreamIpPortMatcher) GetUpstreamPortRange() *v31.Int64Range { + if x != nil { + return x.UpstreamPortRange + } + return nil +} + +var File_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto protoreflect.FileDescriptor + +var file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDesc = []byte{ + 0x0a, 0x51, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, + 0x2f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x70, 0x5f, 0x70, 0x6f, 0x72, + 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x70, + 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x73, 0x2e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x70, 0x5f, + 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa4, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x49, 0x70, 0x50, 0x6f, 0x72, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, + 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x70, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x64, 0x72, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0a, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, + 0x70, 0x12, 0x49, 0x0a, 0x13, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x70, 0x6f, + 0x72, 0x74, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, + 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x11, 0x75, 0x70, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0xd6, 0x01, 0x0a, + 0x40, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x72, 0x62, 0x61, 0x63, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x70, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x70, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x76, + 0x33, 0x42, 0x1a, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x70, 0x50, 0x6f, 0x72, + 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x6c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x2f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, + 0x69, 0x70, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x75, 0x70, 0x73, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x70, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDescOnce sync.Once + file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDescData = file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDesc +) + +func file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDescGZIP() []byte { + file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDescOnce.Do(func() { + file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDescData) + }) + return file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDescData +} + +var file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_goTypes = []interface{}{ + (*UpstreamIpPortMatcher)(nil), // 0: envoy.extensions.rbac.matchers.upstream_ip_port.v3.UpstreamIpPortMatcher + (*v3.CidrRange)(nil), // 1: envoy.config.core.v3.CidrRange + (*v31.Int64Range)(nil), // 2: envoy.type.v3.Int64Range +} +var file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.rbac.matchers.upstream_ip_port.v3.UpstreamIpPortMatcher.upstream_ip:type_name -> envoy.config.core.v3.CidrRange + 2, // 1: envoy.extensions.rbac.matchers.upstream_ip_port.v3.UpstreamIpPortMatcher.upstream_port_range:type_name -> envoy.type.v3.Int64Range + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_init() +} +func file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_init() { + if File_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpstreamIpPortMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_goTypes, + DependencyIndexes: file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_depIdxs, + MessageInfos: file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_msgTypes, + }.Build() + File_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto = out.File + file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_rawDesc = nil + file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_goTypes = nil + file_envoy_extensions_rbac_matchers_upstream_ip_port_v3_upstream_ip_port_matcher_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/rbac/matchers/upstream_ip_port/v3/upstream_ip_port_matcher.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/rbac/matchers/upstream_ip_port/v3/upstream_ip_port_matcher.pb.validate.go new file mode 100644 index 0000000000000..7ef8a87e24d4d --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/rbac/matchers/upstream_ip_port/v3/upstream_ip_port_matcher.pb.validate.go @@ -0,0 +1,195 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/rbac/matchers/upstream_ip_port/v3/upstream_ip_port_matcher.proto + +package upstream_ip_portv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on UpstreamIpPortMatcher 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 *UpstreamIpPortMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UpstreamIpPortMatcher 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 +// UpstreamIpPortMatcherMultiError, or nil if none found. +func (m *UpstreamIpPortMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *UpstreamIpPortMatcher) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetUpstreamIp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamIpPortMatcherValidationError{ + field: "UpstreamIp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamIpPortMatcherValidationError{ + field: "UpstreamIp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamIp()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UpstreamIpPortMatcherValidationError{ + field: "UpstreamIp", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetUpstreamPortRange()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamIpPortMatcherValidationError{ + field: "UpstreamPortRange", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamIpPortMatcherValidationError{ + field: "UpstreamPortRange", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamPortRange()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UpstreamIpPortMatcherValidationError{ + field: "UpstreamPortRange", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return UpstreamIpPortMatcherMultiError(errors) + } + return nil +} + +// UpstreamIpPortMatcherMultiError is an error wrapping multiple validation +// errors returned by UpstreamIpPortMatcher.ValidateAll() if the designated +// constraints aren't met. +type UpstreamIpPortMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UpstreamIpPortMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UpstreamIpPortMatcherMultiError) AllErrors() []error { return m } + +// UpstreamIpPortMatcherValidationError is the validation error returned by +// UpstreamIpPortMatcher.Validate if the designated constraints aren't met. +type UpstreamIpPortMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e UpstreamIpPortMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e UpstreamIpPortMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e UpstreamIpPortMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e UpstreamIpPortMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e UpstreamIpPortMatcherValidationError) ErrorName() string { + return "UpstreamIpPortMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e UpstreamIpPortMatcherValidationError) 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 %sUpstreamIpPortMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = UpstreamIpPortMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = UpstreamIpPortMatcherValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/regex_engines/v3/google_re2.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/regex_engines/v3/google_re2.pb.go new file mode 100644 index 0000000000000..ef60153651892 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/regex_engines/v3/google_re2.pb.go @@ -0,0 +1,160 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/regex_engines/v3/google_re2.proto + +package regex_enginesv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Google's `RE2 `_ regex engine. The regex string must adhere to +// the documented `syntax `_. The engine is designed +// to complete execution in linear time as well as limit the amount of memory used. +// +// Envoy emits two stats for tracking the program size of regexes: the histogram “re2.program_size“, +// which records the program size, and the counter “re2.exceeded_warn_level“, which is incremented +// each time the program size exceeds the warn level threshold. +type GoogleRE2 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GoogleRE2) Reset() { + *x = GoogleRE2{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_regex_engines_v3_google_re2_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GoogleRE2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GoogleRE2) ProtoMessage() {} + +func (x *GoogleRE2) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_regex_engines_v3_google_re2_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GoogleRE2.ProtoReflect.Descriptor instead. +func (*GoogleRE2) Descriptor() ([]byte, []int) { + return file_envoy_extensions_regex_engines_v3_google_re2_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_regex_engines_v3_google_re2_proto protoreflect.FileDescriptor + +var file_envoy_extensions_regex_engines_v3_google_re2_proto_rawDesc = []byte{ + 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x73, + 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x32, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x65, 0x6e, 0x67, + 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0b, 0x0a, 0x09, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x52, 0x45, 0x32, 0x42, 0xa5, 0x01, 0x0a, 0x2f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x65, 0x6e, 0x67, + 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, + 0x65, 0x32, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x73, + 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x65, 0x67, 0x65, 0x78, 0x5f, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, + 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_regex_engines_v3_google_re2_proto_rawDescOnce sync.Once + file_envoy_extensions_regex_engines_v3_google_re2_proto_rawDescData = file_envoy_extensions_regex_engines_v3_google_re2_proto_rawDesc +) + +func file_envoy_extensions_regex_engines_v3_google_re2_proto_rawDescGZIP() []byte { + file_envoy_extensions_regex_engines_v3_google_re2_proto_rawDescOnce.Do(func() { + file_envoy_extensions_regex_engines_v3_google_re2_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_regex_engines_v3_google_re2_proto_rawDescData) + }) + return file_envoy_extensions_regex_engines_v3_google_re2_proto_rawDescData +} + +var file_envoy_extensions_regex_engines_v3_google_re2_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_regex_engines_v3_google_re2_proto_goTypes = []interface{}{ + (*GoogleRE2)(nil), // 0: envoy.extensions.regex_engines.v3.GoogleRE2 +} +var file_envoy_extensions_regex_engines_v3_google_re2_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_regex_engines_v3_google_re2_proto_init() } +func file_envoy_extensions_regex_engines_v3_google_re2_proto_init() { + if File_envoy_extensions_regex_engines_v3_google_re2_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_regex_engines_v3_google_re2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GoogleRE2); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_regex_engines_v3_google_re2_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_regex_engines_v3_google_re2_proto_goTypes, + DependencyIndexes: file_envoy_extensions_regex_engines_v3_google_re2_proto_depIdxs, + MessageInfos: file_envoy_extensions_regex_engines_v3_google_re2_proto_msgTypes, + }.Build() + File_envoy_extensions_regex_engines_v3_google_re2_proto = out.File + file_envoy_extensions_regex_engines_v3_google_re2_proto_rawDesc = nil + file_envoy_extensions_regex_engines_v3_google_re2_proto_goTypes = nil + file_envoy_extensions_regex_engines_v3_google_re2_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/regex_engines/v3/google_re2.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/regex_engines/v3/google_re2.pb.validate.go new file mode 100644 index 0000000000000..50949a7f132e5 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/regex_engines/v3/google_re2.pb.validate.go @@ -0,0 +1,134 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/regex_engines/v3/google_re2.proto + +package regex_enginesv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on GoogleRE2 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 *GoogleRE2) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GoogleRE2 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 GoogleRE2MultiError, or nil +// if none found. +func (m *GoogleRE2) ValidateAll() error { + return m.validate(true) +} + +func (m *GoogleRE2) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return GoogleRE2MultiError(errors) + } + return nil +} + +// GoogleRE2MultiError is an error wrapping multiple validation errors returned +// by GoogleRE2.ValidateAll() if the designated constraints aren't met. +type GoogleRE2MultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GoogleRE2MultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GoogleRE2MultiError) AllErrors() []error { return m } + +// GoogleRE2ValidationError is the validation error returned by +// GoogleRE2.Validate if the designated constraints aren't met. +type GoogleRE2ValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GoogleRE2ValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GoogleRE2ValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GoogleRE2ValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GoogleRE2ValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GoogleRE2ValidationError) ErrorName() string { return "GoogleRE2ValidationError" } + +// Error satisfies the builtin error interface +func (e GoogleRE2ValidationError) 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 %sGoogleRE2.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GoogleRE2ValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GoogleRE2ValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/request_id/uuid/v3/uuid.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/request_id/uuid/v3/uuid.pb.go new file mode 100644 index 0000000000000..1a5576839a3c9 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/request_id/uuid/v3/uuid.pb.go @@ -0,0 +1,213 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/request_id/uuid/v3/uuid.proto + +package uuidv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for the default UUID request ID extension which has the following behavior: +// +// 1. Request ID is propagated using the :ref:`x-request-id +// ` header. +// +// 2. Request ID is a universally unique identifier `(UUID4) +// `_. +// +// 3. Tracing decision (sampled, forced, etc) is set in 14th nibble of the UUID. By default this will +// overwrite existing UUIDs received in the “x-request-id“ header if the trace sampling decision +// is changed. The 14th nibble of the UUID4 has been chosen because it is fixed to '4' by the +// standard. Thus, '4' indicates a default UUID and no trace status. This nibble is swapped to: +// +// a. '9': Sampled. +// b. 'a': Force traced due to server-side override. +// c. 'b': Force traced due to client-side request ID joining. +// +// See the :ref:`x-request-id ` documentation for +// more information. +type UuidRequestIdConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Whether the implementation alters the UUID to contain the trace sampling decision as per the + // “UuidRequestIdConfig“ message documentation. This defaults to true. If disabled no + // modification to the UUID will be performed. It is important to note that if disabled, + // stable sampling of traces, access logs, etc. will no longer work and only random sampling will + // be possible. + PackTraceReason *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=pack_trace_reason,json=packTraceReason,proto3" json:"pack_trace_reason,omitempty"` + // Set whether to use :ref:`x-request-id` for sampling or not. + // This defaults to true. See the :ref:`context propagation ` + // overview for more information. + UseRequestIdForTraceSampling *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=use_request_id_for_trace_sampling,json=useRequestIdForTraceSampling,proto3" json:"use_request_id_for_trace_sampling,omitempty"` +} + +func (x *UuidRequestIdConfig) Reset() { + *x = UuidRequestIdConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_request_id_uuid_v3_uuid_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UuidRequestIdConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UuidRequestIdConfig) ProtoMessage() {} + +func (x *UuidRequestIdConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_request_id_uuid_v3_uuid_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UuidRequestIdConfig.ProtoReflect.Descriptor instead. +func (*UuidRequestIdConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDescGZIP(), []int{0} +} + +func (x *UuidRequestIdConfig) GetPackTraceReason() *wrapperspb.BoolValue { + if x != nil { + return x.PackTraceReason + } + return nil +} + +func (x *UuidRequestIdConfig) GetUseRequestIdForTraceSampling() *wrapperspb.BoolValue { + if x != nil { + return x.UseRequestIdForTraceSampling + } + return nil +} + +var File_envoy_extensions_request_id_uuid_v3_uuid_proto protoreflect.FileDescriptor + +var file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x2f, 0x75, 0x75, + 0x69, 0x64, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x75, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x2e, 0x75, 0x75, + 0x69, 0x64, 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc2, 0x01, 0x0a, 0x13, 0x55, 0x75, 0x69, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x46, 0x0a, 0x11, + 0x70, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x0f, 0x70, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x63, 0x0a, 0x21, 0x75, 0x73, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, + 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 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, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1c, 0x75, 0x73, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x46, 0x6f, 0x72, 0x54, 0x72, 0x61, 0x63, + 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x42, 0x9b, 0x01, 0x0a, 0x31, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x2e, 0x75, 0x75, 0x69, 0x64, 0x2e, 0x76, 0x33, 0x42, + 0x09, 0x55, 0x75, 0x69, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x51, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, + 0x2f, 0x75, 0x75, 0x69, 0x64, 0x2f, 0x76, 0x33, 0x3b, 0x75, 0x75, 0x69, 0x64, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDescOnce sync.Once + file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDescData = file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDesc +) + +func file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDescGZIP() []byte { + file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDescOnce.Do(func() { + file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDescData) + }) + return file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDescData +} + +var file_envoy_extensions_request_id_uuid_v3_uuid_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_request_id_uuid_v3_uuid_proto_goTypes = []interface{}{ + (*UuidRequestIdConfig)(nil), // 0: envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig + (*wrapperspb.BoolValue)(nil), // 1: google.protobuf.BoolValue +} +var file_envoy_extensions_request_id_uuid_v3_uuid_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig.pack_trace_reason:type_name -> google.protobuf.BoolValue + 1, // 1: envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig.use_request_id_for_trace_sampling:type_name -> google.protobuf.BoolValue + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_request_id_uuid_v3_uuid_proto_init() } +func file_envoy_extensions_request_id_uuid_v3_uuid_proto_init() { + if File_envoy_extensions_request_id_uuid_v3_uuid_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_request_id_uuid_v3_uuid_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UuidRequestIdConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_request_id_uuid_v3_uuid_proto_goTypes, + DependencyIndexes: file_envoy_extensions_request_id_uuid_v3_uuid_proto_depIdxs, + MessageInfos: file_envoy_extensions_request_id_uuid_v3_uuid_proto_msgTypes, + }.Build() + File_envoy_extensions_request_id_uuid_v3_uuid_proto = out.File + file_envoy_extensions_request_id_uuid_v3_uuid_proto_rawDesc = nil + file_envoy_extensions_request_id_uuid_v3_uuid_proto_goTypes = nil + file_envoy_extensions_request_id_uuid_v3_uuid_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/request_id/uuid/v3/uuid.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/request_id/uuid/v3/uuid.pb.validate.go new file mode 100644 index 0000000000000..b1091cf2c793e --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/request_id/uuid/v3/uuid.pb.validate.go @@ -0,0 +1,195 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/request_id/uuid/v3/uuid.proto + +package uuidv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on UuidRequestIdConfig 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 *UuidRequestIdConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UuidRequestIdConfig 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 +// UuidRequestIdConfigMultiError, or nil if none found. +func (m *UuidRequestIdConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *UuidRequestIdConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetPackTraceReason()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UuidRequestIdConfigValidationError{ + field: "PackTraceReason", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UuidRequestIdConfigValidationError{ + field: "PackTraceReason", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPackTraceReason()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UuidRequestIdConfigValidationError{ + field: "PackTraceReason", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetUseRequestIdForTraceSampling()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UuidRequestIdConfigValidationError{ + field: "UseRequestIdForTraceSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UuidRequestIdConfigValidationError{ + field: "UseRequestIdForTraceSampling", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUseRequestIdForTraceSampling()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UuidRequestIdConfigValidationError{ + field: "UseRequestIdForTraceSampling", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return UuidRequestIdConfigMultiError(errors) + } + return nil +} + +// UuidRequestIdConfigMultiError is an error wrapping multiple validation +// errors returned by UuidRequestIdConfig.ValidateAll() if the designated +// constraints aren't met. +type UuidRequestIdConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UuidRequestIdConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UuidRequestIdConfigMultiError) AllErrors() []error { return m } + +// UuidRequestIdConfigValidationError is the validation error returned by +// UuidRequestIdConfig.Validate if the designated constraints aren't met. +type UuidRequestIdConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e UuidRequestIdConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e UuidRequestIdConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e UuidRequestIdConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e UuidRequestIdConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e UuidRequestIdConfigValidationError) ErrorName() string { + return "UuidRequestIdConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e UuidRequestIdConfigValidationError) 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 %sUuidRequestIdConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = UuidRequestIdConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = UuidRequestIdConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/resource_monitors/fixed_heap/v3/fixed_heap.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/resource_monitors/fixed_heap/v3/fixed_heap.pb.go new file mode 100644 index 0000000000000..658ba616cbcb4 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/resource_monitors/fixed_heap/v3/fixed_heap.pb.go @@ -0,0 +1,181 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/resource_monitors/fixed_heap/v3/fixed_heap.proto + +package fixed_heapv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// The fixed heap resource monitor reports the Envoy process memory pressure, computed as a +// fraction of currently reserved heap memory divided by a statically configured maximum +// specified in the FixedHeapConfig. +type FixedHeapConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MaxHeapSizeBytes uint64 `protobuf:"varint,1,opt,name=max_heap_size_bytes,json=maxHeapSizeBytes,proto3" json:"max_heap_size_bytes,omitempty"` +} + +func (x *FixedHeapConfig) Reset() { + *x = FixedHeapConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FixedHeapConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FixedHeapConfig) ProtoMessage() {} + +func (x *FixedHeapConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FixedHeapConfig.ProtoReflect.Descriptor instead. +func (*FixedHeapConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDescGZIP(), []int{0} +} + +func (x *FixedHeapConfig) GetMaxHeapSizeBytes() uint64 { + if x != nil { + return x.MaxHeapSizeBytes + } + return 0 +} + +var File_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto protoreflect.FileDescriptor + +var file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDesc = []byte{ + 0x0a, 0x41, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, + 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x70, 0x2f, + 0x76, 0x33, 0x2f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x70, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, + 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x68, 0x65, + 0x61, 0x70, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, + 0x67, 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, 0x92, 0x01, 0x0a, 0x0f, 0x46, 0x69, 0x78, 0x65, 0x64, 0x48, 0x65, 0x61, 0x70, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x36, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x68, 0x65, 0x61, 0x70, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, 0x02, 0x20, 0x00, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x48, + 0x65, 0x61, 0x70, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x3a, 0x47, 0x9a, 0xc5, + 0x88, 0x1e, 0x42, 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, + 0x6f, 0x72, 0x2e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x70, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x48, 0x65, 0x61, 0x70, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xc0, 0x01, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x66, 0x69, 0x78, 0x65, 0x64, + 0x5f, 0x68, 0x65, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x48, + 0x65, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x64, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, + 0x69, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x70, + 0x2f, 0x76, 0x33, 0x3b, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, 0x70, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDescOnce sync.Once + file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDescData = file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDesc +) + +func file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDescGZIP() []byte { + file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDescOnce.Do(func() { + file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDescData) + }) + return file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDescData +} + +var file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_goTypes = []interface{}{ + (*FixedHeapConfig)(nil), // 0: envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig +} +var file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_init() } +func file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_init() { + if File_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FixedHeapConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_goTypes, + DependencyIndexes: file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_depIdxs, + MessageInfos: file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_msgTypes, + }.Build() + File_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto = out.File + file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_rawDesc = nil + file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_goTypes = nil + file_envoy_extensions_resource_monitors_fixed_heap_v3_fixed_heap_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/resource_monitors/fixed_heap/v3/fixed_heap.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/resource_monitors/fixed_heap/v3/fixed_heap.pb.validate.go new file mode 100644 index 0000000000000..0df28c7697dbf --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/resource_monitors/fixed_heap/v3/fixed_heap.pb.validate.go @@ -0,0 +1,146 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/resource_monitors/fixed_heap/v3/fixed_heap.proto + +package fixed_heapv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on FixedHeapConfig 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 *FixedHeapConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FixedHeapConfig 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 +// FixedHeapConfigMultiError, or nil if none found. +func (m *FixedHeapConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *FixedHeapConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetMaxHeapSizeBytes() <= 0 { + err := FixedHeapConfigValidationError{ + field: "MaxHeapSizeBytes", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return FixedHeapConfigMultiError(errors) + } + return nil +} + +// FixedHeapConfigMultiError is an error wrapping multiple validation errors +// returned by FixedHeapConfig.ValidateAll() if the designated constraints +// aren't met. +type FixedHeapConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FixedHeapConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FixedHeapConfigMultiError) AllErrors() []error { return m } + +// FixedHeapConfigValidationError is the validation error returned by +// FixedHeapConfig.Validate if the designated constraints aren't met. +type FixedHeapConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FixedHeapConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FixedHeapConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FixedHeapConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FixedHeapConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FixedHeapConfigValidationError) ErrorName() string { return "FixedHeapConfigValidationError" } + +// Error satisfies the builtin error interface +func (e FixedHeapConfigValidationError) 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 %sFixedHeapConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FixedHeapConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FixedHeapConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/resource_monitors/injected_resource/v3/injected_resource.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/resource_monitors/injected_resource/v3/injected_resource.pb.go new file mode 100644 index 0000000000000..d37068e86e00b --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/resource_monitors/injected_resource/v3/injected_resource.pb.go @@ -0,0 +1,188 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/resource_monitors/injected_resource/v3/injected_resource.proto + +package injected_resourcev3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// The injected resource monitor allows injecting a synthetic resource pressure into Envoy +// via a text file, which must contain a floating-point number in the range [0..1] representing +// the resource pressure and be updated atomically by a symbolic link swap. +// This is intended primarily for integration tests to force Envoy into an overloaded state. +type InjectedResourceConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` +} + +func (x *InjectedResourceConfig) Reset() { + *x = InjectedResourceConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InjectedResourceConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InjectedResourceConfig) ProtoMessage() {} + +func (x *InjectedResourceConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InjectedResourceConfig.ProtoReflect.Descriptor instead. +func (*InjectedResourceConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDescGZIP(), []int{0} +} + +func (x *InjectedResourceConfig) GetFilename() string { + if x != nil { + return x.Filename + } + return "" +} + +var File_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto protoreflect.FileDescriptor + +var file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDesc = []byte{ + 0x0a, 0x4f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, + 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, + 0x69, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0x94, 0x01, 0x0a, 0x16, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x23, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x66, 0x69, 0x6c, + 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x55, 0x9a, 0xc5, 0x88, 0x1e, 0x50, 0x0a, 0x4e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x2e, 0x69, 0x6e, 0x6a, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xdc, 0x01, 0x0a, + 0x45, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, + 0x73, 0x2e, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x15, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x72, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x69, 0x6e, 0x6a, 0x65, 0x63, + 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x3b, + 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDescOnce sync.Once + file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDescData = file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDesc +) + +func file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDescGZIP() []byte { + file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDescOnce.Do(func() { + file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDescData) + }) + return file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDescData +} + +var file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_goTypes = []interface{}{ + (*InjectedResourceConfig)(nil), // 0: envoy.extensions.resource_monitors.injected_resource.v3.InjectedResourceConfig +} +var file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_init() +} +func file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_init() { + if File_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InjectedResourceConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_goTypes, + DependencyIndexes: file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_depIdxs, + MessageInfos: file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_msgTypes, + }.Build() + File_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto = out.File + file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_rawDesc = nil + file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_goTypes = nil + file_envoy_extensions_resource_monitors_injected_resource_v3_injected_resource_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/resource_monitors/injected_resource/v3/injected_resource.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/resource_monitors/injected_resource/v3/injected_resource.pb.validate.go new file mode 100644 index 0000000000000..9606a1909a940 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/resource_monitors/injected_resource/v3/injected_resource.pb.validate.go @@ -0,0 +1,148 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/resource_monitors/injected_resource/v3/injected_resource.proto + +package injected_resourcev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on InjectedResourceConfig 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 *InjectedResourceConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on InjectedResourceConfig 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 +// InjectedResourceConfigMultiError, or nil if none found. +func (m *InjectedResourceConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *InjectedResourceConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetFilename()) < 1 { + err := InjectedResourceConfigValidationError{ + field: "Filename", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return InjectedResourceConfigMultiError(errors) + } + return nil +} + +// InjectedResourceConfigMultiError is an error wrapping multiple validation +// errors returned by InjectedResourceConfig.ValidateAll() if the designated +// constraints aren't met. +type InjectedResourceConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m InjectedResourceConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m InjectedResourceConfigMultiError) AllErrors() []error { return m } + +// InjectedResourceConfigValidationError is the validation error returned by +// InjectedResourceConfig.Validate if the designated constraints aren't met. +type InjectedResourceConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e InjectedResourceConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e InjectedResourceConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e InjectedResourceConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e InjectedResourceConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e InjectedResourceConfigValidationError) ErrorName() string { + return "InjectedResourceConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e InjectedResourceConfigValidationError) 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 %sInjectedResourceConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = InjectedResourceConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = InjectedResourceConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.pb.go new file mode 100644 index 0000000000000..0a987ab9114ed --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.pb.go @@ -0,0 +1,165 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.proto + +package omit_canary_hostsv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type OmitCanaryHostsPredicate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *OmitCanaryHostsPredicate) Reset() { + *x = OmitCanaryHostsPredicate{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OmitCanaryHostsPredicate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OmitCanaryHostsPredicate) ProtoMessage() {} + +func (x *OmitCanaryHostsPredicate) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OmitCanaryHostsPredicate.ProtoReflect.Descriptor instead. +func (*OmitCanaryHostsPredicate) Descriptor() ([]byte, []int) { + return file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto protoreflect.FileDescriptor + +var file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDesc = []byte{ + 0x0a, 0x48, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x6f, 0x6d, + 0x69, 0x74, 0x5f, 0x63, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2f, + 0x76, 0x33, 0x2f, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x63, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x68, + 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x30, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x74, + 0x72, 0x79, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x63, 0x61, 0x6e, + 0x61, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x63, + 0x0a, 0x18, 0x4f, 0x6d, 0x69, 0x74, 0x43, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, + 0x73, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x3a, 0x47, 0x9a, 0xc5, 0x88, 0x1e, + 0x42, 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x63, 0x61, 0x6e, 0x61, 0x72, + 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x6d, 0x69, 0x74, 0x43, + 0x61, 0x6e, 0x61, 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x42, 0xcd, 0x01, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x68, 0x6f, 0x73, + 0x74, 0x2e, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x63, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x68, 0x6f, + 0x73, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x14, 0x4f, 0x6d, 0x69, 0x74, 0x43, 0x61, 0x6e, 0x61, + 0x72, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6b, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2f, 0x68, 0x6f, + 0x73, 0x74, 0x2f, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x63, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x68, + 0x6f, 0x73, 0x74, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x63, 0x61, 0x6e, + 0x61, 0x72, 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDescOnce sync.Once + file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDescData = file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDesc +) + +func file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDescGZIP() []byte { + file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDescOnce.Do(func() { + file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDescData) + }) + return file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDescData +} + +var file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_goTypes = []interface{}{ + (*OmitCanaryHostsPredicate)(nil), // 0: envoy.extensions.retry.host.omit_canary_hosts.v3.OmitCanaryHostsPredicate +} +var file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_init() } +func file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_init() { + if File_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OmitCanaryHostsPredicate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_goTypes, + DependencyIndexes: file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_depIdxs, + MessageInfos: file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_msgTypes, + }.Build() + File_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto = out.File + file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_rawDesc = nil + file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_goTypes = nil + file_envoy_extensions_retry_host_omit_canary_hosts_v3_omit_canary_hosts_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.pb.validate.go new file mode 100644 index 0000000000000..ea490b4193644 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.pb.validate.go @@ -0,0 +1,137 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/retry/host/omit_canary_hosts/v3/omit_canary_hosts.proto + +package omit_canary_hostsv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on OmitCanaryHostsPredicate 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 *OmitCanaryHostsPredicate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OmitCanaryHostsPredicate 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 +// OmitCanaryHostsPredicateMultiError, or nil if none found. +func (m *OmitCanaryHostsPredicate) ValidateAll() error { + return m.validate(true) +} + +func (m *OmitCanaryHostsPredicate) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return OmitCanaryHostsPredicateMultiError(errors) + } + return nil +} + +// OmitCanaryHostsPredicateMultiError is an error wrapping multiple validation +// errors returned by OmitCanaryHostsPredicate.ValidateAll() if the designated +// constraints aren't met. +type OmitCanaryHostsPredicateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OmitCanaryHostsPredicateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OmitCanaryHostsPredicateMultiError) AllErrors() []error { return m } + +// OmitCanaryHostsPredicateValidationError is the validation error returned by +// OmitCanaryHostsPredicate.Validate if the designated constraints aren't met. +type OmitCanaryHostsPredicateValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OmitCanaryHostsPredicateValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OmitCanaryHostsPredicateValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OmitCanaryHostsPredicateValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OmitCanaryHostsPredicateValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OmitCanaryHostsPredicateValidationError) ErrorName() string { + return "OmitCanaryHostsPredicateValidationError" +} + +// Error satisfies the builtin error interface +func (e OmitCanaryHostsPredicateValidationError) 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 %sOmitCanaryHostsPredicate.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OmitCanaryHostsPredicateValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OmitCanaryHostsPredicateValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.pb.go new file mode 100644 index 0000000000000..401c0661a397f --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.pb.go @@ -0,0 +1,194 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.proto + +package omit_host_metadatav3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// A retry host predicate that can be used to reject a host based on +// predefined metadata match criteria. +// [#extension: envoy.retry_host_predicates.omit_host_metadata] +type OmitHostMetadataConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Retry host predicate metadata match criteria. The hosts in + // the upstream cluster with matching metadata will be omitted while + // attempting a retry of a failed request. The metadata should be specified + // under the “envoy.lb“ key. + MetadataMatch *v3.Metadata `protobuf:"bytes,1,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"` +} + +func (x *OmitHostMetadataConfig) Reset() { + *x = OmitHostMetadataConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OmitHostMetadataConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OmitHostMetadataConfig) ProtoMessage() {} + +func (x *OmitHostMetadataConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OmitHostMetadataConfig.ProtoReflect.Descriptor instead. +func (*OmitHostMetadataConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_rawDescGZIP(), []int{0} +} + +func (x *OmitHostMetadataConfig) GetMetadataMatch() *v3.Metadata { + if x != nil { + return x.MetadataMatch + } + return nil +} + +var File_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto protoreflect.FileDescriptor + +var file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_rawDesc = []byte{ + 0x0a, 0x51, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x6f, 0x6d, + 0x69, 0x74, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2f, 0x76, 0x33, 0x2f, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x68, 0x6f, 0x73, 0x74, + 0x2e, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa7, 0x01, 0x0a, 0x16, 0x4f, 0x6d, + 0x69, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x46, 0x9a, 0xc5, 0x88, + 0x1e, 0x41, 0x0a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x6f, 0x73, 0x74, + 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x6d, 0x69, + 0x74, 0x48, 0x6f, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x42, 0xd7, 0x01, 0x0a, 0x3f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x68, 0x6f, 0x73, + 0x74, 0x2e, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x42, 0x1b, 0x4f, 0x6d, 0x69, 0x74, 0x48, 0x6f, 0x73, + 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x72, 0x65, 0x74, 0x72, 0x79, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x6f, 0x6d, 0x69, 0x74, 0x5f, + 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, + 0x3b, 0x6f, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_rawDescOnce sync.Once + file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_rawDescData = file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_rawDesc +) + +func file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_rawDescGZIP() []byte { + file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_rawDescOnce.Do(func() { + file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_rawDescData) + }) + return file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_rawDescData +} + +var file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_goTypes = []interface{}{ + (*OmitHostMetadataConfig)(nil), // 0: envoy.extensions.retry.host.omit_host_metadata.v3.OmitHostMetadataConfig + (*v3.Metadata)(nil), // 1: envoy.config.core.v3.Metadata +} +var file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.retry.host.omit_host_metadata.v3.OmitHostMetadataConfig.metadata_match:type_name -> envoy.config.core.v3.Metadata + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_init() +} +func file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_init() { + if File_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OmitHostMetadataConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_goTypes, + DependencyIndexes: file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_depIdxs, + MessageInfos: file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_msgTypes, + }.Build() + File_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto = out.File + file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_rawDesc = nil + file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_goTypes = nil + file_envoy_extensions_retry_host_omit_host_metadata_v3_omit_host_metadata_config_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.pb.validate.go new file mode 100644 index 0000000000000..27c74c813a063 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.pb.validate.go @@ -0,0 +1,166 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.proto + +package omit_host_metadatav3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on OmitHostMetadataConfig 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 *OmitHostMetadataConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OmitHostMetadataConfig 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 +// OmitHostMetadataConfigMultiError, or nil if none found. +func (m *OmitHostMetadataConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *OmitHostMetadataConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetMetadataMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OmitHostMetadataConfigValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OmitHostMetadataConfigValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OmitHostMetadataConfigValidationError{ + field: "MetadataMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return OmitHostMetadataConfigMultiError(errors) + } + return nil +} + +// OmitHostMetadataConfigMultiError is an error wrapping multiple validation +// errors returned by OmitHostMetadataConfig.ValidateAll() if the designated +// constraints aren't met. +type OmitHostMetadataConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OmitHostMetadataConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OmitHostMetadataConfigMultiError) AllErrors() []error { return m } + +// OmitHostMetadataConfigValidationError is the validation error returned by +// OmitHostMetadataConfig.Validate if the designated constraints aren't met. +type OmitHostMetadataConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OmitHostMetadataConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OmitHostMetadataConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OmitHostMetadataConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OmitHostMetadataConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OmitHostMetadataConfigValidationError) ErrorName() string { + return "OmitHostMetadataConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e OmitHostMetadataConfigValidationError) 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 %sOmitHostMetadataConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OmitHostMetadataConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OmitHostMetadataConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.pb.go new file mode 100644 index 0000000000000..9a4c690424be7 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.pb.go @@ -0,0 +1,163 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.proto + +package previous_hostsv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type PreviousHostsPredicate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PreviousHostsPredicate) Reset() { + *x = PreviousHostsPredicate{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PreviousHostsPredicate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreviousHostsPredicate) ProtoMessage() {} + +func (x *PreviousHostsPredicate) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreviousHostsPredicate.ProtoReflect.Descriptor instead. +func (*PreviousHostsPredicate) Descriptor() ([]byte, []int) { + return file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto protoreflect.FileDescriptor + +var file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDesc = []byte{ + 0x0a, 0x42, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x72, + 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2f, 0x76, 0x33, 0x2f, + 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x68, 0x6f, 0x73, + 0x74, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, + 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5c, 0x0a, 0x16, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, + 0x73, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x3a, + 0x42, 0x9a, 0xc5, 0x88, 0x1e, 0x3d, 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, + 0x6f, 0x75, 0x73, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x65, + 0x76, 0x69, 0x6f, 0x75, 0x73, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x42, 0xc2, 0x01, 0x0a, 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x68, 0x6f, 0x73, + 0x74, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, + 0x2e, 0x76, 0x33, 0x42, 0x12, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x48, 0x6f, 0x73, + 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x65, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x70, 0x72, + 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2f, 0x76, 0x33, 0x3b, + 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x76, 0x33, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDescOnce sync.Once + file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDescData = file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDesc +) + +func file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDescGZIP() []byte { + file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDescOnce.Do(func() { + file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDescData) + }) + return file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDescData +} + +var file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_goTypes = []interface{}{ + (*PreviousHostsPredicate)(nil), // 0: envoy.extensions.retry.host.previous_hosts.v3.PreviousHostsPredicate +} +var file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_init() } +func file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_init() { + if File_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PreviousHostsPredicate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_goTypes, + DependencyIndexes: file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_depIdxs, + MessageInfos: file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_msgTypes, + }.Build() + File_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto = out.File + file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_rawDesc = nil + file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_goTypes = nil + file_envoy_extensions_retry_host_previous_hosts_v3_previous_hosts_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.pb.validate.go new file mode 100644 index 0000000000000..9c2959d8085ed --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.pb.validate.go @@ -0,0 +1,137 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.proto + +package previous_hostsv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on PreviousHostsPredicate 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 *PreviousHostsPredicate) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PreviousHostsPredicate 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 +// PreviousHostsPredicateMultiError, or nil if none found. +func (m *PreviousHostsPredicate) ValidateAll() error { + return m.validate(true) +} + +func (m *PreviousHostsPredicate) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return PreviousHostsPredicateMultiError(errors) + } + return nil +} + +// PreviousHostsPredicateMultiError is an error wrapping multiple validation +// errors returned by PreviousHostsPredicate.ValidateAll() if the designated +// constraints aren't met. +type PreviousHostsPredicateMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PreviousHostsPredicateMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PreviousHostsPredicateMultiError) AllErrors() []error { return m } + +// PreviousHostsPredicateValidationError is the validation error returned by +// PreviousHostsPredicate.Validate if the designated constraints aren't met. +type PreviousHostsPredicateValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PreviousHostsPredicateValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PreviousHostsPredicateValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PreviousHostsPredicateValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PreviousHostsPredicateValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PreviousHostsPredicateValidationError) ErrorName() string { + return "PreviousHostsPredicateValidationError" +} + +// Error satisfies the builtin error interface +func (e PreviousHostsPredicateValidationError) 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 %sPreviousHostsPredicate.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PreviousHostsPredicateValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PreviousHostsPredicateValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.pb.go new file mode 100644 index 0000000000000..34ca3f192a967 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.pb.go @@ -0,0 +1,221 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.proto + +package previous_prioritiesv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// A retry host selector that attempts to spread retries between priorities, even if certain +// priorities would not normally be attempted due to higher priorities being available. +// +// As priorities get excluded, load will be distributed amongst the remaining healthy priorities +// based on the relative health of the priorities, matching how load is distributed during regular +// host selection. For example, given priority healths of {100, 50, 50}, the original load will be +// {100, 0, 0} (since P0 has capacity to handle 100% of the traffic). If P0 is excluded, the load +// changes to {0, 50, 50}, because P1 is only able to handle 50% of the traffic, causing the +// remaining to spill over to P2. +// +// Each priority attempted will be excluded until there are no healthy priorities left, at which +// point the list of attempted priorities will be reset, essentially starting from the beginning. +// For example, given three priorities P0, P1, P2 with healthy % of 100, 0 and 50 respectively, the +// following sequence of priorities would be selected (assuming update_frequency = 1): +// Attempt 1: P0 (P0 is 100% healthy) +// Attempt 2: P2 (P0 already attempted, P2 only healthy priority) +// Attempt 3: P0 (no healthy priorities, reset) +// Attempt 4: P2 +// +// In the case of all upstream hosts being unhealthy, no adjustments will be made to the original +// priority load, so behavior should be identical to not using this plugin. +// +// Using this PriorityFilter requires rebuilding the priority load, which runs in O(# of +// priorities), which might incur significant overhead for clusters with many priorities. +// [#extension: envoy.retry_priorities.previous_priorities] +type PreviousPrioritiesConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // How often the priority load should be updated based on previously attempted priorities. Useful + // to allow each priorities to receive more than one request before being excluded or to reduce + // the number of times that the priority load has to be recomputed. + // + // For example, by setting this to 2, then the first two attempts (initial attempt and first + // retry) will use the unmodified priority load. The third and fourth attempt will use priority + // load which excludes the priorities routed to with the first two attempts, and the fifth and + // sixth attempt will use the priority load excluding the priorities used for the first four + // attempts. + // + // Must be greater than 0. + UpdateFrequency int32 `protobuf:"varint,1,opt,name=update_frequency,json=updateFrequency,proto3" json:"update_frequency,omitempty"` +} + +func (x *PreviousPrioritiesConfig) Reset() { + *x = PreviousPrioritiesConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PreviousPrioritiesConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PreviousPrioritiesConfig) ProtoMessage() {} + +func (x *PreviousPrioritiesConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PreviousPrioritiesConfig.ProtoReflect.Descriptor instead. +func (*PreviousPrioritiesConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_rawDescGZIP(), []int{0} +} + +func (x *PreviousPrioritiesConfig) GetUpdateFrequency() int32 { + if x != nil { + return x.UpdateFrequency + } + return 0 +} + +var File_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto protoreflect.FileDescriptor + +var file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_rawDesc = []byte{ + 0x0a, 0x57, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x2f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, + 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, + 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x74, 0x72, + 0x79, 0x2e, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, + 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x76, + 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0x96, 0x01, 0x0a, + 0x18, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x69, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x32, 0x0a, 0x10, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x1a, 0x02, 0x20, 0x00, 0x52, 0x0f, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x3a, 0x46, 0x9a, + 0xc5, 0x88, 0x1e, 0x41, 0x0a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, + 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x50, 0x72, 0x65, + 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xe4, 0x01, 0x0a, 0x44, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, + 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, + 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x1d, + 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, + 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x73, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x2f, 0x70, + 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, + 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x70, + 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, + 0x65, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_rawDescOnce sync.Once + file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_rawDescData = file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_rawDesc +) + +func file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_rawDescGZIP() []byte { + file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_rawDescOnce.Do(func() { + file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_rawDescData) + }) + return file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_rawDescData +} + +var file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_goTypes = []interface{}{ + (*PreviousPrioritiesConfig)(nil), // 0: envoy.extensions.retry.priority.previous_priorities.v3.PreviousPrioritiesConfig +} +var file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_init() +} +func file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_init() { + if File_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PreviousPrioritiesConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_goTypes, + DependencyIndexes: file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_depIdxs, + MessageInfos: file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_msgTypes, + }.Build() + File_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto = out.File + file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_rawDesc = nil + file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_goTypes = nil + file_envoy_extensions_retry_priority_previous_priorities_v3_previous_priorities_config_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.pb.validate.go new file mode 100644 index 0000000000000..185bade882e41 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.pb.validate.go @@ -0,0 +1,148 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/retry/priority/previous_priorities/v3/previous_priorities_config.proto + +package previous_prioritiesv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on PreviousPrioritiesConfig 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 *PreviousPrioritiesConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PreviousPrioritiesConfig 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 +// PreviousPrioritiesConfigMultiError, or nil if none found. +func (m *PreviousPrioritiesConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *PreviousPrioritiesConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetUpdateFrequency() <= 0 { + err := PreviousPrioritiesConfigValidationError{ + field: "UpdateFrequency", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return PreviousPrioritiesConfigMultiError(errors) + } + return nil +} + +// PreviousPrioritiesConfigMultiError is an error wrapping multiple validation +// errors returned by PreviousPrioritiesConfig.ValidateAll() if the designated +// constraints aren't met. +type PreviousPrioritiesConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PreviousPrioritiesConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PreviousPrioritiesConfigMultiError) AllErrors() []error { return m } + +// PreviousPrioritiesConfigValidationError is the validation error returned by +// PreviousPrioritiesConfig.Validate if the designated constraints aren't met. +type PreviousPrioritiesConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PreviousPrioritiesConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PreviousPrioritiesConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PreviousPrioritiesConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PreviousPrioritiesConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PreviousPrioritiesConfigValidationError) ErrorName() string { + return "PreviousPrioritiesConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e PreviousPrioritiesConfigValidationError) 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 %sPreviousPrioritiesConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PreviousPrioritiesConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PreviousPrioritiesConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/stat_sinks/graphite_statsd/v3/graphite_statsd.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/stat_sinks/graphite_statsd/v3/graphite_statsd.pb.go new file mode 100644 index 0000000000000..e939de9a63ad8 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/stat_sinks/graphite_statsd/v3/graphite_statsd.pb.go @@ -0,0 +1,241 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/stat_sinks/graphite_statsd/v3/graphite_statsd.proto + +package graphite_statsdv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type GraphiteStatsdSink struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to StatsdSpecifier: + // + // *GraphiteStatsdSink_Address + StatsdSpecifier isGraphiteStatsdSink_StatsdSpecifier `protobuf_oneof:"statsd_specifier"` + // Optional custom metric name prefix. See :ref:`StatsdSink's prefix field + // ` for more details. + Prefix string `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"` + // Optional max datagram size to use when sending UDP messages. By default Envoy + // will emit one metric per datagram. By specifying a max-size larger than a single + // metric, Envoy will emit multiple, new-line separated metrics. The max datagram + // size should not exceed your network's MTU. + // + // Note that this value may not be respected if smaller than a single metric. + MaxBytesPerDatagram *wrapperspb.UInt64Value `protobuf:"bytes,4,opt,name=max_bytes_per_datagram,json=maxBytesPerDatagram,proto3" json:"max_bytes_per_datagram,omitempty"` +} + +func (x *GraphiteStatsdSink) Reset() { + *x = GraphiteStatsdSink{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GraphiteStatsdSink) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GraphiteStatsdSink) ProtoMessage() {} + +func (x *GraphiteStatsdSink) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GraphiteStatsdSink.ProtoReflect.Descriptor instead. +func (*GraphiteStatsdSink) Descriptor() ([]byte, []int) { + return file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDescGZIP(), []int{0} +} + +func (m *GraphiteStatsdSink) GetStatsdSpecifier() isGraphiteStatsdSink_StatsdSpecifier { + if m != nil { + return m.StatsdSpecifier + } + return nil +} + +func (x *GraphiteStatsdSink) GetAddress() *v3.Address { + if x, ok := x.GetStatsdSpecifier().(*GraphiteStatsdSink_Address); ok { + return x.Address + } + return nil +} + +func (x *GraphiteStatsdSink) GetPrefix() string { + if x != nil { + return x.Prefix + } + return "" +} + +func (x *GraphiteStatsdSink) GetMaxBytesPerDatagram() *wrapperspb.UInt64Value { + if x != nil { + return x.MaxBytesPerDatagram + } + return nil +} + +type isGraphiteStatsdSink_StatsdSpecifier interface { + isGraphiteStatsdSink_StatsdSpecifier() +} + +type GraphiteStatsdSink_Address struct { + // The UDP address of a running Graphite-compliant listener. If specified, + // statistics will be flushed to this address. + Address *v3.Address `protobuf:"bytes,1,opt,name=address,proto3,oneof"` +} + +func (*GraphiteStatsdSink_Address) isGraphiteStatsdSink_StatsdSpecifier() {} + +var File_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto protoreflect.FileDescriptor + +var file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDesc = []byte{ + 0x0a, 0x44, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x2f, 0x67, 0x72, + 0x61, 0x70, 0x68, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x64, 0x2f, 0x76, 0x33, + 0x2f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x64, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x73, 0x69, + 0x6e, 0x6b, 0x73, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x73, 0x64, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, + 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 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, 0xdc, 0x01, 0x0a, 0x12, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x74, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x64, 0x53, 0x69, 0x6e, 0x6b, 0x12, 0x39, 0x0a, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x5a, 0x0a, 0x16, + 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x67, 0x72, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, + 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x32, + 0x02, 0x20, 0x00, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x50, 0x65, 0x72, + 0x44, 0x61, 0x74, 0x61, 0x67, 0x72, 0x61, 0x6d, 0x42, 0x17, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x74, + 0x73, 0x64, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, + 0x01, 0x42, 0xc6, 0x01, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x2e, + 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x64, 0x2e, + 0x76, 0x33, 0x42, 0x13, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x67, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x2f, 0x67, 0x72, + 0x61, 0x70, 0x68, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x64, 0x2f, 0x76, 0x33, + 0x3b, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x64, + 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDescOnce sync.Once + file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDescData = file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDesc +) + +func file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDescGZIP() []byte { + file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDescOnce.Do(func() { + file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDescData) + }) + return file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDescData +} + +var file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_goTypes = []interface{}{ + (*GraphiteStatsdSink)(nil), // 0: envoy.extensions.stat_sinks.graphite_statsd.v3.GraphiteStatsdSink + (*v3.Address)(nil), // 1: envoy.config.core.v3.Address + (*wrapperspb.UInt64Value)(nil), // 2: google.protobuf.UInt64Value +} +var file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.stat_sinks.graphite_statsd.v3.GraphiteStatsdSink.address:type_name -> envoy.config.core.v3.Address + 2, // 1: envoy.extensions.stat_sinks.graphite_statsd.v3.GraphiteStatsdSink.max_bytes_per_datagram:type_name -> google.protobuf.UInt64Value + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_init() } +func file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_init() { + if File_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GraphiteStatsdSink); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*GraphiteStatsdSink_Address)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_goTypes, + DependencyIndexes: file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_depIdxs, + MessageInfos: file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_msgTypes, + }.Build() + File_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto = out.File + file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_rawDesc = nil + file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_goTypes = nil + file_envoy_extensions_stat_sinks_graphite_statsd_v3_graphite_statsd_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/stat_sinks/graphite_statsd/v3/graphite_statsd.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/stat_sinks/graphite_statsd/v3/graphite_statsd.pb.validate.go new file mode 100644 index 0000000000000..6702c41f3cdd1 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/stat_sinks/graphite_statsd/v3/graphite_statsd.pb.validate.go @@ -0,0 +1,199 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/stat_sinks/graphite_statsd/v3/graphite_statsd.proto + +package graphite_statsdv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on GraphiteStatsdSink 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 *GraphiteStatsdSink) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GraphiteStatsdSink 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 +// GraphiteStatsdSinkMultiError, or nil if none found. +func (m *GraphiteStatsdSink) ValidateAll() error { + return m.validate(true) +} + +func (m *GraphiteStatsdSink) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Prefix + + if wrapper := m.GetMaxBytesPerDatagram(); wrapper != nil { + + if wrapper.GetValue() <= 0 { + err := GraphiteStatsdSinkValidationError{ + field: "MaxBytesPerDatagram", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + switch m.StatsdSpecifier.(type) { + + case *GraphiteStatsdSink_Address: + + if all { + switch v := interface{}(m.GetAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GraphiteStatsdSinkValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GraphiteStatsdSinkValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GraphiteStatsdSinkValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := GraphiteStatsdSinkValidationError{ + field: "StatsdSpecifier", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return GraphiteStatsdSinkMultiError(errors) + } + return nil +} + +// GraphiteStatsdSinkMultiError is an error wrapping multiple validation errors +// returned by GraphiteStatsdSink.ValidateAll() if the designated constraints +// aren't met. +type GraphiteStatsdSinkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GraphiteStatsdSinkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GraphiteStatsdSinkMultiError) AllErrors() []error { return m } + +// GraphiteStatsdSinkValidationError is the validation error returned by +// GraphiteStatsdSink.Validate if the designated constraints aren't met. +type GraphiteStatsdSinkValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GraphiteStatsdSinkValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GraphiteStatsdSinkValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GraphiteStatsdSinkValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GraphiteStatsdSinkValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GraphiteStatsdSinkValidationError) ErrorName() string { + return "GraphiteStatsdSinkValidationError" +} + +// Error satisfies the builtin error interface +func (e GraphiteStatsdSinkValidationError) 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 %sGraphiteStatsdSink.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GraphiteStatsdSinkValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GraphiteStatsdSinkValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/stat_sinks/wasm/v3/wasm.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/stat_sinks/wasm/v3/wasm.pb.go new file mode 100644 index 0000000000000..323d592592b22 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/stat_sinks/wasm/v3/wasm.pb.go @@ -0,0 +1,171 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/stat_sinks/wasm/v3/wasm.proto + +package wasmv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/extensions/wasm/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Wasm struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // General Plugin configuration. + Config *v3.PluginConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` +} + +func (x *Wasm) Reset() { + *x = Wasm{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Wasm) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Wasm) ProtoMessage() {} + +func (x *Wasm) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Wasm.ProtoReflect.Descriptor instead. +func (*Wasm) Descriptor() ([]byte, []int) { + return file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_rawDescGZIP(), []int{0} +} + +func (x *Wasm) GetConfig() *v3.PluginConfig { + if x != nil { + return x.Config + } + return nil +} + +var File_envoy_extensions_stat_sinks_wasm_v3_wasm_proto protoreflect.FileDescriptor + +var file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x2f, 0x77, 0x61, + 0x73, 0x6d, 0x2f, 0x76, 0x33, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x2e, 0x77, 0x61, + 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2f, 0x76, 0x33, 0x2f, + 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x46, 0x0a, 0x04, 0x57, 0x61, 0x73, + 0x6d, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x42, 0x9b, 0x01, 0x0a, 0x31, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x2e, + 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x57, 0x61, 0x73, 0x6d, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2f, 0x76, 0x33, + 0x3b, 0x77, 0x61, 0x73, 0x6d, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_rawDescOnce sync.Once + file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_rawDescData = file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_rawDesc +) + +func file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_rawDescGZIP() []byte { + file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_rawDescOnce.Do(func() { + file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_rawDescData) + }) + return file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_rawDescData +} + +var file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_goTypes = []interface{}{ + (*Wasm)(nil), // 0: envoy.extensions.stat_sinks.wasm.v3.Wasm + (*v3.PluginConfig)(nil), // 1: envoy.extensions.wasm.v3.PluginConfig +} +var file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.stat_sinks.wasm.v3.Wasm.config:type_name -> envoy.extensions.wasm.v3.PluginConfig + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_init() } +func file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_init() { + if File_envoy_extensions_stat_sinks_wasm_v3_wasm_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Wasm); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_goTypes, + DependencyIndexes: file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_depIdxs, + MessageInfos: file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_msgTypes, + }.Build() + File_envoy_extensions_stat_sinks_wasm_v3_wasm_proto = out.File + file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_rawDesc = nil + file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_goTypes = nil + file_envoy_extensions_stat_sinks_wasm_v3_wasm_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/stat_sinks/wasm/v3/wasm.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/stat_sinks/wasm/v3/wasm.pb.validate.go new file mode 100644 index 0000000000000..c54573ef0971b --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/stat_sinks/wasm/v3/wasm.pb.validate.go @@ -0,0 +1,162 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/stat_sinks/wasm/v3/wasm.proto + +package wasmv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Wasm 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 *Wasm) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Wasm 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 WasmMultiError, or nil if none found. +func (m *Wasm) ValidateAll() error { + return m.validate(true) +} + +func (m *Wasm) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WasmValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WasmValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return WasmValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return WasmMultiError(errors) + } + return nil +} + +// WasmMultiError is an error wrapping multiple validation errors returned by +// Wasm.ValidateAll() if the designated constraints aren't met. +type WasmMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WasmMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WasmMultiError) AllErrors() []error { return m } + +// WasmValidationError is the validation error returned by Wasm.Validate if the +// designated constraints aren't met. +type WasmValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e WasmValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e WasmValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e WasmValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e WasmValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e WasmValidationError) ErrorName() string { return "WasmValidationError" } + +// Error satisfies the builtin error interface +func (e WasmValidationError) 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 %sWasm.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = WasmValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = WasmValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/alts/v3/alts.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/alts/v3/alts.pb.go new file mode 100644 index 0000000000000..48aa802189421 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/alts/v3/alts.pb.go @@ -0,0 +1,192 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/transport_sockets/alts/v3/alts.proto + +package altsv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for ALTS transport socket. This provides Google's ALTS protocol to Envoy. +// Store the peer identity in dynamic metadata, namespace is "envoy.transport_socket.peer_information", key is "peer_identity". +// https://cloud.google.com/security/encryption-in-transit/application-layer-transport-security/ +type Alts struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The location of a handshaker service, this is usually 169.254.169.254:8080 + // on GCE. + HandshakerService string `protobuf:"bytes,1,opt,name=handshaker_service,json=handshakerService,proto3" json:"handshaker_service,omitempty"` + // The acceptable service accounts from peer, peers not in the list will be rejected in the + // handshake validation step. If empty, no validation will be performed. + PeerServiceAccounts []string `protobuf:"bytes,2,rep,name=peer_service_accounts,json=peerServiceAccounts,proto3" json:"peer_service_accounts,omitempty"` +} + +func (x *Alts) Reset() { + *x = Alts{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_transport_sockets_alts_v3_alts_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Alts) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Alts) ProtoMessage() {} + +func (x *Alts) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_transport_sockets_alts_v3_alts_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Alts.ProtoReflect.Descriptor instead. +func (*Alts) Descriptor() ([]byte, []int) { + return file_envoy_extensions_transport_sockets_alts_v3_alts_proto_rawDescGZIP(), []int{0} +} + +func (x *Alts) GetHandshakerService() string { + if x != nil { + return x.HandshakerService + } + return "" +} + +func (x *Alts) GetPeerServiceAccounts() []string { + if x != nil { + return x.PeerServiceAccounts + } + return nil +} + +var File_envoy_extensions_transport_sockets_alts_v3_alts_proto protoreflect.FileDescriptor + +var file_envoy_extensions_transport_sockets_alts_v3_alts_proto_rawDesc = []byte{ + 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x61, 0x6c, 0x74, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x6c, 0x74, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x61, 0x6c, 0x74, 0x73, + 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0xaa, + 0x01, 0x0a, 0x04, 0x41, 0x6c, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x12, 0x68, 0x61, 0x6e, 0x64, 0x73, + 0x68, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x11, 0x68, 0x61, + 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x32, 0x0a, 0x15, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, + 0x70, 0x65, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x3a, 0x36, 0x9a, 0xc5, 0x88, 0x1e, 0x31, 0x0a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x61, 0x6c, 0x74, 0x73, 0x2e, 0x76, + 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x6c, 0x74, 0x73, 0x42, 0xa9, 0x01, 0x0a, 0x38, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, + 0x2e, 0x61, 0x6c, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x41, 0x6c, 0x74, 0x73, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, + 0x2f, 0x61, 0x6c, 0x74, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x6c, 0x74, 0x73, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_transport_sockets_alts_v3_alts_proto_rawDescOnce sync.Once + file_envoy_extensions_transport_sockets_alts_v3_alts_proto_rawDescData = file_envoy_extensions_transport_sockets_alts_v3_alts_proto_rawDesc +) + +func file_envoy_extensions_transport_sockets_alts_v3_alts_proto_rawDescGZIP() []byte { + file_envoy_extensions_transport_sockets_alts_v3_alts_proto_rawDescOnce.Do(func() { + file_envoy_extensions_transport_sockets_alts_v3_alts_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_transport_sockets_alts_v3_alts_proto_rawDescData) + }) + return file_envoy_extensions_transport_sockets_alts_v3_alts_proto_rawDescData +} + +var file_envoy_extensions_transport_sockets_alts_v3_alts_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_transport_sockets_alts_v3_alts_proto_goTypes = []interface{}{ + (*Alts)(nil), // 0: envoy.extensions.transport_sockets.alts.v3.Alts +} +var file_envoy_extensions_transport_sockets_alts_v3_alts_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_transport_sockets_alts_v3_alts_proto_init() } +func file_envoy_extensions_transport_sockets_alts_v3_alts_proto_init() { + if File_envoy_extensions_transport_sockets_alts_v3_alts_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_transport_sockets_alts_v3_alts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Alts); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_transport_sockets_alts_v3_alts_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_transport_sockets_alts_v3_alts_proto_goTypes, + DependencyIndexes: file_envoy_extensions_transport_sockets_alts_v3_alts_proto_depIdxs, + MessageInfos: file_envoy_extensions_transport_sockets_alts_v3_alts_proto_msgTypes, + }.Build() + File_envoy_extensions_transport_sockets_alts_v3_alts_proto = out.File + file_envoy_extensions_transport_sockets_alts_v3_alts_proto_rawDesc = nil + file_envoy_extensions_transport_sockets_alts_v3_alts_proto_goTypes = nil + file_envoy_extensions_transport_sockets_alts_v3_alts_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/alts/v3/alts.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/alts/v3/alts.pb.validate.go new file mode 100644 index 0000000000000..5136fc9769001 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/alts/v3/alts.pb.validate.go @@ -0,0 +1,144 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/transport_sockets/alts/v3/alts.proto + +package altsv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Alts 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 *Alts) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Alts 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 AltsMultiError, or nil if none found. +func (m *Alts) ValidateAll() error { + return m.validate(true) +} + +func (m *Alts) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetHandshakerService()) < 1 { + err := AltsValidationError{ + field: "HandshakerService", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return AltsMultiError(errors) + } + return nil +} + +// AltsMultiError is an error wrapping multiple validation errors returned by +// Alts.ValidateAll() if the designated constraints aren't met. +type AltsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AltsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AltsMultiError) AllErrors() []error { return m } + +// AltsValidationError is the validation error returned by Alts.Validate if the +// designated constraints aren't met. +type AltsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AltsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AltsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AltsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AltsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AltsValidationError) ErrorName() string { return "AltsValidationError" } + +// Error satisfies the builtin error interface +func (e AltsValidationError) 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 %sAlts.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AltsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AltsValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.pb.go new file mode 100644 index 0000000000000..537e407c5bd8e --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.pb.go @@ -0,0 +1,199 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.proto + +package http_11_proxyv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for HTTP/1.1 proxy transport sockets. +// This is intended for use in Envoy Mobile, though may eventually be extended +// for upstream Envoy use. +// If this transport socket is configured, and an intermediate filter adds the +// stream info necessary for proxying to the stream info (as the test filter +// does :repo:`here `) then +// +// - Upstream connections will be directed to the specified proxy address rather +// than the host's address +// - Upstream TLS connections will have a raw HTTP/1.1 CONNECT header prefaced +// to the payload, and 200 response stripped (if less than 200 bytes) +// - Plaintext HTTP/1.1 connections will be sent with a fully qualified URL. +// +// This transport socket is not compatible with HTTP/3, plaintext HTTP/2, or raw TCP. +type Http11ProxyUpstreamTransport struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The underlying transport socket being wrapped. + TransportSocket *v3.TransportSocket `protobuf:"bytes,1,opt,name=transport_socket,json=transportSocket,proto3" json:"transport_socket,omitempty"` +} + +func (x *Http11ProxyUpstreamTransport) Reset() { + *x = Http11ProxyUpstreamTransport{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Http11ProxyUpstreamTransport) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Http11ProxyUpstreamTransport) ProtoMessage() {} + +func (x *Http11ProxyUpstreamTransport) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Http11ProxyUpstreamTransport.ProtoReflect.Descriptor instead. +func (*Http11ProxyUpstreamTransport) Descriptor() ([]byte, []int) { + return file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_rawDescGZIP(), []int{0} +} + +func (x *Http11ProxyUpstreamTransport) GetTransportSocket() *v3.TransportSocket { + if x != nil { + return x.TransportSocket + } + return nil +} + +var File_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto protoreflect.FileDescriptor + +var file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_rawDesc = []byte{ + 0x0a, 0x52, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x31, 0x31, 0x5f, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x68, + 0x74, 0x74, 0x70, 0x5f, 0x31, 0x31, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x31, 0x31, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 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, 0x7a, 0x0a, 0x1c, 0x48, 0x74, 0x74, 0x70, 0x31, 0x31, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x12, 0x5a, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, + 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x42, 0xd5, + 0x01, 0x0a, 0x41, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, + 0x65, 0x74, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x31, 0x31, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x76, 0x33, 0x42, 0x1a, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x74, + 0x74, 0x70, 0x31, 0x31, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x6a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x68, 0x74, + 0x74, 0x70, 0x5f, 0x31, 0x31, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x68, + 0x74, 0x74, 0x70, 0x5f, 0x31, 0x31, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_rawDescOnce sync.Once + file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_rawDescData = file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_rawDesc +) + +func file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_rawDescGZIP() []byte { + file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_rawDescOnce.Do(func() { + file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_rawDescData) + }) + return file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_rawDescData +} + +var file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_goTypes = []interface{}{ + (*Http11ProxyUpstreamTransport)(nil), // 0: envoy.extensions.transport_sockets.http_11_proxy.v3.Http11ProxyUpstreamTransport + (*v3.TransportSocket)(nil), // 1: envoy.config.core.v3.TransportSocket +} +var file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.transport_sockets.http_11_proxy.v3.Http11ProxyUpstreamTransport.transport_socket:type_name -> envoy.config.core.v3.TransportSocket + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_init() +} +func file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_init() { + if File_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Http11ProxyUpstreamTransport); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_goTypes, + DependencyIndexes: file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_depIdxs, + MessageInfos: file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_msgTypes, + }.Build() + File_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto = out.File + file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_rawDesc = nil + file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_goTypes = nil + file_envoy_extensions_transport_sockets_http_11_proxy_v3_upstream_http_11_connect_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.pb.validate.go new file mode 100644 index 0000000000000..75aeae6c0cf91 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.pb.validate.go @@ -0,0 +1,178 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.proto + +package http_11_proxyv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Http11ProxyUpstreamTransport 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 *Http11ProxyUpstreamTransport) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Http11ProxyUpstreamTransport 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 +// Http11ProxyUpstreamTransportMultiError, or nil if none found. +func (m *Http11ProxyUpstreamTransport) ValidateAll() error { + return m.validate(true) +} + +func (m *Http11ProxyUpstreamTransport) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetTransportSocket() == nil { + err := Http11ProxyUpstreamTransportValidationError{ + field: "TransportSocket", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetTransportSocket()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Http11ProxyUpstreamTransportValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Http11ProxyUpstreamTransportValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Http11ProxyUpstreamTransportValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return Http11ProxyUpstreamTransportMultiError(errors) + } + return nil +} + +// Http11ProxyUpstreamTransportMultiError is an error wrapping multiple +// validation errors returned by Http11ProxyUpstreamTransport.ValidateAll() if +// the designated constraints aren't met. +type Http11ProxyUpstreamTransportMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Http11ProxyUpstreamTransportMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Http11ProxyUpstreamTransportMultiError) AllErrors() []error { return m } + +// Http11ProxyUpstreamTransportValidationError is the validation error returned +// by Http11ProxyUpstreamTransport.Validate if the designated constraints +// aren't met. +type Http11ProxyUpstreamTransportValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Http11ProxyUpstreamTransportValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Http11ProxyUpstreamTransportValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Http11ProxyUpstreamTransportValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Http11ProxyUpstreamTransportValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Http11ProxyUpstreamTransportValidationError) ErrorName() string { + return "Http11ProxyUpstreamTransportValidationError" +} + +// Error satisfies the builtin error interface +func (e Http11ProxyUpstreamTransportValidationError) 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 %sHttp11ProxyUpstreamTransport.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Http11ProxyUpstreamTransportValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Http11ProxyUpstreamTransportValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/internal_upstream/v3/internal_upstream.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/internal_upstream/v3/internal_upstream.pb.go new file mode 100644 index 0000000000000..ae054b6e1caa3 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/internal_upstream/v3/internal_upstream.pb.go @@ -0,0 +1,303 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/transport_sockets/internal_upstream/v3/internal_upstream.proto + +package internal_upstreamv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + v31 "github.com/cilium/proxy/go/envoy/type/metadata/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for the internal upstream address. An internal address defines +// a loopback user space socket residing in the same proxy instance. This +// extension allows passing additional structured state across the user space +// socket in addition to the regular byte stream. The purpose is to facilitate +// communication between filters on the downstream and the upstream internal +// connections. All filter state objects that are shared with the upstream +// connection are also shared with the downstream internal connection using +// this transport socket. +type InternalUpstreamTransport struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies the metadata namespaces and values to insert into the downstream + // internal connection dynamic metadata when an internal address is used as a + // host. If the destination name is repeated across two metadata source + // locations, and both locations contain the metadata with the given name, + // then the latter in the list overrides the former. + PassthroughMetadata []*InternalUpstreamTransport_MetadataValueSource `protobuf:"bytes,1,rep,name=passthrough_metadata,json=passthroughMetadata,proto3" json:"passthrough_metadata,omitempty"` + // The underlying transport socket being wrapped. + TransportSocket *v3.TransportSocket `protobuf:"bytes,3,opt,name=transport_socket,json=transportSocket,proto3" json:"transport_socket,omitempty"` +} + +func (x *InternalUpstreamTransport) Reset() { + *x = InternalUpstreamTransport{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InternalUpstreamTransport) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InternalUpstreamTransport) ProtoMessage() {} + +func (x *InternalUpstreamTransport) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InternalUpstreamTransport.ProtoReflect.Descriptor instead. +func (*InternalUpstreamTransport) Descriptor() ([]byte, []int) { + return file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_rawDescGZIP(), []int{0} +} + +func (x *InternalUpstreamTransport) GetPassthroughMetadata() []*InternalUpstreamTransport_MetadataValueSource { + if x != nil { + return x.PassthroughMetadata + } + return nil +} + +func (x *InternalUpstreamTransport) GetTransportSocket() *v3.TransportSocket { + if x != nil { + return x.TransportSocket + } + return nil +} + +// Describes the location of the imported metadata value. +// If the metadata with the given name is not present at the source location, +// then no metadata is passed through for this particular instance. +type InternalUpstreamTransport_MetadataValueSource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies what kind of metadata. + Kind *v31.MetadataKind `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + // Name is the filter namespace used in the dynamic metadata. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *InternalUpstreamTransport_MetadataValueSource) Reset() { + *x = InternalUpstreamTransport_MetadataValueSource{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InternalUpstreamTransport_MetadataValueSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InternalUpstreamTransport_MetadataValueSource) ProtoMessage() {} + +func (x *InternalUpstreamTransport_MetadataValueSource) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InternalUpstreamTransport_MetadataValueSource.ProtoReflect.Descriptor instead. +func (*InternalUpstreamTransport_MetadataValueSource) Descriptor() ([]byte, []int) { + return file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *InternalUpstreamTransport_MetadataValueSource) GetKind() *v31.MetadataKind { + if x != nil { + return x.Kind + } + return nil +} + +func (x *InternalUpstreamTransport_MetadataValueSource) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto protoreflect.FileDescriptor + +var file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_rawDesc = []byte{ + 0x0a, 0x4f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x70, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x33, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x37, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x75, + 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, + 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x8b, 0x03, 0x0a, 0x19, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x99, 0x01, 0x0a, 0x14, 0x70, 0x61, 0x73, + 0x73, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x66, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, + 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, + 0x13, 0x70, 0x61, 0x73, 0x73, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x5a, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, + 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x1a, 0x76, 0x0a, 0x13, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69, 0x6e, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x1b, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0xdc, 0x01, 0x0a, 0x45, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, + 0x76, 0x33, 0x42, 0x15, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x55, 0x70, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x72, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, + 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, + 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x33, 0x3b, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x76, 0x33, 0xba, + 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_rawDescOnce sync.Once + file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_rawDescData = file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_rawDesc +) + +func file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_rawDescGZIP() []byte { + file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_rawDescOnce.Do(func() { + file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_rawDescData) + }) + return file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_rawDescData +} + +var file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_goTypes = []interface{}{ + (*InternalUpstreamTransport)(nil), // 0: envoy.extensions.transport_sockets.internal_upstream.v3.InternalUpstreamTransport + (*InternalUpstreamTransport_MetadataValueSource)(nil), // 1: envoy.extensions.transport_sockets.internal_upstream.v3.InternalUpstreamTransport.MetadataValueSource + (*v3.TransportSocket)(nil), // 2: envoy.config.core.v3.TransportSocket + (*v31.MetadataKind)(nil), // 3: envoy.type.metadata.v3.MetadataKind +} +var file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.transport_sockets.internal_upstream.v3.InternalUpstreamTransport.passthrough_metadata:type_name -> envoy.extensions.transport_sockets.internal_upstream.v3.InternalUpstreamTransport.MetadataValueSource + 2, // 1: envoy.extensions.transport_sockets.internal_upstream.v3.InternalUpstreamTransport.transport_socket:type_name -> envoy.config.core.v3.TransportSocket + 3, // 2: envoy.extensions.transport_sockets.internal_upstream.v3.InternalUpstreamTransport.MetadataValueSource.kind:type_name -> envoy.type.metadata.v3.MetadataKind + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_init() +} +func file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_init() { + if File_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InternalUpstreamTransport); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InternalUpstreamTransport_MetadataValueSource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_goTypes, + DependencyIndexes: file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_depIdxs, + MessageInfos: file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_msgTypes, + }.Build() + File_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto = out.File + file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_rawDesc = nil + file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_goTypes = nil + file_envoy_extensions_transport_sockets_internal_upstream_v3_internal_upstream_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/internal_upstream/v3/internal_upstream.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/internal_upstream/v3/internal_upstream.pb.validate.go new file mode 100644 index 0000000000000..cf0115b77a390 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/internal_upstream/v3/internal_upstream.pb.validate.go @@ -0,0 +1,370 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/transport_sockets/internal_upstream/v3/internal_upstream.proto + +package internal_upstreamv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on InternalUpstreamTransport 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 *InternalUpstreamTransport) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on InternalUpstreamTransport 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 +// InternalUpstreamTransportMultiError, or nil if none found. +func (m *InternalUpstreamTransport) ValidateAll() error { + return m.validate(true) +} + +func (m *InternalUpstreamTransport) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetPassthroughMetadata() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, InternalUpstreamTransportValidationError{ + field: fmt.Sprintf("PassthroughMetadata[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, InternalUpstreamTransportValidationError{ + field: fmt.Sprintf("PassthroughMetadata[%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 InternalUpstreamTransportValidationError{ + field: fmt.Sprintf("PassthroughMetadata[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if m.GetTransportSocket() == nil { + err := InternalUpstreamTransportValidationError{ + field: "TransportSocket", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetTransportSocket()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, InternalUpstreamTransportValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, InternalUpstreamTransportValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return InternalUpstreamTransportValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return InternalUpstreamTransportMultiError(errors) + } + return nil +} + +// InternalUpstreamTransportMultiError is an error wrapping multiple validation +// errors returned by InternalUpstreamTransport.ValidateAll() if the +// designated constraints aren't met. +type InternalUpstreamTransportMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m InternalUpstreamTransportMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m InternalUpstreamTransportMultiError) AllErrors() []error { return m } + +// InternalUpstreamTransportValidationError is the validation error returned by +// InternalUpstreamTransport.Validate if the designated constraints aren't met. +type InternalUpstreamTransportValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e InternalUpstreamTransportValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e InternalUpstreamTransportValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e InternalUpstreamTransportValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e InternalUpstreamTransportValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e InternalUpstreamTransportValidationError) ErrorName() string { + return "InternalUpstreamTransportValidationError" +} + +// Error satisfies the builtin error interface +func (e InternalUpstreamTransportValidationError) 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 %sInternalUpstreamTransport.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = InternalUpstreamTransportValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = InternalUpstreamTransportValidationError{} + +// Validate checks the field values on +// InternalUpstreamTransport_MetadataValueSource 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 *InternalUpstreamTransport_MetadataValueSource) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// InternalUpstreamTransport_MetadataValueSource 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 +// InternalUpstreamTransport_MetadataValueSourceMultiError, or nil if none found. +func (m *InternalUpstreamTransport_MetadataValueSource) ValidateAll() error { + return m.validate(true) +} + +func (m *InternalUpstreamTransport_MetadataValueSource) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetKind() == nil { + err := InternalUpstreamTransport_MetadataValueSourceValidationError{ + field: "Kind", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetKind()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, InternalUpstreamTransport_MetadataValueSourceValidationError{ + field: "Kind", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, InternalUpstreamTransport_MetadataValueSourceValidationError{ + field: "Kind", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetKind()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return InternalUpstreamTransport_MetadataValueSourceValidationError{ + field: "Kind", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if utf8.RuneCountInString(m.GetName()) < 1 { + err := InternalUpstreamTransport_MetadataValueSourceValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return InternalUpstreamTransport_MetadataValueSourceMultiError(errors) + } + return nil +} + +// InternalUpstreamTransport_MetadataValueSourceMultiError is an error wrapping +// multiple validation errors returned by +// InternalUpstreamTransport_MetadataValueSource.ValidateAll() if the +// designated constraints aren't met. +type InternalUpstreamTransport_MetadataValueSourceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m InternalUpstreamTransport_MetadataValueSourceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m InternalUpstreamTransport_MetadataValueSourceMultiError) AllErrors() []error { return m } + +// InternalUpstreamTransport_MetadataValueSourceValidationError is the +// validation error returned by +// InternalUpstreamTransport_MetadataValueSource.Validate if the designated +// constraints aren't met. +type InternalUpstreamTransport_MetadataValueSourceValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e InternalUpstreamTransport_MetadataValueSourceValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e InternalUpstreamTransport_MetadataValueSourceValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e InternalUpstreamTransport_MetadataValueSourceValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e InternalUpstreamTransport_MetadataValueSourceValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e InternalUpstreamTransport_MetadataValueSourceValidationError) ErrorName() string { + return "InternalUpstreamTransport_MetadataValueSourceValidationError" +} + +// Error satisfies the builtin error interface +func (e InternalUpstreamTransport_MetadataValueSourceValidationError) 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 %sInternalUpstreamTransport_MetadataValueSource.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = InternalUpstreamTransport_MetadataValueSourceValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = InternalUpstreamTransport_MetadataValueSourceValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.pb.go new file mode 100644 index 0000000000000..b6115ef90a951 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.pb.go @@ -0,0 +1,205 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.proto + +package proxy_protocolv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for PROXY protocol socket +type ProxyProtocolUpstreamTransport struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The PROXY protocol settings + Config *v3.ProxyProtocolConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + // The underlying transport socket being wrapped. + TransportSocket *v3.TransportSocket `protobuf:"bytes,2,opt,name=transport_socket,json=transportSocket,proto3" json:"transport_socket,omitempty"` +} + +func (x *ProxyProtocolUpstreamTransport) Reset() { + *x = ProxyProtocolUpstreamTransport{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProxyProtocolUpstreamTransport) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProxyProtocolUpstreamTransport) ProtoMessage() {} + +func (x *ProxyProtocolUpstreamTransport) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProxyProtocolUpstreamTransport.ProtoReflect.Descriptor instead. +func (*ProxyProtocolUpstreamTransport) Descriptor() ([]byte, []int) { + return file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_rawDescGZIP(), []int{0} +} + +func (x *ProxyProtocolUpstreamTransport) GetConfig() *v3.ProxyProtocolConfig { + if x != nil { + return x.Config + } + return nil +} + +func (x *ProxyProtocolUpstreamTransport) GetTransportSocket() *v3.TransportSocket { + if x != nil { + return x.TransportSocket + } + return nil +} + +var File_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto protoreflect.FileDescriptor + +var file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_rawDesc = []byte{ + 0x0a, 0x52, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, + 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, + 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xbf, + 0x01, 0x0a, 0x1e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x12, 0x41, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5a, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, + 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x42, 0xd8, 0x01, 0x0a, 0x42, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x76, 0x33, 0x42, 0x1a, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, + 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, + 0x76, 0x33, 0x3b, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_rawDescOnce sync.Once + file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_rawDescData = file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_rawDesc +) + +func file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_rawDescGZIP() []byte { + file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_rawDescOnce.Do(func() { + file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_rawDescData) + }) + return file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_rawDescData +} + +var file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_goTypes = []interface{}{ + (*ProxyProtocolUpstreamTransport)(nil), // 0: envoy.extensions.transport_sockets.proxy_protocol.v3.ProxyProtocolUpstreamTransport + (*v3.ProxyProtocolConfig)(nil), // 1: envoy.config.core.v3.ProxyProtocolConfig + (*v3.TransportSocket)(nil), // 2: envoy.config.core.v3.TransportSocket +} +var file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.transport_sockets.proxy_protocol.v3.ProxyProtocolUpstreamTransport.config:type_name -> envoy.config.core.v3.ProxyProtocolConfig + 2, // 1: envoy.extensions.transport_sockets.proxy_protocol.v3.ProxyProtocolUpstreamTransport.transport_socket:type_name -> envoy.config.core.v3.TransportSocket + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { + file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_init() +} +func file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_init() { + if File_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProxyProtocolUpstreamTransport); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_goTypes, + DependencyIndexes: file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_depIdxs, + MessageInfos: file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_msgTypes, + }.Build() + File_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto = out.File + file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_rawDesc = nil + file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_goTypes = nil + file_envoy_extensions_transport_sockets_proxy_protocol_v3_upstream_proxy_protocol_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.pb.validate.go new file mode 100644 index 0000000000000..e82dafda7e8bc --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.pb.validate.go @@ -0,0 +1,207 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/transport_sockets/proxy_protocol/v3/upstream_proxy_protocol.proto + +package proxy_protocolv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ProxyProtocolUpstreamTransport 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 *ProxyProtocolUpstreamTransport) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ProxyProtocolUpstreamTransport 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 +// ProxyProtocolUpstreamTransportMultiError, or nil if none found. +func (m *ProxyProtocolUpstreamTransport) ValidateAll() error { + return m.validate(true) +} + +func (m *ProxyProtocolUpstreamTransport) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProxyProtocolUpstreamTransportValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProxyProtocolUpstreamTransportValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProxyProtocolUpstreamTransportValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetTransportSocket() == nil { + err := ProxyProtocolUpstreamTransportValidationError{ + field: "TransportSocket", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetTransportSocket()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProxyProtocolUpstreamTransportValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProxyProtocolUpstreamTransportValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProxyProtocolUpstreamTransportValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ProxyProtocolUpstreamTransportMultiError(errors) + } + return nil +} + +// ProxyProtocolUpstreamTransportMultiError is an error wrapping multiple +// validation errors returned by ProxyProtocolUpstreamTransport.ValidateAll() +// if the designated constraints aren't met. +type ProxyProtocolUpstreamTransportMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ProxyProtocolUpstreamTransportMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ProxyProtocolUpstreamTransportMultiError) AllErrors() []error { return m } + +// ProxyProtocolUpstreamTransportValidationError is the validation error +// returned by ProxyProtocolUpstreamTransport.Validate if the designated +// constraints aren't met. +type ProxyProtocolUpstreamTransportValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ProxyProtocolUpstreamTransportValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ProxyProtocolUpstreamTransportValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ProxyProtocolUpstreamTransportValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ProxyProtocolUpstreamTransportValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ProxyProtocolUpstreamTransportValidationError) ErrorName() string { + return "ProxyProtocolUpstreamTransportValidationError" +} + +// Error satisfies the builtin error interface +func (e ProxyProtocolUpstreamTransportValidationError) 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 %sProxyProtocolUpstreamTransport.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ProxyProtocolUpstreamTransportValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ProxyProtocolUpstreamTransportValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/quic/v3/quic_transport.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/quic/v3/quic_transport.pb.go new file mode 100644 index 0000000000000..6d95880fb3850 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/quic/v3/quic_transport.pb.go @@ -0,0 +1,275 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/transport_sockets/quic/v3/quic_transport.proto + +package quicv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/extensions/transport_sockets/tls/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for Downstream QUIC transport socket. This provides Google's implementation of Google QUIC and IETF QUIC to Envoy. +type QuicDownstreamTransport struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DownstreamTlsContext *v3.DownstreamTlsContext `protobuf:"bytes,1,opt,name=downstream_tls_context,json=downstreamTlsContext,proto3" json:"downstream_tls_context,omitempty"` + // If false, QUIC will tell TLS to reject any early data and to stop issuing 0-RTT credentials with resumption session tickets. This will prevent clients from sending 0-RTT requests. + // Default to true. + EnableEarlyData *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=enable_early_data,json=enableEarlyData,proto3" json:"enable_early_data,omitempty"` +} + +func (x *QuicDownstreamTransport) Reset() { + *x = QuicDownstreamTransport{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuicDownstreamTransport) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuicDownstreamTransport) ProtoMessage() {} + +func (x *QuicDownstreamTransport) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QuicDownstreamTransport.ProtoReflect.Descriptor instead. +func (*QuicDownstreamTransport) Descriptor() ([]byte, []int) { + return file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_rawDescGZIP(), []int{0} +} + +func (x *QuicDownstreamTransport) GetDownstreamTlsContext() *v3.DownstreamTlsContext { + if x != nil { + return x.DownstreamTlsContext + } + return nil +} + +func (x *QuicDownstreamTransport) GetEnableEarlyData() *wrapperspb.BoolValue { + if x != nil { + return x.EnableEarlyData + } + return nil +} + +// Configuration for Upstream QUIC transport socket. This provides Google's implementation of Google QUIC and IETF QUIC to Envoy. +type QuicUpstreamTransport struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UpstreamTlsContext *v3.UpstreamTlsContext `protobuf:"bytes,1,opt,name=upstream_tls_context,json=upstreamTlsContext,proto3" json:"upstream_tls_context,omitempty"` +} + +func (x *QuicUpstreamTransport) Reset() { + *x = QuicUpstreamTransport{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QuicUpstreamTransport) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QuicUpstreamTransport) ProtoMessage() {} + +func (x *QuicUpstreamTransport) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QuicUpstreamTransport.ProtoReflect.Descriptor instead. +func (*QuicUpstreamTransport) Descriptor() ([]byte, []int) { + return file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_rawDescGZIP(), []int{1} +} + +func (x *QuicUpstreamTransport) GetUpstreamTlsContext() *v3.UpstreamTlsContext { + if x != nil { + return x.UpstreamTlsContext + } + return nil +} + +var File_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto protoreflect.FileDescriptor + +var file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_rawDesc = []byte{ + 0x0a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x71, 0x75, 0x69, + 0x63, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x2e, 0x76, 0x33, 0x1a, 0x33, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xe2, 0x01, 0x0a, 0x17, 0x51, + 0x75, 0x69, 0x63, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x7f, 0x0a, 0x16, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, + 0x76, 0x33, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x14, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x46, 0x0a, 0x11, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 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, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0f, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x61, 0x72, 0x6c, 0x79, 0x44, 0x61, 0x74, 0x61, 0x22, + 0x92, 0x01, 0x0a, 0x15, 0x51, 0x75, 0x69, 0x63, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x79, 0x0a, 0x14, 0x75, 0x70, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, + 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, + 0x52, 0x12, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x42, 0xb2, 0x01, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x2e, 0x76, + 0x33, 0x42, 0x12, 0x51, 0x75, 0x69, 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x58, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x73, 0x2f, 0x71, 0x75, 0x69, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x71, 0x75, 0x69, 0x63, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_rawDescOnce sync.Once + file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_rawDescData = file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_rawDesc +) + +func file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_rawDescGZIP() []byte { + file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_rawDescOnce.Do(func() { + file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_rawDescData) + }) + return file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_rawDescData +} + +var file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_goTypes = []interface{}{ + (*QuicDownstreamTransport)(nil), // 0: envoy.extensions.transport_sockets.quic.v3.QuicDownstreamTransport + (*QuicUpstreamTransport)(nil), // 1: envoy.extensions.transport_sockets.quic.v3.QuicUpstreamTransport + (*v3.DownstreamTlsContext)(nil), // 2: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext + (*wrapperspb.BoolValue)(nil), // 3: google.protobuf.BoolValue + (*v3.UpstreamTlsContext)(nil), // 4: envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext +} +var file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.transport_sockets.quic.v3.QuicDownstreamTransport.downstream_tls_context:type_name -> envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext + 3, // 1: envoy.extensions.transport_sockets.quic.v3.QuicDownstreamTransport.enable_early_data:type_name -> google.protobuf.BoolValue + 4, // 2: envoy.extensions.transport_sockets.quic.v3.QuicUpstreamTransport.upstream_tls_context:type_name -> envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_init() } +func file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_init() { + if File_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuicDownstreamTransport); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QuicUpstreamTransport); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_goTypes, + DependencyIndexes: file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_depIdxs, + MessageInfos: file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_msgTypes, + }.Build() + File_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto = out.File + file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_rawDesc = nil + file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_goTypes = nil + file_envoy_extensions_transport_sockets_quic_v3_quic_transport_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/quic/v3/quic_transport.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/quic/v3/quic_transport.pb.validate.go new file mode 100644 index 0000000000000..53252e4b496f1 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/quic/v3/quic_transport.pb.validate.go @@ -0,0 +1,347 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/transport_sockets/quic/v3/quic_transport.proto + +package quicv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on QuicDownstreamTransport 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 *QuicDownstreamTransport) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on QuicDownstreamTransport 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 +// QuicDownstreamTransportMultiError, or nil if none found. +func (m *QuicDownstreamTransport) ValidateAll() error { + return m.validate(true) +} + +func (m *QuicDownstreamTransport) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetDownstreamTlsContext() == nil { + err := QuicDownstreamTransportValidationError{ + field: "DownstreamTlsContext", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetDownstreamTlsContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, QuicDownstreamTransportValidationError{ + field: "DownstreamTlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, QuicDownstreamTransportValidationError{ + field: "DownstreamTlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDownstreamTlsContext()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return QuicDownstreamTransportValidationError{ + field: "DownstreamTlsContext", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetEnableEarlyData()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, QuicDownstreamTransportValidationError{ + field: "EnableEarlyData", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, QuicDownstreamTransportValidationError{ + field: "EnableEarlyData", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnableEarlyData()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return QuicDownstreamTransportValidationError{ + field: "EnableEarlyData", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return QuicDownstreamTransportMultiError(errors) + } + return nil +} + +// QuicDownstreamTransportMultiError is an error wrapping multiple validation +// errors returned by QuicDownstreamTransport.ValidateAll() if the designated +// constraints aren't met. +type QuicDownstreamTransportMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m QuicDownstreamTransportMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m QuicDownstreamTransportMultiError) AllErrors() []error { return m } + +// QuicDownstreamTransportValidationError is the validation error returned by +// QuicDownstreamTransport.Validate if the designated constraints aren't met. +type QuicDownstreamTransportValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e QuicDownstreamTransportValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e QuicDownstreamTransportValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e QuicDownstreamTransportValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e QuicDownstreamTransportValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e QuicDownstreamTransportValidationError) ErrorName() string { + return "QuicDownstreamTransportValidationError" +} + +// Error satisfies the builtin error interface +func (e QuicDownstreamTransportValidationError) 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 %sQuicDownstreamTransport.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = QuicDownstreamTransportValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = QuicDownstreamTransportValidationError{} + +// Validate checks the field values on QuicUpstreamTransport 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 *QuicUpstreamTransport) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on QuicUpstreamTransport 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 +// QuicUpstreamTransportMultiError, or nil if none found. +func (m *QuicUpstreamTransport) ValidateAll() error { + return m.validate(true) +} + +func (m *QuicUpstreamTransport) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetUpstreamTlsContext() == nil { + err := QuicUpstreamTransportValidationError{ + field: "UpstreamTlsContext", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetUpstreamTlsContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, QuicUpstreamTransportValidationError{ + field: "UpstreamTlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, QuicUpstreamTransportValidationError{ + field: "UpstreamTlsContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpstreamTlsContext()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return QuicUpstreamTransportValidationError{ + field: "UpstreamTlsContext", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return QuicUpstreamTransportMultiError(errors) + } + return nil +} + +// QuicUpstreamTransportMultiError is an error wrapping multiple validation +// errors returned by QuicUpstreamTransport.ValidateAll() if the designated +// constraints aren't met. +type QuicUpstreamTransportMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m QuicUpstreamTransportMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m QuicUpstreamTransportMultiError) AllErrors() []error { return m } + +// QuicUpstreamTransportValidationError is the validation error returned by +// QuicUpstreamTransport.Validate if the designated constraints aren't met. +type QuicUpstreamTransportValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e QuicUpstreamTransportValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e QuicUpstreamTransportValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e QuicUpstreamTransportValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e QuicUpstreamTransportValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e QuicUpstreamTransportValidationError) ErrorName() string { + return "QuicUpstreamTransportValidationError" +} + +// Error satisfies the builtin error interface +func (e QuicUpstreamTransportValidationError) 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 %sQuicUpstreamTransport.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = QuicUpstreamTransportValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = QuicUpstreamTransportValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.pb.go new file mode 100644 index 0000000000000..9889c33770232 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.pb.go @@ -0,0 +1,163 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.proto + +package raw_bufferv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for raw buffer transport socket. +type RawBuffer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RawBuffer) Reset() { + *x = RawBuffer{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RawBuffer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RawBuffer) ProtoMessage() {} + +func (x *RawBuffer) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RawBuffer.ProtoReflect.Descriptor instead. +func (*RawBuffer) Descriptor() ([]byte, []int) { + return file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto protoreflect.FileDescriptor + +var file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_rawDesc = []byte{ + 0x0a, 0x41, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2f, + 0x76, 0x33, 0x2f, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, + 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x75, 0x66, 0x66, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, + 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x49, 0x0a, 0x09, 0x52, 0x61, 0x77, 0x42, 0x75, + 0x66, 0x66, 0x65, 0x72, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x72, 0x61, 0x77, 0x5f, 0x62, + 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x77, 0x42, 0x75, 0x66, 0x66, + 0x65, 0x72, 0x42, 0xc0, 0x01, 0x0a, 0x3e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, + 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x75, 0x66, 0x66, + 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x52, 0x61, 0x77, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x64, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, + 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x73, 0x2f, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2f, 0x76, 0x33, + 0x3b, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_rawDescOnce sync.Once + file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_rawDescData = file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_rawDesc +) + +func file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_rawDescGZIP() []byte { + file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_rawDescOnce.Do(func() { + file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_rawDescData) + }) + return file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_rawDescData +} + +var file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_goTypes = []interface{}{ + (*RawBuffer)(nil), // 0: envoy.extensions.transport_sockets.raw_buffer.v3.RawBuffer +} +var file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_init() } +func file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_init() { + if File_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RawBuffer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_goTypes, + DependencyIndexes: file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_depIdxs, + MessageInfos: file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_msgTypes, + }.Build() + File_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto = out.File + file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_rawDesc = nil + file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_goTypes = nil + file_envoy_extensions_transport_sockets_raw_buffer_v3_raw_buffer_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.pb.validate.go new file mode 100644 index 0000000000000..d2f1790b09f20 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.pb.validate.go @@ -0,0 +1,134 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/transport_sockets/raw_buffer/v3/raw_buffer.proto + +package raw_bufferv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RawBuffer 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 *RawBuffer) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RawBuffer 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 RawBufferMultiError, or nil +// if none found. +func (m *RawBuffer) ValidateAll() error { + return m.validate(true) +} + +func (m *RawBuffer) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return RawBufferMultiError(errors) + } + return nil +} + +// RawBufferMultiError is an error wrapping multiple validation errors returned +// by RawBuffer.ValidateAll() if the designated constraints aren't met. +type RawBufferMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RawBufferMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RawBufferMultiError) AllErrors() []error { return m } + +// RawBufferValidationError is the validation error returned by +// RawBuffer.Validate if the designated constraints aren't met. +type RawBufferValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RawBufferValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RawBufferValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RawBufferValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RawBufferValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RawBufferValidationError) ErrorName() string { return "RawBufferValidationError" } + +// Error satisfies the builtin error interface +func (e RawBufferValidationError) 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 %sRawBuffer.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RawBufferValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RawBufferValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/s2a/v3/s2a.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/s2a/v3/s2a.pb.go new file mode 100644 index 0000000000000..c5dccb23b7d7d --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/s2a/v3/s2a.pb.go @@ -0,0 +1,174 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/transport_sockets/s2a/v3/s2a.proto + +package s2av3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// [#not-implemented-hide:] +// Configuration for S2A transport socket. This allows Envoy clients to +// configure how to offload mTLS handshakes to the S2A service. +// https://github.com/google/s2a-core#readme +type S2AConfiguration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address of the S2A. This can be an IP address or a hostname, + // followed by a port number. + S2AAddress string `protobuf:"bytes,1,opt,name=s2a_address,json=s2aAddress,proto3" json:"s2a_address,omitempty"` +} + +func (x *S2AConfiguration) Reset() { + *x = S2AConfiguration{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *S2AConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*S2AConfiguration) ProtoMessage() {} + +func (x *S2AConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use S2AConfiguration.ProtoReflect.Descriptor instead. +func (*S2AConfiguration) Descriptor() ([]byte, []int) { + return file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDescGZIP(), []int{0} +} + +func (x *S2AConfiguration) GetS2AAddress() string { + if x != nil { + return x.S2AAddress + } + return "" +} + +var File_envoy_extensions_transport_sockets_s2a_v3_s2a_proto protoreflect.FileDescriptor + +var file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDesc = []byte{ + 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x73, 0x32, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x32, 0x61, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x76, 0x33, + 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x3c, 0x0a, 0x10, 0x53, 0x32, 0x41, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0b, + 0x73, 0x32, 0x61, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x32, 0x61, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0xa5, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x73, 0x32, 0x61, 0x2e, + 0x76, 0x33, 0x42, 0x08, 0x53, 0x32, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x56, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x73, 0x32, 0x61, 0x2f, 0x76, 0x33, + 0x3b, 0x73, 0x32, 0x61, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDescOnce sync.Once + file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDescData = file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDesc +) + +func file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDescGZIP() []byte { + file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDescOnce.Do(func() { + file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDescData) + }) + return file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDescData +} + +var file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_goTypes = []interface{}{ + (*S2AConfiguration)(nil), // 0: envoy.extensions.transport_sockets.s2a.v3.S2AConfiguration +} +var file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_init() } +func file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_init() { + if File_envoy_extensions_transport_sockets_s2a_v3_s2a_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*S2AConfiguration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_goTypes, + DependencyIndexes: file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_depIdxs, + MessageInfos: file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_msgTypes, + }.Build() + File_envoy_extensions_transport_sockets_s2a_v3_s2a_proto = out.File + file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_rawDesc = nil + file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_goTypes = nil + file_envoy_extensions_transport_sockets_s2a_v3_s2a_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/s2a/v3/s2a.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/s2a/v3/s2a.pb.validate.go new file mode 100644 index 0000000000000..0cae2fd456e35 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/s2a/v3/s2a.pb.validate.go @@ -0,0 +1,146 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/transport_sockets/s2a/v3/s2a.proto + +package s2av3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on S2AConfiguration 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 *S2AConfiguration) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on S2AConfiguration 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 +// S2AConfigurationMultiError, or nil if none found. +func (m *S2AConfiguration) ValidateAll() error { + return m.validate(true) +} + +func (m *S2AConfiguration) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetS2AAddress()) < 1 { + err := S2AConfigurationValidationError{ + field: "S2AAddress", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return S2AConfigurationMultiError(errors) + } + return nil +} + +// S2AConfigurationMultiError is an error wrapping multiple validation errors +// returned by S2AConfiguration.ValidateAll() if the designated constraints +// aren't met. +type S2AConfigurationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m S2AConfigurationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m S2AConfigurationMultiError) AllErrors() []error { return m } + +// S2AConfigurationValidationError is the validation error returned by +// S2AConfiguration.Validate if the designated constraints aren't met. +type S2AConfigurationValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e S2AConfigurationValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e S2AConfigurationValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e S2AConfigurationValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e S2AConfigurationValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e S2AConfigurationValidationError) ErrorName() string { return "S2AConfigurationValidationError" } + +// Error satisfies the builtin error interface +func (e S2AConfigurationValidationError) 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 %sS2AConfiguration.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = S2AConfigurationValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = S2AConfigurationValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/starttls/v3/starttls.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/starttls/v3/starttls.pb.go new file mode 100644 index 0000000000000..49fb16cf66fea --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/starttls/v3/starttls.pb.go @@ -0,0 +1,303 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/transport_sockets/starttls/v3/starttls.proto + +package starttlsv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/extensions/transport_sockets/raw_buffer/v3" + v31 "github.com/cilium/proxy/go/envoy/extensions/transport_sockets/tls/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for a downstream StartTls transport socket. +// StartTls transport socket wraps two sockets: +// * raw_buffer socket which is used at the beginning of the session +// * TLS socket used when a protocol negotiates a switch to encrypted traffic. +type StartTlsConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // (optional) Configuration for clear-text socket used at the beginning of the session. + CleartextSocketConfig *v3.RawBuffer `protobuf:"bytes,1,opt,name=cleartext_socket_config,json=cleartextSocketConfig,proto3" json:"cleartext_socket_config,omitempty"` + // Configuration for a downstream TLS socket. + TlsSocketConfig *v31.DownstreamTlsContext `protobuf:"bytes,2,opt,name=tls_socket_config,json=tlsSocketConfig,proto3" json:"tls_socket_config,omitempty"` +} + +func (x *StartTlsConfig) Reset() { + *x = StartTlsConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StartTlsConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartTlsConfig) ProtoMessage() {} + +func (x *StartTlsConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartTlsConfig.ProtoReflect.Descriptor instead. +func (*StartTlsConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_rawDescGZIP(), []int{0} +} + +func (x *StartTlsConfig) GetCleartextSocketConfig() *v3.RawBuffer { + if x != nil { + return x.CleartextSocketConfig + } + return nil +} + +func (x *StartTlsConfig) GetTlsSocketConfig() *v31.DownstreamTlsContext { + if x != nil { + return x.TlsSocketConfig + } + return nil +} + +// Configuration for an upstream StartTls transport socket. +// StartTls transport socket wraps two sockets: +// * raw_buffer socket which is used at the beginning of the session +// * TLS socket used when a protocol negotiates a switch to encrypted traffic. +type UpstreamStartTlsConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // (optional) Configuration for clear-text socket used at the beginning of the session. + CleartextSocketConfig *v3.RawBuffer `protobuf:"bytes,1,opt,name=cleartext_socket_config,json=cleartextSocketConfig,proto3" json:"cleartext_socket_config,omitempty"` + // Configuration for an upstream TLS socket. + TlsSocketConfig *v31.UpstreamTlsContext `protobuf:"bytes,2,opt,name=tls_socket_config,json=tlsSocketConfig,proto3" json:"tls_socket_config,omitempty"` +} + +func (x *UpstreamStartTlsConfig) Reset() { + *x = UpstreamStartTlsConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpstreamStartTlsConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpstreamStartTlsConfig) ProtoMessage() {} + +func (x *UpstreamStartTlsConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpstreamStartTlsConfig.ProtoReflect.Descriptor instead. +func (*UpstreamStartTlsConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_rawDescGZIP(), []int{1} +} + +func (x *UpstreamStartTlsConfig) GetCleartextSocketConfig() *v3.RawBuffer { + if x != nil { + return x.CleartextSocketConfig + } + return nil +} + +func (x *UpstreamStartTlsConfig) GetTlsSocketConfig() *v31.UpstreamTlsContext { + if x != nil { + return x.TlsSocketConfig + } + return nil +} + +var File_envoy_extensions_transport_sockets_starttls_v3_starttls_proto protoreflect.FileDescriptor + +var file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_rawDesc = []byte{ + 0x0a, 0x3d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, + 0x2f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x74, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, + 0x65, 0x74, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x1a, + 0x41, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, + 0x65, 0x74, 0x73, 0x2f, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2f, 0x76, + 0x33, 0x2f, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, + 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x6c, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 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, + 0xfc, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x73, 0x0a, 0x17, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x74, 0x65, 0x78, 0x74, 0x5f, + 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x75, 0x66, + 0x66, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x77, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, + 0x52, 0x15, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x75, 0x0a, 0x11, 0x74, 0x6c, 0x73, 0x5f, 0x73, + 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, + 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, + 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x74, + 0x6c, 0x73, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x82, + 0x02, 0x0a, 0x16, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x73, 0x0a, 0x17, 0x63, 0x6c, 0x65, + 0x61, 0x72, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, + 0x72, 0x61, 0x77, 0x5f, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, + 0x77, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x52, 0x15, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x74, 0x65, + 0x78, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x73, + 0x0a, 0x11, 0x74, 0x6c, 0x73, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, + 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, + 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, + 0x10, 0x01, 0x52, 0x0f, 0x74, 0x6c, 0x73, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x42, 0xb9, 0x01, 0x0a, 0x3c, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x74, 0x6c, + 0x73, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x74, 0x6c, 0x73, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x60, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x74, 0x6c, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_rawDescOnce sync.Once + file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_rawDescData = file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_rawDesc +) + +func file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_rawDescGZIP() []byte { + file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_rawDescOnce.Do(func() { + file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_rawDescData) + }) + return file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_rawDescData +} + +var file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_goTypes = []interface{}{ + (*StartTlsConfig)(nil), // 0: envoy.extensions.transport_sockets.starttls.v3.StartTlsConfig + (*UpstreamStartTlsConfig)(nil), // 1: envoy.extensions.transport_sockets.starttls.v3.UpstreamStartTlsConfig + (*v3.RawBuffer)(nil), // 2: envoy.extensions.transport_sockets.raw_buffer.v3.RawBuffer + (*v31.DownstreamTlsContext)(nil), // 3: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext + (*v31.UpstreamTlsContext)(nil), // 4: envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext +} +var file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_depIdxs = []int32{ + 2, // 0: envoy.extensions.transport_sockets.starttls.v3.StartTlsConfig.cleartext_socket_config:type_name -> envoy.extensions.transport_sockets.raw_buffer.v3.RawBuffer + 3, // 1: envoy.extensions.transport_sockets.starttls.v3.StartTlsConfig.tls_socket_config:type_name -> envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext + 2, // 2: envoy.extensions.transport_sockets.starttls.v3.UpstreamStartTlsConfig.cleartext_socket_config:type_name -> envoy.extensions.transport_sockets.raw_buffer.v3.RawBuffer + 4, // 3: envoy.extensions.transport_sockets.starttls.v3.UpstreamStartTlsConfig.tls_socket_config:type_name -> envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_init() } +func file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_init() { + if File_envoy_extensions_transport_sockets_starttls_v3_starttls_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StartTlsConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpstreamStartTlsConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_goTypes, + DependencyIndexes: file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_depIdxs, + MessageInfos: file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_msgTypes, + }.Build() + File_envoy_extensions_transport_sockets_starttls_v3_starttls_proto = out.File + file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_rawDesc = nil + file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_goTypes = nil + file_envoy_extensions_transport_sockets_starttls_v3_starttls_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/starttls/v3/starttls.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/starttls/v3/starttls.pb.validate.go new file mode 100644 index 0000000000000..3a8826146ff8d --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/starttls/v3/starttls.pb.validate.go @@ -0,0 +1,374 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/transport_sockets/starttls/v3/starttls.proto + +package starttlsv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on StartTlsConfig 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 *StartTlsConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StartTlsConfig 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 StartTlsConfigMultiError, +// or nil if none found. +func (m *StartTlsConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *StartTlsConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetCleartextSocketConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StartTlsConfigValidationError{ + field: "CleartextSocketConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StartTlsConfigValidationError{ + field: "CleartextSocketConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCleartextSocketConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StartTlsConfigValidationError{ + field: "CleartextSocketConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetTlsSocketConfig() == nil { + err := StartTlsConfigValidationError{ + field: "TlsSocketConfig", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetTlsSocketConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StartTlsConfigValidationError{ + field: "TlsSocketConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StartTlsConfigValidationError{ + field: "TlsSocketConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTlsSocketConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StartTlsConfigValidationError{ + field: "TlsSocketConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return StartTlsConfigMultiError(errors) + } + return nil +} + +// StartTlsConfigMultiError is an error wrapping multiple validation errors +// returned by StartTlsConfig.ValidateAll() if the designated constraints +// aren't met. +type StartTlsConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StartTlsConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StartTlsConfigMultiError) AllErrors() []error { return m } + +// StartTlsConfigValidationError is the validation error returned by +// StartTlsConfig.Validate if the designated constraints aren't met. +type StartTlsConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StartTlsConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StartTlsConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StartTlsConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StartTlsConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StartTlsConfigValidationError) ErrorName() string { return "StartTlsConfigValidationError" } + +// Error satisfies the builtin error interface +func (e StartTlsConfigValidationError) 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 %sStartTlsConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StartTlsConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StartTlsConfigValidationError{} + +// Validate checks the field values on UpstreamStartTlsConfig 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 *UpstreamStartTlsConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UpstreamStartTlsConfig 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 +// UpstreamStartTlsConfigMultiError, or nil if none found. +func (m *UpstreamStartTlsConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *UpstreamStartTlsConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetCleartextSocketConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamStartTlsConfigValidationError{ + field: "CleartextSocketConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamStartTlsConfigValidationError{ + field: "CleartextSocketConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCleartextSocketConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UpstreamStartTlsConfigValidationError{ + field: "CleartextSocketConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetTlsSocketConfig() == nil { + err := UpstreamStartTlsConfigValidationError{ + field: "TlsSocketConfig", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetTlsSocketConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, UpstreamStartTlsConfigValidationError{ + field: "TlsSocketConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, UpstreamStartTlsConfigValidationError{ + field: "TlsSocketConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTlsSocketConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return UpstreamStartTlsConfigValidationError{ + field: "TlsSocketConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return UpstreamStartTlsConfigMultiError(errors) + } + return nil +} + +// UpstreamStartTlsConfigMultiError is an error wrapping multiple validation +// errors returned by UpstreamStartTlsConfig.ValidateAll() if the designated +// constraints aren't met. +type UpstreamStartTlsConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UpstreamStartTlsConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UpstreamStartTlsConfigMultiError) AllErrors() []error { return m } + +// UpstreamStartTlsConfigValidationError is the validation error returned by +// UpstreamStartTlsConfig.Validate if the designated constraints aren't met. +type UpstreamStartTlsConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e UpstreamStartTlsConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e UpstreamStartTlsConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e UpstreamStartTlsConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e UpstreamStartTlsConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e UpstreamStartTlsConfigValidationError) ErrorName() string { + return "UpstreamStartTlsConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e UpstreamStartTlsConfigValidationError) 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 %sUpstreamStartTlsConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = UpstreamStartTlsConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = UpstreamStartTlsConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/tap/v3/tap.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/tap/v3/tap.pb.go new file mode 100644 index 0000000000000..755e9a4f68e8c --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/tap/v3/tap.pb.go @@ -0,0 +1,205 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/transport_sockets/tap/v3/tap.proto + +package tapv3 + +import ( + v31 "github.com/cilium/proxy/go/envoy/config/core/v3" + v3 "github.com/cilium/proxy/go/envoy/extensions/common/tap/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for tap transport socket. This wraps another transport socket, providing the +// ability to interpose and record in plain text any traffic that is surfaced to Envoy. +type Tap struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Common configuration for the tap transport socket. + CommonConfig *v3.CommonExtensionConfig `protobuf:"bytes,1,opt,name=common_config,json=commonConfig,proto3" json:"common_config,omitempty"` + // The underlying transport socket being wrapped. + TransportSocket *v31.TransportSocket `protobuf:"bytes,2,opt,name=transport_socket,json=transportSocket,proto3" json:"transport_socket,omitempty"` +} + +func (x *Tap) Reset() { + *x = Tap{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_transport_sockets_tap_v3_tap_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Tap) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Tap) ProtoMessage() {} + +func (x *Tap) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_transport_sockets_tap_v3_tap_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Tap.ProtoReflect.Descriptor instead. +func (*Tap) Descriptor() ([]byte, []int) { + return file_envoy_extensions_transport_sockets_tap_v3_tap_proto_rawDescGZIP(), []int{0} +} + +func (x *Tap) GetCommonConfig() *v3.CommonExtensionConfig { + if x != nil { + return x.CommonConfig + } + return nil +} + +func (x *Tap) GetTransportSocket() *v31.TransportSocket { + if x != nil { + return x.TransportSocket + } + return nil +} + +var File_envoy_extensions_transport_sockets_tap_v3_tap_proto protoreflect.FileDescriptor + +var file_envoy_extensions_transport_sockets_tap_v3_tap_proto_rawDesc = []byte{ + 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x61, 0x70, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, + 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, + 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0xfd, 0x01, 0x0a, 0x03, 0x54, 0x61, + 0x70, 0x12, 0x64, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5a, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, + 0x10, 0x01, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x54, 0x61, 0x70, 0x42, 0xa5, 0x01, 0x0a, 0x37, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, + 0x61, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x54, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x56, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x61, 0x70, + 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x61, 0x70, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_transport_sockets_tap_v3_tap_proto_rawDescOnce sync.Once + file_envoy_extensions_transport_sockets_tap_v3_tap_proto_rawDescData = file_envoy_extensions_transport_sockets_tap_v3_tap_proto_rawDesc +) + +func file_envoy_extensions_transport_sockets_tap_v3_tap_proto_rawDescGZIP() []byte { + file_envoy_extensions_transport_sockets_tap_v3_tap_proto_rawDescOnce.Do(func() { + file_envoy_extensions_transport_sockets_tap_v3_tap_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_transport_sockets_tap_v3_tap_proto_rawDescData) + }) + return file_envoy_extensions_transport_sockets_tap_v3_tap_proto_rawDescData +} + +var file_envoy_extensions_transport_sockets_tap_v3_tap_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_transport_sockets_tap_v3_tap_proto_goTypes = []interface{}{ + (*Tap)(nil), // 0: envoy.extensions.transport_sockets.tap.v3.Tap + (*v3.CommonExtensionConfig)(nil), // 1: envoy.extensions.common.tap.v3.CommonExtensionConfig + (*v31.TransportSocket)(nil), // 2: envoy.config.core.v3.TransportSocket +} +var file_envoy_extensions_transport_sockets_tap_v3_tap_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.transport_sockets.tap.v3.Tap.common_config:type_name -> envoy.extensions.common.tap.v3.CommonExtensionConfig + 2, // 1: envoy.extensions.transport_sockets.tap.v3.Tap.transport_socket:type_name -> envoy.config.core.v3.TransportSocket + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_transport_sockets_tap_v3_tap_proto_init() } +func file_envoy_extensions_transport_sockets_tap_v3_tap_proto_init() { + if File_envoy_extensions_transport_sockets_tap_v3_tap_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_transport_sockets_tap_v3_tap_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Tap); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_transport_sockets_tap_v3_tap_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_transport_sockets_tap_v3_tap_proto_goTypes, + DependencyIndexes: file_envoy_extensions_transport_sockets_tap_v3_tap_proto_depIdxs, + MessageInfos: file_envoy_extensions_transport_sockets_tap_v3_tap_proto_msgTypes, + }.Build() + File_envoy_extensions_transport_sockets_tap_v3_tap_proto = out.File + file_envoy_extensions_transport_sockets_tap_v3_tap_proto_rawDesc = nil + file_envoy_extensions_transport_sockets_tap_v3_tap_proto_goTypes = nil + file_envoy_extensions_transport_sockets_tap_v3_tap_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/tap/v3/tap.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/tap/v3/tap.pb.validate.go new file mode 100644 index 0000000000000..479be920ea4a1 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/tap/v3/tap.pb.validate.go @@ -0,0 +1,213 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/transport_sockets/tap/v3/tap.proto + +package tapv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Tap 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 *Tap) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Tap 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 TapMultiError, or nil if none found. +func (m *Tap) ValidateAll() error { + return m.validate(true) +} + +func (m *Tap) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetCommonConfig() == nil { + err := TapValidationError{ + field: "CommonConfig", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetCommonConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TapValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TapValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCommonConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TapValidationError{ + field: "CommonConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetTransportSocket() == nil { + err := TapValidationError{ + field: "TransportSocket", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetTransportSocket()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TapValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TapValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TapValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return TapMultiError(errors) + } + return nil +} + +// TapMultiError is an error wrapping multiple validation errors returned by +// Tap.ValidateAll() if the designated constraints aren't met. +type TapMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TapMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TapMultiError) AllErrors() []error { return m } + +// TapValidationError is the validation error returned by Tap.Validate if the +// designated constraints aren't met. +type TapValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TapValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TapValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TapValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TapValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TapValidationError) ErrorName() string { return "TapValidationError" } + +// Error satisfies the builtin error interface +func (e TapValidationError) 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 %sTap.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TapValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TapValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.pb.go new file mode 100644 index 0000000000000..79b9956aa0ca0 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.pb.go @@ -0,0 +1,206 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.proto + +package tcp_statsv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for the TCP Stats transport socket wrapper, which wraps another transport socket for +// all communication, but emits stats about the underlying TCP connection. +// +// The stats are documented :ref:`here ` for listeners and +// :ref:`here ` for clusters. +// +// This transport socket is currently only supported on Linux. +type Config struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The underlying transport socket being wrapped. + TransportSocket *v3.TransportSocket `protobuf:"bytes,1,opt,name=transport_socket,json=transportSocket,proto3" json:"transport_socket,omitempty"` + // Period to update stats while the connection is open. If unset, updates only happen when the + // connection is closed. Stats are always updated one final time when the connection is closed. + UpdatePeriod *durationpb.Duration `protobuf:"bytes,2,opt,name=update_period,json=updatePeriod,proto3" json:"update_period,omitempty"` +} + +func (x *Config) Reset() { + *x = Config{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config) ProtoMessage() {} + +func (x *Config) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Config.ProtoReflect.Descriptor instead. +func (*Config) Descriptor() ([]byte, []int) { + return file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDescGZIP(), []int{0} +} + +func (x *Config) GetTransportSocket() *v3.TransportSocket { + if x != nil { + return x.TransportSocket + } + return nil +} + +func (x *Config) GetUpdatePeriod() *durationpb.Duration { + if x != nil { + return x.UpdatePeriod + } + return nil +} + +var File_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto protoreflect.FileDescriptor + +var file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDesc = []byte{ + 0x0a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x63, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2f, 0x76, + 0x33, 0x2f, 0x74, 0x63, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x63, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, + 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xb2, 0x01, 0x0a, 0x06, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5a, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, + 0x65, 0x74, 0x12, 0x4c, 0x0a, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, 0xfa, 0x42, 0x09, 0xaa, 0x01, 0x06, 0x32, 0x04, 0x10, 0xc0, + 0x84, 0x3d, 0x52, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, + 0x42, 0xbc, 0x01, 0x0a, 0x3d, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x63, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, + 0x76, 0x33, 0x42, 0x0d, 0x54, 0x63, 0x70, 0x53, 0x74, 0x61, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x62, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, + 0x63, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x63, 0x70, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x73, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDescOnce sync.Once + file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDescData = file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDesc +) + +func file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDescGZIP() []byte { + file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDescOnce.Do(func() { + file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDescData) + }) + return file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDescData +} + +var file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_goTypes = []interface{}{ + (*Config)(nil), // 0: envoy.extensions.transport_sockets.tcp_stats.v3.Config + (*v3.TransportSocket)(nil), // 1: envoy.config.core.v3.TransportSocket + (*durationpb.Duration)(nil), // 2: google.protobuf.Duration +} +var file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.transport_sockets.tcp_stats.v3.Config.transport_socket:type_name -> envoy.config.core.v3.TransportSocket + 2, // 1: envoy.extensions.transport_sockets.tcp_stats.v3.Config.update_period:type_name -> google.protobuf.Duration + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_init() } +func file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_init() { + if File_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Config); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_goTypes, + DependencyIndexes: file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_depIdxs, + MessageInfos: file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_msgTypes, + }.Build() + File_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto = out.File + file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_rawDesc = nil + file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_goTypes = nil + file_envoy_extensions_transport_sockets_tcp_stats_v3_tcp_stats_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.pb.validate.go new file mode 100644 index 0000000000000..aa9efc1919561 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.pb.validate.go @@ -0,0 +1,203 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.proto + +package tcp_statsv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Config 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 *Config) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Config 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 ConfigMultiError, or nil if none found. +func (m *Config) ValidateAll() error { + return m.validate(true) +} + +func (m *Config) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetTransportSocket() == nil { + err := ConfigValidationError{ + field: "TransportSocket", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetTransportSocket()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTransportSocket()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ConfigValidationError{ + field: "TransportSocket", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if d := m.GetUpdatePeriod(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = ConfigValidationError{ + field: "UpdatePeriod", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gte := time.Duration(0*time.Second + 1000000*time.Nanosecond) + + if dur < gte { + err := ConfigValidationError{ + field: "UpdatePeriod", + reason: "value must be greater than or equal to 1ms", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if len(errors) > 0 { + return ConfigMultiError(errors) + } + return nil +} + +// ConfigMultiError is an error wrapping multiple validation errors returned by +// Config.ValidateAll() if the designated constraints aren't met. +type ConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigMultiError) AllErrors() []error { return m } + +// ConfigValidationError is the validation error returned by Config.Validate if +// the designated constraints aren't met. +type ConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConfigValidationError) ErrorName() string { return "ConfigValidationError" } + +// Error satisfies the builtin error interface +func (e ConfigValidationError) 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 %sConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/udp_packet_writer/v3/udp_default_writer_factory.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/udp_packet_writer/v3/udp_default_writer_factory.pb.go new file mode 100644 index 0000000000000..3fd25a84c0394 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/udp_packet_writer/v3/udp_default_writer_factory.pb.go @@ -0,0 +1,159 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/udp_packet_writer/v3/udp_default_writer_factory.proto + +package udp_packet_writerv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for the default UDP packet writer factory which simply +// uses the kernel's sendmsg() to send UDP packets. +type UdpDefaultWriterFactory struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UdpDefaultWriterFactory) Reset() { + *x = UdpDefaultWriterFactory{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UdpDefaultWriterFactory) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UdpDefaultWriterFactory) ProtoMessage() {} + +func (x *UdpDefaultWriterFactory) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UdpDefaultWriterFactory.ProtoReflect.Descriptor instead. +func (*UdpDefaultWriterFactory) Descriptor() ([]byte, []int) { + return file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto protoreflect.FileDescriptor + +var file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_rawDesc = []byte{ + 0x0a, 0x46, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x77, 0x72, + 0x69, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x64, 0x70, 0x5f, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f, + 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x64, 0x70, 0x5f, 0x70, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x19, + 0x0a, 0x17, 0x55, 0x64, 0x70, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x57, 0x72, 0x69, 0x74, + 0x65, 0x72, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x42, 0xbf, 0x01, 0x0a, 0x33, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x64, 0x70, + 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x42, 0x1c, 0x55, 0x64, 0x70, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x57, 0x72, 0x69, + 0x74, 0x65, 0x72, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x60, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x75, 0x64, 0x70, 0x5f, 0x70, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, + 0x75, 0x64, 0x70, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, + 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_rawDescOnce sync.Once + file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_rawDescData = file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_rawDesc +) + +func file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_rawDescGZIP() []byte { + file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_rawDescOnce.Do(func() { + file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_rawDescData) + }) + return file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_rawDescData +} + +var file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_goTypes = []interface{}{ + (*UdpDefaultWriterFactory)(nil), // 0: envoy.extensions.udp_packet_writer.v3.UdpDefaultWriterFactory +} +var file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_init() } +func file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_init() { + if File_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UdpDefaultWriterFactory); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_goTypes, + DependencyIndexes: file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_depIdxs, + MessageInfos: file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_msgTypes, + }.Build() + File_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto = out.File + file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_rawDesc = nil + file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_goTypes = nil + file_envoy_extensions_udp_packet_writer_v3_udp_default_writer_factory_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/udp_packet_writer/v3/udp_default_writer_factory.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/udp_packet_writer/v3/udp_default_writer_factory.pb.validate.go new file mode 100644 index 0000000000000..05eed43dfab43 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/udp_packet_writer/v3/udp_default_writer_factory.pb.validate.go @@ -0,0 +1,137 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/udp_packet_writer/v3/udp_default_writer_factory.proto + +package udp_packet_writerv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on UdpDefaultWriterFactory 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 *UdpDefaultWriterFactory) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UdpDefaultWriterFactory 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 +// UdpDefaultWriterFactoryMultiError, or nil if none found. +func (m *UdpDefaultWriterFactory) ValidateAll() error { + return m.validate(true) +} + +func (m *UdpDefaultWriterFactory) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return UdpDefaultWriterFactoryMultiError(errors) + } + return nil +} + +// UdpDefaultWriterFactoryMultiError is an error wrapping multiple validation +// errors returned by UdpDefaultWriterFactory.ValidateAll() if the designated +// constraints aren't met. +type UdpDefaultWriterFactoryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UdpDefaultWriterFactoryMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UdpDefaultWriterFactoryMultiError) AllErrors() []error { return m } + +// UdpDefaultWriterFactoryValidationError is the validation error returned by +// UdpDefaultWriterFactory.Validate if the designated constraints aren't met. +type UdpDefaultWriterFactoryValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e UdpDefaultWriterFactoryValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e UdpDefaultWriterFactoryValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e UdpDefaultWriterFactoryValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e UdpDefaultWriterFactoryValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e UdpDefaultWriterFactoryValidationError) ErrorName() string { + return "UdpDefaultWriterFactoryValidationError" +} + +// Error satisfies the builtin error interface +func (e UdpDefaultWriterFactoryValidationError) 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 %sUdpDefaultWriterFactory.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = UdpDefaultWriterFactoryValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = UdpDefaultWriterFactoryValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/udp_packet_writer/v3/udp_gso_batch_writer_factory.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/udp_packet_writer/v3/udp_gso_batch_writer_factory.pb.go new file mode 100644 index 0000000000000..b26254e021672 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/udp_packet_writer/v3/udp_gso_batch_writer_factory.pb.go @@ -0,0 +1,158 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/udp_packet_writer/v3/udp_gso_batch_writer_factory.proto + +package udp_packet_writerv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for the UDP GSO batch packet writer factory. +type UdpGsoBatchWriterFactory struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UdpGsoBatchWriterFactory) Reset() { + *x = UdpGsoBatchWriterFactory{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UdpGsoBatchWriterFactory) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UdpGsoBatchWriterFactory) ProtoMessage() {} + +func (x *UdpGsoBatchWriterFactory) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UdpGsoBatchWriterFactory.ProtoReflect.Descriptor instead. +func (*UdpGsoBatchWriterFactory) Descriptor() ([]byte, []int) { + return file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto protoreflect.FileDescriptor + +var file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_rawDesc = []byte{ + 0x0a, 0x48, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x77, 0x72, + 0x69, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x64, 0x70, 0x5f, 0x67, 0x73, 0x6f, 0x5f, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x5f, 0x66, 0x61, 0x63, + 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x25, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x64, 0x70, + 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x1a, 0x0a, 0x18, 0x55, 0x64, 0x70, 0x47, 0x73, 0x6f, 0x42, 0x61, 0x74, 0x63, 0x68, 0x57, + 0x72, 0x69, 0x74, 0x65, 0x72, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x42, 0xc0, 0x01, 0x0a, + 0x33, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x75, 0x64, 0x70, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x42, 0x1d, 0x55, 0x64, 0x70, 0x47, 0x73, 0x6f, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x57, 0x72, 0x69, 0x74, 0x65, 0x72, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x60, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x75, + 0x64, 0x70, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, + 0x2f, 0x76, 0x33, 0x3b, 0x75, 0x64, 0x70, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x72, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_rawDescOnce sync.Once + file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_rawDescData = file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_rawDesc +) + +func file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_rawDescGZIP() []byte { + file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_rawDescOnce.Do(func() { + file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_rawDescData) + }) + return file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_rawDescData +} + +var file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_goTypes = []interface{}{ + (*UdpGsoBatchWriterFactory)(nil), // 0: envoy.extensions.udp_packet_writer.v3.UdpGsoBatchWriterFactory +} +var file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_init() } +func file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_init() { + if File_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UdpGsoBatchWriterFactory); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_goTypes, + DependencyIndexes: file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_depIdxs, + MessageInfos: file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_msgTypes, + }.Build() + File_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto = out.File + file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_rawDesc = nil + file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_goTypes = nil + file_envoy_extensions_udp_packet_writer_v3_udp_gso_batch_writer_factory_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/udp_packet_writer/v3/udp_gso_batch_writer_factory.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/udp_packet_writer/v3/udp_gso_batch_writer_factory.pb.validate.go new file mode 100644 index 0000000000000..03fe9ee92b3fb --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/udp_packet_writer/v3/udp_gso_batch_writer_factory.pb.validate.go @@ -0,0 +1,137 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/udp_packet_writer/v3/udp_gso_batch_writer_factory.proto + +package udp_packet_writerv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on UdpGsoBatchWriterFactory 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 *UdpGsoBatchWriterFactory) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UdpGsoBatchWriterFactory 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 +// UdpGsoBatchWriterFactoryMultiError, or nil if none found. +func (m *UdpGsoBatchWriterFactory) ValidateAll() error { + return m.validate(true) +} + +func (m *UdpGsoBatchWriterFactory) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return UdpGsoBatchWriterFactoryMultiError(errors) + } + return nil +} + +// UdpGsoBatchWriterFactoryMultiError is an error wrapping multiple validation +// errors returned by UdpGsoBatchWriterFactory.ValidateAll() if the designated +// constraints aren't met. +type UdpGsoBatchWriterFactoryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UdpGsoBatchWriterFactoryMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UdpGsoBatchWriterFactoryMultiError) AllErrors() []error { return m } + +// UdpGsoBatchWriterFactoryValidationError is the validation error returned by +// UdpGsoBatchWriterFactory.Validate if the designated constraints aren't met. +type UdpGsoBatchWriterFactoryValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e UdpGsoBatchWriterFactoryValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e UdpGsoBatchWriterFactoryValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e UdpGsoBatchWriterFactoryValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e UdpGsoBatchWriterFactoryValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e UdpGsoBatchWriterFactoryValidationError) ErrorName() string { + return "UdpGsoBatchWriterFactoryValidationError" +} + +// Error satisfies the builtin error interface +func (e UdpGsoBatchWriterFactoryValidationError) 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 %sUdpGsoBatchWriterFactory.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = UdpGsoBatchWriterFactoryValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = UdpGsoBatchWriterFactoryValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.pb.go new file mode 100644 index 0000000000000..0b16c82422e06 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.pb.go @@ -0,0 +1,161 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.proto + +package genericv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// A connection pool which forwards downstream HTTP as TCP or HTTP to upstream, +// based on CONNECT configuration. +// [#extension: envoy.upstreams.http.generic] +type GenericConnectionPoolProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GenericConnectionPoolProto) Reset() { + *x = GenericConnectionPoolProto{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenericConnectionPoolProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenericConnectionPoolProto) ProtoMessage() {} + +func (x *GenericConnectionPoolProto) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GenericConnectionPoolProto.ProtoReflect.Descriptor instead. +func (*GenericConnectionPoolProto) Descriptor() ([]byte, []int) { + return file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto protoreflect.FileDescriptor + +var file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_rawDesc = []byte{ + 0x0a, 0x48, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x70, 0x6f, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x69, 0x63, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1c, 0x0a, 0x1a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x42, 0xc7, 0x01, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2e, 0x76, 0x33, + 0x42, 0x24, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4f, 0x75, 0x74, 0x65, + 0x72, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, + 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x69, 0x63, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_rawDescOnce sync.Once + file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_rawDescData = file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_rawDesc +) + +func file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_rawDescGZIP() []byte { + file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_rawDescOnce.Do(func() { + file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_rawDescData) + }) + return file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_rawDescData +} + +var file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_goTypes = []interface{}{ + (*GenericConnectionPoolProto)(nil), // 0: envoy.extensions.upstreams.http.generic.v3.GenericConnectionPoolProto +} +var file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_init() } +func file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_init() { + if File_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenericConnectionPoolProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_goTypes, + DependencyIndexes: file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_depIdxs, + MessageInfos: file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_msgTypes, + }.Build() + File_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto = out.File + file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_rawDesc = nil + file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_goTypes = nil + file_envoy_extensions_upstreams_http_generic_v3_generic_connection_pool_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.pb.validate.go new file mode 100644 index 0000000000000..071f14fd827ba --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.pb.validate.go @@ -0,0 +1,137 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/upstreams/http/generic/v3/generic_connection_pool.proto + +package genericv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on GenericConnectionPoolProto 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 *GenericConnectionPoolProto) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GenericConnectionPoolProto 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 +// GenericConnectionPoolProtoMultiError, or nil if none found. +func (m *GenericConnectionPoolProto) ValidateAll() error { + return m.validate(true) +} + +func (m *GenericConnectionPoolProto) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return GenericConnectionPoolProtoMultiError(errors) + } + return nil +} + +// GenericConnectionPoolProtoMultiError is an error wrapping multiple +// validation errors returned by GenericConnectionPoolProto.ValidateAll() if +// the designated constraints aren't met. +type GenericConnectionPoolProtoMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GenericConnectionPoolProtoMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GenericConnectionPoolProtoMultiError) AllErrors() []error { return m } + +// GenericConnectionPoolProtoValidationError is the validation error returned +// by GenericConnectionPoolProto.Validate if the designated constraints aren't met. +type GenericConnectionPoolProtoValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GenericConnectionPoolProtoValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GenericConnectionPoolProtoValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GenericConnectionPoolProtoValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GenericConnectionPoolProtoValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GenericConnectionPoolProtoValidationError) ErrorName() string { + return "GenericConnectionPoolProtoValidationError" +} + +// Error satisfies the builtin error interface +func (e GenericConnectionPoolProtoValidationError) 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 %sGenericConnectionPoolProto.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GenericConnectionPoolProtoValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GenericConnectionPoolProtoValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.pb.go new file mode 100644 index 0000000000000..9da627404dcbf --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.pb.go @@ -0,0 +1,161 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.proto + +package genericv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// A connection pool which forwards downstream TCP as TCP or HTTP to upstream, +// based on CONNECT configuration. +// [#extension: envoy.upstreams.tcp.generic] +type GenericConnectionPoolProto struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GenericConnectionPoolProto) Reset() { + *x = GenericConnectionPoolProto{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenericConnectionPoolProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenericConnectionPoolProto) ProtoMessage() {} + +func (x *GenericConnectionPoolProto) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GenericConnectionPoolProto.ProtoReflect.Descriptor instead. +func (*GenericConnectionPoolProto) Descriptor() ([]byte, []int) { + return file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto protoreflect.FileDescriptor + +var file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_rawDesc = []byte{ + 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x74, 0x63, 0x70, + 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, + 0x6f, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x74, 0x63, 0x70, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, + 0x63, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x1c, 0x0a, 0x1a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x42, 0xc5, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x74, + 0x63, 0x70, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x24, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x50, 0x6f, 0x6f, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6c, + 0x61, 0x73, 0x73, 0x50, 0x01, 0x5a, 0x5a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x75, + 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x74, 0x63, 0x70, 0x2f, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x69, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_rawDescOnce sync.Once + file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_rawDescData = file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_rawDesc +) + +func file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_rawDescGZIP() []byte { + file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_rawDescOnce.Do(func() { + file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_rawDescData) + }) + return file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_rawDescData +} + +var file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_goTypes = []interface{}{ + (*GenericConnectionPoolProto)(nil), // 0: envoy.extensions.upstreams.tcp.generic.v3.GenericConnectionPoolProto +} +var file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_init() } +func file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_init() { + if File_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenericConnectionPoolProto); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_goTypes, + DependencyIndexes: file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_depIdxs, + MessageInfos: file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_msgTypes, + }.Build() + File_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto = out.File + file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_rawDesc = nil + file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_goTypes = nil + file_envoy_extensions_upstreams_tcp_generic_v3_generic_connection_pool_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.pb.validate.go new file mode 100644 index 0000000000000..fc3ed6c9461f3 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.pb.validate.go @@ -0,0 +1,137 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/upstreams/tcp/generic/v3/generic_connection_pool.proto + +package genericv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on GenericConnectionPoolProto 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 *GenericConnectionPoolProto) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GenericConnectionPoolProto 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 +// GenericConnectionPoolProtoMultiError, or nil if none found. +func (m *GenericConnectionPoolProto) ValidateAll() error { + return m.validate(true) +} + +func (m *GenericConnectionPoolProto) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return GenericConnectionPoolProtoMultiError(errors) + } + return nil +} + +// GenericConnectionPoolProtoMultiError is an error wrapping multiple +// validation errors returned by GenericConnectionPoolProto.ValidateAll() if +// the designated constraints aren't met. +type GenericConnectionPoolProtoMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GenericConnectionPoolProtoMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GenericConnectionPoolProtoMultiError) AllErrors() []error { return m } + +// GenericConnectionPoolProtoValidationError is the validation error returned +// by GenericConnectionPoolProto.Validate if the designated constraints aren't met. +type GenericConnectionPoolProtoValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GenericConnectionPoolProtoValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GenericConnectionPoolProtoValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GenericConnectionPoolProtoValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GenericConnectionPoolProtoValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GenericConnectionPoolProtoValidationError) ErrorName() string { + return "GenericConnectionPoolProtoValidationError" +} + +// Error satisfies the builtin error interface +func (e GenericConnectionPoolProtoValidationError) 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 %sGenericConnectionPoolProto.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GenericConnectionPoolProtoValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GenericConnectionPoolProtoValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/wasm/v3/wasm.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/wasm/v3/wasm.pb.go new file mode 100644 index 0000000000000..39d1e5adc3284 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/wasm/v3/wasm.pb.go @@ -0,0 +1,779 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/wasm/v3/wasm.proto + +package wasmv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for restricting Proxy-Wasm capabilities available to modules. +type CapabilityRestrictionConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The Proxy-Wasm capabilities which will be allowed. Capabilities are mapped by + // name. The “SanitizationConfig“ which each capability maps to is currently unimplemented and ignored, + // and so should be left empty. + // + // The capability names are given in the + // `Proxy-Wasm ABI `_. + // Additionally, the following WASI capabilities from + // `this list `_ + // are implemented and can be allowed: + // “fd_write“, “fd_read“, “fd_seek“, “fd_close“, “fd_fdstat_get“, “environ_get“, “environ_sizes_get“, + // “args_get“, “args_sizes_get“, “proc_exit“, “clock_time_get“, “random_get“. + AllowedCapabilities map[string]*SanitizationConfig `protobuf:"bytes,1,rep,name=allowed_capabilities,json=allowedCapabilities,proto3" json:"allowed_capabilities,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *CapabilityRestrictionConfig) Reset() { + *x = CapabilityRestrictionConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CapabilityRestrictionConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CapabilityRestrictionConfig) ProtoMessage() {} + +func (x *CapabilityRestrictionConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CapabilityRestrictionConfig.ProtoReflect.Descriptor instead. +func (*CapabilityRestrictionConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_wasm_v3_wasm_proto_rawDescGZIP(), []int{0} +} + +func (x *CapabilityRestrictionConfig) GetAllowedCapabilities() map[string]*SanitizationConfig { + if x != nil { + return x.AllowedCapabilities + } + return nil +} + +// Configuration for sanitization of inputs to an allowed capability. +// +// NOTE: This is currently unimplemented. +type SanitizationConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SanitizationConfig) Reset() { + *x = SanitizationConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SanitizationConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SanitizationConfig) ProtoMessage() {} + +func (x *SanitizationConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SanitizationConfig.ProtoReflect.Descriptor instead. +func (*SanitizationConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_wasm_v3_wasm_proto_rawDescGZIP(), []int{1} +} + +// Configuration for a Wasm VM. +// [#next-free-field: 8] +type VmConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // An ID which will be used along with a hash of the wasm code (or the name of the registered Null + // VM plugin) to determine which VM will be used for the plugin. All plugins which use the same + // “vm_id“ and code will use the same VM. May be left blank. Sharing a VM between plugins can + // reduce memory utilization and make sharing of data easier which may have security implications. + // [#comment: TODO: add ref for details.] + VmId string `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"` + // The Wasm runtime type. + // Available Wasm runtime types are registered as extensions. The following runtimes are included + // in Envoy code base: + // + // .. _extension_envoy.wasm.runtime.null: + // + // **envoy.wasm.runtime.null**: Null sandbox, the Wasm module must be compiled and linked into the + // Envoy binary. The registered name is given in the “code“ field as “inline_string“. + // + // .. _extension_envoy.wasm.runtime.v8: + // + // **envoy.wasm.runtime.v8**: `V8 `_-based WebAssembly runtime. + // + // .. _extension_envoy.wasm.runtime.wamr: + // + // **envoy.wasm.runtime.wamr**: `WAMR `_-based WebAssembly runtime. + // This runtime is not enabled in the official build. + // + // .. _extension_envoy.wasm.runtime.wavm: + // + // **envoy.wasm.runtime.wavm**: `WAVM `_-based WebAssembly runtime. + // This runtime is not enabled in the official build. + // + // .. _extension_envoy.wasm.runtime.wasmtime: + // + // **envoy.wasm.runtime.wasmtime**: `Wasmtime `_-based WebAssembly runtime. + // This runtime is not enabled in the official build. + // + // [#extension-category: envoy.wasm.runtime] + Runtime string `protobuf:"bytes,2,opt,name=runtime,proto3" json:"runtime,omitempty"` + // The Wasm code that Envoy will execute. + Code *v3.AsyncDataSource `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` + // The Wasm configuration used in initialization of a new VM + // (proxy_on_start). “google.protobuf.Struct“ is serialized as JSON before + // passing it to the plugin. “google.protobuf.BytesValue“ and + // “google.protobuf.StringValue“ are passed directly without the wrapper. + Configuration *anypb.Any `protobuf:"bytes,4,opt,name=configuration,proto3" json:"configuration,omitempty"` + // Allow the wasm file to include pre-compiled code on VMs which support it. + // Warning: this should only be enable for trusted sources as the precompiled code is not + // verified. + AllowPrecompiled bool `protobuf:"varint,5,opt,name=allow_precompiled,json=allowPrecompiled,proto3" json:"allow_precompiled,omitempty"` + // If true and the code needs to be remotely fetched and it is not in the cache then NACK the configuration + // update and do a background fetch to fill the cache, otherwise fetch the code asynchronously and enter + // warming state. + NackOnCodeCacheMiss bool `protobuf:"varint,6,opt,name=nack_on_code_cache_miss,json=nackOnCodeCacheMiss,proto3" json:"nack_on_code_cache_miss,omitempty"` + // Specifies environment variables to be injected to this VM which will be available through + // WASI's “environ_get“ and “environ_get_sizes“ system calls. Note that these functions are mostly implicitly + // called in your language's standard library, so you do not need to call them directly and you can access to env + // vars just like when you do on native platforms. + // Warning: Envoy rejects the configuration if there's conflict of key space. + EnvironmentVariables *EnvironmentVariables `protobuf:"bytes,7,opt,name=environment_variables,json=environmentVariables,proto3" json:"environment_variables,omitempty"` +} + +func (x *VmConfig) Reset() { + *x = VmConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VmConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VmConfig) ProtoMessage() {} + +func (x *VmConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VmConfig.ProtoReflect.Descriptor instead. +func (*VmConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_wasm_v3_wasm_proto_rawDescGZIP(), []int{2} +} + +func (x *VmConfig) GetVmId() string { + if x != nil { + return x.VmId + } + return "" +} + +func (x *VmConfig) GetRuntime() string { + if x != nil { + return x.Runtime + } + return "" +} + +func (x *VmConfig) GetCode() *v3.AsyncDataSource { + if x != nil { + return x.Code + } + return nil +} + +func (x *VmConfig) GetConfiguration() *anypb.Any { + if x != nil { + return x.Configuration + } + return nil +} + +func (x *VmConfig) GetAllowPrecompiled() bool { + if x != nil { + return x.AllowPrecompiled + } + return false +} + +func (x *VmConfig) GetNackOnCodeCacheMiss() bool { + if x != nil { + return x.NackOnCodeCacheMiss + } + return false +} + +func (x *VmConfig) GetEnvironmentVariables() *EnvironmentVariables { + if x != nil { + return x.EnvironmentVariables + } + return nil +} + +type EnvironmentVariables struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The keys of *Envoy's* environment variables exposed to this VM. In other words, if a key exists in Envoy's environment + // variables, then that key-value pair will be injected. Note that if a key does not exist, it will be ignored. + HostEnvKeys []string `protobuf:"bytes,1,rep,name=host_env_keys,json=hostEnvKeys,proto3" json:"host_env_keys,omitempty"` + // Explicitly given key-value pairs to be injected to this VM in the form of "KEY=VALUE". + KeyValues map[string]string `protobuf:"bytes,2,rep,name=key_values,json=keyValues,proto3" json:"key_values,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *EnvironmentVariables) Reset() { + *x = EnvironmentVariables{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EnvironmentVariables) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnvironmentVariables) ProtoMessage() {} + +func (x *EnvironmentVariables) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnvironmentVariables.ProtoReflect.Descriptor instead. +func (*EnvironmentVariables) Descriptor() ([]byte, []int) { + return file_envoy_extensions_wasm_v3_wasm_proto_rawDescGZIP(), []int{3} +} + +func (x *EnvironmentVariables) GetHostEnvKeys() []string { + if x != nil { + return x.HostEnvKeys + } + return nil +} + +func (x *EnvironmentVariables) GetKeyValues() map[string]string { + if x != nil { + return x.KeyValues + } + return nil +} + +// Base Configuration for Wasm Plugins e.g. filters and services. +// [#next-free-field: 7] +type PluginConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A unique name for a filters/services in a VM for use in identifying the filter/service if + // multiple filters/services are handled by the same “vm_id“ and “root_id“ and for + // logging/debugging. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // A unique ID for a set of filters/services in a VM which will share a RootContext and Contexts + // if applicable (e.g. an Wasm HttpFilter and an Wasm AccessLog). If left blank, all + // filters/services with a blank root_id with the same “vm_id“ will share Context(s). + RootId string `protobuf:"bytes,2,opt,name=root_id,json=rootId,proto3" json:"root_id,omitempty"` + // Configuration for finding or starting VM. + // + // Types that are assignable to Vm: + // + // *PluginConfig_VmConfig + Vm isPluginConfig_Vm `protobuf_oneof:"vm"` + // Filter/service configuration used to configure or reconfigure a plugin + // (“proxy_on_configure“). + // “google.protobuf.Struct“ is serialized as JSON before + // passing it to the plugin. “google.protobuf.BytesValue“ and + // “google.protobuf.StringValue“ are passed directly without the wrapper. + Configuration *anypb.Any `protobuf:"bytes,4,opt,name=configuration,proto3" json:"configuration,omitempty"` + // If there is a fatal error on the VM (e.g. exception, abort(), on_start or on_configure return false), + // then all plugins associated with the VM will either fail closed (by default), e.g. by returning an HTTP 503 error, + // or fail open (if 'fail_open' is set to true) by bypassing the filter. Note: when on_start or on_configure return false + // during xDS updates the xDS configuration will be rejected and when on_start or on_configuration return false on initial + // startup the proxy will not start. + FailOpen bool `protobuf:"varint,5,opt,name=fail_open,json=failOpen,proto3" json:"fail_open,omitempty"` + // Configuration for restricting Proxy-Wasm capabilities available to modules. + CapabilityRestrictionConfig *CapabilityRestrictionConfig `protobuf:"bytes,6,opt,name=capability_restriction_config,json=capabilityRestrictionConfig,proto3" json:"capability_restriction_config,omitempty"` +} + +func (x *PluginConfig) Reset() { + *x = PluginConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PluginConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PluginConfig) ProtoMessage() {} + +func (x *PluginConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PluginConfig.ProtoReflect.Descriptor instead. +func (*PluginConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_wasm_v3_wasm_proto_rawDescGZIP(), []int{4} +} + +func (x *PluginConfig) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PluginConfig) GetRootId() string { + if x != nil { + return x.RootId + } + return "" +} + +func (m *PluginConfig) GetVm() isPluginConfig_Vm { + if m != nil { + return m.Vm + } + return nil +} + +func (x *PluginConfig) GetVmConfig() *VmConfig { + if x, ok := x.GetVm().(*PluginConfig_VmConfig); ok { + return x.VmConfig + } + return nil +} + +func (x *PluginConfig) GetConfiguration() *anypb.Any { + if x != nil { + return x.Configuration + } + return nil +} + +func (x *PluginConfig) GetFailOpen() bool { + if x != nil { + return x.FailOpen + } + return false +} + +func (x *PluginConfig) GetCapabilityRestrictionConfig() *CapabilityRestrictionConfig { + if x != nil { + return x.CapabilityRestrictionConfig + } + return nil +} + +type isPluginConfig_Vm interface { + isPluginConfig_Vm() +} + +type PluginConfig_VmConfig struct { + VmConfig *VmConfig `protobuf:"bytes,3,opt,name=vm_config,json=vmConfig,proto3,oneof"` // TODO: add referential VM configurations. +} + +func (*PluginConfig_VmConfig) isPluginConfig_Vm() {} + +// WasmService is configured as a built-in “envoy.wasm_service“ :ref:`WasmService +// ` This opaque configuration will be used to create a Wasm Service. +type WasmService struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // General plugin configuration. + Config *PluginConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + // If true, create a single VM rather than creating one VM per worker. Such a singleton can + // not be used with filters. + Singleton bool `protobuf:"varint,2,opt,name=singleton,proto3" json:"singleton,omitempty"` +} + +func (x *WasmService) Reset() { + *x = WasmService{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WasmService) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WasmService) ProtoMessage() {} + +func (x *WasmService) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WasmService.ProtoReflect.Descriptor instead. +func (*WasmService) Descriptor() ([]byte, []int) { + return file_envoy_extensions_wasm_v3_wasm_proto_rawDescGZIP(), []int{5} +} + +func (x *WasmService) GetConfig() *PluginConfig { + if x != nil { + return x.Config + } + return nil +} + +func (x *WasmService) GetSingleton() bool { + if x != nil { + return x.Singleton + } + return false +} + +var File_envoy_extensions_wasm_v3_wasm_proto protoreflect.FileDescriptor + +var file_envoy_extensions_wasm_v3_wasm_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2f, 0x76, 0x33, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x1a, + 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 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, 0x1a, 0x1d, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 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, 0x97, 0x02, 0x0a, 0x1b, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x81, 0x01, 0x0a, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, + 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x61, + 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, + 0x64, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x43, 0x61, 0x70, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x74, 0x0a, 0x18, 0x41, 0x6c, 0x6c, 0x6f, 0x77, + 0x65, 0x64, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x42, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x2e, + 0x53, 0x61, 0x6e, 0x69, 0x74, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x14, 0x0a, + 0x12, 0x53, 0x61, 0x6e, 0x69, 0x74, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x22, 0x81, 0x03, 0x0a, 0x08, 0x56, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x13, 0x0a, 0x05, 0x76, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x76, 0x6d, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, + 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x73, + 0x79, 0x6e, 0x63, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x12, 0x3a, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 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, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x2b, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x17, + 0x6e, 0x61, 0x63, 0x6b, 0x5f, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x61, 0x63, + 0x68, 0x65, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x6e, + 0x61, 0x63, 0x6b, 0x4f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x4d, 0x69, + 0x73, 0x73, 0x12, 0x63, 0x0a, 0x15, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x76, + 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x52, 0x14, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x22, 0xd6, 0x01, 0x0a, 0x14, 0x45, 0x6e, 0x76, 0x69, + 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, + 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x65, 0x6e, 0x76, 0x5f, 0x6b, 0x65, 0x79, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x68, 0x6f, 0x73, 0x74, 0x45, 0x6e, 0x76, + 0x4b, 0x65, 0x79, 0x73, 0x12, 0x5c, 0x0a, 0x0a, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, + 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, + 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x1a, 0x3c, 0x0a, 0x0e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0xd8, 0x02, 0x0a, 0x0c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x74, 0x49, 0x64, 0x12, 0x41, + 0x0a, 0x09, 0x76, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x6d, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x08, 0x76, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x3a, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 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, 0x0d, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, + 0x09, 0x66, 0x61, 0x69, 0x6c, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x08, 0x66, 0x61, 0x69, 0x6c, 0x4f, 0x70, 0x65, 0x6e, 0x12, 0x79, 0x0a, 0x1d, 0x63, 0x61, + 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x61, 0x70, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x1b, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x04, 0x0a, 0x02, 0x76, 0x6d, 0x22, 0x6b, 0x0a, 0x0b, 0x57, + 0x61, 0x73, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, + 0x73, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, + 0x6e, 0x67, 0x6c, 0x65, 0x74, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, + 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x74, 0x6f, 0x6e, 0x42, 0x85, 0x01, 0x0a, 0x26, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x73, 0x6d, + 0x2e, 0x76, 0x33, 0x42, 0x09, 0x57, 0x61, 0x73, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x77, 0x61, 0x73, 0x6d, 0x2f, 0x76, + 0x33, 0x3b, 0x77, 0x61, 0x73, 0x6d, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_wasm_v3_wasm_proto_rawDescOnce sync.Once + file_envoy_extensions_wasm_v3_wasm_proto_rawDescData = file_envoy_extensions_wasm_v3_wasm_proto_rawDesc +) + +func file_envoy_extensions_wasm_v3_wasm_proto_rawDescGZIP() []byte { + file_envoy_extensions_wasm_v3_wasm_proto_rawDescOnce.Do(func() { + file_envoy_extensions_wasm_v3_wasm_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_wasm_v3_wasm_proto_rawDescData) + }) + return file_envoy_extensions_wasm_v3_wasm_proto_rawDescData +} + +var file_envoy_extensions_wasm_v3_wasm_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_envoy_extensions_wasm_v3_wasm_proto_goTypes = []interface{}{ + (*CapabilityRestrictionConfig)(nil), // 0: envoy.extensions.wasm.v3.CapabilityRestrictionConfig + (*SanitizationConfig)(nil), // 1: envoy.extensions.wasm.v3.SanitizationConfig + (*VmConfig)(nil), // 2: envoy.extensions.wasm.v3.VmConfig + (*EnvironmentVariables)(nil), // 3: envoy.extensions.wasm.v3.EnvironmentVariables + (*PluginConfig)(nil), // 4: envoy.extensions.wasm.v3.PluginConfig + (*WasmService)(nil), // 5: envoy.extensions.wasm.v3.WasmService + nil, // 6: envoy.extensions.wasm.v3.CapabilityRestrictionConfig.AllowedCapabilitiesEntry + nil, // 7: envoy.extensions.wasm.v3.EnvironmentVariables.KeyValuesEntry + (*v3.AsyncDataSource)(nil), // 8: envoy.config.core.v3.AsyncDataSource + (*anypb.Any)(nil), // 9: google.protobuf.Any +} +var file_envoy_extensions_wasm_v3_wasm_proto_depIdxs = []int32{ + 6, // 0: envoy.extensions.wasm.v3.CapabilityRestrictionConfig.allowed_capabilities:type_name -> envoy.extensions.wasm.v3.CapabilityRestrictionConfig.AllowedCapabilitiesEntry + 8, // 1: envoy.extensions.wasm.v3.VmConfig.code:type_name -> envoy.config.core.v3.AsyncDataSource + 9, // 2: envoy.extensions.wasm.v3.VmConfig.configuration:type_name -> google.protobuf.Any + 3, // 3: envoy.extensions.wasm.v3.VmConfig.environment_variables:type_name -> envoy.extensions.wasm.v3.EnvironmentVariables + 7, // 4: envoy.extensions.wasm.v3.EnvironmentVariables.key_values:type_name -> envoy.extensions.wasm.v3.EnvironmentVariables.KeyValuesEntry + 2, // 5: envoy.extensions.wasm.v3.PluginConfig.vm_config:type_name -> envoy.extensions.wasm.v3.VmConfig + 9, // 6: envoy.extensions.wasm.v3.PluginConfig.configuration:type_name -> google.protobuf.Any + 0, // 7: envoy.extensions.wasm.v3.PluginConfig.capability_restriction_config:type_name -> envoy.extensions.wasm.v3.CapabilityRestrictionConfig + 4, // 8: envoy.extensions.wasm.v3.WasmService.config:type_name -> envoy.extensions.wasm.v3.PluginConfig + 1, // 9: envoy.extensions.wasm.v3.CapabilityRestrictionConfig.AllowedCapabilitiesEntry.value:type_name -> envoy.extensions.wasm.v3.SanitizationConfig + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_wasm_v3_wasm_proto_init() } +func file_envoy_extensions_wasm_v3_wasm_proto_init() { + if File_envoy_extensions_wasm_v3_wasm_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CapabilityRestrictionConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SanitizationConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VmConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnvironmentVariables); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PluginConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WasmService); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_extensions_wasm_v3_wasm_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*PluginConfig_VmConfig)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_wasm_v3_wasm_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_wasm_v3_wasm_proto_goTypes, + DependencyIndexes: file_envoy_extensions_wasm_v3_wasm_proto_depIdxs, + MessageInfos: file_envoy_extensions_wasm_v3_wasm_proto_msgTypes, + }.Build() + File_envoy_extensions_wasm_v3_wasm_proto = out.File + file_envoy_extensions_wasm_v3_wasm_proto_rawDesc = nil + file_envoy_extensions_wasm_v3_wasm_proto_goTypes = nil + file_envoy_extensions_wasm_v3_wasm_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/wasm/v3/wasm.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/wasm/v3/wasm.pb.validate.go new file mode 100644 index 0000000000000..47838cfa63a22 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/wasm/v3/wasm.pb.validate.go @@ -0,0 +1,916 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/wasm/v3/wasm.proto + +package wasmv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on CapabilityRestrictionConfig 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 *CapabilityRestrictionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CapabilityRestrictionConfig 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 +// CapabilityRestrictionConfigMultiError, or nil if none found. +func (m *CapabilityRestrictionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *CapabilityRestrictionConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + { + sorted_keys := make([]string, len(m.GetAllowedCapabilities())) + i := 0 + for key := range m.GetAllowedCapabilities() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetAllowedCapabilities()[key] + _ = val + + // no validation rules for AllowedCapabilities[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CapabilityRestrictionConfigValidationError{ + field: fmt.Sprintf("AllowedCapabilities[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CapabilityRestrictionConfigValidationError{ + field: fmt.Sprintf("AllowedCapabilities[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CapabilityRestrictionConfigValidationError{ + field: fmt.Sprintf("AllowedCapabilities[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if len(errors) > 0 { + return CapabilityRestrictionConfigMultiError(errors) + } + return nil +} + +// CapabilityRestrictionConfigMultiError is an error wrapping multiple +// validation errors returned by CapabilityRestrictionConfig.ValidateAll() if +// the designated constraints aren't met. +type CapabilityRestrictionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CapabilityRestrictionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CapabilityRestrictionConfigMultiError) AllErrors() []error { return m } + +// CapabilityRestrictionConfigValidationError is the validation error returned +// by CapabilityRestrictionConfig.Validate if the designated constraints +// aren't met. +type CapabilityRestrictionConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CapabilityRestrictionConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CapabilityRestrictionConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CapabilityRestrictionConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CapabilityRestrictionConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CapabilityRestrictionConfigValidationError) ErrorName() string { + return "CapabilityRestrictionConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e CapabilityRestrictionConfigValidationError) 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 %sCapabilityRestrictionConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CapabilityRestrictionConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CapabilityRestrictionConfigValidationError{} + +// Validate checks the field values on SanitizationConfig 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 *SanitizationConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SanitizationConfig 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 +// SanitizationConfigMultiError, or nil if none found. +func (m *SanitizationConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *SanitizationConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return SanitizationConfigMultiError(errors) + } + return nil +} + +// SanitizationConfigMultiError is an error wrapping multiple validation errors +// returned by SanitizationConfig.ValidateAll() if the designated constraints +// aren't met. +type SanitizationConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SanitizationConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SanitizationConfigMultiError) AllErrors() []error { return m } + +// SanitizationConfigValidationError is the validation error returned by +// SanitizationConfig.Validate if the designated constraints aren't met. +type SanitizationConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SanitizationConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SanitizationConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SanitizationConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SanitizationConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SanitizationConfigValidationError) ErrorName() string { + return "SanitizationConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e SanitizationConfigValidationError) 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 %sSanitizationConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SanitizationConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SanitizationConfigValidationError{} + +// Validate checks the field values on VmConfig 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 *VmConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on VmConfig 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 VmConfigMultiError, or nil +// if none found. +func (m *VmConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *VmConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for VmId + + if utf8.RuneCountInString(m.GetRuntime()) < 1 { + err := VmConfigValidationError{ + field: "Runtime", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetCode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VmConfigValidationError{ + field: "Code", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VmConfigValidationError{ + field: "Code", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCode()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return VmConfigValidationError{ + field: "Code", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetConfiguration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VmConfigValidationError{ + field: "Configuration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VmConfigValidationError{ + field: "Configuration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfiguration()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return VmConfigValidationError{ + field: "Configuration", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for AllowPrecompiled + + // no validation rules for NackOnCodeCacheMiss + + if all { + switch v := interface{}(m.GetEnvironmentVariables()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VmConfigValidationError{ + field: "EnvironmentVariables", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VmConfigValidationError{ + field: "EnvironmentVariables", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnvironmentVariables()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return VmConfigValidationError{ + field: "EnvironmentVariables", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return VmConfigMultiError(errors) + } + return nil +} + +// VmConfigMultiError is an error wrapping multiple validation errors returned +// by VmConfig.ValidateAll() if the designated constraints aren't met. +type VmConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m VmConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m VmConfigMultiError) AllErrors() []error { return m } + +// VmConfigValidationError is the validation error returned by +// VmConfig.Validate if the designated constraints aren't met. +type VmConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e VmConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e VmConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e VmConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e VmConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e VmConfigValidationError) ErrorName() string { return "VmConfigValidationError" } + +// Error satisfies the builtin error interface +func (e VmConfigValidationError) 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 %sVmConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = VmConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = VmConfigValidationError{} + +// Validate checks the field values on EnvironmentVariables 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 *EnvironmentVariables) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on EnvironmentVariables 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 +// EnvironmentVariablesMultiError, or nil if none found. +func (m *EnvironmentVariables) ValidateAll() error { + return m.validate(true) +} + +func (m *EnvironmentVariables) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for KeyValues + + if len(errors) > 0 { + return EnvironmentVariablesMultiError(errors) + } + return nil +} + +// EnvironmentVariablesMultiError is an error wrapping multiple validation +// errors returned by EnvironmentVariables.ValidateAll() if the designated +// constraints aren't met. +type EnvironmentVariablesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EnvironmentVariablesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EnvironmentVariablesMultiError) AllErrors() []error { return m } + +// EnvironmentVariablesValidationError is the validation error returned by +// EnvironmentVariables.Validate if the designated constraints aren't met. +type EnvironmentVariablesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e EnvironmentVariablesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e EnvironmentVariablesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e EnvironmentVariablesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e EnvironmentVariablesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e EnvironmentVariablesValidationError) ErrorName() string { + return "EnvironmentVariablesValidationError" +} + +// Error satisfies the builtin error interface +func (e EnvironmentVariablesValidationError) 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 %sEnvironmentVariables.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = EnvironmentVariablesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = EnvironmentVariablesValidationError{} + +// Validate checks the field values on PluginConfig 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 *PluginConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PluginConfig 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 PluginConfigMultiError, or +// nil if none found. +func (m *PluginConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *PluginConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + // no validation rules for RootId + + if all { + switch v := interface{}(m.GetConfiguration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PluginConfigValidationError{ + field: "Configuration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PluginConfigValidationError{ + field: "Configuration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfiguration()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PluginConfigValidationError{ + field: "Configuration", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for FailOpen + + if all { + switch v := interface{}(m.GetCapabilityRestrictionConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PluginConfigValidationError{ + field: "CapabilityRestrictionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PluginConfigValidationError{ + field: "CapabilityRestrictionConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCapabilityRestrictionConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PluginConfigValidationError{ + field: "CapabilityRestrictionConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.Vm.(type) { + + case *PluginConfig_VmConfig: + + if all { + switch v := interface{}(m.GetVmConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PluginConfigValidationError{ + field: "VmConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PluginConfigValidationError{ + field: "VmConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetVmConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PluginConfigValidationError{ + field: "VmConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return PluginConfigMultiError(errors) + } + return nil +} + +// PluginConfigMultiError is an error wrapping multiple validation errors +// returned by PluginConfig.ValidateAll() if the designated constraints aren't met. +type PluginConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PluginConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PluginConfigMultiError) AllErrors() []error { return m } + +// PluginConfigValidationError is the validation error returned by +// PluginConfig.Validate if the designated constraints aren't met. +type PluginConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PluginConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PluginConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PluginConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PluginConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PluginConfigValidationError) ErrorName() string { return "PluginConfigValidationError" } + +// Error satisfies the builtin error interface +func (e PluginConfigValidationError) 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 %sPluginConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PluginConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PluginConfigValidationError{} + +// Validate checks the field values on WasmService 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 *WasmService) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on WasmService 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 WasmServiceMultiError, or +// nil if none found. +func (m *WasmService) ValidateAll() error { + return m.validate(true) +} + +func (m *WasmService) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WasmServiceValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WasmServiceValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return WasmServiceValidationError{ + field: "Config", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Singleton + + if len(errors) > 0 { + return WasmServiceMultiError(errors) + } + return nil +} + +// WasmServiceMultiError is an error wrapping multiple validation errors +// returned by WasmService.ValidateAll() if the designated constraints aren't met. +type WasmServiceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WasmServiceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WasmServiceMultiError) AllErrors() []error { return m } + +// WasmServiceValidationError is the validation error returned by +// WasmService.Validate if the designated constraints aren't met. +type WasmServiceValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e WasmServiceValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e WasmServiceValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e WasmServiceValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e WasmServiceValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e WasmServiceValidationError) ErrorName() string { return "WasmServiceValidationError" } + +// Error satisfies the builtin error interface +func (e WasmServiceValidationError) 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 %sWasmService.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = WasmServiceValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = WasmServiceValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/watchdog/profile_action/v3/profile_action.pb.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/watchdog/profile_action/v3/profile_action.pb.go new file mode 100644 index 0000000000000..f9b8725a6a1db --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/watchdog/profile_action/v3/profile_action.pb.go @@ -0,0 +1,204 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/extensions/watchdog/profile_action/v3/profile_action.proto + +package profile_actionv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configuration for the profile watchdog action. +type ProfileActionConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // How long the profile should last. If not set defaults to 5 seconds. + ProfileDuration *durationpb.Duration `protobuf:"bytes,1,opt,name=profile_duration,json=profileDuration,proto3" json:"profile_duration,omitempty"` + // File path to the directory to output profiles. + ProfilePath string `protobuf:"bytes,2,opt,name=profile_path,json=profilePath,proto3" json:"profile_path,omitempty"` + // Limits the max number of profiles that can be generated by this action + // over its lifetime to avoid filling the disk. + // If not set (i.e. it's 0), a default of 10 will be used. + MaxProfiles uint64 `protobuf:"varint,3,opt,name=max_profiles,json=maxProfiles,proto3" json:"max_profiles,omitempty"` +} + +func (x *ProfileActionConfig) Reset() { + *x = ProfileActionConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProfileActionConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProfileActionConfig) ProtoMessage() {} + +func (x *ProfileActionConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProfileActionConfig.ProtoReflect.Descriptor instead. +func (*ProfileActionConfig) Descriptor() ([]byte, []int) { + return file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDescGZIP(), []int{0} +} + +func (x *ProfileActionConfig) GetProfileDuration() *durationpb.Duration { + if x != nil { + return x.ProfileDuration + } + return nil +} + +func (x *ProfileActionConfig) GetProfilePath() string { + if x != nil { + return x.ProfilePath + } + return "" +} + +func (x *ProfileActionConfig) GetMaxProfiles() uint64 { + if x != nil { + return x.MaxProfiles + } + return 0 +} + +var File_envoy_extensions_watchdog_profile_action_v3_profile_action_proto protoreflect.FileDescriptor + +var file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDesc = []byte{ + 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x2e, 0x70, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x1a, + 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xaa, 0x01, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x44, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, + 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x73, 0x42, 0xbe, 0x01, 0x0a, 0x39, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x76, 0x33, 0x42, 0x12, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x63, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x70, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x76, 0x33, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDescOnce sync.Once + file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDescData = file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDesc +) + +func file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDescGZIP() []byte { + file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDescOnce.Do(func() { + file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDescData) + }) + return file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDescData +} + +var file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_goTypes = []interface{}{ + (*ProfileActionConfig)(nil), // 0: envoy.extensions.watchdog.profile_action.v3.ProfileActionConfig + (*durationpb.Duration)(nil), // 1: google.protobuf.Duration +} +var file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_depIdxs = []int32{ + 1, // 0: envoy.extensions.watchdog.profile_action.v3.ProfileActionConfig.profile_duration:type_name -> google.protobuf.Duration + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_init() } +func file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_init() { + if File_envoy_extensions_watchdog_profile_action_v3_profile_action_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProfileActionConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_goTypes, + DependencyIndexes: file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_depIdxs, + MessageInfos: file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_msgTypes, + }.Build() + File_envoy_extensions_watchdog_profile_action_v3_profile_action_proto = out.File + file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_rawDesc = nil + file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_goTypes = nil + file_envoy_extensions_watchdog_profile_action_v3_profile_action_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/extensions/watchdog/profile_action/v3/profile_action.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/extensions/watchdog/profile_action/v3/profile_action.pb.validate.go new file mode 100644 index 0000000000000..0f568673c3ad5 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/extensions/watchdog/profile_action/v3/profile_action.pb.validate.go @@ -0,0 +1,179 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/watchdog/profile_action/v3/profile_action.proto + +package profile_actionv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ProfileActionConfig 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 *ProfileActionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ProfileActionConfig 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 +// ProfileActionConfigMultiError, or nil if none found. +func (m *ProfileActionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *ProfileActionConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetProfileDuration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProfileActionConfigValidationError{ + field: "ProfileDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProfileActionConfigValidationError{ + field: "ProfileDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetProfileDuration()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProfileActionConfigValidationError{ + field: "ProfileDuration", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if utf8.RuneCountInString(m.GetProfilePath()) < 1 { + err := ProfileActionConfigValidationError{ + field: "ProfilePath", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for MaxProfiles + + if len(errors) > 0 { + return ProfileActionConfigMultiError(errors) + } + return nil +} + +// ProfileActionConfigMultiError is an error wrapping multiple validation +// errors returned by ProfileActionConfig.ValidateAll() if the designated +// constraints aren't met. +type ProfileActionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ProfileActionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ProfileActionConfigMultiError) AllErrors() []error { return m } + +// ProfileActionConfigValidationError is the validation error returned by +// ProfileActionConfig.Validate if the designated constraints aren't met. +type ProfileActionConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ProfileActionConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ProfileActionConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ProfileActionConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ProfileActionConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ProfileActionConfigValidationError) ErrorName() string { + return "ProfileActionConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e ProfileActionConfigValidationError) 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 %sProfileActionConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ProfileActionConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ProfileActionConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/accesslog/v3/als.pb.go b/vendor/github.com/cilium/proxy/go/envoy/service/accesslog/v3/als.pb.go new file mode 100644 index 0000000000000..eeaa5a541e23e --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/accesslog/v3/als.pb.go @@ -0,0 +1,684 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/service/accesslog/v3/als.proto + +package accesslogv3 + +import ( + context "context" + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + v31 "github.com/cilium/proxy/go/envoy/data/accesslog/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Empty response for the StreamAccessLogs API. Will never be sent. See below. +type StreamAccessLogsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StreamAccessLogsResponse) Reset() { + *x = StreamAccessLogsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_accesslog_v3_als_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamAccessLogsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamAccessLogsResponse) ProtoMessage() {} + +func (x *StreamAccessLogsResponse) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_accesslog_v3_als_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamAccessLogsResponse.ProtoReflect.Descriptor instead. +func (*StreamAccessLogsResponse) Descriptor() ([]byte, []int) { + return file_envoy_service_accesslog_v3_als_proto_rawDescGZIP(), []int{0} +} + +// Stream message for the StreamAccessLogs API. Envoy will open a stream to the server and stream +// access logs without ever expecting a response. +type StreamAccessLogsMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier data that will only be sent in the first message on the stream. This is effectively + // structured metadata and is a performance optimization. + Identifier *StreamAccessLogsMessage_Identifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` + // Batches of log entries of a single type. Generally speaking, a given stream should only + // ever include one type of log entry. + // + // Types that are assignable to LogEntries: + // + // *StreamAccessLogsMessage_HttpLogs + // *StreamAccessLogsMessage_TcpLogs + LogEntries isStreamAccessLogsMessage_LogEntries `protobuf_oneof:"log_entries"` +} + +func (x *StreamAccessLogsMessage) Reset() { + *x = StreamAccessLogsMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_accesslog_v3_als_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamAccessLogsMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamAccessLogsMessage) ProtoMessage() {} + +func (x *StreamAccessLogsMessage) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_accesslog_v3_als_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamAccessLogsMessage.ProtoReflect.Descriptor instead. +func (*StreamAccessLogsMessage) Descriptor() ([]byte, []int) { + return file_envoy_service_accesslog_v3_als_proto_rawDescGZIP(), []int{1} +} + +func (x *StreamAccessLogsMessage) GetIdentifier() *StreamAccessLogsMessage_Identifier { + if x != nil { + return x.Identifier + } + return nil +} + +func (m *StreamAccessLogsMessage) GetLogEntries() isStreamAccessLogsMessage_LogEntries { + if m != nil { + return m.LogEntries + } + return nil +} + +func (x *StreamAccessLogsMessage) GetHttpLogs() *StreamAccessLogsMessage_HTTPAccessLogEntries { + if x, ok := x.GetLogEntries().(*StreamAccessLogsMessage_HttpLogs); ok { + return x.HttpLogs + } + return nil +} + +func (x *StreamAccessLogsMessage) GetTcpLogs() *StreamAccessLogsMessage_TCPAccessLogEntries { + if x, ok := x.GetLogEntries().(*StreamAccessLogsMessage_TcpLogs); ok { + return x.TcpLogs + } + return nil +} + +type isStreamAccessLogsMessage_LogEntries interface { + isStreamAccessLogsMessage_LogEntries() +} + +type StreamAccessLogsMessage_HttpLogs struct { + HttpLogs *StreamAccessLogsMessage_HTTPAccessLogEntries `protobuf:"bytes,2,opt,name=http_logs,json=httpLogs,proto3,oneof"` +} + +type StreamAccessLogsMessage_TcpLogs struct { + TcpLogs *StreamAccessLogsMessage_TCPAccessLogEntries `protobuf:"bytes,3,opt,name=tcp_logs,json=tcpLogs,proto3,oneof"` +} + +func (*StreamAccessLogsMessage_HttpLogs) isStreamAccessLogsMessage_LogEntries() {} + +func (*StreamAccessLogsMessage_TcpLogs) isStreamAccessLogsMessage_LogEntries() {} + +type StreamAccessLogsMessage_Identifier struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The node sending the access log messages over the stream. + Node *v3.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + // The friendly name of the log configured in :ref:`CommonGrpcAccessLogConfig + // `. + LogName string `protobuf:"bytes,2,opt,name=log_name,json=logName,proto3" json:"log_name,omitempty"` +} + +func (x *StreamAccessLogsMessage_Identifier) Reset() { + *x = StreamAccessLogsMessage_Identifier{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_accesslog_v3_als_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamAccessLogsMessage_Identifier) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamAccessLogsMessage_Identifier) ProtoMessage() {} + +func (x *StreamAccessLogsMessage_Identifier) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_accesslog_v3_als_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamAccessLogsMessage_Identifier.ProtoReflect.Descriptor instead. +func (*StreamAccessLogsMessage_Identifier) Descriptor() ([]byte, []int) { + return file_envoy_service_accesslog_v3_als_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *StreamAccessLogsMessage_Identifier) GetNode() *v3.Node { + if x != nil { + return x.Node + } + return nil +} + +func (x *StreamAccessLogsMessage_Identifier) GetLogName() string { + if x != nil { + return x.LogName + } + return "" +} + +// Wrapper for batches of HTTP access log entries. +type StreamAccessLogsMessage_HTTPAccessLogEntries struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LogEntry []*v31.HTTPAccessLogEntry `protobuf:"bytes,1,rep,name=log_entry,json=logEntry,proto3" json:"log_entry,omitempty"` +} + +func (x *StreamAccessLogsMessage_HTTPAccessLogEntries) Reset() { + *x = StreamAccessLogsMessage_HTTPAccessLogEntries{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_accesslog_v3_als_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamAccessLogsMessage_HTTPAccessLogEntries) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamAccessLogsMessage_HTTPAccessLogEntries) ProtoMessage() {} + +func (x *StreamAccessLogsMessage_HTTPAccessLogEntries) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_accesslog_v3_als_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamAccessLogsMessage_HTTPAccessLogEntries.ProtoReflect.Descriptor instead. +func (*StreamAccessLogsMessage_HTTPAccessLogEntries) Descriptor() ([]byte, []int) { + return file_envoy_service_accesslog_v3_als_proto_rawDescGZIP(), []int{1, 1} +} + +func (x *StreamAccessLogsMessage_HTTPAccessLogEntries) GetLogEntry() []*v31.HTTPAccessLogEntry { + if x != nil { + return x.LogEntry + } + return nil +} + +// Wrapper for batches of TCP access log entries. +type StreamAccessLogsMessage_TCPAccessLogEntries struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LogEntry []*v31.TCPAccessLogEntry `protobuf:"bytes,1,rep,name=log_entry,json=logEntry,proto3" json:"log_entry,omitempty"` +} + +func (x *StreamAccessLogsMessage_TCPAccessLogEntries) Reset() { + *x = StreamAccessLogsMessage_TCPAccessLogEntries{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_accesslog_v3_als_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamAccessLogsMessage_TCPAccessLogEntries) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamAccessLogsMessage_TCPAccessLogEntries) ProtoMessage() {} + +func (x *StreamAccessLogsMessage_TCPAccessLogEntries) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_accesslog_v3_als_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamAccessLogsMessage_TCPAccessLogEntries.ProtoReflect.Descriptor instead. +func (*StreamAccessLogsMessage_TCPAccessLogEntries) Descriptor() ([]byte, []int) { + return file_envoy_service_accesslog_v3_als_proto_rawDescGZIP(), []int{1, 2} +} + +func (x *StreamAccessLogsMessage_TCPAccessLogEntries) GetLogEntry() []*v31.TCPAccessLogEntry { + if x != nil { + return x.LogEntry + } + return nil +} + +var File_envoy_service_accesslog_v3_als_proto protoreflect.FileDescriptor + +var file_envoy_service_accesslog_v3_als_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x6c, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, + 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0x56, 0x0a, 0x18, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x3a, 0x3a, 0x9a, 0xc5, 0x88, 0x1e, 0x35, 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0xc1, 0x07, 0x0a, 0x17, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x4c, 0x6f, 0x67, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x5e, 0x0a, 0x0a, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, + 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x67, 0x0a, 0x09, 0x68, + 0x74, 0x74, 0x70, 0x5f, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, + 0x67, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x48, 0x00, 0x52, 0x08, 0x68, 0x74, 0x74, 0x70, + 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x64, 0x0a, 0x08, 0x74, 0x63, 0x70, 0x5f, 0x6c, 0x6f, 0x67, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, + 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x4c, 0x6f, 0x67, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x54, 0x43, 0x50, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x48, + 0x00, 0x52, 0x07, 0x74, 0x63, 0x70, 0x4c, 0x6f, 0x67, 0x73, 0x1a, 0xb0, 0x01, 0x0a, 0x0a, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x04, 0x6e, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, + 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, + 0x6f, 0x64, 0x65, 0x12, 0x22, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, + 0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x44, 0x9a, 0xc5, 0x88, 0x1e, 0x3f, 0x0a, 0x3d, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x1a, 0xba, 0x01, + 0x0a, 0x14, 0x48, 0x54, 0x54, 0x50, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x45, + 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, + 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, + 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x3a, 0x4e, 0x9a, 0xc5, 0x88, 0x1e, + 0x49, 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x1a, 0xb7, 0x01, 0x0a, 0x13, 0x54, + 0x43, 0x50, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x69, + 0x65, 0x73, 0x12, 0x51, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, + 0x54, 0x43, 0x50, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x6c, 0x6f, 0x67, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x3a, 0x4d, 0x9a, 0xc5, 0x88, 0x1e, 0x48, 0x0a, 0x46, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x2e, 0x54, 0x43, 0x50, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, 0x32, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, + 0x12, 0x0a, 0x0b, 0x6c, 0x6f, 0x67, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x03, + 0xf8, 0x42, 0x01, 0x32, 0x96, 0x01, 0x0a, 0x10, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, + 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x10, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x33, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x1a, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x42, 0x90, 0x01, 0x0a, + 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x41, 0x6c, 0x73, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, + 0x6f, 0x67, 0x76, 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_service_accesslog_v3_als_proto_rawDescOnce sync.Once + file_envoy_service_accesslog_v3_als_proto_rawDescData = file_envoy_service_accesslog_v3_als_proto_rawDesc +) + +func file_envoy_service_accesslog_v3_als_proto_rawDescGZIP() []byte { + file_envoy_service_accesslog_v3_als_proto_rawDescOnce.Do(func() { + file_envoy_service_accesslog_v3_als_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_accesslog_v3_als_proto_rawDescData) + }) + return file_envoy_service_accesslog_v3_als_proto_rawDescData +} + +var file_envoy_service_accesslog_v3_als_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_envoy_service_accesslog_v3_als_proto_goTypes = []interface{}{ + (*StreamAccessLogsResponse)(nil), // 0: envoy.service.accesslog.v3.StreamAccessLogsResponse + (*StreamAccessLogsMessage)(nil), // 1: envoy.service.accesslog.v3.StreamAccessLogsMessage + (*StreamAccessLogsMessage_Identifier)(nil), // 2: envoy.service.accesslog.v3.StreamAccessLogsMessage.Identifier + (*StreamAccessLogsMessage_HTTPAccessLogEntries)(nil), // 3: envoy.service.accesslog.v3.StreamAccessLogsMessage.HTTPAccessLogEntries + (*StreamAccessLogsMessage_TCPAccessLogEntries)(nil), // 4: envoy.service.accesslog.v3.StreamAccessLogsMessage.TCPAccessLogEntries + (*v3.Node)(nil), // 5: envoy.config.core.v3.Node + (*v31.HTTPAccessLogEntry)(nil), // 6: envoy.data.accesslog.v3.HTTPAccessLogEntry + (*v31.TCPAccessLogEntry)(nil), // 7: envoy.data.accesslog.v3.TCPAccessLogEntry +} +var file_envoy_service_accesslog_v3_als_proto_depIdxs = []int32{ + 2, // 0: envoy.service.accesslog.v3.StreamAccessLogsMessage.identifier:type_name -> envoy.service.accesslog.v3.StreamAccessLogsMessage.Identifier + 3, // 1: envoy.service.accesslog.v3.StreamAccessLogsMessage.http_logs:type_name -> envoy.service.accesslog.v3.StreamAccessLogsMessage.HTTPAccessLogEntries + 4, // 2: envoy.service.accesslog.v3.StreamAccessLogsMessage.tcp_logs:type_name -> envoy.service.accesslog.v3.StreamAccessLogsMessage.TCPAccessLogEntries + 5, // 3: envoy.service.accesslog.v3.StreamAccessLogsMessage.Identifier.node:type_name -> envoy.config.core.v3.Node + 6, // 4: envoy.service.accesslog.v3.StreamAccessLogsMessage.HTTPAccessLogEntries.log_entry:type_name -> envoy.data.accesslog.v3.HTTPAccessLogEntry + 7, // 5: envoy.service.accesslog.v3.StreamAccessLogsMessage.TCPAccessLogEntries.log_entry:type_name -> envoy.data.accesslog.v3.TCPAccessLogEntry + 1, // 6: envoy.service.accesslog.v3.AccessLogService.StreamAccessLogs:input_type -> envoy.service.accesslog.v3.StreamAccessLogsMessage + 0, // 7: envoy.service.accesslog.v3.AccessLogService.StreamAccessLogs:output_type -> envoy.service.accesslog.v3.StreamAccessLogsResponse + 7, // [7:8] is the sub-list for method output_type + 6, // [6:7] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_envoy_service_accesslog_v3_als_proto_init() } +func file_envoy_service_accesslog_v3_als_proto_init() { + if File_envoy_service_accesslog_v3_als_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_service_accesslog_v3_als_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamAccessLogsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_accesslog_v3_als_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamAccessLogsMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_accesslog_v3_als_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamAccessLogsMessage_Identifier); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_accesslog_v3_als_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamAccessLogsMessage_HTTPAccessLogEntries); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_accesslog_v3_als_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamAccessLogsMessage_TCPAccessLogEntries); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_service_accesslog_v3_als_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*StreamAccessLogsMessage_HttpLogs)(nil), + (*StreamAccessLogsMessage_TcpLogs)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_service_accesslog_v3_als_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_envoy_service_accesslog_v3_als_proto_goTypes, + DependencyIndexes: file_envoy_service_accesslog_v3_als_proto_depIdxs, + MessageInfos: file_envoy_service_accesslog_v3_als_proto_msgTypes, + }.Build() + File_envoy_service_accesslog_v3_als_proto = out.File + file_envoy_service_accesslog_v3_als_proto_rawDesc = nil + file_envoy_service_accesslog_v3_als_proto_goTypes = nil + file_envoy_service_accesslog_v3_als_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// AccessLogServiceClient is the client API for AccessLogService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type AccessLogServiceClient interface { + // Envoy will connect and send StreamAccessLogsMessage messages forever. It does not expect any + // response to be sent as nothing would be done in the case of failure. The server should + // disconnect if it expects Envoy to reconnect. In the future we may decide to add a different + // API for "critical" access logs in which Envoy will buffer access logs for some period of time + // until it gets an ACK so it could then retry. This API is designed for high throughput with the + // expectation that it might be lossy. + StreamAccessLogs(ctx context.Context, opts ...grpc.CallOption) (AccessLogService_StreamAccessLogsClient, error) +} + +type accessLogServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAccessLogServiceClient(cc grpc.ClientConnInterface) AccessLogServiceClient { + return &accessLogServiceClient{cc} +} + +func (c *accessLogServiceClient) StreamAccessLogs(ctx context.Context, opts ...grpc.CallOption) (AccessLogService_StreamAccessLogsClient, error) { + stream, err := c.cc.NewStream(ctx, &_AccessLogService_serviceDesc.Streams[0], "/envoy.service.accesslog.v3.AccessLogService/StreamAccessLogs", opts...) + if err != nil { + return nil, err + } + x := &accessLogServiceStreamAccessLogsClient{stream} + return x, nil +} + +type AccessLogService_StreamAccessLogsClient interface { + Send(*StreamAccessLogsMessage) error + CloseAndRecv() (*StreamAccessLogsResponse, error) + grpc.ClientStream +} + +type accessLogServiceStreamAccessLogsClient struct { + grpc.ClientStream +} + +func (x *accessLogServiceStreamAccessLogsClient) Send(m *StreamAccessLogsMessage) error { + return x.ClientStream.SendMsg(m) +} + +func (x *accessLogServiceStreamAccessLogsClient) CloseAndRecv() (*StreamAccessLogsResponse, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(StreamAccessLogsResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// AccessLogServiceServer is the server API for AccessLogService service. +type AccessLogServiceServer interface { + // Envoy will connect and send StreamAccessLogsMessage messages forever. It does not expect any + // response to be sent as nothing would be done in the case of failure. The server should + // disconnect if it expects Envoy to reconnect. In the future we may decide to add a different + // API for "critical" access logs in which Envoy will buffer access logs for some period of time + // until it gets an ACK so it could then retry. This API is designed for high throughput with the + // expectation that it might be lossy. + StreamAccessLogs(AccessLogService_StreamAccessLogsServer) error +} + +// UnimplementedAccessLogServiceServer can be embedded to have forward compatible implementations. +type UnimplementedAccessLogServiceServer struct { +} + +func (*UnimplementedAccessLogServiceServer) StreamAccessLogs(AccessLogService_StreamAccessLogsServer) error { + return status.Errorf(codes.Unimplemented, "method StreamAccessLogs not implemented") +} + +func RegisterAccessLogServiceServer(s *grpc.Server, srv AccessLogServiceServer) { + s.RegisterService(&_AccessLogService_serviceDesc, srv) +} + +func _AccessLogService_StreamAccessLogs_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(AccessLogServiceServer).StreamAccessLogs(&accessLogServiceStreamAccessLogsServer{stream}) +} + +type AccessLogService_StreamAccessLogsServer interface { + SendAndClose(*StreamAccessLogsResponse) error + Recv() (*StreamAccessLogsMessage, error) + grpc.ServerStream +} + +type accessLogServiceStreamAccessLogsServer struct { + grpc.ServerStream +} + +func (x *accessLogServiceStreamAccessLogsServer) SendAndClose(m *StreamAccessLogsResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *accessLogServiceStreamAccessLogsServer) Recv() (*StreamAccessLogsMessage, error) { + m := new(StreamAccessLogsMessage) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +var _AccessLogService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "envoy.service.accesslog.v3.AccessLogService", + HandlerType: (*AccessLogServiceServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamAccessLogs", + Handler: _AccessLogService_StreamAccessLogs_Handler, + ClientStreams: true, + }, + }, + Metadata: "envoy/service/accesslog/v3/als.proto", +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/accesslog/v3/als.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/service/accesslog/v3/als.pb.validate.go new file mode 100644 index 0000000000000..854fb020e3798 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/accesslog/v3/als.pb.validate.go @@ -0,0 +1,799 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/service/accesslog/v3/als.proto + +package accesslogv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on StreamAccessLogsResponse 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 *StreamAccessLogsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamAccessLogsResponse 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 +// StreamAccessLogsResponseMultiError, or nil if none found. +func (m *StreamAccessLogsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamAccessLogsResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return StreamAccessLogsResponseMultiError(errors) + } + return nil +} + +// StreamAccessLogsResponseMultiError is an error wrapping multiple validation +// errors returned by StreamAccessLogsResponse.ValidateAll() if the designated +// constraints aren't met. +type StreamAccessLogsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamAccessLogsResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamAccessLogsResponseMultiError) AllErrors() []error { return m } + +// StreamAccessLogsResponseValidationError is the validation error returned by +// StreamAccessLogsResponse.Validate if the designated constraints aren't met. +type StreamAccessLogsResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StreamAccessLogsResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StreamAccessLogsResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StreamAccessLogsResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StreamAccessLogsResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StreamAccessLogsResponseValidationError) ErrorName() string { + return "StreamAccessLogsResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e StreamAccessLogsResponseValidationError) 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 %sStreamAccessLogsResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StreamAccessLogsResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StreamAccessLogsResponseValidationError{} + +// Validate checks the field values on StreamAccessLogsMessage 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 *StreamAccessLogsMessage) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamAccessLogsMessage 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 +// StreamAccessLogsMessageMultiError, or nil if none found. +func (m *StreamAccessLogsMessage) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamAccessLogsMessage) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetIdentifier()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamAccessLogsMessageValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamAccessLogsMessageValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StreamAccessLogsMessageValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.LogEntries.(type) { + + case *StreamAccessLogsMessage_HttpLogs: + + if all { + switch v := interface{}(m.GetHttpLogs()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamAccessLogsMessageValidationError{ + field: "HttpLogs", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamAccessLogsMessageValidationError{ + field: "HttpLogs", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttpLogs()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StreamAccessLogsMessageValidationError{ + field: "HttpLogs", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *StreamAccessLogsMessage_TcpLogs: + + if all { + switch v := interface{}(m.GetTcpLogs()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamAccessLogsMessageValidationError{ + field: "TcpLogs", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamAccessLogsMessageValidationError{ + field: "TcpLogs", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTcpLogs()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StreamAccessLogsMessageValidationError{ + field: "TcpLogs", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := StreamAccessLogsMessageValidationError{ + field: "LogEntries", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return StreamAccessLogsMessageMultiError(errors) + } + return nil +} + +// StreamAccessLogsMessageMultiError is an error wrapping multiple validation +// errors returned by StreamAccessLogsMessage.ValidateAll() if the designated +// constraints aren't met. +type StreamAccessLogsMessageMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamAccessLogsMessageMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamAccessLogsMessageMultiError) AllErrors() []error { return m } + +// StreamAccessLogsMessageValidationError is the validation error returned by +// StreamAccessLogsMessage.Validate if the designated constraints aren't met. +type StreamAccessLogsMessageValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StreamAccessLogsMessageValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StreamAccessLogsMessageValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StreamAccessLogsMessageValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StreamAccessLogsMessageValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StreamAccessLogsMessageValidationError) ErrorName() string { + return "StreamAccessLogsMessageValidationError" +} + +// Error satisfies the builtin error interface +func (e StreamAccessLogsMessageValidationError) 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 %sStreamAccessLogsMessage.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StreamAccessLogsMessageValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StreamAccessLogsMessageValidationError{} + +// Validate checks the field values on StreamAccessLogsMessage_Identifier 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 *StreamAccessLogsMessage_Identifier) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamAccessLogsMessage_Identifier +// 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 +// StreamAccessLogsMessage_IdentifierMultiError, or nil if none found. +func (m *StreamAccessLogsMessage_Identifier) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamAccessLogsMessage_Identifier) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetNode() == nil { + err := StreamAccessLogsMessage_IdentifierValidationError{ + field: "Node", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamAccessLogsMessage_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamAccessLogsMessage_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StreamAccessLogsMessage_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if utf8.RuneCountInString(m.GetLogName()) < 1 { + err := StreamAccessLogsMessage_IdentifierValidationError{ + field: "LogName", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return StreamAccessLogsMessage_IdentifierMultiError(errors) + } + return nil +} + +// StreamAccessLogsMessage_IdentifierMultiError is an error wrapping multiple +// validation errors returned by +// StreamAccessLogsMessage_Identifier.ValidateAll() if the designated +// constraints aren't met. +type StreamAccessLogsMessage_IdentifierMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamAccessLogsMessage_IdentifierMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamAccessLogsMessage_IdentifierMultiError) AllErrors() []error { return m } + +// StreamAccessLogsMessage_IdentifierValidationError is the validation error +// returned by StreamAccessLogsMessage_Identifier.Validate if the designated +// constraints aren't met. +type StreamAccessLogsMessage_IdentifierValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StreamAccessLogsMessage_IdentifierValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StreamAccessLogsMessage_IdentifierValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StreamAccessLogsMessage_IdentifierValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StreamAccessLogsMessage_IdentifierValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StreamAccessLogsMessage_IdentifierValidationError) ErrorName() string { + return "StreamAccessLogsMessage_IdentifierValidationError" +} + +// Error satisfies the builtin error interface +func (e StreamAccessLogsMessage_IdentifierValidationError) 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 %sStreamAccessLogsMessage_Identifier.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StreamAccessLogsMessage_IdentifierValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StreamAccessLogsMessage_IdentifierValidationError{} + +// Validate checks the field values on +// StreamAccessLogsMessage_HTTPAccessLogEntries 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 *StreamAccessLogsMessage_HTTPAccessLogEntries) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// StreamAccessLogsMessage_HTTPAccessLogEntries 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 +// StreamAccessLogsMessage_HTTPAccessLogEntriesMultiError, or nil if none found. +func (m *StreamAccessLogsMessage_HTTPAccessLogEntries) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamAccessLogsMessage_HTTPAccessLogEntries) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetLogEntry()) < 1 { + err := StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError{ + field: "LogEntry", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetLogEntry() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError{ + field: fmt.Sprintf("LogEntry[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError{ + field: fmt.Sprintf("LogEntry[%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 StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError{ + field: fmt.Sprintf("LogEntry[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return StreamAccessLogsMessage_HTTPAccessLogEntriesMultiError(errors) + } + return nil +} + +// StreamAccessLogsMessage_HTTPAccessLogEntriesMultiError is an error wrapping +// multiple validation errors returned by +// StreamAccessLogsMessage_HTTPAccessLogEntries.ValidateAll() if the +// designated constraints aren't met. +type StreamAccessLogsMessage_HTTPAccessLogEntriesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamAccessLogsMessage_HTTPAccessLogEntriesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamAccessLogsMessage_HTTPAccessLogEntriesMultiError) AllErrors() []error { return m } + +// StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError is the +// validation error returned by +// StreamAccessLogsMessage_HTTPAccessLogEntries.Validate if the designated +// constraints aren't met. +type StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError) ErrorName() string { + return "StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError" +} + +// Error satisfies the builtin error interface +func (e StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError) 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 %sStreamAccessLogsMessage_HTTPAccessLogEntries.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StreamAccessLogsMessage_HTTPAccessLogEntriesValidationError{} + +// Validate checks the field values on +// StreamAccessLogsMessage_TCPAccessLogEntries 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 *StreamAccessLogsMessage_TCPAccessLogEntries) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// StreamAccessLogsMessage_TCPAccessLogEntries 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 +// StreamAccessLogsMessage_TCPAccessLogEntriesMultiError, or nil if none found. +func (m *StreamAccessLogsMessage_TCPAccessLogEntries) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamAccessLogsMessage_TCPAccessLogEntries) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetLogEntry()) < 1 { + err := StreamAccessLogsMessage_TCPAccessLogEntriesValidationError{ + field: "LogEntry", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetLogEntry() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamAccessLogsMessage_TCPAccessLogEntriesValidationError{ + field: fmt.Sprintf("LogEntry[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamAccessLogsMessage_TCPAccessLogEntriesValidationError{ + field: fmt.Sprintf("LogEntry[%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 StreamAccessLogsMessage_TCPAccessLogEntriesValidationError{ + field: fmt.Sprintf("LogEntry[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return StreamAccessLogsMessage_TCPAccessLogEntriesMultiError(errors) + } + return nil +} + +// StreamAccessLogsMessage_TCPAccessLogEntriesMultiError is an error wrapping +// multiple validation errors returned by +// StreamAccessLogsMessage_TCPAccessLogEntries.ValidateAll() if the designated +// constraints aren't met. +type StreamAccessLogsMessage_TCPAccessLogEntriesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamAccessLogsMessage_TCPAccessLogEntriesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamAccessLogsMessage_TCPAccessLogEntriesMultiError) AllErrors() []error { return m } + +// StreamAccessLogsMessage_TCPAccessLogEntriesValidationError is the validation +// error returned by StreamAccessLogsMessage_TCPAccessLogEntries.Validate if +// the designated constraints aren't met. +type StreamAccessLogsMessage_TCPAccessLogEntriesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StreamAccessLogsMessage_TCPAccessLogEntriesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StreamAccessLogsMessage_TCPAccessLogEntriesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StreamAccessLogsMessage_TCPAccessLogEntriesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StreamAccessLogsMessage_TCPAccessLogEntriesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StreamAccessLogsMessage_TCPAccessLogEntriesValidationError) ErrorName() string { + return "StreamAccessLogsMessage_TCPAccessLogEntriesValidationError" +} + +// Error satisfies the builtin error interface +func (e StreamAccessLogsMessage_TCPAccessLogEntriesValidationError) 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 %sStreamAccessLogsMessage_TCPAccessLogEntries.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StreamAccessLogsMessage_TCPAccessLogEntriesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StreamAccessLogsMessage_TCPAccessLogEntriesValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/auth/v3/attribute_context.pb.go b/vendor/github.com/cilium/proxy/go/envoy/service/auth/v3/attribute_context.pb.go new file mode 100644 index 0000000000000..db59becb55113 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/auth/v3/attribute_context.pb.go @@ -0,0 +1,710 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/service/auth/v3/attribute_context.proto + +package authv3 + +import ( + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// An attribute is a piece of metadata that describes an activity on a network. +// For example, the size of an HTTP request, or the status code of an HTTP response. +// +// Each attribute has a type and a name, which is logically defined as a proto message field +// of the “AttributeContext“. The “AttributeContext“ is a collection of individual attributes +// supported by Envoy authorization system. +// [#comment: The following items are left out of this proto +// Request.Auth field for jwt tokens +// Request.Api for api management +// Origin peer that originated the request +// Caching Protocol +// request_context return values to inject back into the filter chain +// peer.claims -- from X.509 extensions +// Configuration +// - field mask to send +// - which return values from request_context are copied back +// - which return values are copied into request_headers] +// [#next-free-field: 12] +type AttributeContext struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The source of a network activity, such as starting a TCP connection. + // In a multi hop network activity, the source represents the sender of the + // last hop. + Source *AttributeContext_Peer `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` + // The destination of a network activity, such as accepting a TCP connection. + // In a multi hop network activity, the destination represents the receiver of + // the last hop. + Destination *AttributeContext_Peer `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"` + // Represents a network request, such as an HTTP request. + Request *AttributeContext_Request `protobuf:"bytes,4,opt,name=request,proto3" json:"request,omitempty"` + // This is analogous to http_request.headers, however these contents will not be sent to the + // upstream server. Context_extensions provide an extension mechanism for sending additional + // information to the auth server without modifying the proto definition. It maps to the + // internal opaque context in the filter chain. + ContextExtensions map[string]string `protobuf:"bytes,10,rep,name=context_extensions,json=contextExtensions,proto3" json:"context_extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Dynamic metadata associated with the request. + MetadataContext *v3.Metadata `protobuf:"bytes,11,opt,name=metadata_context,json=metadataContext,proto3" json:"metadata_context,omitempty"` +} + +func (x *AttributeContext) Reset() { + *x = AttributeContext{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_auth_v3_attribute_context_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AttributeContext) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AttributeContext) ProtoMessage() {} + +func (x *AttributeContext) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_auth_v3_attribute_context_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AttributeContext.ProtoReflect.Descriptor instead. +func (*AttributeContext) Descriptor() ([]byte, []int) { + return file_envoy_service_auth_v3_attribute_context_proto_rawDescGZIP(), []int{0} +} + +func (x *AttributeContext) GetSource() *AttributeContext_Peer { + if x != nil { + return x.Source + } + return nil +} + +func (x *AttributeContext) GetDestination() *AttributeContext_Peer { + if x != nil { + return x.Destination + } + return nil +} + +func (x *AttributeContext) GetRequest() *AttributeContext_Request { + if x != nil { + return x.Request + } + return nil +} + +func (x *AttributeContext) GetContextExtensions() map[string]string { + if x != nil { + return x.ContextExtensions + } + return nil +} + +func (x *AttributeContext) GetMetadataContext() *v3.Metadata { + if x != nil { + return x.MetadataContext + } + return nil +} + +// This message defines attributes for a node that handles a network request. +// The node can be either a service or an application that sends, forwards, +// or receives the request. Service peers should fill in the “service“, +// “principal“, and “labels“ as appropriate. +// [#next-free-field: 6] +type AttributeContext_Peer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address of the peer, this is typically the IP address. + // It can also be UDS path, or others. + Address *v3.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // The canonical service name of the peer. + // It should be set to :ref:`the HTTP x-envoy-downstream-service-cluster + // ` + // If a more trusted source of the service name is available through mTLS/secure naming, it + // should be used. + Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` + // The labels associated with the peer. + // These could be pod labels for Kubernetes or tags for VMs. + // The source of the labels could be an X.509 certificate or other configuration. + Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The authenticated identity of this peer. + // For example, the identity associated with the workload such as a service account. + // If an X.509 certificate is used to assert the identity this field should be sourced from + // “URI Subject Alternative Names“, “DNS Subject Alternate Names“ or “Subject“ in that order. + // The primary identity should be the principal. The principal format is issuer specific. + // + // Example: + // * SPIFFE format is “spiffe://trust-domain/path“ + // * Google account format is “https://accounts.google.com/{userid}“ + Principal string `protobuf:"bytes,4,opt,name=principal,proto3" json:"principal,omitempty"` + // The X.509 certificate used to authenticate the identify of this peer. + // When present, the certificate contents are encoded in URL and PEM format. + Certificate string `protobuf:"bytes,5,opt,name=certificate,proto3" json:"certificate,omitempty"` +} + +func (x *AttributeContext_Peer) Reset() { + *x = AttributeContext_Peer{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_auth_v3_attribute_context_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AttributeContext_Peer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AttributeContext_Peer) ProtoMessage() {} + +func (x *AttributeContext_Peer) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_auth_v3_attribute_context_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AttributeContext_Peer.ProtoReflect.Descriptor instead. +func (*AttributeContext_Peer) Descriptor() ([]byte, []int) { + return file_envoy_service_auth_v3_attribute_context_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *AttributeContext_Peer) GetAddress() *v3.Address { + if x != nil { + return x.Address + } + return nil +} + +func (x *AttributeContext_Peer) GetService() string { + if x != nil { + return x.Service + } + return "" +} + +func (x *AttributeContext_Peer) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *AttributeContext_Peer) GetPrincipal() string { + if x != nil { + return x.Principal + } + return "" +} + +func (x *AttributeContext_Peer) GetCertificate() string { + if x != nil { + return x.Certificate + } + return "" +} + +// Represents a network request, such as an HTTP request. +type AttributeContext_Request struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The timestamp when the proxy receives the first byte of the request. + Time *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` + // Represents an HTTP request or an HTTP-like request. + Http *AttributeContext_HttpRequest `protobuf:"bytes,2,opt,name=http,proto3" json:"http,omitempty"` +} + +func (x *AttributeContext_Request) Reset() { + *x = AttributeContext_Request{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_auth_v3_attribute_context_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AttributeContext_Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AttributeContext_Request) ProtoMessage() {} + +func (x *AttributeContext_Request) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_auth_v3_attribute_context_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AttributeContext_Request.ProtoReflect.Descriptor instead. +func (*AttributeContext_Request) Descriptor() ([]byte, []int) { + return file_envoy_service_auth_v3_attribute_context_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *AttributeContext_Request) GetTime() *timestamppb.Timestamp { + if x != nil { + return x.Time + } + return nil +} + +func (x *AttributeContext_Request) GetHttp() *AttributeContext_HttpRequest { + if x != nil { + return x.Http + } + return nil +} + +// This message defines attributes for an HTTP request. +// HTTP/1.x, HTTP/2, gRPC are all considered as HTTP requests. +// [#next-free-field: 13] +type AttributeContext_HttpRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique ID for a request, which can be propagated to downstream + // systems. The ID should have low probability of collision + // within a single day for a specific service. + // For HTTP requests, it should be X-Request-ID or equivalent. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The HTTP request method, such as “GET“, “POST“. + Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"` + // The HTTP request headers. If multiple headers share the same key, they + // must be merged according to the HTTP spec. All header keys must be + // lower-cased, because HTTP header keys are case-insensitive. + Headers map[string]string `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The request target, as it appears in the first line of the HTTP request. This includes + // the URL path and query-string. No decoding is performed. + Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"` + // The HTTP request “Host“ or '`Authority“ header value. + Host string `protobuf:"bytes,5,opt,name=host,proto3" json:"host,omitempty"` + // The HTTP URL scheme, such as “http“ and “https“. + Scheme string `protobuf:"bytes,6,opt,name=scheme,proto3" json:"scheme,omitempty"` + // This field is always empty, and exists for compatibility reasons. The HTTP URL query is + // included in “path“ field. + Query string `protobuf:"bytes,7,opt,name=query,proto3" json:"query,omitempty"` + // This field is always empty, and exists for compatibility reasons. The URL fragment is + // not submitted as part of HTTP requests; it is unknowable. + Fragment string `protobuf:"bytes,8,opt,name=fragment,proto3" json:"fragment,omitempty"` + // The HTTP request size in bytes. If unknown, it must be -1. + Size int64 `protobuf:"varint,9,opt,name=size,proto3" json:"size,omitempty"` + // The network protocol used with the request, such as "HTTP/1.0", "HTTP/1.1", or "HTTP/2". + // + // See :repo:`headers.h:ProtocolStrings ` for a list of all + // possible values. + Protocol string `protobuf:"bytes,10,opt,name=protocol,proto3" json:"protocol,omitempty"` + // The HTTP request body. + Body string `protobuf:"bytes,11,opt,name=body,proto3" json:"body,omitempty"` + // The HTTP request body in bytes. This is used instead of + // :ref:`body ` when + // :ref:`pack_as_bytes ` + // is set to true. + RawBody []byte `protobuf:"bytes,12,opt,name=raw_body,json=rawBody,proto3" json:"raw_body,omitempty"` +} + +func (x *AttributeContext_HttpRequest) Reset() { + *x = AttributeContext_HttpRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_auth_v3_attribute_context_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AttributeContext_HttpRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AttributeContext_HttpRequest) ProtoMessage() {} + +func (x *AttributeContext_HttpRequest) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_auth_v3_attribute_context_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AttributeContext_HttpRequest.ProtoReflect.Descriptor instead. +func (*AttributeContext_HttpRequest) Descriptor() ([]byte, []int) { + return file_envoy_service_auth_v3_attribute_context_proto_rawDescGZIP(), []int{0, 2} +} + +func (x *AttributeContext_HttpRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *AttributeContext_HttpRequest) GetMethod() string { + if x != nil { + return x.Method + } + return "" +} + +func (x *AttributeContext_HttpRequest) GetHeaders() map[string]string { + if x != nil { + return x.Headers + } + return nil +} + +func (x *AttributeContext_HttpRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *AttributeContext_HttpRequest) GetHost() string { + if x != nil { + return x.Host + } + return "" +} + +func (x *AttributeContext_HttpRequest) GetScheme() string { + if x != nil { + return x.Scheme + } + return "" +} + +func (x *AttributeContext_HttpRequest) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +func (x *AttributeContext_HttpRequest) GetFragment() string { + if x != nil { + return x.Fragment + } + return "" +} + +func (x *AttributeContext_HttpRequest) GetSize() int64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *AttributeContext_HttpRequest) GetProtocol() string { + if x != nil { + return x.Protocol + } + return "" +} + +func (x *AttributeContext_HttpRequest) GetBody() string { + if x != nil { + return x.Body + } + return "" +} + +func (x *AttributeContext_HttpRequest) GetRawBody() []byte { + if x != nil { + return x.RawBody + } + return nil +} + +var File_envoy_service_auth_v3_attribute_context_proto protoreflect.FileDescriptor + +var file_envoy_service_auth_v3_attribute_context_proto_rawDesc = []byte{ + 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, + 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 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, 0x1d, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, + 0x0c, 0x0a, 0x10, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x12, 0x44, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x50, 0x65, 0x65, + 0x72, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x4e, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x07, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, + 0x76, 0x33, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x6d, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x10, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0f, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x1a, 0xda, + 0x02, 0x0a, 0x04, 0x50, 0x65, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x50, 0x0a, 0x06, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, + 0x76, 0x33, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x1c, 0x0a, 0x09, + 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x65, + 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x1a, 0x39, 0x0a, 0x0b, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x1a, 0xb9, 0x01, 0x0a, 0x07, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x01, 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, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x48, + 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, + 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0xd9, 0x03, 0x0a, 0x0b, 0x48, 0x74, 0x74, 0x70, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, + 0x5a, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, + 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, + 0x6f, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x12, 0x0a, + 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, + 0x79, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x61, 0x77, 0x42, 0x6f, 0x64, 0x79, 0x1a, 0x3a, 0x0a, 0x0c, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x39, 0x9a, 0xc5, 0x88, 0x1e, 0x34, 0x0a, + 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x44, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, + 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x8b, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, + 0x42, 0x15, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, + 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x76, 0x33, 0xba, 0x80, + 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_service_auth_v3_attribute_context_proto_rawDescOnce sync.Once + file_envoy_service_auth_v3_attribute_context_proto_rawDescData = file_envoy_service_auth_v3_attribute_context_proto_rawDesc +) + +func file_envoy_service_auth_v3_attribute_context_proto_rawDescGZIP() []byte { + file_envoy_service_auth_v3_attribute_context_proto_rawDescOnce.Do(func() { + file_envoy_service_auth_v3_attribute_context_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_auth_v3_attribute_context_proto_rawDescData) + }) + return file_envoy_service_auth_v3_attribute_context_proto_rawDescData +} + +var file_envoy_service_auth_v3_attribute_context_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_envoy_service_auth_v3_attribute_context_proto_goTypes = []interface{}{ + (*AttributeContext)(nil), // 0: envoy.service.auth.v3.AttributeContext + (*AttributeContext_Peer)(nil), // 1: envoy.service.auth.v3.AttributeContext.Peer + (*AttributeContext_Request)(nil), // 2: envoy.service.auth.v3.AttributeContext.Request + (*AttributeContext_HttpRequest)(nil), // 3: envoy.service.auth.v3.AttributeContext.HttpRequest + nil, // 4: envoy.service.auth.v3.AttributeContext.ContextExtensionsEntry + nil, // 5: envoy.service.auth.v3.AttributeContext.Peer.LabelsEntry + nil, // 6: envoy.service.auth.v3.AttributeContext.HttpRequest.HeadersEntry + (*v3.Metadata)(nil), // 7: envoy.config.core.v3.Metadata + (*v3.Address)(nil), // 8: envoy.config.core.v3.Address + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp +} +var file_envoy_service_auth_v3_attribute_context_proto_depIdxs = []int32{ + 1, // 0: envoy.service.auth.v3.AttributeContext.source:type_name -> envoy.service.auth.v3.AttributeContext.Peer + 1, // 1: envoy.service.auth.v3.AttributeContext.destination:type_name -> envoy.service.auth.v3.AttributeContext.Peer + 2, // 2: envoy.service.auth.v3.AttributeContext.request:type_name -> envoy.service.auth.v3.AttributeContext.Request + 4, // 3: envoy.service.auth.v3.AttributeContext.context_extensions:type_name -> envoy.service.auth.v3.AttributeContext.ContextExtensionsEntry + 7, // 4: envoy.service.auth.v3.AttributeContext.metadata_context:type_name -> envoy.config.core.v3.Metadata + 8, // 5: envoy.service.auth.v3.AttributeContext.Peer.address:type_name -> envoy.config.core.v3.Address + 5, // 6: envoy.service.auth.v3.AttributeContext.Peer.labels:type_name -> envoy.service.auth.v3.AttributeContext.Peer.LabelsEntry + 9, // 7: envoy.service.auth.v3.AttributeContext.Request.time:type_name -> google.protobuf.Timestamp + 3, // 8: envoy.service.auth.v3.AttributeContext.Request.http:type_name -> envoy.service.auth.v3.AttributeContext.HttpRequest + 6, // 9: envoy.service.auth.v3.AttributeContext.HttpRequest.headers:type_name -> envoy.service.auth.v3.AttributeContext.HttpRequest.HeadersEntry + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_envoy_service_auth_v3_attribute_context_proto_init() } +func file_envoy_service_auth_v3_attribute_context_proto_init() { + if File_envoy_service_auth_v3_attribute_context_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_service_auth_v3_attribute_context_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AttributeContext); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_auth_v3_attribute_context_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AttributeContext_Peer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_auth_v3_attribute_context_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AttributeContext_Request); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_auth_v3_attribute_context_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AttributeContext_HttpRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_service_auth_v3_attribute_context_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_service_auth_v3_attribute_context_proto_goTypes, + DependencyIndexes: file_envoy_service_auth_v3_attribute_context_proto_depIdxs, + MessageInfos: file_envoy_service_auth_v3_attribute_context_proto_msgTypes, + }.Build() + File_envoy_service_auth_v3_attribute_context_proto = out.File + file_envoy_service_auth_v3_attribute_context_proto_rawDesc = nil + file_envoy_service_auth_v3_attribute_context_proto_goTypes = nil + file_envoy_service_auth_v3_attribute_context_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/auth/v3/attribute_context.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/service/auth/v3/attribute_context.pb.validate.go new file mode 100644 index 0000000000000..b13fd02999bec --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/auth/v3/attribute_context.pb.validate.go @@ -0,0 +1,676 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/service/auth/v3/attribute_context.proto + +package authv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on AttributeContext 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 *AttributeContext) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AttributeContext 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 +// AttributeContextMultiError, or nil if none found. +func (m *AttributeContext) ValidateAll() error { + return m.validate(true) +} + +func (m *AttributeContext) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetSource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "Source", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "Source", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSource()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AttributeContextValidationError{ + field: "Source", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetDestination()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "Destination", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "Destination", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDestination()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AttributeContextValidationError{ + field: "Destination", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetRequest()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AttributeContextValidationError{ + field: "Request", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ContextExtensions + + if all { + switch v := interface{}(m.GetMetadataContext()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "MetadataContext", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AttributeContextValidationError{ + field: "MetadataContext", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMetadataContext()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AttributeContextValidationError{ + field: "MetadataContext", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return AttributeContextMultiError(errors) + } + return nil +} + +// AttributeContextMultiError is an error wrapping multiple validation errors +// returned by AttributeContext.ValidateAll() if the designated constraints +// aren't met. +type AttributeContextMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AttributeContextMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AttributeContextMultiError) AllErrors() []error { return m } + +// AttributeContextValidationError is the validation error returned by +// AttributeContext.Validate if the designated constraints aren't met. +type AttributeContextValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AttributeContextValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AttributeContextValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AttributeContextValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AttributeContextValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AttributeContextValidationError) ErrorName() string { return "AttributeContextValidationError" } + +// Error satisfies the builtin error interface +func (e AttributeContextValidationError) 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 %sAttributeContext.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AttributeContextValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AttributeContextValidationError{} + +// Validate checks the field values on AttributeContext_Peer 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 *AttributeContext_Peer) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AttributeContext_Peer 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 +// AttributeContext_PeerMultiError, or nil if none found. +func (m *AttributeContext_Peer) ValidateAll() error { + return m.validate(true) +} + +func (m *AttributeContext_Peer) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetAddress()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AttributeContext_PeerValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AttributeContext_PeerValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAddress()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AttributeContext_PeerValidationError{ + field: "Address", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Service + + // no validation rules for Labels + + // no validation rules for Principal + + // no validation rules for Certificate + + if len(errors) > 0 { + return AttributeContext_PeerMultiError(errors) + } + return nil +} + +// AttributeContext_PeerMultiError is an error wrapping multiple validation +// errors returned by AttributeContext_Peer.ValidateAll() if the designated +// constraints aren't met. +type AttributeContext_PeerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AttributeContext_PeerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AttributeContext_PeerMultiError) AllErrors() []error { return m } + +// AttributeContext_PeerValidationError is the validation error returned by +// AttributeContext_Peer.Validate if the designated constraints aren't met. +type AttributeContext_PeerValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AttributeContext_PeerValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AttributeContext_PeerValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AttributeContext_PeerValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AttributeContext_PeerValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AttributeContext_PeerValidationError) ErrorName() string { + return "AttributeContext_PeerValidationError" +} + +// Error satisfies the builtin error interface +func (e AttributeContext_PeerValidationError) 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 %sAttributeContext_Peer.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AttributeContext_PeerValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AttributeContext_PeerValidationError{} + +// Validate checks the field values on AttributeContext_Request 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 *AttributeContext_Request) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AttributeContext_Request 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 +// AttributeContext_RequestMultiError, or nil if none found. +func (m *AttributeContext_Request) ValidateAll() error { + return m.validate(true) +} + +func (m *AttributeContext_Request) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetTime()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AttributeContext_RequestValidationError{ + field: "Time", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AttributeContext_RequestValidationError{ + field: "Time", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTime()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AttributeContext_RequestValidationError{ + field: "Time", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetHttp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AttributeContext_RequestValidationError{ + field: "Http", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AttributeContext_RequestValidationError{ + field: "Http", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHttp()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AttributeContext_RequestValidationError{ + field: "Http", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return AttributeContext_RequestMultiError(errors) + } + return nil +} + +// AttributeContext_RequestMultiError is an error wrapping multiple validation +// errors returned by AttributeContext_Request.ValidateAll() if the designated +// constraints aren't met. +type AttributeContext_RequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AttributeContext_RequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AttributeContext_RequestMultiError) AllErrors() []error { return m } + +// AttributeContext_RequestValidationError is the validation error returned by +// AttributeContext_Request.Validate if the designated constraints aren't met. +type AttributeContext_RequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AttributeContext_RequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AttributeContext_RequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AttributeContext_RequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AttributeContext_RequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AttributeContext_RequestValidationError) ErrorName() string { + return "AttributeContext_RequestValidationError" +} + +// Error satisfies the builtin error interface +func (e AttributeContext_RequestValidationError) 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 %sAttributeContext_Request.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AttributeContext_RequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AttributeContext_RequestValidationError{} + +// Validate checks the field values on AttributeContext_HttpRequest 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 *AttributeContext_HttpRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AttributeContext_HttpRequest 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 +// AttributeContext_HttpRequestMultiError, or nil if none found. +func (m *AttributeContext_HttpRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *AttributeContext_HttpRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Id + + // no validation rules for Method + + // no validation rules for Headers + + // no validation rules for Path + + // no validation rules for Host + + // no validation rules for Scheme + + // no validation rules for Query + + // no validation rules for Fragment + + // no validation rules for Size + + // no validation rules for Protocol + + // no validation rules for Body + + // no validation rules for RawBody + + if len(errors) > 0 { + return AttributeContext_HttpRequestMultiError(errors) + } + return nil +} + +// AttributeContext_HttpRequestMultiError is an error wrapping multiple +// validation errors returned by AttributeContext_HttpRequest.ValidateAll() if +// the designated constraints aren't met. +type AttributeContext_HttpRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AttributeContext_HttpRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AttributeContext_HttpRequestMultiError) AllErrors() []error { return m } + +// AttributeContext_HttpRequestValidationError is the validation error returned +// by AttributeContext_HttpRequest.Validate if the designated constraints +// aren't met. +type AttributeContext_HttpRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AttributeContext_HttpRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AttributeContext_HttpRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AttributeContext_HttpRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AttributeContext_HttpRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AttributeContext_HttpRequestValidationError) ErrorName() string { + return "AttributeContext_HttpRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e AttributeContext_HttpRequestValidationError) 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 %sAttributeContext_HttpRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AttributeContext_HttpRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AttributeContext_HttpRequestValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/auth/v3/external_auth.pb.go b/vendor/github.com/cilium/proxy/go/envoy/service/auth/v3/external_auth.pb.go new file mode 100644 index 0000000000000..78a690fd623f0 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/auth/v3/external_auth.pb.go @@ -0,0 +1,721 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/service/auth/v3/external_auth.proto + +package authv3 + +import ( + context "context" + _ "github.com/cilium/proxy/go/envoy/annotations" + v31 "github.com/cilium/proxy/go/envoy/config/core/v3" + v3 "github.com/cilium/proxy/go/envoy/type/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + status "google.golang.org/genproto/googleapis/rpc/status" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status1 "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type CheckRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The request attributes. + Attributes *AttributeContext `protobuf:"bytes,1,opt,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (x *CheckRequest) Reset() { + *x = CheckRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_auth_v3_external_auth_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckRequest) ProtoMessage() {} + +func (x *CheckRequest) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_auth_v3_external_auth_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckRequest.ProtoReflect.Descriptor instead. +func (*CheckRequest) Descriptor() ([]byte, []int) { + return file_envoy_service_auth_v3_external_auth_proto_rawDescGZIP(), []int{0} +} + +func (x *CheckRequest) GetAttributes() *AttributeContext { + if x != nil { + return x.Attributes + } + return nil +} + +// HTTP attributes for a denied response. +type DeniedHttpResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This field allows the authorization service to send an HTTP response status code to the + // downstream client. If not set, Envoy sends “403 Forbidden“ HTTP status code by default. + Status *v3.HttpStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + // This field allows the authorization service to send HTTP response headers + // to the downstream client. Note that the :ref:`append field in HeaderValueOption ` defaults to + // false when used in this message. + Headers []*v31.HeaderValueOption `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"` + // This field allows the authorization service to send a response body data + // to the downstream client. + Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` +} + +func (x *DeniedHttpResponse) Reset() { + *x = DeniedHttpResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_auth_v3_external_auth_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeniedHttpResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeniedHttpResponse) ProtoMessage() {} + +func (x *DeniedHttpResponse) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_auth_v3_external_auth_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeniedHttpResponse.ProtoReflect.Descriptor instead. +func (*DeniedHttpResponse) Descriptor() ([]byte, []int) { + return file_envoy_service_auth_v3_external_auth_proto_rawDescGZIP(), []int{1} +} + +func (x *DeniedHttpResponse) GetStatus() *v3.HttpStatus { + if x != nil { + return x.Status + } + return nil +} + +func (x *DeniedHttpResponse) GetHeaders() []*v31.HeaderValueOption { + if x != nil { + return x.Headers + } + return nil +} + +func (x *DeniedHttpResponse) GetBody() string { + if x != nil { + return x.Body + } + return "" +} + +// HTTP attributes for an OK response. +// [#next-free-field: 9] +type OkHttpResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // HTTP entity headers in addition to the original request headers. This allows the authorization + // service to append, to add or to override headers from the original request before + // dispatching it to the upstream. Note that the :ref:`append field in HeaderValueOption ` defaults to + // false when used in this message. By setting the “append“ field to “true“, + // the filter will append the correspondent header value to the matched request header. + // By leaving “append“ as false, the filter will either add a new header, or override an existing + // one if there is a match. + Headers []*v31.HeaderValueOption `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"` + // HTTP entity headers to remove from the original request before dispatching + // it to the upstream. This allows the authorization service to act on auth + // related headers (like “Authorization“), process them, and consume them. + // Under this model, the upstream will either receive the request (if it's + // authorized) or not receive it (if it's not), but will not see headers + // containing authorization credentials. + // + // Pseudo headers (such as “:authority“, “:method“, “:path“ etc), as well as + // the header “Host“, may not be removed as that would make the request + // malformed. If mentioned in “headers_to_remove“ these special headers will + // be ignored. + // + // When using the HTTP service this must instead be set by the HTTP + // authorization service as a comma separated list like so: + // “x-envoy-auth-headers-to-remove: one-auth-header, another-auth-header“. + HeadersToRemove []string `protobuf:"bytes,5,rep,name=headers_to_remove,json=headersToRemove,proto3" json:"headers_to_remove,omitempty"` + // This field has been deprecated in favor of :ref:`CheckResponse.dynamic_metadata + // `. Until it is removed, + // setting this field overrides :ref:`CheckResponse.dynamic_metadata + // `. + // + // Deprecated: Do not use. + DynamicMetadata *structpb.Struct `protobuf:"bytes,3,opt,name=dynamic_metadata,json=dynamicMetadata,proto3" json:"dynamic_metadata,omitempty"` + // This field allows the authorization service to send HTTP response headers + // to the downstream client on success. Note that the :ref:`append field in HeaderValueOption ` + // defaults to false when used in this message. + ResponseHeadersToAdd []*v31.HeaderValueOption `protobuf:"bytes,6,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` + // This field allows the authorization service to set (and overwrite) query + // string parameters on the original request before it is sent upstream. + QueryParametersToSet []*v31.QueryParameter `protobuf:"bytes,7,rep,name=query_parameters_to_set,json=queryParametersToSet,proto3" json:"query_parameters_to_set,omitempty"` + // This field allows the authorization service to specify which query parameters + // should be removed from the original request before it is sent upstream. Each + // element in this list is a case-sensitive query parameter name to be removed. + QueryParametersToRemove []string `protobuf:"bytes,8,rep,name=query_parameters_to_remove,json=queryParametersToRemove,proto3" json:"query_parameters_to_remove,omitempty"` +} + +func (x *OkHttpResponse) Reset() { + *x = OkHttpResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_auth_v3_external_auth_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OkHttpResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OkHttpResponse) ProtoMessage() {} + +func (x *OkHttpResponse) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_auth_v3_external_auth_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OkHttpResponse.ProtoReflect.Descriptor instead. +func (*OkHttpResponse) Descriptor() ([]byte, []int) { + return file_envoy_service_auth_v3_external_auth_proto_rawDescGZIP(), []int{2} +} + +func (x *OkHttpResponse) GetHeaders() []*v31.HeaderValueOption { + if x != nil { + return x.Headers + } + return nil +} + +func (x *OkHttpResponse) GetHeadersToRemove() []string { + if x != nil { + return x.HeadersToRemove + } + return nil +} + +// Deprecated: Do not use. +func (x *OkHttpResponse) GetDynamicMetadata() *structpb.Struct { + if x != nil { + return x.DynamicMetadata + } + return nil +} + +func (x *OkHttpResponse) GetResponseHeadersToAdd() []*v31.HeaderValueOption { + if x != nil { + return x.ResponseHeadersToAdd + } + return nil +} + +func (x *OkHttpResponse) GetQueryParametersToSet() []*v31.QueryParameter { + if x != nil { + return x.QueryParametersToSet + } + return nil +} + +func (x *OkHttpResponse) GetQueryParametersToRemove() []string { + if x != nil { + return x.QueryParametersToRemove + } + return nil +} + +// Intended for gRPC and Network Authorization servers “only“. +type CheckResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Status “OK“ allows the request. Any other status indicates the request should be denied, and + // for HTTP filter, if not overridden by :ref:`denied HTTP response status ` + // Envoy sends “403 Forbidden“ HTTP status code by default. + Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + // An message that contains HTTP response attributes. This message is + // used when the authorization service needs to send custom responses to the + // downstream client or, to modify/add request headers being dispatched to the upstream. + // + // Types that are assignable to HttpResponse: + // + // *CheckResponse_DeniedResponse + // *CheckResponse_OkResponse + HttpResponse isCheckResponse_HttpResponse `protobuf_oneof:"http_response"` + // Optional response metadata that will be emitted as dynamic metadata to be consumed by the next + // filter. This metadata lives in a namespace specified by the canonical name of extension filter + // that requires it: + // + // - :ref:`envoy.filters.http.ext_authz ` for HTTP filter. + // - :ref:`envoy.filters.network.ext_authz ` for network filter. + DynamicMetadata *structpb.Struct `protobuf:"bytes,4,opt,name=dynamic_metadata,json=dynamicMetadata,proto3" json:"dynamic_metadata,omitempty"` +} + +func (x *CheckResponse) Reset() { + *x = CheckResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_auth_v3_external_auth_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckResponse) ProtoMessage() {} + +func (x *CheckResponse) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_auth_v3_external_auth_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckResponse.ProtoReflect.Descriptor instead. +func (*CheckResponse) Descriptor() ([]byte, []int) { + return file_envoy_service_auth_v3_external_auth_proto_rawDescGZIP(), []int{3} +} + +func (x *CheckResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +func (m *CheckResponse) GetHttpResponse() isCheckResponse_HttpResponse { + if m != nil { + return m.HttpResponse + } + return nil +} + +func (x *CheckResponse) GetDeniedResponse() *DeniedHttpResponse { + if x, ok := x.GetHttpResponse().(*CheckResponse_DeniedResponse); ok { + return x.DeniedResponse + } + return nil +} + +func (x *CheckResponse) GetOkResponse() *OkHttpResponse { + if x, ok := x.GetHttpResponse().(*CheckResponse_OkResponse); ok { + return x.OkResponse + } + return nil +} + +func (x *CheckResponse) GetDynamicMetadata() *structpb.Struct { + if x != nil { + return x.DynamicMetadata + } + return nil +} + +type isCheckResponse_HttpResponse interface { + isCheckResponse_HttpResponse() +} + +type CheckResponse_DeniedResponse struct { + // Supplies http attributes for a denied response. + DeniedResponse *DeniedHttpResponse `protobuf:"bytes,2,opt,name=denied_response,json=deniedResponse,proto3,oneof"` +} + +type CheckResponse_OkResponse struct { + // Supplies http attributes for an ok response. + OkResponse *OkHttpResponse `protobuf:"bytes,3,opt,name=ok_response,json=okResponse,proto3,oneof"` +} + +func (*CheckResponse_DeniedResponse) isCheckResponse_HttpResponse() {} + +func (*CheckResponse_OkResponse) isCheckResponse_HttpResponse() {} + +var File_envoy_service_auth_v3_external_auth_proto protoreflect.FileDescriptor + +var file_envoy_service_auth_v3_external_auth_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x5f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, + 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, + 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x82, 0x01, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x47, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, + 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x3a, 0x29, 0x9a, 0xc5, 0x88, + 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xcf, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x6e, 0x69, 0x65, + 0x64, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, + 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x41, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, + 0x74, 0x68, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x48, 0x74, 0x74, 0x70, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf7, 0x03, 0x0a, 0x0e, 0x4f, 0x6b, 0x48, + 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x2a, + 0x0a, 0x11, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x4f, 0x0a, 0x10, 0x64, 0x79, + 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x0b, 0x18, + 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x52, 0x0f, 0x64, 0x79, 0x6e, 0x61, + 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5e, 0x0a, 0x17, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, + 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x5b, 0x0a, 0x17, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x5f, + 0x74, 0x6f, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x52, 0x14, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x54, 0x6f, 0x53, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x1a, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, + 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x6b, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xdc, 0x02, 0x0a, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, + 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x54, 0x0a, 0x0f, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, + 0x33, 0x2e, 0x44, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x6f, 0x6b, 0x5f, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x6b, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x42, 0x0a, 0x10, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x52, 0x0f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x3a, 0x2a, 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, + 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0x0f, 0x0a, 0x0d, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x32, 0x65, 0x0a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x54, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x23, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x8a, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x76, 0x33, + 0x42, 0x11, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x61, 0x75, 0x74, 0x68, + 0x2f, 0x76, 0x33, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x76, 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_service_auth_v3_external_auth_proto_rawDescOnce sync.Once + file_envoy_service_auth_v3_external_auth_proto_rawDescData = file_envoy_service_auth_v3_external_auth_proto_rawDesc +) + +func file_envoy_service_auth_v3_external_auth_proto_rawDescGZIP() []byte { + file_envoy_service_auth_v3_external_auth_proto_rawDescOnce.Do(func() { + file_envoy_service_auth_v3_external_auth_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_auth_v3_external_auth_proto_rawDescData) + }) + return file_envoy_service_auth_v3_external_auth_proto_rawDescData +} + +var file_envoy_service_auth_v3_external_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_envoy_service_auth_v3_external_auth_proto_goTypes = []interface{}{ + (*CheckRequest)(nil), // 0: envoy.service.auth.v3.CheckRequest + (*DeniedHttpResponse)(nil), // 1: envoy.service.auth.v3.DeniedHttpResponse + (*OkHttpResponse)(nil), // 2: envoy.service.auth.v3.OkHttpResponse + (*CheckResponse)(nil), // 3: envoy.service.auth.v3.CheckResponse + (*AttributeContext)(nil), // 4: envoy.service.auth.v3.AttributeContext + (*v3.HttpStatus)(nil), // 5: envoy.type.v3.HttpStatus + (*v31.HeaderValueOption)(nil), // 6: envoy.config.core.v3.HeaderValueOption + (*structpb.Struct)(nil), // 7: google.protobuf.Struct + (*v31.QueryParameter)(nil), // 8: envoy.config.core.v3.QueryParameter + (*status.Status)(nil), // 9: google.rpc.Status +} +var file_envoy_service_auth_v3_external_auth_proto_depIdxs = []int32{ + 4, // 0: envoy.service.auth.v3.CheckRequest.attributes:type_name -> envoy.service.auth.v3.AttributeContext + 5, // 1: envoy.service.auth.v3.DeniedHttpResponse.status:type_name -> envoy.type.v3.HttpStatus + 6, // 2: envoy.service.auth.v3.DeniedHttpResponse.headers:type_name -> envoy.config.core.v3.HeaderValueOption + 6, // 3: envoy.service.auth.v3.OkHttpResponse.headers:type_name -> envoy.config.core.v3.HeaderValueOption + 7, // 4: envoy.service.auth.v3.OkHttpResponse.dynamic_metadata:type_name -> google.protobuf.Struct + 6, // 5: envoy.service.auth.v3.OkHttpResponse.response_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption + 8, // 6: envoy.service.auth.v3.OkHttpResponse.query_parameters_to_set:type_name -> envoy.config.core.v3.QueryParameter + 9, // 7: envoy.service.auth.v3.CheckResponse.status:type_name -> google.rpc.Status + 1, // 8: envoy.service.auth.v3.CheckResponse.denied_response:type_name -> envoy.service.auth.v3.DeniedHttpResponse + 2, // 9: envoy.service.auth.v3.CheckResponse.ok_response:type_name -> envoy.service.auth.v3.OkHttpResponse + 7, // 10: envoy.service.auth.v3.CheckResponse.dynamic_metadata:type_name -> google.protobuf.Struct + 0, // 11: envoy.service.auth.v3.Authorization.Check:input_type -> envoy.service.auth.v3.CheckRequest + 3, // 12: envoy.service.auth.v3.Authorization.Check:output_type -> envoy.service.auth.v3.CheckResponse + 12, // [12:13] is the sub-list for method output_type + 11, // [11:12] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_envoy_service_auth_v3_external_auth_proto_init() } +func file_envoy_service_auth_v3_external_auth_proto_init() { + if File_envoy_service_auth_v3_external_auth_proto != nil { + return + } + file_envoy_service_auth_v3_attribute_context_proto_init() + if !protoimpl.UnsafeEnabled { + file_envoy_service_auth_v3_external_auth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_auth_v3_external_auth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeniedHttpResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_auth_v3_external_auth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OkHttpResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_auth_v3_external_auth_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_service_auth_v3_external_auth_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*CheckResponse_DeniedResponse)(nil), + (*CheckResponse_OkResponse)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_service_auth_v3_external_auth_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_envoy_service_auth_v3_external_auth_proto_goTypes, + DependencyIndexes: file_envoy_service_auth_v3_external_auth_proto_depIdxs, + MessageInfos: file_envoy_service_auth_v3_external_auth_proto_msgTypes, + }.Build() + File_envoy_service_auth_v3_external_auth_proto = out.File + file_envoy_service_auth_v3_external_auth_proto_rawDesc = nil + file_envoy_service_auth_v3_external_auth_proto_goTypes = nil + file_envoy_service_auth_v3_external_auth_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// AuthorizationClient is the client API for Authorization service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type AuthorizationClient interface { + // Performs authorization check based on the attributes associated with the + // incoming request, and returns status `OK` or not `OK`. + Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) +} + +type authorizationClient struct { + cc grpc.ClientConnInterface +} + +func NewAuthorizationClient(cc grpc.ClientConnInterface) AuthorizationClient { + return &authorizationClient{cc} +} + +func (c *authorizationClient) Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) { + out := new(CheckResponse) + err := c.cc.Invoke(ctx, "/envoy.service.auth.v3.Authorization/Check", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AuthorizationServer is the server API for Authorization service. +type AuthorizationServer interface { + // Performs authorization check based on the attributes associated with the + // incoming request, and returns status `OK` or not `OK`. + Check(context.Context, *CheckRequest) (*CheckResponse, error) +} + +// UnimplementedAuthorizationServer can be embedded to have forward compatible implementations. +type UnimplementedAuthorizationServer struct { +} + +func (*UnimplementedAuthorizationServer) Check(context.Context, *CheckRequest) (*CheckResponse, error) { + return nil, status1.Errorf(codes.Unimplemented, "method Check not implemented") +} + +func RegisterAuthorizationServer(s *grpc.Server, srv AuthorizationServer) { + s.RegisterService(&_Authorization_serviceDesc, srv) +} + +func _Authorization_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CheckRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorizationServer).Check(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/envoy.service.auth.v3.Authorization/Check", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorizationServer).Check(ctx, req.(*CheckRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Authorization_serviceDesc = grpc.ServiceDesc{ + ServiceName: "envoy.service.auth.v3.Authorization", + HandlerType: (*AuthorizationServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Check", + Handler: _Authorization_Check_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "envoy/service/auth/v3/external_auth.proto", +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/auth/v3/external_auth.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/service/auth/v3/external_auth.pb.validate.go new file mode 100644 index 0000000000000..1530019433528 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/auth/v3/external_auth.pb.validate.go @@ -0,0 +1,782 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/service/auth/v3/external_auth.proto + +package authv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on CheckRequest 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 *CheckRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CheckRequest 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 CheckRequestMultiError, or +// nil if none found. +func (m *CheckRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *CheckRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetAttributes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CheckRequestValidationError{ + field: "Attributes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CheckRequestValidationError{ + field: "Attributes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAttributes()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CheckRequestValidationError{ + field: "Attributes", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return CheckRequestMultiError(errors) + } + return nil +} + +// CheckRequestMultiError is an error wrapping multiple validation errors +// returned by CheckRequest.ValidateAll() if the designated constraints aren't met. +type CheckRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CheckRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CheckRequestMultiError) AllErrors() []error { return m } + +// CheckRequestValidationError is the validation error returned by +// CheckRequest.Validate if the designated constraints aren't met. +type CheckRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CheckRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CheckRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CheckRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CheckRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CheckRequestValidationError) ErrorName() string { return "CheckRequestValidationError" } + +// Error satisfies the builtin error interface +func (e CheckRequestValidationError) 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 %sCheckRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CheckRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CheckRequestValidationError{} + +// Validate checks the field values on DeniedHttpResponse 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 *DeniedHttpResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DeniedHttpResponse 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 +// DeniedHttpResponseMultiError, or nil if none found. +func (m *DeniedHttpResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *DeniedHttpResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetStatus()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DeniedHttpResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DeniedHttpResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatus()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DeniedHttpResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetHeaders() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DeniedHttpResponseValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DeniedHttpResponseValidationError{ + field: fmt.Sprintf("Headers[%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 DeniedHttpResponseValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for Body + + if len(errors) > 0 { + return DeniedHttpResponseMultiError(errors) + } + return nil +} + +// DeniedHttpResponseMultiError is an error wrapping multiple validation errors +// returned by DeniedHttpResponse.ValidateAll() if the designated constraints +// aren't met. +type DeniedHttpResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DeniedHttpResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DeniedHttpResponseMultiError) AllErrors() []error { return m } + +// DeniedHttpResponseValidationError is the validation error returned by +// DeniedHttpResponse.Validate if the designated constraints aren't met. +type DeniedHttpResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DeniedHttpResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DeniedHttpResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DeniedHttpResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DeniedHttpResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DeniedHttpResponseValidationError) ErrorName() string { + return "DeniedHttpResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e DeniedHttpResponseValidationError) 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 %sDeniedHttpResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DeniedHttpResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DeniedHttpResponseValidationError{} + +// Validate checks the field values on OkHttpResponse 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 *OkHttpResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OkHttpResponse 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 OkHttpResponseMultiError, +// or nil if none found. +func (m *OkHttpResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *OkHttpResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetHeaders() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OkHttpResponseValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OkHttpResponseValidationError{ + field: fmt.Sprintf("Headers[%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 OkHttpResponseValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetDynamicMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OkHttpResponseValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OkHttpResponseValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDynamicMetadata()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OkHttpResponseValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetResponseHeadersToAdd() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OkHttpResponseValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OkHttpResponseValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%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 OkHttpResponseValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetQueryParametersToSet() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OkHttpResponseValidationError{ + field: fmt.Sprintf("QueryParametersToSet[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OkHttpResponseValidationError{ + field: fmt.Sprintf("QueryParametersToSet[%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 OkHttpResponseValidationError{ + field: fmt.Sprintf("QueryParametersToSet[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return OkHttpResponseMultiError(errors) + } + return nil +} + +// OkHttpResponseMultiError is an error wrapping multiple validation errors +// returned by OkHttpResponse.ValidateAll() if the designated constraints +// aren't met. +type OkHttpResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OkHttpResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OkHttpResponseMultiError) AllErrors() []error { return m } + +// OkHttpResponseValidationError is the validation error returned by +// OkHttpResponse.Validate if the designated constraints aren't met. +type OkHttpResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OkHttpResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OkHttpResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OkHttpResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OkHttpResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OkHttpResponseValidationError) ErrorName() string { return "OkHttpResponseValidationError" } + +// Error satisfies the builtin error interface +func (e OkHttpResponseValidationError) 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 %sOkHttpResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OkHttpResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OkHttpResponseValidationError{} + +// Validate checks the field values on CheckResponse 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 *CheckResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CheckResponse 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 CheckResponseMultiError, or +// nil if none found. +func (m *CheckResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *CheckResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetStatus()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatus()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CheckResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetDynamicMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDynamicMetadata()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CheckResponseValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.HttpResponse.(type) { + + case *CheckResponse_DeniedResponse: + + if all { + switch v := interface{}(m.GetDeniedResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: "DeniedResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: "DeniedResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDeniedResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CheckResponseValidationError{ + field: "DeniedResponse", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *CheckResponse_OkResponse: + + if all { + switch v := interface{}(m.GetOkResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: "OkResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: "OkResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOkResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CheckResponseValidationError{ + field: "OkResponse", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return CheckResponseMultiError(errors) + } + return nil +} + +// CheckResponseMultiError is an error wrapping multiple validation errors +// returned by CheckResponse.ValidateAll() if the designated constraints +// aren't met. +type CheckResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CheckResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CheckResponseMultiError) AllErrors() []error { return m } + +// CheckResponseValidationError is the validation error returned by +// CheckResponse.Validate if the designated constraints aren't met. +type CheckResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CheckResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CheckResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CheckResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CheckResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CheckResponseValidationError) ErrorName() string { return "CheckResponseValidationError" } + +// Error satisfies the builtin error interface +func (e CheckResponseValidationError) 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 %sCheckResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CheckResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CheckResponseValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/event_reporting/v3/event_reporting_service.pb.go b/vendor/github.com/cilium/proxy/go/envoy/service/event_reporting/v3/event_reporting_service.pb.go new file mode 100644 index 0000000000000..afebc6aa75e66 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/event_reporting/v3/event_reporting_service.pb.go @@ -0,0 +1,479 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/service/event_reporting/v3/event_reporting_service.proto + +package event_reportingv3 + +import ( + context "context" + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// [#not-implemented-hide:] +// An events envoy sends to the management server. +type StreamEventsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier data that will only be sent in the first message on the stream. This is effectively + // structured metadata and is a performance optimization. + Identifier *StreamEventsRequest_Identifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` + // Batch of events. When the stream is already active, it will be the events occurred + // since the last message had been sent. If the server receives unknown event type, it should + // silently ignore it. + // + // The following events are supported: + // + // * :ref:`HealthCheckEvent ` + // * :ref:`OutlierDetectionEvent ` + Events []*anypb.Any `protobuf:"bytes,2,rep,name=events,proto3" json:"events,omitempty"` +} + +func (x *StreamEventsRequest) Reset() { + *x = StreamEventsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_event_reporting_v3_event_reporting_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamEventsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamEventsRequest) ProtoMessage() {} + +func (x *StreamEventsRequest) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_event_reporting_v3_event_reporting_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamEventsRequest.ProtoReflect.Descriptor instead. +func (*StreamEventsRequest) Descriptor() ([]byte, []int) { + return file_envoy_service_event_reporting_v3_event_reporting_service_proto_rawDescGZIP(), []int{0} +} + +func (x *StreamEventsRequest) GetIdentifier() *StreamEventsRequest_Identifier { + if x != nil { + return x.Identifier + } + return nil +} + +func (x *StreamEventsRequest) GetEvents() []*anypb.Any { + if x != nil { + return x.Events + } + return nil +} + +// [#not-implemented-hide:] +// The management server may send envoy a StreamEventsResponse to tell which events the server +// is interested in. In future, with aggregated event reporting service, this message will +// contain, for example, clusters the envoy should send events for, or event types the server +// wants to process. +type StreamEventsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StreamEventsResponse) Reset() { + *x = StreamEventsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_event_reporting_v3_event_reporting_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamEventsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamEventsResponse) ProtoMessage() {} + +func (x *StreamEventsResponse) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_event_reporting_v3_event_reporting_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamEventsResponse.ProtoReflect.Descriptor instead. +func (*StreamEventsResponse) Descriptor() ([]byte, []int) { + return file_envoy_service_event_reporting_v3_event_reporting_service_proto_rawDescGZIP(), []int{1} +} + +type StreamEventsRequest_Identifier struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The node sending the event messages over the stream. + Node *v3.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` +} + +func (x *StreamEventsRequest_Identifier) Reset() { + *x = StreamEventsRequest_Identifier{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_event_reporting_v3_event_reporting_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamEventsRequest_Identifier) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamEventsRequest_Identifier) ProtoMessage() {} + +func (x *StreamEventsRequest_Identifier) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_event_reporting_v3_event_reporting_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamEventsRequest_Identifier.ProtoReflect.Descriptor instead. +func (*StreamEventsRequest_Identifier) Descriptor() ([]byte, []int) { + return file_envoy_service_event_reporting_v3_event_reporting_service_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *StreamEventsRequest_Identifier) GetNode() *v3.Node { + if x != nil { + return x.Node + } + return nil +} + +var File_envoy_service_event_reporting_v3_event_reporting_service_proto protoreflect.FileDescriptor + +var file_envoy_service_event_reporting_v3_event_reporting_service_proto_rawDesc = []byte{ + 0x0a, 0x3e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2f, + 0x76, 0x33, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, + 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 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, 0x1a, 0x1d, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0x87, 0x03, 0x0a, 0x13, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x60, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 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, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, + 0x02, 0x08, 0x01, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x93, 0x01, 0x0a, 0x0a, + 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x04, 0x6e, 0x6f, + 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, + 0x6e, 0x6f, 0x64, 0x65, 0x3a, 0x4b, 0x9a, 0xc5, 0x88, 0x1e, 0x46, 0x0a, 0x44, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x3a, 0x40, 0x9a, 0xc5, 0x88, 0x1e, 0x3b, 0x0a, 0x39, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x22, 0x59, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x41, 0x9a, 0xc5, 0x88, + 0x1e, 0x3c, 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9d, + 0x01, 0x0a, 0x15, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, + 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x83, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x35, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, + 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0xb4, + 0x01, 0x0a, 0x2e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x33, 0x42, 0x1a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, + 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x3b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x72, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x76, 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, + 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_service_event_reporting_v3_event_reporting_service_proto_rawDescOnce sync.Once + file_envoy_service_event_reporting_v3_event_reporting_service_proto_rawDescData = file_envoy_service_event_reporting_v3_event_reporting_service_proto_rawDesc +) + +func file_envoy_service_event_reporting_v3_event_reporting_service_proto_rawDescGZIP() []byte { + file_envoy_service_event_reporting_v3_event_reporting_service_proto_rawDescOnce.Do(func() { + file_envoy_service_event_reporting_v3_event_reporting_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_event_reporting_v3_event_reporting_service_proto_rawDescData) + }) + return file_envoy_service_event_reporting_v3_event_reporting_service_proto_rawDescData +} + +var file_envoy_service_event_reporting_v3_event_reporting_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_service_event_reporting_v3_event_reporting_service_proto_goTypes = []interface{}{ + (*StreamEventsRequest)(nil), // 0: envoy.service.event_reporting.v3.StreamEventsRequest + (*StreamEventsResponse)(nil), // 1: envoy.service.event_reporting.v3.StreamEventsResponse + (*StreamEventsRequest_Identifier)(nil), // 2: envoy.service.event_reporting.v3.StreamEventsRequest.Identifier + (*anypb.Any)(nil), // 3: google.protobuf.Any + (*v3.Node)(nil), // 4: envoy.config.core.v3.Node +} +var file_envoy_service_event_reporting_v3_event_reporting_service_proto_depIdxs = []int32{ + 2, // 0: envoy.service.event_reporting.v3.StreamEventsRequest.identifier:type_name -> envoy.service.event_reporting.v3.StreamEventsRequest.Identifier + 3, // 1: envoy.service.event_reporting.v3.StreamEventsRequest.events:type_name -> google.protobuf.Any + 4, // 2: envoy.service.event_reporting.v3.StreamEventsRequest.Identifier.node:type_name -> envoy.config.core.v3.Node + 0, // 3: envoy.service.event_reporting.v3.EventReportingService.StreamEvents:input_type -> envoy.service.event_reporting.v3.StreamEventsRequest + 1, // 4: envoy.service.event_reporting.v3.EventReportingService.StreamEvents:output_type -> envoy.service.event_reporting.v3.StreamEventsResponse + 4, // [4:5] is the sub-list for method output_type + 3, // [3:4] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_envoy_service_event_reporting_v3_event_reporting_service_proto_init() } +func file_envoy_service_event_reporting_v3_event_reporting_service_proto_init() { + if File_envoy_service_event_reporting_v3_event_reporting_service_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_service_event_reporting_v3_event_reporting_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamEventsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_event_reporting_v3_event_reporting_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamEventsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_event_reporting_v3_event_reporting_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamEventsRequest_Identifier); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_service_event_reporting_v3_event_reporting_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_envoy_service_event_reporting_v3_event_reporting_service_proto_goTypes, + DependencyIndexes: file_envoy_service_event_reporting_v3_event_reporting_service_proto_depIdxs, + MessageInfos: file_envoy_service_event_reporting_v3_event_reporting_service_proto_msgTypes, + }.Build() + File_envoy_service_event_reporting_v3_event_reporting_service_proto = out.File + file_envoy_service_event_reporting_v3_event_reporting_service_proto_rawDesc = nil + file_envoy_service_event_reporting_v3_event_reporting_service_proto_goTypes = nil + file_envoy_service_event_reporting_v3_event_reporting_service_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// EventReportingServiceClient is the client API for EventReportingService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type EventReportingServiceClient interface { + // Envoy will connect and send StreamEventsRequest messages forever. + // The management server may send StreamEventsResponse to configure event stream. See below. + // This API is designed for high throughput with the expectation that it might be lossy. + StreamEvents(ctx context.Context, opts ...grpc.CallOption) (EventReportingService_StreamEventsClient, error) +} + +type eventReportingServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewEventReportingServiceClient(cc grpc.ClientConnInterface) EventReportingServiceClient { + return &eventReportingServiceClient{cc} +} + +func (c *eventReportingServiceClient) StreamEvents(ctx context.Context, opts ...grpc.CallOption) (EventReportingService_StreamEventsClient, error) { + stream, err := c.cc.NewStream(ctx, &_EventReportingService_serviceDesc.Streams[0], "/envoy.service.event_reporting.v3.EventReportingService/StreamEvents", opts...) + if err != nil { + return nil, err + } + x := &eventReportingServiceStreamEventsClient{stream} + return x, nil +} + +type EventReportingService_StreamEventsClient interface { + Send(*StreamEventsRequest) error + Recv() (*StreamEventsResponse, error) + grpc.ClientStream +} + +type eventReportingServiceStreamEventsClient struct { + grpc.ClientStream +} + +func (x *eventReportingServiceStreamEventsClient) Send(m *StreamEventsRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *eventReportingServiceStreamEventsClient) Recv() (*StreamEventsResponse, error) { + m := new(StreamEventsResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// EventReportingServiceServer is the server API for EventReportingService service. +type EventReportingServiceServer interface { + // Envoy will connect and send StreamEventsRequest messages forever. + // The management server may send StreamEventsResponse to configure event stream. See below. + // This API is designed for high throughput with the expectation that it might be lossy. + StreamEvents(EventReportingService_StreamEventsServer) error +} + +// UnimplementedEventReportingServiceServer can be embedded to have forward compatible implementations. +type UnimplementedEventReportingServiceServer struct { +} + +func (*UnimplementedEventReportingServiceServer) StreamEvents(EventReportingService_StreamEventsServer) error { + return status.Errorf(codes.Unimplemented, "method StreamEvents not implemented") +} + +func RegisterEventReportingServiceServer(s *grpc.Server, srv EventReportingServiceServer) { + s.RegisterService(&_EventReportingService_serviceDesc, srv) +} + +func _EventReportingService_StreamEvents_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(EventReportingServiceServer).StreamEvents(&eventReportingServiceStreamEventsServer{stream}) +} + +type EventReportingService_StreamEventsServer interface { + Send(*StreamEventsResponse) error + Recv() (*StreamEventsRequest, error) + grpc.ServerStream +} + +type eventReportingServiceStreamEventsServer struct { + grpc.ServerStream +} + +func (x *eventReportingServiceStreamEventsServer) Send(m *StreamEventsResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *eventReportingServiceStreamEventsServer) Recv() (*StreamEventsRequest, error) { + m := new(StreamEventsRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +var _EventReportingService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "envoy.service.event_reporting.v3.EventReportingService", + HandlerType: (*EventReportingServiceServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamEvents", + Handler: _EventReportingService_StreamEvents_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "envoy/service/event_reporting/v3/event_reporting_service.proto", +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/event_reporting/v3/event_reporting_service.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/service/event_reporting/v3/event_reporting_service.pb.validate.go new file mode 100644 index 0000000000000..a09de63e8f81d --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/event_reporting/v3/event_reporting_service.pb.validate.go @@ -0,0 +1,454 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/service/event_reporting/v3/event_reporting_service.proto + +package event_reportingv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on StreamEventsRequest 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 *StreamEventsRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamEventsRequest 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 +// StreamEventsRequestMultiError, or nil if none found. +func (m *StreamEventsRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamEventsRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetIdentifier()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamEventsRequestValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamEventsRequestValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StreamEventsRequestValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(m.GetEvents()) < 1 { + err := StreamEventsRequestValidationError{ + field: "Events", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetEvents() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamEventsRequestValidationError{ + field: fmt.Sprintf("Events[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamEventsRequestValidationError{ + field: fmt.Sprintf("Events[%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 StreamEventsRequestValidationError{ + field: fmt.Sprintf("Events[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return StreamEventsRequestMultiError(errors) + } + return nil +} + +// StreamEventsRequestMultiError is an error wrapping multiple validation +// errors returned by StreamEventsRequest.ValidateAll() if the designated +// constraints aren't met. +type StreamEventsRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamEventsRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamEventsRequestMultiError) AllErrors() []error { return m } + +// StreamEventsRequestValidationError is the validation error returned by +// StreamEventsRequest.Validate if the designated constraints aren't met. +type StreamEventsRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StreamEventsRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StreamEventsRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StreamEventsRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StreamEventsRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StreamEventsRequestValidationError) ErrorName() string { + return "StreamEventsRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e StreamEventsRequestValidationError) 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 %sStreamEventsRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StreamEventsRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StreamEventsRequestValidationError{} + +// Validate checks the field values on StreamEventsResponse 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 *StreamEventsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamEventsResponse 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 +// StreamEventsResponseMultiError, or nil if none found. +func (m *StreamEventsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamEventsResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return StreamEventsResponseMultiError(errors) + } + return nil +} + +// StreamEventsResponseMultiError is an error wrapping multiple validation +// errors returned by StreamEventsResponse.ValidateAll() if the designated +// constraints aren't met. +type StreamEventsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamEventsResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamEventsResponseMultiError) AllErrors() []error { return m } + +// StreamEventsResponseValidationError is the validation error returned by +// StreamEventsResponse.Validate if the designated constraints aren't met. +type StreamEventsResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StreamEventsResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StreamEventsResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StreamEventsResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StreamEventsResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StreamEventsResponseValidationError) ErrorName() string { + return "StreamEventsResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e StreamEventsResponseValidationError) 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 %sStreamEventsResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StreamEventsResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StreamEventsResponseValidationError{} + +// Validate checks the field values on StreamEventsRequest_Identifier 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 *StreamEventsRequest_Identifier) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamEventsRequest_Identifier 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 +// StreamEventsRequest_IdentifierMultiError, or nil if none found. +func (m *StreamEventsRequest_Identifier) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamEventsRequest_Identifier) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetNode() == nil { + err := StreamEventsRequest_IdentifierValidationError{ + field: "Node", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamEventsRequest_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamEventsRequest_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StreamEventsRequest_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return StreamEventsRequest_IdentifierMultiError(errors) + } + return nil +} + +// StreamEventsRequest_IdentifierMultiError is an error wrapping multiple +// validation errors returned by StreamEventsRequest_Identifier.ValidateAll() +// if the designated constraints aren't met. +type StreamEventsRequest_IdentifierMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamEventsRequest_IdentifierMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamEventsRequest_IdentifierMultiError) AllErrors() []error { return m } + +// StreamEventsRequest_IdentifierValidationError is the validation error +// returned by StreamEventsRequest_Identifier.Validate if the designated +// constraints aren't met. +type StreamEventsRequest_IdentifierValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StreamEventsRequest_IdentifierValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StreamEventsRequest_IdentifierValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StreamEventsRequest_IdentifierValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StreamEventsRequest_IdentifierValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StreamEventsRequest_IdentifierValidationError) ErrorName() string { + return "StreamEventsRequest_IdentifierValidationError" +} + +// Error satisfies the builtin error interface +func (e StreamEventsRequest_IdentifierValidationError) 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 %sStreamEventsRequest_Identifier.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StreamEventsRequest_IdentifierValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StreamEventsRequest_IdentifierValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/ext_proc/v3/external_processor.pb.go b/vendor/github.com/cilium/proxy/go/envoy/service/ext_proc/v3/external_processor.pb.go new file mode 100644 index 0000000000000..4b1e8b198342f --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/ext_proc/v3/external_processor.pb.go @@ -0,0 +1,1830 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/service/ext_proc/v3/external_processor.proto + +package ext_procv3 + +import ( + context "context" + v31 "github.com/cilium/proxy/go/envoy/config/core/v3" + v3 "github.com/cilium/proxy/go/envoy/extensions/filters/http/ext_proc/v3" + v32 "github.com/cilium/proxy/go/envoy/type/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type CommonResponse_ResponseStatus int32 + +const ( + // Apply the mutation instructions in this message to the + // request or response, and then continue processing the filter + // stream as normal. This is the default. + CommonResponse_CONTINUE CommonResponse_ResponseStatus = 0 + // Apply the specified header mutation, replace the body with the body + // specified in the body mutation (if present), and do not send any + // further messages for this request or response even if the processing + // mode is configured to do so. + // + // When used in response to a request_headers or response_headers message, + // this status makes it possible to either completely replace the body + // while discarding the original body, or to add a body to a message that + // formerly did not have one. + // + // In other words, this response makes it possible to turn an HTTP GET + // into a POST, PUT, or PATCH. + CommonResponse_CONTINUE_AND_REPLACE CommonResponse_ResponseStatus = 1 +) + +// Enum value maps for CommonResponse_ResponseStatus. +var ( + CommonResponse_ResponseStatus_name = map[int32]string{ + 0: "CONTINUE", + 1: "CONTINUE_AND_REPLACE", + } + CommonResponse_ResponseStatus_value = map[string]int32{ + "CONTINUE": 0, + "CONTINUE_AND_REPLACE": 1, + } +) + +func (x CommonResponse_ResponseStatus) Enum() *CommonResponse_ResponseStatus { + p := new(CommonResponse_ResponseStatus) + *p = x + return p +} + +func (x CommonResponse_ResponseStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CommonResponse_ResponseStatus) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_service_ext_proc_v3_external_processor_proto_enumTypes[0].Descriptor() +} + +func (CommonResponse_ResponseStatus) Type() protoreflect.EnumType { + return &file_envoy_service_ext_proc_v3_external_processor_proto_enumTypes[0] +} + +func (x CommonResponse_ResponseStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CommonResponse_ResponseStatus.Descriptor instead. +func (CommonResponse_ResponseStatus) EnumDescriptor() ([]byte, []int) { + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{8, 0} +} + +// This represents the different types of messages that Envoy can send +// to an external processing server. +// [#next-free-field: 8] +type ProcessingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specify whether the filter that sent this request is running in synchronous + // or asynchronous mode. The choice of synchronous or asynchronous mode + // can be set in the filter configuration, and defaults to false. + // + // - A value of “false“ indicates that the server must respond + // to this message by either sending back a matching ProcessingResponse message, + // or by closing the stream. + // - A value of “true“ indicates that the server must not respond to this + // message, although it may still close the stream to indicate that no more messages + // are needed. + AsyncMode bool `protobuf:"varint,1,opt,name=async_mode,json=asyncMode,proto3" json:"async_mode,omitempty"` + // Each request message will include one of the following sub-messages. Which + // ones are set for a particular HTTP request/response depend on the + // processing mode. + // + // Types that are assignable to Request: + // + // *ProcessingRequest_RequestHeaders + // *ProcessingRequest_ResponseHeaders + // *ProcessingRequest_RequestBody + // *ProcessingRequest_ResponseBody + // *ProcessingRequest_RequestTrailers + // *ProcessingRequest_ResponseTrailers + Request isProcessingRequest_Request `protobuf_oneof:"request"` +} + +func (x *ProcessingRequest) Reset() { + *x = ProcessingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProcessingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProcessingRequest) ProtoMessage() {} + +func (x *ProcessingRequest) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProcessingRequest.ProtoReflect.Descriptor instead. +func (*ProcessingRequest) Descriptor() ([]byte, []int) { + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{0} +} + +func (x *ProcessingRequest) GetAsyncMode() bool { + if x != nil { + return x.AsyncMode + } + return false +} + +func (m *ProcessingRequest) GetRequest() isProcessingRequest_Request { + if m != nil { + return m.Request + } + return nil +} + +func (x *ProcessingRequest) GetRequestHeaders() *HttpHeaders { + if x, ok := x.GetRequest().(*ProcessingRequest_RequestHeaders); ok { + return x.RequestHeaders + } + return nil +} + +func (x *ProcessingRequest) GetResponseHeaders() *HttpHeaders { + if x, ok := x.GetRequest().(*ProcessingRequest_ResponseHeaders); ok { + return x.ResponseHeaders + } + return nil +} + +func (x *ProcessingRequest) GetRequestBody() *HttpBody { + if x, ok := x.GetRequest().(*ProcessingRequest_RequestBody); ok { + return x.RequestBody + } + return nil +} + +func (x *ProcessingRequest) GetResponseBody() *HttpBody { + if x, ok := x.GetRequest().(*ProcessingRequest_ResponseBody); ok { + return x.ResponseBody + } + return nil +} + +func (x *ProcessingRequest) GetRequestTrailers() *HttpTrailers { + if x, ok := x.GetRequest().(*ProcessingRequest_RequestTrailers); ok { + return x.RequestTrailers + } + return nil +} + +func (x *ProcessingRequest) GetResponseTrailers() *HttpTrailers { + if x, ok := x.GetRequest().(*ProcessingRequest_ResponseTrailers); ok { + return x.ResponseTrailers + } + return nil +} + +type isProcessingRequest_Request interface { + isProcessingRequest_Request() +} + +type ProcessingRequest_RequestHeaders struct { + // Information about the HTTP request headers, as well as peer info and additional + // properties. Unless “async_mode“ is “true“, the server must send back a + // HeaderResponse message, an ImmediateResponse message, or close the stream. + RequestHeaders *HttpHeaders `protobuf:"bytes,2,opt,name=request_headers,json=requestHeaders,proto3,oneof"` +} + +type ProcessingRequest_ResponseHeaders struct { + // Information about the HTTP response headers, as well as peer info and additional + // properties. Unless “async_mode“ is “true“, the server must send back a + // HeaderResponse message or close the stream. + ResponseHeaders *HttpHeaders `protobuf:"bytes,3,opt,name=response_headers,json=responseHeaders,proto3,oneof"` +} + +type ProcessingRequest_RequestBody struct { + // A chunk of the HTTP request body. Unless “async_mode“ is true, the server must send back + // a BodyResponse message, an ImmediateResponse message, or close the stream. + RequestBody *HttpBody `protobuf:"bytes,4,opt,name=request_body,json=requestBody,proto3,oneof"` +} + +type ProcessingRequest_ResponseBody struct { + // A chunk of the HTTP request body. Unless “async_mode“ is “true“, the server must send back + // a BodyResponse message or close the stream. + ResponseBody *HttpBody `protobuf:"bytes,5,opt,name=response_body,json=responseBody,proto3,oneof"` +} + +type ProcessingRequest_RequestTrailers struct { + // The HTTP trailers for the request path. Unless “async_mode“ is “true“, the server + // must send back a TrailerResponse message or close the stream. + // + // This message is only sent if the trailers processing mode is set to “SEND“. + // If there are no trailers on the original downstream request, then this message + // will only be sent (with empty trailers waiting to be populated) if the + // processing mode is set before the request headers are sent, such as + // in the filter configuration. + RequestTrailers *HttpTrailers `protobuf:"bytes,6,opt,name=request_trailers,json=requestTrailers,proto3,oneof"` +} + +type ProcessingRequest_ResponseTrailers struct { + // The HTTP trailers for the response path. Unless “async_mode“ is “true“, the server + // must send back a TrailerResponse message or close the stream. + // + // This message is only sent if the trailers processing mode is set to “SEND“. + // If there are no trailers on the original downstream request, then this message + // will only be sent (with empty trailers waiting to be populated) if the + // processing mode is set before the request headers are sent, such as + // in the filter configuration. + ResponseTrailers *HttpTrailers `protobuf:"bytes,7,opt,name=response_trailers,json=responseTrailers,proto3,oneof"` +} + +func (*ProcessingRequest_RequestHeaders) isProcessingRequest_Request() {} + +func (*ProcessingRequest_ResponseHeaders) isProcessingRequest_Request() {} + +func (*ProcessingRequest_RequestBody) isProcessingRequest_Request() {} + +func (*ProcessingRequest_ResponseBody) isProcessingRequest_Request() {} + +func (*ProcessingRequest_RequestTrailers) isProcessingRequest_Request() {} + +func (*ProcessingRequest_ResponseTrailers) isProcessingRequest_Request() {} + +// For every ProcessingRequest received by the server with the “async_mode“ field +// set to false, the server must send back exactly one ProcessingResponse message. +// [#next-free-field: 10] +type ProcessingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Response: + // + // *ProcessingResponse_RequestHeaders + // *ProcessingResponse_ResponseHeaders + // *ProcessingResponse_RequestBody + // *ProcessingResponse_ResponseBody + // *ProcessingResponse_RequestTrailers + // *ProcessingResponse_ResponseTrailers + // *ProcessingResponse_ImmediateResponse + Response isProcessingResponse_Response `protobuf_oneof:"response"` + // [#not-implemented-hide:] + // Optional metadata that will be emitted as dynamic metadata to be consumed by the next + // filter. This metadata will be placed in the namespace “envoy.filters.http.ext_proc“. + DynamicMetadata *structpb.Struct `protobuf:"bytes,8,opt,name=dynamic_metadata,json=dynamicMetadata,proto3" json:"dynamic_metadata,omitempty"` + // Override how parts of the HTTP request and response are processed + // for the duration of this particular request/response only. Servers + // may use this to intelligently control how requests are processed + // based on the headers and other metadata that they see. + ModeOverride *v3.ProcessingMode `protobuf:"bytes,9,opt,name=mode_override,json=modeOverride,proto3" json:"mode_override,omitempty"` +} + +func (x *ProcessingResponse) Reset() { + *x = ProcessingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProcessingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProcessingResponse) ProtoMessage() {} + +func (x *ProcessingResponse) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProcessingResponse.ProtoReflect.Descriptor instead. +func (*ProcessingResponse) Descriptor() ([]byte, []int) { + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{1} +} + +func (m *ProcessingResponse) GetResponse() isProcessingResponse_Response { + if m != nil { + return m.Response + } + return nil +} + +func (x *ProcessingResponse) GetRequestHeaders() *HeadersResponse { + if x, ok := x.GetResponse().(*ProcessingResponse_RequestHeaders); ok { + return x.RequestHeaders + } + return nil +} + +func (x *ProcessingResponse) GetResponseHeaders() *HeadersResponse { + if x, ok := x.GetResponse().(*ProcessingResponse_ResponseHeaders); ok { + return x.ResponseHeaders + } + return nil +} + +func (x *ProcessingResponse) GetRequestBody() *BodyResponse { + if x, ok := x.GetResponse().(*ProcessingResponse_RequestBody); ok { + return x.RequestBody + } + return nil +} + +func (x *ProcessingResponse) GetResponseBody() *BodyResponse { + if x, ok := x.GetResponse().(*ProcessingResponse_ResponseBody); ok { + return x.ResponseBody + } + return nil +} + +func (x *ProcessingResponse) GetRequestTrailers() *TrailersResponse { + if x, ok := x.GetResponse().(*ProcessingResponse_RequestTrailers); ok { + return x.RequestTrailers + } + return nil +} + +func (x *ProcessingResponse) GetResponseTrailers() *TrailersResponse { + if x, ok := x.GetResponse().(*ProcessingResponse_ResponseTrailers); ok { + return x.ResponseTrailers + } + return nil +} + +func (x *ProcessingResponse) GetImmediateResponse() *ImmediateResponse { + if x, ok := x.GetResponse().(*ProcessingResponse_ImmediateResponse); ok { + return x.ImmediateResponse + } + return nil +} + +func (x *ProcessingResponse) GetDynamicMetadata() *structpb.Struct { + if x != nil { + return x.DynamicMetadata + } + return nil +} + +func (x *ProcessingResponse) GetModeOverride() *v3.ProcessingMode { + if x != nil { + return x.ModeOverride + } + return nil +} + +type isProcessingResponse_Response interface { + isProcessingResponse_Response() +} + +type ProcessingResponse_RequestHeaders struct { + // The server must send back this message in response to a message with the + // “request_headers“ field set. + RequestHeaders *HeadersResponse `protobuf:"bytes,1,opt,name=request_headers,json=requestHeaders,proto3,oneof"` +} + +type ProcessingResponse_ResponseHeaders struct { + // The server must send back this message in response to a message with the + // “response_headers“ field set. + ResponseHeaders *HeadersResponse `protobuf:"bytes,2,opt,name=response_headers,json=responseHeaders,proto3,oneof"` +} + +type ProcessingResponse_RequestBody struct { + // The server must send back this message in response to a message with + // the “request_body“ field set. + RequestBody *BodyResponse `protobuf:"bytes,3,opt,name=request_body,json=requestBody,proto3,oneof"` +} + +type ProcessingResponse_ResponseBody struct { + // The server must send back this message in response to a message with + // the “response_body“ field set. + ResponseBody *BodyResponse `protobuf:"bytes,4,opt,name=response_body,json=responseBody,proto3,oneof"` +} + +type ProcessingResponse_RequestTrailers struct { + // The server must send back this message in response to a message with + // the “request_trailers“ field set. + RequestTrailers *TrailersResponse `protobuf:"bytes,5,opt,name=request_trailers,json=requestTrailers,proto3,oneof"` +} + +type ProcessingResponse_ResponseTrailers struct { + // The server must send back this message in response to a message with + // the “response_trailers“ field set. + ResponseTrailers *TrailersResponse `protobuf:"bytes,6,opt,name=response_trailers,json=responseTrailers,proto3,oneof"` +} + +type ProcessingResponse_ImmediateResponse struct { + // If specified, attempt to create a locally generated response, send it + // downstream, and stop processing additional filters and ignore any + // additional messages received from the remote server for this request or + // response. If a response has already started -- for example, if this + // message is sent response to a “response_body“ message -- then + // this will either ship the reply directly to the downstream codec, + // or reset the stream. + ImmediateResponse *ImmediateResponse `protobuf:"bytes,7,opt,name=immediate_response,json=immediateResponse,proto3,oneof"` +} + +func (*ProcessingResponse_RequestHeaders) isProcessingResponse_Response() {} + +func (*ProcessingResponse_ResponseHeaders) isProcessingResponse_Response() {} + +func (*ProcessingResponse_RequestBody) isProcessingResponse_Response() {} + +func (*ProcessingResponse_ResponseBody) isProcessingResponse_Response() {} + +func (*ProcessingResponse_RequestTrailers) isProcessingResponse_Response() {} + +func (*ProcessingResponse_ResponseTrailers) isProcessingResponse_Response() {} + +func (*ProcessingResponse_ImmediateResponse) isProcessingResponse_Response() {} + +// This message is sent to the external server when the HTTP request and responses +// are first received. +type HttpHeaders struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The HTTP request headers. All header keys will be + // lower-cased, because HTTP header keys are case-insensitive. + Headers *v31.HeaderMap `protobuf:"bytes,1,opt,name=headers,proto3" json:"headers,omitempty"` + // [#not-implemented-hide:] + // The values of properties selected by the “request_attributes“ + // or “response_attributes“ list in the configuration. Each entry + // in the list is populated + // from the standard :ref:`attributes ` + // supported across Envoy. + Attributes map[string]*structpb.Struct `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // If true, then there is no message body associated with this + // request or response. + EndOfStream bool `protobuf:"varint,3,opt,name=end_of_stream,json=endOfStream,proto3" json:"end_of_stream,omitempty"` +} + +func (x *HttpHeaders) Reset() { + *x = HttpHeaders{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpHeaders) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpHeaders) ProtoMessage() {} + +func (x *HttpHeaders) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpHeaders.ProtoReflect.Descriptor instead. +func (*HttpHeaders) Descriptor() ([]byte, []int) { + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{2} +} + +func (x *HttpHeaders) GetHeaders() *v31.HeaderMap { + if x != nil { + return x.Headers + } + return nil +} + +func (x *HttpHeaders) GetAttributes() map[string]*structpb.Struct { + if x != nil { + return x.Attributes + } + return nil +} + +func (x *HttpHeaders) GetEndOfStream() bool { + if x != nil { + return x.EndOfStream + } + return false +} + +// This message contains the message body that Envoy sends to the external server. +type HttpBody struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Body []byte `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` + EndOfStream bool `protobuf:"varint,2,opt,name=end_of_stream,json=endOfStream,proto3" json:"end_of_stream,omitempty"` +} + +func (x *HttpBody) Reset() { + *x = HttpBody{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpBody) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpBody) ProtoMessage() {} + +func (x *HttpBody) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpBody.ProtoReflect.Descriptor instead. +func (*HttpBody) Descriptor() ([]byte, []int) { + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{3} +} + +func (x *HttpBody) GetBody() []byte { + if x != nil { + return x.Body + } + return nil +} + +func (x *HttpBody) GetEndOfStream() bool { + if x != nil { + return x.EndOfStream + } + return false +} + +// This message contains the trailers. +type HttpTrailers struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Trailers *v31.HeaderMap `protobuf:"bytes,1,opt,name=trailers,proto3" json:"trailers,omitempty"` +} + +func (x *HttpTrailers) Reset() { + *x = HttpTrailers{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpTrailers) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpTrailers) ProtoMessage() {} + +func (x *HttpTrailers) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpTrailers.ProtoReflect.Descriptor instead. +func (*HttpTrailers) Descriptor() ([]byte, []int) { + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{4} +} + +func (x *HttpTrailers) GetTrailers() *v31.HeaderMap { + if x != nil { + return x.Trailers + } + return nil +} + +// This message must be sent in response to an HttpHeaders message. +type HeadersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *CommonResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` +} + +func (x *HeadersResponse) Reset() { + *x = HeadersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeadersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeadersResponse) ProtoMessage() {} + +func (x *HeadersResponse) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HeadersResponse.ProtoReflect.Descriptor instead. +func (*HeadersResponse) Descriptor() ([]byte, []int) { + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{5} +} + +func (x *HeadersResponse) GetResponse() *CommonResponse { + if x != nil { + return x.Response + } + return nil +} + +// This message must be sent in response to an HttpTrailers message. +type TrailersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Instructions on how to manipulate the trailers + HeaderMutation *HeaderMutation `protobuf:"bytes,1,opt,name=header_mutation,json=headerMutation,proto3" json:"header_mutation,omitempty"` +} + +func (x *TrailersResponse) Reset() { + *x = TrailersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TrailersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TrailersResponse) ProtoMessage() {} + +func (x *TrailersResponse) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TrailersResponse.ProtoReflect.Descriptor instead. +func (*TrailersResponse) Descriptor() ([]byte, []int) { + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{6} +} + +func (x *TrailersResponse) GetHeaderMutation() *HeaderMutation { + if x != nil { + return x.HeaderMutation + } + return nil +} + +// This message must be sent in response to an HttpBody message. +type BodyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Response *CommonResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` +} + +func (x *BodyResponse) Reset() { + *x = BodyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BodyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BodyResponse) ProtoMessage() {} + +func (x *BodyResponse) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BodyResponse.ProtoReflect.Descriptor instead. +func (*BodyResponse) Descriptor() ([]byte, []int) { + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{7} +} + +func (x *BodyResponse) GetResponse() *CommonResponse { + if x != nil { + return x.Response + } + return nil +} + +// This message contains common fields between header and body responses. +// [#next-free-field: 6] +type CommonResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If set, provide additional direction on how the Envoy proxy should + // handle the rest of the HTTP filter chain. + Status CommonResponse_ResponseStatus `protobuf:"varint,1,opt,name=status,proto3,enum=envoy.service.ext_proc.v3.CommonResponse_ResponseStatus" json:"status,omitempty"` + // Instructions on how to manipulate the headers. When responding to an + // HttpBody request, header mutations will only take effect if + // the current processing mode for the body is BUFFERED. + HeaderMutation *HeaderMutation `protobuf:"bytes,2,opt,name=header_mutation,json=headerMutation,proto3" json:"header_mutation,omitempty"` + // Replace the body of the last message sent to the remote server on this + // stream. If responding to an HttpBody request, simply replace or clear + // the body chunk that was sent with that request. Body mutations only take + // effect in response to “body“ messages and are ignored otherwise. + BodyMutation *BodyMutation `protobuf:"bytes,3,opt,name=body_mutation,json=bodyMutation,proto3" json:"body_mutation,omitempty"` + // [#not-implemented-hide:] + // Add new trailers to the message. This may be used when responding to either a + // HttpHeaders or HttpBody message, but only if this message is returned + // along with the CONTINUE_AND_REPLACE status. + Trailers *v31.HeaderMap `protobuf:"bytes,4,opt,name=trailers,proto3" json:"trailers,omitempty"` + // Clear the route cache for the current request. + // This is necessary if the remote server + // modified headers that are used to calculate the route. + ClearRouteCache bool `protobuf:"varint,5,opt,name=clear_route_cache,json=clearRouteCache,proto3" json:"clear_route_cache,omitempty"` +} + +func (x *CommonResponse) Reset() { + *x = CommonResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CommonResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CommonResponse) ProtoMessage() {} + +func (x *CommonResponse) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CommonResponse.ProtoReflect.Descriptor instead. +func (*CommonResponse) Descriptor() ([]byte, []int) { + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{8} +} + +func (x *CommonResponse) GetStatus() CommonResponse_ResponseStatus { + if x != nil { + return x.Status + } + return CommonResponse_CONTINUE +} + +func (x *CommonResponse) GetHeaderMutation() *HeaderMutation { + if x != nil { + return x.HeaderMutation + } + return nil +} + +func (x *CommonResponse) GetBodyMutation() *BodyMutation { + if x != nil { + return x.BodyMutation + } + return nil +} + +func (x *CommonResponse) GetTrailers() *v31.HeaderMap { + if x != nil { + return x.Trailers + } + return nil +} + +func (x *CommonResponse) GetClearRouteCache() bool { + if x != nil { + return x.ClearRouteCache + } + return false +} + +// This message causes the filter to attempt to create a locally +// generated response, send it downstream, stop processing +// additional filters, and ignore any additional messages received +// from the remote server for this request or response. If a response +// has already started, then this will either ship the reply directly +// to the downstream codec, or reset the stream. +// [#next-free-field: 6] +type ImmediateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The response code to return + Status *v32.HttpStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + // Apply changes to the default headers, which will include content-type. + Headers *HeaderMutation `protobuf:"bytes,2,opt,name=headers,proto3" json:"headers,omitempty"` + // The message body to return with the response which is sent using the + // text/plain content type, or encoded in the grpc-message header. + Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` + // If set, then include a gRPC status trailer. + GrpcStatus *GrpcStatus `protobuf:"bytes,4,opt,name=grpc_status,json=grpcStatus,proto3" json:"grpc_status,omitempty"` + // A string detailing why this local reply was sent, which may be included + // in log and debug output (e.g. this populates the %RESPONSE_CODE_DETAILS% + // command operator field for use in access logging). + Details string `protobuf:"bytes,5,opt,name=details,proto3" json:"details,omitempty"` +} + +func (x *ImmediateResponse) Reset() { + *x = ImmediateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImmediateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImmediateResponse) ProtoMessage() {} + +func (x *ImmediateResponse) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImmediateResponse.ProtoReflect.Descriptor instead. +func (*ImmediateResponse) Descriptor() ([]byte, []int) { + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{9} +} + +func (x *ImmediateResponse) GetStatus() *v32.HttpStatus { + if x != nil { + return x.Status + } + return nil +} + +func (x *ImmediateResponse) GetHeaders() *HeaderMutation { + if x != nil { + return x.Headers + } + return nil +} + +func (x *ImmediateResponse) GetBody() string { + if x != nil { + return x.Body + } + return "" +} + +func (x *ImmediateResponse) GetGrpcStatus() *GrpcStatus { + if x != nil { + return x.GrpcStatus + } + return nil +} + +func (x *ImmediateResponse) GetDetails() string { + if x != nil { + return x.Details + } + return "" +} + +// This message specifies a gRPC status for an ImmediateResponse message. +type GrpcStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The actual gRPC status + Status uint32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *GrpcStatus) Reset() { + *x = GrpcStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GrpcStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GrpcStatus) ProtoMessage() {} + +func (x *GrpcStatus) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GrpcStatus.ProtoReflect.Descriptor instead. +func (*GrpcStatus) Descriptor() ([]byte, []int) { + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{10} +} + +func (x *GrpcStatus) GetStatus() uint32 { + if x != nil { + return x.Status + } + return 0 +} + +// Change HTTP headers or trailers by appending, replacing, or removing +// headers. +type HeaderMutation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Add or replace HTTP headers. Attempts to set the value of + // any “x-envoy“ header, and attempts to set the “:method“, + // “:authority“, “:scheme“, or “host“ headers will be ignored. + SetHeaders []*v31.HeaderValueOption `protobuf:"bytes,1,rep,name=set_headers,json=setHeaders,proto3" json:"set_headers,omitempty"` + // Remove these HTTP headers. Attempts to remove system headers -- + // any header starting with “:“, plus “host“ -- will be ignored. + RemoveHeaders []string `protobuf:"bytes,2,rep,name=remove_headers,json=removeHeaders,proto3" json:"remove_headers,omitempty"` +} + +func (x *HeaderMutation) Reset() { + *x = HeaderMutation{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeaderMutation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeaderMutation) ProtoMessage() {} + +func (x *HeaderMutation) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HeaderMutation.ProtoReflect.Descriptor instead. +func (*HeaderMutation) Descriptor() ([]byte, []int) { + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{11} +} + +func (x *HeaderMutation) GetSetHeaders() []*v31.HeaderValueOption { + if x != nil { + return x.SetHeaders + } + return nil +} + +func (x *HeaderMutation) GetRemoveHeaders() []string { + if x != nil { + return x.RemoveHeaders + } + return nil +} + +// Replace the entire message body chunk received in the corresponding +// HttpBody message with this new body, or clear the body. +type BodyMutation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Mutation: + // + // *BodyMutation_Body + // *BodyMutation_ClearBody + Mutation isBodyMutation_Mutation `protobuf_oneof:"mutation"` +} + +func (x *BodyMutation) Reset() { + *x = BodyMutation{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BodyMutation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BodyMutation) ProtoMessage() {} + +func (x *BodyMutation) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BodyMutation.ProtoReflect.Descriptor instead. +func (*BodyMutation) Descriptor() ([]byte, []int) { + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP(), []int{12} +} + +func (m *BodyMutation) GetMutation() isBodyMutation_Mutation { + if m != nil { + return m.Mutation + } + return nil +} + +func (x *BodyMutation) GetBody() []byte { + if x, ok := x.GetMutation().(*BodyMutation_Body); ok { + return x.Body + } + return nil +} + +func (x *BodyMutation) GetClearBody() bool { + if x, ok := x.GetMutation().(*BodyMutation_ClearBody); ok { + return x.ClearBody + } + return false +} + +type isBodyMutation_Mutation interface { + isBodyMutation_Mutation() +} + +type BodyMutation_Body struct { + // The entire body to replace + Body []byte `protobuf:"bytes,1,opt,name=body,proto3,oneof"` +} + +type BodyMutation_ClearBody struct { + // Clear the corresponding body chunk + ClearBody bool `protobuf:"varint,2,opt,name=clear_body,json=clearBody,proto3,oneof"` +} + +func (*BodyMutation_Body) isBodyMutation_Mutation() {} + +func (*BodyMutation_ClearBody) isBodyMutation_Mutation() {} + +var File_envoy_service_ext_proc_v3_external_processor_proto protoreflect.FileDescriptor + +var file_envoy_service_ext_proc_v3_external_processor_proto_rawDesc = []byte{ + 0x0a, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x1a, + 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, + 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xae, 0x04, 0x0a, 0x11, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x51, + 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x48, + 0x00, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x53, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, + 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x48, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, + 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, + 0x79, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, + 0x12, 0x4a, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x62, 0x6f, 0x64, + 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x48, 0x00, 0x52, 0x0c, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x54, 0x0a, 0x10, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, + 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x48, + 0x00, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, + 0x72, 0x73, 0x12, 0x56, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, + 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, + 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x54, 0x72, + 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x42, 0x0e, 0x0a, 0x07, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xac, 0x06, 0x0a, 0x12, 0x50, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x55, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, + 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x57, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, + 0x52, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x4c, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6f, 0x64, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, + 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x12, + 0x4e, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x62, 0x6f, 0x64, 0x79, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, + 0x76, 0x33, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, + 0x00, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x12, + 0x58, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, + 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, + 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x5a, 0x0a, 0x11, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, + 0x2e, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x48, 0x00, 0x52, 0x10, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x72, 0x61, + 0x69, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6d, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, + 0x00, 0x52, 0x11, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x10, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0f, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5e, 0x0a, 0x0d, 0x6d, 0x6f, 0x64, 0x65, + 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0c, 0x6d, 0x6f, 0x64, 0x65, + 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x42, 0x0f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x9c, 0x02, 0x0a, 0x0b, 0x48, 0x74, + 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x39, 0x0a, 0x07, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x52, 0x07, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x12, 0x56, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, + 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0d, + 0x65, 0x6e, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0b, 0x65, 0x6e, 0x64, 0x4f, 0x66, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x1a, 0x56, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x42, 0x0a, 0x08, 0x48, 0x74, 0x74, 0x70, + 0x42, 0x6f, 0x64, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x22, 0x0a, 0x0d, 0x65, 0x6e, 0x64, 0x5f, + 0x6f, 0x66, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x65, 0x6e, 0x64, 0x4f, 0x66, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x22, 0x4b, 0x0a, 0x0c, + 0x48, 0x74, 0x74, 0x70, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x3b, 0x0a, 0x08, + 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x52, + 0x08, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x22, 0x58, 0x0a, 0x0f, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x08, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, + 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x66, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x5f, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x55, 0x0a, 0x0c, 0x42, + 0x6f, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x08, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, + 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xb1, 0x03, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, + 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x52, 0x0a, 0x0f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x75, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, + 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4c, 0x0a, 0x0d, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x6d, 0x75, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, + 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x75, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x62, 0x6f, 0x64, 0x79, 0x4d, 0x75, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x4d, 0x61, 0x70, 0x52, 0x08, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, + 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, + 0x63, 0x61, 0x63, 0x68, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x63, 0x6c, 0x65, + 0x61, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x22, 0x38, 0x0a, 0x0e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0c, + 0x0a, 0x08, 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x4e, 0x55, 0x45, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, + 0x43, 0x4f, 0x4e, 0x54, 0x49, 0x4e, 0x55, 0x45, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x50, + 0x4c, 0x41, 0x43, 0x45, 0x10, 0x01, 0x22, 0x8b, 0x02, 0x0a, 0x11, 0x49, 0x6d, 0x6d, 0x65, 0x64, + 0x69, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, + 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x43, 0x0a, 0x07, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, + 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, + 0x64, 0x79, 0x12, 0x46, 0x0a, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, + 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0a, + 0x67, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x22, 0x24, 0x0a, 0x0a, 0x47, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x81, 0x01, 0x0a, 0x0e, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, + 0x0b, 0x73, 0x65, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x73, 0x65, 0x74, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0x51, + 0x0a, 0x0c, 0x42, 0x6f, 0x64, 0x79, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, + 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x04, + 0x62, 0x6f, 0x64, 0x79, 0x12, 0x1f, 0x0a, 0x0a, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x62, 0x6f, + 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x63, 0x6c, 0x65, 0x61, + 0x72, 0x42, 0x6f, 0x64, 0x79, 0x42, 0x0a, 0x0a, 0x08, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x32, 0x81, 0x01, 0x0a, 0x11, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x6c, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0xa3, 0x01, 0x0a, 0x27, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x76, + 0x33, 0x42, 0x16, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4b, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2f, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x65, 0x78, + 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x76, 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_service_ext_proc_v3_external_processor_proto_rawDescOnce sync.Once + file_envoy_service_ext_proc_v3_external_processor_proto_rawDescData = file_envoy_service_ext_proc_v3_external_processor_proto_rawDesc +) + +func file_envoy_service_ext_proc_v3_external_processor_proto_rawDescGZIP() []byte { + file_envoy_service_ext_proc_v3_external_processor_proto_rawDescOnce.Do(func() { + file_envoy_service_ext_proc_v3_external_processor_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_ext_proc_v3_external_processor_proto_rawDescData) + }) + return file_envoy_service_ext_proc_v3_external_processor_proto_rawDescData +} + +var file_envoy_service_ext_proc_v3_external_processor_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_envoy_service_ext_proc_v3_external_processor_proto_goTypes = []interface{}{ + (CommonResponse_ResponseStatus)(0), // 0: envoy.service.ext_proc.v3.CommonResponse.ResponseStatus + (*ProcessingRequest)(nil), // 1: envoy.service.ext_proc.v3.ProcessingRequest + (*ProcessingResponse)(nil), // 2: envoy.service.ext_proc.v3.ProcessingResponse + (*HttpHeaders)(nil), // 3: envoy.service.ext_proc.v3.HttpHeaders + (*HttpBody)(nil), // 4: envoy.service.ext_proc.v3.HttpBody + (*HttpTrailers)(nil), // 5: envoy.service.ext_proc.v3.HttpTrailers + (*HeadersResponse)(nil), // 6: envoy.service.ext_proc.v3.HeadersResponse + (*TrailersResponse)(nil), // 7: envoy.service.ext_proc.v3.TrailersResponse + (*BodyResponse)(nil), // 8: envoy.service.ext_proc.v3.BodyResponse + (*CommonResponse)(nil), // 9: envoy.service.ext_proc.v3.CommonResponse + (*ImmediateResponse)(nil), // 10: envoy.service.ext_proc.v3.ImmediateResponse + (*GrpcStatus)(nil), // 11: envoy.service.ext_proc.v3.GrpcStatus + (*HeaderMutation)(nil), // 12: envoy.service.ext_proc.v3.HeaderMutation + (*BodyMutation)(nil), // 13: envoy.service.ext_proc.v3.BodyMutation + nil, // 14: envoy.service.ext_proc.v3.HttpHeaders.AttributesEntry + (*structpb.Struct)(nil), // 15: google.protobuf.Struct + (*v3.ProcessingMode)(nil), // 16: envoy.extensions.filters.http.ext_proc.v3.ProcessingMode + (*v31.HeaderMap)(nil), // 17: envoy.config.core.v3.HeaderMap + (*v32.HttpStatus)(nil), // 18: envoy.type.v3.HttpStatus + (*v31.HeaderValueOption)(nil), // 19: envoy.config.core.v3.HeaderValueOption +} +var file_envoy_service_ext_proc_v3_external_processor_proto_depIdxs = []int32{ + 3, // 0: envoy.service.ext_proc.v3.ProcessingRequest.request_headers:type_name -> envoy.service.ext_proc.v3.HttpHeaders + 3, // 1: envoy.service.ext_proc.v3.ProcessingRequest.response_headers:type_name -> envoy.service.ext_proc.v3.HttpHeaders + 4, // 2: envoy.service.ext_proc.v3.ProcessingRequest.request_body:type_name -> envoy.service.ext_proc.v3.HttpBody + 4, // 3: envoy.service.ext_proc.v3.ProcessingRequest.response_body:type_name -> envoy.service.ext_proc.v3.HttpBody + 5, // 4: envoy.service.ext_proc.v3.ProcessingRequest.request_trailers:type_name -> envoy.service.ext_proc.v3.HttpTrailers + 5, // 5: envoy.service.ext_proc.v3.ProcessingRequest.response_trailers:type_name -> envoy.service.ext_proc.v3.HttpTrailers + 6, // 6: envoy.service.ext_proc.v3.ProcessingResponse.request_headers:type_name -> envoy.service.ext_proc.v3.HeadersResponse + 6, // 7: envoy.service.ext_proc.v3.ProcessingResponse.response_headers:type_name -> envoy.service.ext_proc.v3.HeadersResponse + 8, // 8: envoy.service.ext_proc.v3.ProcessingResponse.request_body:type_name -> envoy.service.ext_proc.v3.BodyResponse + 8, // 9: envoy.service.ext_proc.v3.ProcessingResponse.response_body:type_name -> envoy.service.ext_proc.v3.BodyResponse + 7, // 10: envoy.service.ext_proc.v3.ProcessingResponse.request_trailers:type_name -> envoy.service.ext_proc.v3.TrailersResponse + 7, // 11: envoy.service.ext_proc.v3.ProcessingResponse.response_trailers:type_name -> envoy.service.ext_proc.v3.TrailersResponse + 10, // 12: envoy.service.ext_proc.v3.ProcessingResponse.immediate_response:type_name -> envoy.service.ext_proc.v3.ImmediateResponse + 15, // 13: envoy.service.ext_proc.v3.ProcessingResponse.dynamic_metadata:type_name -> google.protobuf.Struct + 16, // 14: envoy.service.ext_proc.v3.ProcessingResponse.mode_override:type_name -> envoy.extensions.filters.http.ext_proc.v3.ProcessingMode + 17, // 15: envoy.service.ext_proc.v3.HttpHeaders.headers:type_name -> envoy.config.core.v3.HeaderMap + 14, // 16: envoy.service.ext_proc.v3.HttpHeaders.attributes:type_name -> envoy.service.ext_proc.v3.HttpHeaders.AttributesEntry + 17, // 17: envoy.service.ext_proc.v3.HttpTrailers.trailers:type_name -> envoy.config.core.v3.HeaderMap + 9, // 18: envoy.service.ext_proc.v3.HeadersResponse.response:type_name -> envoy.service.ext_proc.v3.CommonResponse + 12, // 19: envoy.service.ext_proc.v3.TrailersResponse.header_mutation:type_name -> envoy.service.ext_proc.v3.HeaderMutation + 9, // 20: envoy.service.ext_proc.v3.BodyResponse.response:type_name -> envoy.service.ext_proc.v3.CommonResponse + 0, // 21: envoy.service.ext_proc.v3.CommonResponse.status:type_name -> envoy.service.ext_proc.v3.CommonResponse.ResponseStatus + 12, // 22: envoy.service.ext_proc.v3.CommonResponse.header_mutation:type_name -> envoy.service.ext_proc.v3.HeaderMutation + 13, // 23: envoy.service.ext_proc.v3.CommonResponse.body_mutation:type_name -> envoy.service.ext_proc.v3.BodyMutation + 17, // 24: envoy.service.ext_proc.v3.CommonResponse.trailers:type_name -> envoy.config.core.v3.HeaderMap + 18, // 25: envoy.service.ext_proc.v3.ImmediateResponse.status:type_name -> envoy.type.v3.HttpStatus + 12, // 26: envoy.service.ext_proc.v3.ImmediateResponse.headers:type_name -> envoy.service.ext_proc.v3.HeaderMutation + 11, // 27: envoy.service.ext_proc.v3.ImmediateResponse.grpc_status:type_name -> envoy.service.ext_proc.v3.GrpcStatus + 19, // 28: envoy.service.ext_proc.v3.HeaderMutation.set_headers:type_name -> envoy.config.core.v3.HeaderValueOption + 15, // 29: envoy.service.ext_proc.v3.HttpHeaders.AttributesEntry.value:type_name -> google.protobuf.Struct + 1, // 30: envoy.service.ext_proc.v3.ExternalProcessor.Process:input_type -> envoy.service.ext_proc.v3.ProcessingRequest + 2, // 31: envoy.service.ext_proc.v3.ExternalProcessor.Process:output_type -> envoy.service.ext_proc.v3.ProcessingResponse + 31, // [31:32] is the sub-list for method output_type + 30, // [30:31] is the sub-list for method input_type + 30, // [30:30] is the sub-list for extension type_name + 30, // [30:30] is the sub-list for extension extendee + 0, // [0:30] is the sub-list for field type_name +} + +func init() { file_envoy_service_ext_proc_v3_external_processor_proto_init() } +func file_envoy_service_ext_proc_v3_external_processor_proto_init() { + if File_envoy_service_ext_proc_v3_external_processor_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProcessingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProcessingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpHeaders); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpBody); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpTrailers); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeadersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TrailersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BodyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CommonResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImmediateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GrpcStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeaderMutation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BodyMutation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*ProcessingRequest_RequestHeaders)(nil), + (*ProcessingRequest_ResponseHeaders)(nil), + (*ProcessingRequest_RequestBody)(nil), + (*ProcessingRequest_ResponseBody)(nil), + (*ProcessingRequest_RequestTrailers)(nil), + (*ProcessingRequest_ResponseTrailers)(nil), + } + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*ProcessingResponse_RequestHeaders)(nil), + (*ProcessingResponse_ResponseHeaders)(nil), + (*ProcessingResponse_RequestBody)(nil), + (*ProcessingResponse_ResponseBody)(nil), + (*ProcessingResponse_RequestTrailers)(nil), + (*ProcessingResponse_ResponseTrailers)(nil), + (*ProcessingResponse_ImmediateResponse)(nil), + } + file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes[12].OneofWrappers = []interface{}{ + (*BodyMutation_Body)(nil), + (*BodyMutation_ClearBody)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_service_ext_proc_v3_external_processor_proto_rawDesc, + NumEnums: 1, + NumMessages: 14, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_envoy_service_ext_proc_v3_external_processor_proto_goTypes, + DependencyIndexes: file_envoy_service_ext_proc_v3_external_processor_proto_depIdxs, + EnumInfos: file_envoy_service_ext_proc_v3_external_processor_proto_enumTypes, + MessageInfos: file_envoy_service_ext_proc_v3_external_processor_proto_msgTypes, + }.Build() + File_envoy_service_ext_proc_v3_external_processor_proto = out.File + file_envoy_service_ext_proc_v3_external_processor_proto_rawDesc = nil + file_envoy_service_ext_proc_v3_external_processor_proto_goTypes = nil + file_envoy_service_ext_proc_v3_external_processor_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// ExternalProcessorClient is the client API for ExternalProcessor service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ExternalProcessorClient interface { + // This begins the bidirectional stream that Envoy will use to + // give the server control over what the filter does. The actual + // protocol is described by the ProcessingRequest and ProcessingResponse + // messages below. + Process(ctx context.Context, opts ...grpc.CallOption) (ExternalProcessor_ProcessClient, error) +} + +type externalProcessorClient struct { + cc grpc.ClientConnInterface +} + +func NewExternalProcessorClient(cc grpc.ClientConnInterface) ExternalProcessorClient { + return &externalProcessorClient{cc} +} + +func (c *externalProcessorClient) Process(ctx context.Context, opts ...grpc.CallOption) (ExternalProcessor_ProcessClient, error) { + stream, err := c.cc.NewStream(ctx, &_ExternalProcessor_serviceDesc.Streams[0], "/envoy.service.ext_proc.v3.ExternalProcessor/Process", opts...) + if err != nil { + return nil, err + } + x := &externalProcessorProcessClient{stream} + return x, nil +} + +type ExternalProcessor_ProcessClient interface { + Send(*ProcessingRequest) error + Recv() (*ProcessingResponse, error) + grpc.ClientStream +} + +type externalProcessorProcessClient struct { + grpc.ClientStream +} + +func (x *externalProcessorProcessClient) Send(m *ProcessingRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *externalProcessorProcessClient) Recv() (*ProcessingResponse, error) { + m := new(ProcessingResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// ExternalProcessorServer is the server API for ExternalProcessor service. +type ExternalProcessorServer interface { + // This begins the bidirectional stream that Envoy will use to + // give the server control over what the filter does. The actual + // protocol is described by the ProcessingRequest and ProcessingResponse + // messages below. + Process(ExternalProcessor_ProcessServer) error +} + +// UnimplementedExternalProcessorServer can be embedded to have forward compatible implementations. +type UnimplementedExternalProcessorServer struct { +} + +func (*UnimplementedExternalProcessorServer) Process(ExternalProcessor_ProcessServer) error { + return status.Errorf(codes.Unimplemented, "method Process not implemented") +} + +func RegisterExternalProcessorServer(s *grpc.Server, srv ExternalProcessorServer) { + s.RegisterService(&_ExternalProcessor_serviceDesc, srv) +} + +func _ExternalProcessor_Process_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(ExternalProcessorServer).Process(&externalProcessorProcessServer{stream}) +} + +type ExternalProcessor_ProcessServer interface { + Send(*ProcessingResponse) error + Recv() (*ProcessingRequest, error) + grpc.ServerStream +} + +type externalProcessorProcessServer struct { + grpc.ServerStream +} + +func (x *externalProcessorProcessServer) Send(m *ProcessingResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *externalProcessorProcessServer) Recv() (*ProcessingRequest, error) { + m := new(ProcessingRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +var _ExternalProcessor_serviceDesc = grpc.ServiceDesc{ + ServiceName: "envoy.service.ext_proc.v3.ExternalProcessor", + HandlerType: (*ExternalProcessorServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "Process", + Handler: _ExternalProcessor_Process_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "envoy/service/ext_proc/v3/external_processor.proto", +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/ext_proc/v3/external_processor.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/service/ext_proc/v3/external_processor.pb.validate.go new file mode 100644 index 0000000000000..b02301ea8d8ca --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/ext_proc/v3/external_processor.pb.validate.go @@ -0,0 +1,2259 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/service/ext_proc/v3/external_processor.proto + +package ext_procv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ProcessingRequest 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 *ProcessingRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ProcessingRequest 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 +// ProcessingRequestMultiError, or nil if none found. +func (m *ProcessingRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ProcessingRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for AsyncMode + + switch m.Request.(type) { + + case *ProcessingRequest_RequestHeaders: + + if all { + switch v := interface{}(m.GetRequestHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestHeaders()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingRequestValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ProcessingRequest_ResponseHeaders: + + if all { + switch v := interface{}(m.GetResponseHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "ResponseHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "ResponseHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseHeaders()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingRequestValidationError{ + field: "ResponseHeaders", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ProcessingRequest_RequestBody: + + if all { + switch v := interface{}(m.GetRequestBody()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "RequestBody", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "RequestBody", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestBody()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingRequestValidationError{ + field: "RequestBody", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ProcessingRequest_ResponseBody: + + if all { + switch v := interface{}(m.GetResponseBody()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "ResponseBody", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "ResponseBody", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseBody()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingRequestValidationError{ + field: "ResponseBody", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ProcessingRequest_RequestTrailers: + + if all { + switch v := interface{}(m.GetRequestTrailers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "RequestTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "RequestTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestTrailers()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingRequestValidationError{ + field: "RequestTrailers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ProcessingRequest_ResponseTrailers: + + if all { + switch v := interface{}(m.GetResponseTrailers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "ResponseTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingRequestValidationError{ + field: "ResponseTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseTrailers()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingRequestValidationError{ + field: "ResponseTrailers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := ProcessingRequestValidationError{ + field: "Request", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return ProcessingRequestMultiError(errors) + } + return nil +} + +// ProcessingRequestMultiError is an error wrapping multiple validation errors +// returned by ProcessingRequest.ValidateAll() if the designated constraints +// aren't met. +type ProcessingRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ProcessingRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ProcessingRequestMultiError) AllErrors() []error { return m } + +// ProcessingRequestValidationError is the validation error returned by +// ProcessingRequest.Validate if the designated constraints aren't met. +type ProcessingRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ProcessingRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ProcessingRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ProcessingRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ProcessingRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ProcessingRequestValidationError) ErrorName() string { + return "ProcessingRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ProcessingRequestValidationError) 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 %sProcessingRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ProcessingRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ProcessingRequestValidationError{} + +// Validate checks the field values on ProcessingResponse 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 *ProcessingResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ProcessingResponse 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 +// ProcessingResponseMultiError, or nil if none found. +func (m *ProcessingResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ProcessingResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetDynamicMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDynamicMetadata()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingResponseValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetModeOverride()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "ModeOverride", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "ModeOverride", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetModeOverride()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingResponseValidationError{ + field: "ModeOverride", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.Response.(type) { + + case *ProcessingResponse_RequestHeaders: + + if all { + switch v := interface{}(m.GetRequestHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestHeaders()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingResponseValidationError{ + field: "RequestHeaders", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ProcessingResponse_ResponseHeaders: + + if all { + switch v := interface{}(m.GetResponseHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "ResponseHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "ResponseHeaders", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseHeaders()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingResponseValidationError{ + field: "ResponseHeaders", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ProcessingResponse_RequestBody: + + if all { + switch v := interface{}(m.GetRequestBody()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "RequestBody", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "RequestBody", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestBody()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingResponseValidationError{ + field: "RequestBody", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ProcessingResponse_ResponseBody: + + if all { + switch v := interface{}(m.GetResponseBody()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "ResponseBody", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "ResponseBody", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseBody()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingResponseValidationError{ + field: "ResponseBody", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ProcessingResponse_RequestTrailers: + + if all { + switch v := interface{}(m.GetRequestTrailers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "RequestTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "RequestTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRequestTrailers()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingResponseValidationError{ + field: "RequestTrailers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ProcessingResponse_ResponseTrailers: + + if all { + switch v := interface{}(m.GetResponseTrailers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "ResponseTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "ResponseTrailers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponseTrailers()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingResponseValidationError{ + field: "ResponseTrailers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ProcessingResponse_ImmediateResponse: + + if all { + switch v := interface{}(m.GetImmediateResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "ImmediateResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ProcessingResponseValidationError{ + field: "ImmediateResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetImmediateResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ProcessingResponseValidationError{ + field: "ImmediateResponse", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := ProcessingResponseValidationError{ + field: "Response", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return ProcessingResponseMultiError(errors) + } + return nil +} + +// ProcessingResponseMultiError is an error wrapping multiple validation errors +// returned by ProcessingResponse.ValidateAll() if the designated constraints +// aren't met. +type ProcessingResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ProcessingResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ProcessingResponseMultiError) AllErrors() []error { return m } + +// ProcessingResponseValidationError is the validation error returned by +// ProcessingResponse.Validate if the designated constraints aren't met. +type ProcessingResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ProcessingResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ProcessingResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ProcessingResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ProcessingResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ProcessingResponseValidationError) ErrorName() string { + return "ProcessingResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ProcessingResponseValidationError) 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 %sProcessingResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ProcessingResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ProcessingResponseValidationError{} + +// Validate checks the field values on HttpHeaders 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 *HttpHeaders) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpHeaders 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 HttpHeadersMultiError, or +// nil if none found. +func (m *HttpHeaders) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpHeaders) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpHeadersValidationError{ + field: "Headers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpHeadersValidationError{ + field: "Headers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaders()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpHeadersValidationError{ + field: "Headers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + { + sorted_keys := make([]string, len(m.GetAttributes())) + i := 0 + for key := range m.GetAttributes() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetAttributes()[key] + _ = val + + // no validation rules for Attributes[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpHeadersValidationError{ + field: fmt.Sprintf("Attributes[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpHeadersValidationError{ + field: fmt.Sprintf("Attributes[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpHeadersValidationError{ + field: fmt.Sprintf("Attributes[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + // no validation rules for EndOfStream + + if len(errors) > 0 { + return HttpHeadersMultiError(errors) + } + return nil +} + +// HttpHeadersMultiError is an error wrapping multiple validation errors +// returned by HttpHeaders.ValidateAll() if the designated constraints aren't met. +type HttpHeadersMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpHeadersMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpHeadersMultiError) AllErrors() []error { return m } + +// HttpHeadersValidationError is the validation error returned by +// HttpHeaders.Validate if the designated constraints aren't met. +type HttpHeadersValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpHeadersValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpHeadersValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpHeadersValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpHeadersValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpHeadersValidationError) ErrorName() string { return "HttpHeadersValidationError" } + +// Error satisfies the builtin error interface +func (e HttpHeadersValidationError) 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 %sHttpHeaders.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpHeadersValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpHeadersValidationError{} + +// Validate checks the field values on HttpBody 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 *HttpBody) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpBody 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 HttpBodyMultiError, or nil +// if none found. +func (m *HttpBody) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpBody) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Body + + // no validation rules for EndOfStream + + if len(errors) > 0 { + return HttpBodyMultiError(errors) + } + return nil +} + +// HttpBodyMultiError is an error wrapping multiple validation errors returned +// by HttpBody.ValidateAll() if the designated constraints aren't met. +type HttpBodyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpBodyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpBodyMultiError) AllErrors() []error { return m } + +// HttpBodyValidationError is the validation error returned by +// HttpBody.Validate if the designated constraints aren't met. +type HttpBodyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpBodyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpBodyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpBodyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpBodyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpBodyValidationError) ErrorName() string { return "HttpBodyValidationError" } + +// Error satisfies the builtin error interface +func (e HttpBodyValidationError) 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 %sHttpBody.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpBodyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpBodyValidationError{} + +// Validate checks the field values on HttpTrailers 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 *HttpTrailers) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpTrailers 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 HttpTrailersMultiError, or +// nil if none found. +func (m *HttpTrailers) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpTrailers) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetTrailers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpTrailersValidationError{ + field: "Trailers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpTrailersValidationError{ + field: "Trailers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTrailers()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpTrailersValidationError{ + field: "Trailers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return HttpTrailersMultiError(errors) + } + return nil +} + +// HttpTrailersMultiError is an error wrapping multiple validation errors +// returned by HttpTrailers.ValidateAll() if the designated constraints aren't met. +type HttpTrailersMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpTrailersMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpTrailersMultiError) AllErrors() []error { return m } + +// HttpTrailersValidationError is the validation error returned by +// HttpTrailers.Validate if the designated constraints aren't met. +type HttpTrailersValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpTrailersValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpTrailersValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpTrailersValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpTrailersValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpTrailersValidationError) ErrorName() string { return "HttpTrailersValidationError" } + +// Error satisfies the builtin error interface +func (e HttpTrailersValidationError) 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 %sHttpTrailers.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpTrailersValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpTrailersValidationError{} + +// Validate checks the field values on HeadersResponse 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 *HeadersResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeadersResponse 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 +// HeadersResponseMultiError, or nil if none found. +func (m *HeadersResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *HeadersResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeadersResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeadersResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HeadersResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return HeadersResponseMultiError(errors) + } + return nil +} + +// HeadersResponseMultiError is an error wrapping multiple validation errors +// returned by HeadersResponse.ValidateAll() if the designated constraints +// aren't met. +type HeadersResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeadersResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeadersResponseMultiError) AllErrors() []error { return m } + +// HeadersResponseValidationError is the validation error returned by +// HeadersResponse.Validate if the designated constraints aren't met. +type HeadersResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HeadersResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HeadersResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HeadersResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HeadersResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HeadersResponseValidationError) ErrorName() string { return "HeadersResponseValidationError" } + +// Error satisfies the builtin error interface +func (e HeadersResponseValidationError) 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 %sHeadersResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HeadersResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HeadersResponseValidationError{} + +// Validate checks the field values on TrailersResponse 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 *TrailersResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TrailersResponse 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 +// TrailersResponseMultiError, or nil if none found. +func (m *TrailersResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *TrailersResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetHeaderMutation()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TrailersResponseValidationError{ + field: "HeaderMutation", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TrailersResponseValidationError{ + field: "HeaderMutation", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaderMutation()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TrailersResponseValidationError{ + field: "HeaderMutation", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return TrailersResponseMultiError(errors) + } + return nil +} + +// TrailersResponseMultiError is an error wrapping multiple validation errors +// returned by TrailersResponse.ValidateAll() if the designated constraints +// aren't met. +type TrailersResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TrailersResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TrailersResponseMultiError) AllErrors() []error { return m } + +// TrailersResponseValidationError is the validation error returned by +// TrailersResponse.Validate if the designated constraints aren't met. +type TrailersResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TrailersResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TrailersResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TrailersResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TrailersResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TrailersResponseValidationError) ErrorName() string { return "TrailersResponseValidationError" } + +// Error satisfies the builtin error interface +func (e TrailersResponseValidationError) 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 %sTrailersResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TrailersResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TrailersResponseValidationError{} + +// Validate checks the field values on BodyResponse 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 *BodyResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BodyResponse 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 BodyResponseMultiError, or +// nil if none found. +func (m *BodyResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *BodyResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BodyResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BodyResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BodyResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return BodyResponseMultiError(errors) + } + return nil +} + +// BodyResponseMultiError is an error wrapping multiple validation errors +// returned by BodyResponse.ValidateAll() if the designated constraints aren't met. +type BodyResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BodyResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BodyResponseMultiError) AllErrors() []error { return m } + +// BodyResponseValidationError is the validation error returned by +// BodyResponse.Validate if the designated constraints aren't met. +type BodyResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BodyResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BodyResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BodyResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BodyResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BodyResponseValidationError) ErrorName() string { return "BodyResponseValidationError" } + +// Error satisfies the builtin error interface +func (e BodyResponseValidationError) 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 %sBodyResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BodyResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BodyResponseValidationError{} + +// Validate checks the field values on CommonResponse 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 *CommonResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CommonResponse 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 CommonResponseMultiError, +// or nil if none found. +func (m *CommonResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *CommonResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if _, ok := CommonResponse_ResponseStatus_name[int32(m.GetStatus())]; !ok { + err := CommonResponseValidationError{ + field: "Status", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetHeaderMutation()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonResponseValidationError{ + field: "HeaderMutation", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonResponseValidationError{ + field: "HeaderMutation", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaderMutation()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommonResponseValidationError{ + field: "HeaderMutation", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetBodyMutation()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonResponseValidationError{ + field: "BodyMutation", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonResponseValidationError{ + field: "BodyMutation", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBodyMutation()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommonResponseValidationError{ + field: "BodyMutation", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetTrailers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CommonResponseValidationError{ + field: "Trailers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CommonResponseValidationError{ + field: "Trailers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTrailers()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CommonResponseValidationError{ + field: "Trailers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ClearRouteCache + + if len(errors) > 0 { + return CommonResponseMultiError(errors) + } + return nil +} + +// CommonResponseMultiError is an error wrapping multiple validation errors +// returned by CommonResponse.ValidateAll() if the designated constraints +// aren't met. +type CommonResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CommonResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CommonResponseMultiError) AllErrors() []error { return m } + +// CommonResponseValidationError is the validation error returned by +// CommonResponse.Validate if the designated constraints aren't met. +type CommonResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CommonResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CommonResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CommonResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CommonResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CommonResponseValidationError) ErrorName() string { return "CommonResponseValidationError" } + +// Error satisfies the builtin error interface +func (e CommonResponseValidationError) 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 %sCommonResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CommonResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CommonResponseValidationError{} + +// Validate checks the field values on ImmediateResponse 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 *ImmediateResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ImmediateResponse 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 +// ImmediateResponseMultiError, or nil if none found. +func (m *ImmediateResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ImmediateResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetStatus() == nil { + err := ImmediateResponseValidationError{ + field: "Status", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetStatus()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ImmediateResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ImmediateResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatus()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ImmediateResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ImmediateResponseValidationError{ + field: "Headers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ImmediateResponseValidationError{ + field: "Headers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaders()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ImmediateResponseValidationError{ + field: "Headers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Body + + if all { + switch v := interface{}(m.GetGrpcStatus()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ImmediateResponseValidationError{ + field: "GrpcStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ImmediateResponseValidationError{ + field: "GrpcStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGrpcStatus()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ImmediateResponseValidationError{ + field: "GrpcStatus", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Details + + if len(errors) > 0 { + return ImmediateResponseMultiError(errors) + } + return nil +} + +// ImmediateResponseMultiError is an error wrapping multiple validation errors +// returned by ImmediateResponse.ValidateAll() if the designated constraints +// aren't met. +type ImmediateResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ImmediateResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ImmediateResponseMultiError) AllErrors() []error { return m } + +// ImmediateResponseValidationError is the validation error returned by +// ImmediateResponse.Validate if the designated constraints aren't met. +type ImmediateResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ImmediateResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ImmediateResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ImmediateResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ImmediateResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ImmediateResponseValidationError) ErrorName() string { + return "ImmediateResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ImmediateResponseValidationError) 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 %sImmediateResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ImmediateResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ImmediateResponseValidationError{} + +// Validate checks the field values on GrpcStatus 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 *GrpcStatus) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GrpcStatus 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 GrpcStatusMultiError, or +// nil if none found. +func (m *GrpcStatus) ValidateAll() error { + return m.validate(true) +} + +func (m *GrpcStatus) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Status + + if len(errors) > 0 { + return GrpcStatusMultiError(errors) + } + return nil +} + +// GrpcStatusMultiError is an error wrapping multiple validation errors +// returned by GrpcStatus.ValidateAll() if the designated constraints aren't met. +type GrpcStatusMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GrpcStatusMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GrpcStatusMultiError) AllErrors() []error { return m } + +// GrpcStatusValidationError is the validation error returned by +// GrpcStatus.Validate if the designated constraints aren't met. +type GrpcStatusValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GrpcStatusValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GrpcStatusValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GrpcStatusValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GrpcStatusValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GrpcStatusValidationError) ErrorName() string { return "GrpcStatusValidationError" } + +// Error satisfies the builtin error interface +func (e GrpcStatusValidationError) 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 %sGrpcStatus.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GrpcStatusValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GrpcStatusValidationError{} + +// Validate checks the field values on HeaderMutation 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 *HeaderMutation) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeaderMutation 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 HeaderMutationMultiError, +// or nil if none found. +func (m *HeaderMutation) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderMutation) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetSetHeaders() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HeaderMutationValidationError{ + field: fmt.Sprintf("SetHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HeaderMutationValidationError{ + field: fmt.Sprintf("SetHeaders[%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 HeaderMutationValidationError{ + field: fmt.Sprintf("SetHeaders[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return HeaderMutationMultiError(errors) + } + return nil +} + +// HeaderMutationMultiError is an error wrapping multiple validation errors +// returned by HeaderMutation.ValidateAll() if the designated constraints +// aren't met. +type HeaderMutationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderMutationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderMutationMultiError) AllErrors() []error { return m } + +// HeaderMutationValidationError is the validation error returned by +// HeaderMutation.Validate if the designated constraints aren't met. +type HeaderMutationValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HeaderMutationValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HeaderMutationValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HeaderMutationValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HeaderMutationValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HeaderMutationValidationError) ErrorName() string { return "HeaderMutationValidationError" } + +// Error satisfies the builtin error interface +func (e HeaderMutationValidationError) 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 %sHeaderMutation.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HeaderMutationValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HeaderMutationValidationError{} + +// Validate checks the field values on BodyMutation 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 *BodyMutation) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BodyMutation 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 BodyMutationMultiError, or +// nil if none found. +func (m *BodyMutation) ValidateAll() error { + return m.validate(true) +} + +func (m *BodyMutation) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.Mutation.(type) { + + case *BodyMutation_Body: + // no validation rules for Body + + case *BodyMutation_ClearBody: + // no validation rules for ClearBody + + } + + if len(errors) > 0 { + return BodyMutationMultiError(errors) + } + return nil +} + +// BodyMutationMultiError is an error wrapping multiple validation errors +// returned by BodyMutation.ValidateAll() if the designated constraints aren't met. +type BodyMutationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BodyMutationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BodyMutationMultiError) AllErrors() []error { return m } + +// BodyMutationValidationError is the validation error returned by +// BodyMutation.Validate if the designated constraints aren't met. +type BodyMutationValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BodyMutationValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BodyMutationValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BodyMutationValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BodyMutationValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BodyMutationValidationError) ErrorName() string { return "BodyMutationValidationError" } + +// Error satisfies the builtin error interface +func (e BodyMutationValidationError) 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 %sBodyMutation.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BodyMutationValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BodyMutationValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/extension/v3/config_discovery.pb.go b/vendor/github.com/cilium/proxy/go/envoy/service/extension/v3/config_discovery.pb.go new file mode 100644 index 0000000000000..27c9c80b7718b --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/extension/v3/config_discovery.pb.go @@ -0,0 +1,428 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/service/extension/v3/config_discovery.proto + +package extensionv3 + +import ( + context "context" + _ "github.com/cilium/proxy/go/envoy/annotations" + v3 "github.com/cilium/proxy/go/envoy/service/discovery/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue +// with importing services: https://github.com/google/protobuf/issues/4221 and +// protoxform to upgrade the file. +type EcdsDummy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *EcdsDummy) Reset() { + *x = EcdsDummy{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_extension_v3_config_discovery_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EcdsDummy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EcdsDummy) ProtoMessage() {} + +func (x *EcdsDummy) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_extension_v3_config_discovery_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EcdsDummy.ProtoReflect.Descriptor instead. +func (*EcdsDummy) Descriptor() ([]byte, []int) { + return file_envoy_service_extension_v3_config_discovery_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_service_extension_v3_config_discovery_proto protoreflect.FileDescriptor + +var file_envoy_service_extension_v3_config_discovery_proto_rawDesc = []byte{ + 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x1a, + 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0b, 0x0a, 0x09, 0x45, 0x63, + 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0x81, 0x04, 0x0a, 0x1f, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x73, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7b, 0x0a, 0x16, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, + 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, + 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x84, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x6c, + 0x74, 0x61, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x73, 0x12, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, + 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, + 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, + 0xa6, 0x01, 0x0a, 0x15, 0x46, 0x65, 0x74, 0x63, 0x68, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1f, + 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x31, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x2b, + 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x9c, 0x01, 0x0a, 0x28, + 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x14, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x33, 0x3b, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x76, 0x33, 0x88, + 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_envoy_service_extension_v3_config_discovery_proto_rawDescOnce sync.Once + file_envoy_service_extension_v3_config_discovery_proto_rawDescData = file_envoy_service_extension_v3_config_discovery_proto_rawDesc +) + +func file_envoy_service_extension_v3_config_discovery_proto_rawDescGZIP() []byte { + file_envoy_service_extension_v3_config_discovery_proto_rawDescOnce.Do(func() { + file_envoy_service_extension_v3_config_discovery_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_extension_v3_config_discovery_proto_rawDescData) + }) + return file_envoy_service_extension_v3_config_discovery_proto_rawDescData +} + +var file_envoy_service_extension_v3_config_discovery_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_service_extension_v3_config_discovery_proto_goTypes = []interface{}{ + (*EcdsDummy)(nil), // 0: envoy.service.extension.v3.EcdsDummy + (*v3.DiscoveryRequest)(nil), // 1: envoy.service.discovery.v3.DiscoveryRequest + (*v3.DeltaDiscoveryRequest)(nil), // 2: envoy.service.discovery.v3.DeltaDiscoveryRequest + (*v3.DiscoveryResponse)(nil), // 3: envoy.service.discovery.v3.DiscoveryResponse + (*v3.DeltaDiscoveryResponse)(nil), // 4: envoy.service.discovery.v3.DeltaDiscoveryResponse +} +var file_envoy_service_extension_v3_config_discovery_proto_depIdxs = []int32{ + 1, // 0: envoy.service.extension.v3.ExtensionConfigDiscoveryService.StreamExtensionConfigs:input_type -> envoy.service.discovery.v3.DiscoveryRequest + 2, // 1: envoy.service.extension.v3.ExtensionConfigDiscoveryService.DeltaExtensionConfigs:input_type -> envoy.service.discovery.v3.DeltaDiscoveryRequest + 1, // 2: envoy.service.extension.v3.ExtensionConfigDiscoveryService.FetchExtensionConfigs:input_type -> envoy.service.discovery.v3.DiscoveryRequest + 3, // 3: envoy.service.extension.v3.ExtensionConfigDiscoveryService.StreamExtensionConfigs:output_type -> envoy.service.discovery.v3.DiscoveryResponse + 4, // 4: envoy.service.extension.v3.ExtensionConfigDiscoveryService.DeltaExtensionConfigs:output_type -> envoy.service.discovery.v3.DeltaDiscoveryResponse + 3, // 5: envoy.service.extension.v3.ExtensionConfigDiscoveryService.FetchExtensionConfigs:output_type -> envoy.service.discovery.v3.DiscoveryResponse + 3, // [3:6] is the sub-list for method output_type + 0, // [0:3] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_service_extension_v3_config_discovery_proto_init() } +func file_envoy_service_extension_v3_config_discovery_proto_init() { + if File_envoy_service_extension_v3_config_discovery_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_service_extension_v3_config_discovery_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EcdsDummy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_service_extension_v3_config_discovery_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_envoy_service_extension_v3_config_discovery_proto_goTypes, + DependencyIndexes: file_envoy_service_extension_v3_config_discovery_proto_depIdxs, + MessageInfos: file_envoy_service_extension_v3_config_discovery_proto_msgTypes, + }.Build() + File_envoy_service_extension_v3_config_discovery_proto = out.File + file_envoy_service_extension_v3_config_discovery_proto_rawDesc = nil + file_envoy_service_extension_v3_config_discovery_proto_goTypes = nil + file_envoy_service_extension_v3_config_discovery_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// ExtensionConfigDiscoveryServiceClient is the client API for ExtensionConfigDiscoveryService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ExtensionConfigDiscoveryServiceClient interface { + StreamExtensionConfigs(ctx context.Context, opts ...grpc.CallOption) (ExtensionConfigDiscoveryService_StreamExtensionConfigsClient, error) + DeltaExtensionConfigs(ctx context.Context, opts ...grpc.CallOption) (ExtensionConfigDiscoveryService_DeltaExtensionConfigsClient, error) + FetchExtensionConfigs(ctx context.Context, in *v3.DiscoveryRequest, opts ...grpc.CallOption) (*v3.DiscoveryResponse, error) +} + +type extensionConfigDiscoveryServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewExtensionConfigDiscoveryServiceClient(cc grpc.ClientConnInterface) ExtensionConfigDiscoveryServiceClient { + return &extensionConfigDiscoveryServiceClient{cc} +} + +func (c *extensionConfigDiscoveryServiceClient) StreamExtensionConfigs(ctx context.Context, opts ...grpc.CallOption) (ExtensionConfigDiscoveryService_StreamExtensionConfigsClient, error) { + stream, err := c.cc.NewStream(ctx, &_ExtensionConfigDiscoveryService_serviceDesc.Streams[0], "/envoy.service.extension.v3.ExtensionConfigDiscoveryService/StreamExtensionConfigs", opts...) + if err != nil { + return nil, err + } + x := &extensionConfigDiscoveryServiceStreamExtensionConfigsClient{stream} + return x, nil +} + +type ExtensionConfigDiscoveryService_StreamExtensionConfigsClient interface { + Send(*v3.DiscoveryRequest) error + Recv() (*v3.DiscoveryResponse, error) + grpc.ClientStream +} + +type extensionConfigDiscoveryServiceStreamExtensionConfigsClient struct { + grpc.ClientStream +} + +func (x *extensionConfigDiscoveryServiceStreamExtensionConfigsClient) Send(m *v3.DiscoveryRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *extensionConfigDiscoveryServiceStreamExtensionConfigsClient) Recv() (*v3.DiscoveryResponse, error) { + m := new(v3.DiscoveryResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *extensionConfigDiscoveryServiceClient) DeltaExtensionConfigs(ctx context.Context, opts ...grpc.CallOption) (ExtensionConfigDiscoveryService_DeltaExtensionConfigsClient, error) { + stream, err := c.cc.NewStream(ctx, &_ExtensionConfigDiscoveryService_serviceDesc.Streams[1], "/envoy.service.extension.v3.ExtensionConfigDiscoveryService/DeltaExtensionConfigs", opts...) + if err != nil { + return nil, err + } + x := &extensionConfigDiscoveryServiceDeltaExtensionConfigsClient{stream} + return x, nil +} + +type ExtensionConfigDiscoveryService_DeltaExtensionConfigsClient interface { + Send(*v3.DeltaDiscoveryRequest) error + Recv() (*v3.DeltaDiscoveryResponse, error) + grpc.ClientStream +} + +type extensionConfigDiscoveryServiceDeltaExtensionConfigsClient struct { + grpc.ClientStream +} + +func (x *extensionConfigDiscoveryServiceDeltaExtensionConfigsClient) Send(m *v3.DeltaDiscoveryRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *extensionConfigDiscoveryServiceDeltaExtensionConfigsClient) Recv() (*v3.DeltaDiscoveryResponse, error) { + m := new(v3.DeltaDiscoveryResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *extensionConfigDiscoveryServiceClient) FetchExtensionConfigs(ctx context.Context, in *v3.DiscoveryRequest, opts ...grpc.CallOption) (*v3.DiscoveryResponse, error) { + out := new(v3.DiscoveryResponse) + err := c.cc.Invoke(ctx, "/envoy.service.extension.v3.ExtensionConfigDiscoveryService/FetchExtensionConfigs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ExtensionConfigDiscoveryServiceServer is the server API for ExtensionConfigDiscoveryService service. +type ExtensionConfigDiscoveryServiceServer interface { + StreamExtensionConfigs(ExtensionConfigDiscoveryService_StreamExtensionConfigsServer) error + DeltaExtensionConfigs(ExtensionConfigDiscoveryService_DeltaExtensionConfigsServer) error + FetchExtensionConfigs(context.Context, *v3.DiscoveryRequest) (*v3.DiscoveryResponse, error) +} + +// UnimplementedExtensionConfigDiscoveryServiceServer can be embedded to have forward compatible implementations. +type UnimplementedExtensionConfigDiscoveryServiceServer struct { +} + +func (*UnimplementedExtensionConfigDiscoveryServiceServer) StreamExtensionConfigs(ExtensionConfigDiscoveryService_StreamExtensionConfigsServer) error { + return status.Errorf(codes.Unimplemented, "method StreamExtensionConfigs not implemented") +} +func (*UnimplementedExtensionConfigDiscoveryServiceServer) DeltaExtensionConfigs(ExtensionConfigDiscoveryService_DeltaExtensionConfigsServer) error { + return status.Errorf(codes.Unimplemented, "method DeltaExtensionConfigs not implemented") +} +func (*UnimplementedExtensionConfigDiscoveryServiceServer) FetchExtensionConfigs(context.Context, *v3.DiscoveryRequest) (*v3.DiscoveryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchExtensionConfigs not implemented") +} + +func RegisterExtensionConfigDiscoveryServiceServer(s *grpc.Server, srv ExtensionConfigDiscoveryServiceServer) { + s.RegisterService(&_ExtensionConfigDiscoveryService_serviceDesc, srv) +} + +func _ExtensionConfigDiscoveryService_StreamExtensionConfigs_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(ExtensionConfigDiscoveryServiceServer).StreamExtensionConfigs(&extensionConfigDiscoveryServiceStreamExtensionConfigsServer{stream}) +} + +type ExtensionConfigDiscoveryService_StreamExtensionConfigsServer interface { + Send(*v3.DiscoveryResponse) error + Recv() (*v3.DiscoveryRequest, error) + grpc.ServerStream +} + +type extensionConfigDiscoveryServiceStreamExtensionConfigsServer struct { + grpc.ServerStream +} + +func (x *extensionConfigDiscoveryServiceStreamExtensionConfigsServer) Send(m *v3.DiscoveryResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *extensionConfigDiscoveryServiceStreamExtensionConfigsServer) Recv() (*v3.DiscoveryRequest, error) { + m := new(v3.DiscoveryRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _ExtensionConfigDiscoveryService_DeltaExtensionConfigs_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(ExtensionConfigDiscoveryServiceServer).DeltaExtensionConfigs(&extensionConfigDiscoveryServiceDeltaExtensionConfigsServer{stream}) +} + +type ExtensionConfigDiscoveryService_DeltaExtensionConfigsServer interface { + Send(*v3.DeltaDiscoveryResponse) error + Recv() (*v3.DeltaDiscoveryRequest, error) + grpc.ServerStream +} + +type extensionConfigDiscoveryServiceDeltaExtensionConfigsServer struct { + grpc.ServerStream +} + +func (x *extensionConfigDiscoveryServiceDeltaExtensionConfigsServer) Send(m *v3.DeltaDiscoveryResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *extensionConfigDiscoveryServiceDeltaExtensionConfigsServer) Recv() (*v3.DeltaDiscoveryRequest, error) { + m := new(v3.DeltaDiscoveryRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _ExtensionConfigDiscoveryService_FetchExtensionConfigs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v3.DiscoveryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExtensionConfigDiscoveryServiceServer).FetchExtensionConfigs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/envoy.service.extension.v3.ExtensionConfigDiscoveryService/FetchExtensionConfigs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExtensionConfigDiscoveryServiceServer).FetchExtensionConfigs(ctx, req.(*v3.DiscoveryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ExtensionConfigDiscoveryService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "envoy.service.extension.v3.ExtensionConfigDiscoveryService", + HandlerType: (*ExtensionConfigDiscoveryServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "FetchExtensionConfigs", + Handler: _ExtensionConfigDiscoveryService_FetchExtensionConfigs_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamExtensionConfigs", + Handler: _ExtensionConfigDiscoveryService_StreamExtensionConfigs_Handler, + ServerStreams: true, + ClientStreams: true, + }, + { + StreamName: "DeltaExtensionConfigs", + Handler: _ExtensionConfigDiscoveryService_DeltaExtensionConfigs_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "envoy/service/extension/v3/config_discovery.proto", +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/extension/v3/config_discovery.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/service/extension/v3/config_discovery.pb.validate.go new file mode 100644 index 0000000000000..977836ae7b9a6 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/extension/v3/config_discovery.pb.validate.go @@ -0,0 +1,134 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/service/extension/v3/config_discovery.proto + +package extensionv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on EcdsDummy 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 *EcdsDummy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on EcdsDummy 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 EcdsDummyMultiError, or nil +// if none found. +func (m *EcdsDummy) ValidateAll() error { + return m.validate(true) +} + +func (m *EcdsDummy) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return EcdsDummyMultiError(errors) + } + return nil +} + +// EcdsDummyMultiError is an error wrapping multiple validation errors returned +// by EcdsDummy.ValidateAll() if the designated constraints aren't met. +type EcdsDummyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EcdsDummyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EcdsDummyMultiError) AllErrors() []error { return m } + +// EcdsDummyValidationError is the validation error returned by +// EcdsDummy.Validate if the designated constraints aren't met. +type EcdsDummyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e EcdsDummyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e EcdsDummyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e EcdsDummyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e EcdsDummyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e EcdsDummyValidationError) ErrorName() string { return "EcdsDummyValidationError" } + +// Error satisfies the builtin error interface +func (e EcdsDummyValidationError) 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 %sEcdsDummy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = EcdsDummyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = EcdsDummyValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/health/v3/hds.pb.go b/vendor/github.com/cilium/proxy/go/envoy/service/health/v3/hds.pb.go new file mode 100644 index 0000000000000..1f568f5bffd67 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/health/v3/hds.pb.go @@ -0,0 +1,1399 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/service/health/v3/hds.proto + +package healthv3 + +import ( + context "context" + _ "github.com/cilium/proxy/go/envoy/annotations" + v32 "github.com/cilium/proxy/go/envoy/config/cluster/v3" + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + v31 "github.com/cilium/proxy/go/envoy/config/endpoint/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Different Envoy instances may have different capabilities (e.g. Redis) +// and/or have ports enabled for different protocols. +type Capability_Protocol int32 + +const ( + Capability_HTTP Capability_Protocol = 0 + Capability_TCP Capability_Protocol = 1 + Capability_REDIS Capability_Protocol = 2 +) + +// Enum value maps for Capability_Protocol. +var ( + Capability_Protocol_name = map[int32]string{ + 0: "HTTP", + 1: "TCP", + 2: "REDIS", + } + Capability_Protocol_value = map[string]int32{ + "HTTP": 0, + "TCP": 1, + "REDIS": 2, + } +) + +func (x Capability_Protocol) Enum() *Capability_Protocol { + p := new(Capability_Protocol) + *p = x + return p +} + +func (x Capability_Protocol) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Capability_Protocol) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_service_health_v3_hds_proto_enumTypes[0].Descriptor() +} + +func (Capability_Protocol) Type() protoreflect.EnumType { + return &file_envoy_service_health_v3_hds_proto_enumTypes[0] +} + +func (x Capability_Protocol) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Capability_Protocol.Descriptor instead. +func (Capability_Protocol) EnumDescriptor() ([]byte, []int) { + return file_envoy_service_health_v3_hds_proto_rawDescGZIP(), []int{0, 0} +} + +// Defines supported protocols etc, so the management server can assign proper +// endpoints to healthcheck. +type Capability struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HealthCheckProtocols []Capability_Protocol `protobuf:"varint,1,rep,packed,name=health_check_protocols,json=healthCheckProtocols,proto3,enum=envoy.service.health.v3.Capability_Protocol" json:"health_check_protocols,omitempty"` +} + +func (x *Capability) Reset() { + *x = Capability{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Capability) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Capability) ProtoMessage() {} + +func (x *Capability) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Capability.ProtoReflect.Descriptor instead. +func (*Capability) Descriptor() ([]byte, []int) { + return file_envoy_service_health_v3_hds_proto_rawDescGZIP(), []int{0} +} + +func (x *Capability) GetHealthCheckProtocols() []Capability_Protocol { + if x != nil { + return x.HealthCheckProtocols + } + return nil +} + +type HealthCheckRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Node *v3.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + Capability *Capability `protobuf:"bytes,2,opt,name=capability,proto3" json:"capability,omitempty"` +} + +func (x *HealthCheckRequest) Reset() { + *x = HealthCheckRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HealthCheckRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HealthCheckRequest) ProtoMessage() {} + +func (x *HealthCheckRequest) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HealthCheckRequest.ProtoReflect.Descriptor instead. +func (*HealthCheckRequest) Descriptor() ([]byte, []int) { + return file_envoy_service_health_v3_hds_proto_rawDescGZIP(), []int{1} +} + +func (x *HealthCheckRequest) GetNode() *v3.Node { + if x != nil { + return x.Node + } + return nil +} + +func (x *HealthCheckRequest) GetCapability() *Capability { + if x != nil { + return x.Capability + } + return nil +} + +type EndpointHealth struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Endpoint *v31.Endpoint `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` + HealthStatus v3.HealthStatus `protobuf:"varint,2,opt,name=health_status,json=healthStatus,proto3,enum=envoy.config.core.v3.HealthStatus" json:"health_status,omitempty"` +} + +func (x *EndpointHealth) Reset() { + *x = EndpointHealth{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EndpointHealth) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EndpointHealth) ProtoMessage() {} + +func (x *EndpointHealth) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EndpointHealth.ProtoReflect.Descriptor instead. +func (*EndpointHealth) Descriptor() ([]byte, []int) { + return file_envoy_service_health_v3_hds_proto_rawDescGZIP(), []int{2} +} + +func (x *EndpointHealth) GetEndpoint() *v31.Endpoint { + if x != nil { + return x.Endpoint + } + return nil +} + +func (x *EndpointHealth) GetHealthStatus() v3.HealthStatus { + if x != nil { + return x.HealthStatus + } + return v3.HealthStatus_UNKNOWN +} + +// Group endpoint health by locality under each cluster. +type LocalityEndpointsHealth struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Locality *v3.Locality `protobuf:"bytes,1,opt,name=locality,proto3" json:"locality,omitempty"` + EndpointsHealth []*EndpointHealth `protobuf:"bytes,2,rep,name=endpoints_health,json=endpointsHealth,proto3" json:"endpoints_health,omitempty"` +} + +func (x *LocalityEndpointsHealth) Reset() { + *x = LocalityEndpointsHealth{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LocalityEndpointsHealth) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LocalityEndpointsHealth) ProtoMessage() {} + +func (x *LocalityEndpointsHealth) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LocalityEndpointsHealth.ProtoReflect.Descriptor instead. +func (*LocalityEndpointsHealth) Descriptor() ([]byte, []int) { + return file_envoy_service_health_v3_hds_proto_rawDescGZIP(), []int{3} +} + +func (x *LocalityEndpointsHealth) GetLocality() *v3.Locality { + if x != nil { + return x.Locality + } + return nil +} + +func (x *LocalityEndpointsHealth) GetEndpointsHealth() []*EndpointHealth { + if x != nil { + return x.EndpointsHealth + } + return nil +} + +// The health status of endpoints in a cluster. The cluster name and locality +// should match the corresponding fields in ClusterHealthCheck message. +type ClusterEndpointsHealth struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` + LocalityEndpointsHealth []*LocalityEndpointsHealth `protobuf:"bytes,2,rep,name=locality_endpoints_health,json=localityEndpointsHealth,proto3" json:"locality_endpoints_health,omitempty"` +} + +func (x *ClusterEndpointsHealth) Reset() { + *x = ClusterEndpointsHealth{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterEndpointsHealth) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterEndpointsHealth) ProtoMessage() {} + +func (x *ClusterEndpointsHealth) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterEndpointsHealth.ProtoReflect.Descriptor instead. +func (*ClusterEndpointsHealth) Descriptor() ([]byte, []int) { + return file_envoy_service_health_v3_hds_proto_rawDescGZIP(), []int{4} +} + +func (x *ClusterEndpointsHealth) GetClusterName() string { + if x != nil { + return x.ClusterName + } + return "" +} + +func (x *ClusterEndpointsHealth) GetLocalityEndpointsHealth() []*LocalityEndpointsHealth { + if x != nil { + return x.LocalityEndpointsHealth + } + return nil +} + +type EndpointHealthResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Deprecated - Flat list of endpoint health information. + // + // Deprecated: Do not use. + EndpointsHealth []*EndpointHealth `protobuf:"bytes,1,rep,name=endpoints_health,json=endpointsHealth,proto3" json:"endpoints_health,omitempty"` + // Organize Endpoint health information by cluster. + ClusterEndpointsHealth []*ClusterEndpointsHealth `protobuf:"bytes,2,rep,name=cluster_endpoints_health,json=clusterEndpointsHealth,proto3" json:"cluster_endpoints_health,omitempty"` +} + +func (x *EndpointHealthResponse) Reset() { + *x = EndpointHealthResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EndpointHealthResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EndpointHealthResponse) ProtoMessage() {} + +func (x *EndpointHealthResponse) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EndpointHealthResponse.ProtoReflect.Descriptor instead. +func (*EndpointHealthResponse) Descriptor() ([]byte, []int) { + return file_envoy_service_health_v3_hds_proto_rawDescGZIP(), []int{5} +} + +// Deprecated: Do not use. +func (x *EndpointHealthResponse) GetEndpointsHealth() []*EndpointHealth { + if x != nil { + return x.EndpointsHealth + } + return nil +} + +func (x *EndpointHealthResponse) GetClusterEndpointsHealth() []*ClusterEndpointsHealth { + if x != nil { + return x.ClusterEndpointsHealth + } + return nil +} + +type HealthCheckRequestOrEndpointHealthResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to RequestType: + // + // *HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest + // *HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse + RequestType isHealthCheckRequestOrEndpointHealthResponse_RequestType `protobuf_oneof:"request_type"` +} + +func (x *HealthCheckRequestOrEndpointHealthResponse) Reset() { + *x = HealthCheckRequestOrEndpointHealthResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HealthCheckRequestOrEndpointHealthResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HealthCheckRequestOrEndpointHealthResponse) ProtoMessage() {} + +func (x *HealthCheckRequestOrEndpointHealthResponse) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HealthCheckRequestOrEndpointHealthResponse.ProtoReflect.Descriptor instead. +func (*HealthCheckRequestOrEndpointHealthResponse) Descriptor() ([]byte, []int) { + return file_envoy_service_health_v3_hds_proto_rawDescGZIP(), []int{6} +} + +func (m *HealthCheckRequestOrEndpointHealthResponse) GetRequestType() isHealthCheckRequestOrEndpointHealthResponse_RequestType { + if m != nil { + return m.RequestType + } + return nil +} + +func (x *HealthCheckRequestOrEndpointHealthResponse) GetHealthCheckRequest() *HealthCheckRequest { + if x, ok := x.GetRequestType().(*HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest); ok { + return x.HealthCheckRequest + } + return nil +} + +func (x *HealthCheckRequestOrEndpointHealthResponse) GetEndpointHealthResponse() *EndpointHealthResponse { + if x, ok := x.GetRequestType().(*HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse); ok { + return x.EndpointHealthResponse + } + return nil +} + +type isHealthCheckRequestOrEndpointHealthResponse_RequestType interface { + isHealthCheckRequestOrEndpointHealthResponse_RequestType() +} + +type HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest struct { + HealthCheckRequest *HealthCheckRequest `protobuf:"bytes,1,opt,name=health_check_request,json=healthCheckRequest,proto3,oneof"` +} + +type HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse struct { + EndpointHealthResponse *EndpointHealthResponse `protobuf:"bytes,2,opt,name=endpoint_health_response,json=endpointHealthResponse,proto3,oneof"` +} + +func (*HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest) isHealthCheckRequestOrEndpointHealthResponse_RequestType() { +} + +func (*HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse) isHealthCheckRequestOrEndpointHealthResponse_RequestType() { +} + +type LocalityEndpoints struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Locality *v3.Locality `protobuf:"bytes,1,opt,name=locality,proto3" json:"locality,omitempty"` + Endpoints []*v31.Endpoint `protobuf:"bytes,2,rep,name=endpoints,proto3" json:"endpoints,omitempty"` +} + +func (x *LocalityEndpoints) Reset() { + *x = LocalityEndpoints{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LocalityEndpoints) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LocalityEndpoints) ProtoMessage() {} + +func (x *LocalityEndpoints) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LocalityEndpoints.ProtoReflect.Descriptor instead. +func (*LocalityEndpoints) Descriptor() ([]byte, []int) { + return file_envoy_service_health_v3_hds_proto_rawDescGZIP(), []int{7} +} + +func (x *LocalityEndpoints) GetLocality() *v3.Locality { + if x != nil { + return x.Locality + } + return nil +} + +func (x *LocalityEndpoints) GetEndpoints() []*v31.Endpoint { + if x != nil { + return x.Endpoints + } + return nil +} + +// The cluster name and locality is provided to Envoy for the endpoints that it +// health checks to support statistics reporting, logging and debugging by the +// Envoy instance (outside of HDS). For maximum usefulness, it should match the +// same cluster structure as that provided by EDS. +type ClusterHealthCheck struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` + HealthChecks []*v3.HealthCheck `protobuf:"bytes,2,rep,name=health_checks,json=healthChecks,proto3" json:"health_checks,omitempty"` + LocalityEndpoints []*LocalityEndpoints `protobuf:"bytes,3,rep,name=locality_endpoints,json=localityEndpoints,proto3" json:"locality_endpoints,omitempty"` + // Optional map that gets filtered by :ref:`health_checks.transport_socket_match_criteria ` + // on connection when health checking. For more details, see + // :ref:`config.cluster.v3.Cluster.transport_socket_matches `. + TransportSocketMatches []*v32.Cluster_TransportSocketMatch `protobuf:"bytes,4,rep,name=transport_socket_matches,json=transportSocketMatches,proto3" json:"transport_socket_matches,omitempty"` +} + +func (x *ClusterHealthCheck) Reset() { + *x = ClusterHealthCheck{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterHealthCheck) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterHealthCheck) ProtoMessage() {} + +func (x *ClusterHealthCheck) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterHealthCheck.ProtoReflect.Descriptor instead. +func (*ClusterHealthCheck) Descriptor() ([]byte, []int) { + return file_envoy_service_health_v3_hds_proto_rawDescGZIP(), []int{8} +} + +func (x *ClusterHealthCheck) GetClusterName() string { + if x != nil { + return x.ClusterName + } + return "" +} + +func (x *ClusterHealthCheck) GetHealthChecks() []*v3.HealthCheck { + if x != nil { + return x.HealthChecks + } + return nil +} + +func (x *ClusterHealthCheck) GetLocalityEndpoints() []*LocalityEndpoints { + if x != nil { + return x.LocalityEndpoints + } + return nil +} + +func (x *ClusterHealthCheck) GetTransportSocketMatches() []*v32.Cluster_TransportSocketMatch { + if x != nil { + return x.TransportSocketMatches + } + return nil +} + +type HealthCheckSpecifier struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterHealthChecks []*ClusterHealthCheck `protobuf:"bytes,1,rep,name=cluster_health_checks,json=clusterHealthChecks,proto3" json:"cluster_health_checks,omitempty"` + // The default is 1 second. + Interval *durationpb.Duration `protobuf:"bytes,2,opt,name=interval,proto3" json:"interval,omitempty"` +} + +func (x *HealthCheckSpecifier) Reset() { + *x = HealthCheckSpecifier{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HealthCheckSpecifier) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HealthCheckSpecifier) ProtoMessage() {} + +func (x *HealthCheckSpecifier) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HealthCheckSpecifier.ProtoReflect.Descriptor instead. +func (*HealthCheckSpecifier) Descriptor() ([]byte, []int) { + return file_envoy_service_health_v3_hds_proto_rawDescGZIP(), []int{9} +} + +func (x *HealthCheckSpecifier) GetClusterHealthChecks() []*ClusterHealthCheck { + if x != nil { + return x.ClusterHealthChecks + } + return nil +} + +func (x *HealthCheckSpecifier) GetInterval() *durationpb.Duration { + if x != nil { + return x.Interval + } + return nil +} + +// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing +// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. +type HdsDummy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *HdsDummy) Reset() { + *x = HdsDummy{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HdsDummy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HdsDummy) ProtoMessage() {} + +func (x *HdsDummy) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_health_v3_hds_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HdsDummy.ProtoReflect.Descriptor instead. +func (*HdsDummy) Descriptor() ([]byte, []int) { + return file_envoy_service_health_v3_hds_proto_rawDescGZIP(), []int{10} +} + +var File_envoy_service_health_v3_hds_proto protoreflect.FileDescriptor + +var file_envoy_service_health_v3_hds_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x64, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x1a, 0x25, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x65, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc8, 0x01, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x62, 0x0a, 0x16, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, + 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x52, 0x14, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x22, 0x28, 0x0a, 0x08, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x10, 0x00, 0x12, + 0x07, 0x0a, 0x03, 0x54, 0x43, 0x50, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x44, 0x49, + 0x53, 0x10, 0x02, 0x3a, 0x2c, 0x9a, 0xc5, 0x88, 0x1e, 0x27, 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x22, 0xbf, 0x01, 0x0a, 0x12, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, + 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x43, 0x0a, 0x0a, 0x63, 0x61, 0x70, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x3a, 0x34, 0x9a, + 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, + 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x22, 0xcb, 0x01, 0x0a, 0x0e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x3e, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x65, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, + 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, + 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x22, 0xa9, 0x01, 0x0a, 0x17, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x3a, 0x0a, + 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x52, + 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x52, 0x0a, 0x10, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x0f, 0x65, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x22, 0xa9, 0x01, + 0x0a, 0x16, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x6c, 0x0a, 0x19, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x73, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, + 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x52, 0x17, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x22, 0x9e, 0x02, 0x0a, 0x16, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x10, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x73, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, + 0x03, 0x33, 0x2e, 0x30, 0x52, 0x0f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x69, 0x0a, 0x18, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, + 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x16, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x3a, 0x38, 0x9a, 0xc5, 0x88, 0x1e, 0x33, 0x0a, 0x31, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, + 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd8, 0x02, 0x0a, 0x2a, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x4f, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x14, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, + 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x12, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x6b, 0x0a, 0x18, 0x65, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, + 0x16, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x4c, 0x9a, 0xc5, 0x88, 0x1e, 0x47, 0x0a, 0x45, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, + 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4f, 0x72, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xc6, 0x01, 0x0a, 0x11, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, + 0x74, 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x08, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x08, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x40, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x09, + 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, + 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x6f, 0x63, + 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x81, + 0x03, 0x0a, 0x12, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x0d, 0x68, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, + 0x12, 0x59, 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, + 0x74, 0x79, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x6f, 0x0a, 0x18, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x52, 0x16, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, + 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x3a, 0x34, 0x9a, 0xc5, + 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x22, 0xe6, 0x01, 0x0a, 0x14, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x5f, 0x0a, 0x15, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x13, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x35, 0x0a, 0x08, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x3a, 0x36, 0x9a, 0xc5, 0x88, 0x1e, 0x31, 0x0a, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x0a, 0x0a, 0x08, 0x48, + 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0xde, 0x02, 0x0a, 0x16, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x48, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, + 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x4f, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x2d, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x00, 0x28, 0x01, + 0x30, 0x01, 0x12, 0xb3, 0x01, 0x0a, 0x10, 0x46, 0x65, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, 0x76, + 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x4f, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x48, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x2d, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x2b, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1c, 0x22, 0x1a, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x79, 0x3a, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x42, 0x87, 0x01, 0x0a, 0x25, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2e, + 0x76, 0x33, 0x42, 0x08, 0x48, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x47, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x3b, 0x68, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x76, 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_service_health_v3_hds_proto_rawDescOnce sync.Once + file_envoy_service_health_v3_hds_proto_rawDescData = file_envoy_service_health_v3_hds_proto_rawDesc +) + +func file_envoy_service_health_v3_hds_proto_rawDescGZIP() []byte { + file_envoy_service_health_v3_hds_proto_rawDescOnce.Do(func() { + file_envoy_service_health_v3_hds_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_health_v3_hds_proto_rawDescData) + }) + return file_envoy_service_health_v3_hds_proto_rawDescData +} + +var file_envoy_service_health_v3_hds_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_service_health_v3_hds_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_envoy_service_health_v3_hds_proto_goTypes = []interface{}{ + (Capability_Protocol)(0), // 0: envoy.service.health.v3.Capability.Protocol + (*Capability)(nil), // 1: envoy.service.health.v3.Capability + (*HealthCheckRequest)(nil), // 2: envoy.service.health.v3.HealthCheckRequest + (*EndpointHealth)(nil), // 3: envoy.service.health.v3.EndpointHealth + (*LocalityEndpointsHealth)(nil), // 4: envoy.service.health.v3.LocalityEndpointsHealth + (*ClusterEndpointsHealth)(nil), // 5: envoy.service.health.v3.ClusterEndpointsHealth + (*EndpointHealthResponse)(nil), // 6: envoy.service.health.v3.EndpointHealthResponse + (*HealthCheckRequestOrEndpointHealthResponse)(nil), // 7: envoy.service.health.v3.HealthCheckRequestOrEndpointHealthResponse + (*LocalityEndpoints)(nil), // 8: envoy.service.health.v3.LocalityEndpoints + (*ClusterHealthCheck)(nil), // 9: envoy.service.health.v3.ClusterHealthCheck + (*HealthCheckSpecifier)(nil), // 10: envoy.service.health.v3.HealthCheckSpecifier + (*HdsDummy)(nil), // 11: envoy.service.health.v3.HdsDummy + (*v3.Node)(nil), // 12: envoy.config.core.v3.Node + (*v31.Endpoint)(nil), // 13: envoy.config.endpoint.v3.Endpoint + (v3.HealthStatus)(0), // 14: envoy.config.core.v3.HealthStatus + (*v3.Locality)(nil), // 15: envoy.config.core.v3.Locality + (*v3.HealthCheck)(nil), // 16: envoy.config.core.v3.HealthCheck + (*v32.Cluster_TransportSocketMatch)(nil), // 17: envoy.config.cluster.v3.Cluster.TransportSocketMatch + (*durationpb.Duration)(nil), // 18: google.protobuf.Duration +} +var file_envoy_service_health_v3_hds_proto_depIdxs = []int32{ + 0, // 0: envoy.service.health.v3.Capability.health_check_protocols:type_name -> envoy.service.health.v3.Capability.Protocol + 12, // 1: envoy.service.health.v3.HealthCheckRequest.node:type_name -> envoy.config.core.v3.Node + 1, // 2: envoy.service.health.v3.HealthCheckRequest.capability:type_name -> envoy.service.health.v3.Capability + 13, // 3: envoy.service.health.v3.EndpointHealth.endpoint:type_name -> envoy.config.endpoint.v3.Endpoint + 14, // 4: envoy.service.health.v3.EndpointHealth.health_status:type_name -> envoy.config.core.v3.HealthStatus + 15, // 5: envoy.service.health.v3.LocalityEndpointsHealth.locality:type_name -> envoy.config.core.v3.Locality + 3, // 6: envoy.service.health.v3.LocalityEndpointsHealth.endpoints_health:type_name -> envoy.service.health.v3.EndpointHealth + 4, // 7: envoy.service.health.v3.ClusterEndpointsHealth.locality_endpoints_health:type_name -> envoy.service.health.v3.LocalityEndpointsHealth + 3, // 8: envoy.service.health.v3.EndpointHealthResponse.endpoints_health:type_name -> envoy.service.health.v3.EndpointHealth + 5, // 9: envoy.service.health.v3.EndpointHealthResponse.cluster_endpoints_health:type_name -> envoy.service.health.v3.ClusterEndpointsHealth + 2, // 10: envoy.service.health.v3.HealthCheckRequestOrEndpointHealthResponse.health_check_request:type_name -> envoy.service.health.v3.HealthCheckRequest + 6, // 11: envoy.service.health.v3.HealthCheckRequestOrEndpointHealthResponse.endpoint_health_response:type_name -> envoy.service.health.v3.EndpointHealthResponse + 15, // 12: envoy.service.health.v3.LocalityEndpoints.locality:type_name -> envoy.config.core.v3.Locality + 13, // 13: envoy.service.health.v3.LocalityEndpoints.endpoints:type_name -> envoy.config.endpoint.v3.Endpoint + 16, // 14: envoy.service.health.v3.ClusterHealthCheck.health_checks:type_name -> envoy.config.core.v3.HealthCheck + 8, // 15: envoy.service.health.v3.ClusterHealthCheck.locality_endpoints:type_name -> envoy.service.health.v3.LocalityEndpoints + 17, // 16: envoy.service.health.v3.ClusterHealthCheck.transport_socket_matches:type_name -> envoy.config.cluster.v3.Cluster.TransportSocketMatch + 9, // 17: envoy.service.health.v3.HealthCheckSpecifier.cluster_health_checks:type_name -> envoy.service.health.v3.ClusterHealthCheck + 18, // 18: envoy.service.health.v3.HealthCheckSpecifier.interval:type_name -> google.protobuf.Duration + 7, // 19: envoy.service.health.v3.HealthDiscoveryService.StreamHealthCheck:input_type -> envoy.service.health.v3.HealthCheckRequestOrEndpointHealthResponse + 7, // 20: envoy.service.health.v3.HealthDiscoveryService.FetchHealthCheck:input_type -> envoy.service.health.v3.HealthCheckRequestOrEndpointHealthResponse + 10, // 21: envoy.service.health.v3.HealthDiscoveryService.StreamHealthCheck:output_type -> envoy.service.health.v3.HealthCheckSpecifier + 10, // 22: envoy.service.health.v3.HealthDiscoveryService.FetchHealthCheck:output_type -> envoy.service.health.v3.HealthCheckSpecifier + 21, // [21:23] is the sub-list for method output_type + 19, // [19:21] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name +} + +func init() { file_envoy_service_health_v3_hds_proto_init() } +func file_envoy_service_health_v3_hds_proto_init() { + if File_envoy_service_health_v3_hds_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_service_health_v3_hds_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Capability); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_health_v3_hds_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HealthCheckRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_health_v3_hds_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EndpointHealth); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_health_v3_hds_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LocalityEndpointsHealth); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_health_v3_hds_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterEndpointsHealth); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_health_v3_hds_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EndpointHealthResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_health_v3_hds_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HealthCheckRequestOrEndpointHealthResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_health_v3_hds_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LocalityEndpoints); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_health_v3_hds_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterHealthCheck); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_health_v3_hds_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HealthCheckSpecifier); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_health_v3_hds_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HdsDummy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_service_health_v3_hds_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest)(nil), + (*HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_service_health_v3_hds_proto_rawDesc, + NumEnums: 1, + NumMessages: 11, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_envoy_service_health_v3_hds_proto_goTypes, + DependencyIndexes: file_envoy_service_health_v3_hds_proto_depIdxs, + EnumInfos: file_envoy_service_health_v3_hds_proto_enumTypes, + MessageInfos: file_envoy_service_health_v3_hds_proto_msgTypes, + }.Build() + File_envoy_service_health_v3_hds_proto = out.File + file_envoy_service_health_v3_hds_proto_rawDesc = nil + file_envoy_service_health_v3_hds_proto_goTypes = nil + file_envoy_service_health_v3_hds_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// HealthDiscoveryServiceClient is the client API for HealthDiscoveryService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type HealthDiscoveryServiceClient interface { + // 1. Envoy starts up and if its can_healthcheck option in the static + // bootstrap config is enabled, sends HealthCheckRequest to the management + // server. It supplies its capabilities (which protocol it can health check + // with, what zone it resides in, etc.). + // 2. In response to (1), the management server designates this Envoy as a + // healthchecker to health check a subset of all upstream hosts for a given + // cluster (for example upstream Host 1 and Host 2). It streams + // HealthCheckSpecifier messages with cluster related configuration for all + // clusters this Envoy is designated to health check. Subsequent + // HealthCheckSpecifier message will be sent on changes to: + // a. Endpoints to health checks + // b. Per cluster configuration change + // 3. Envoy creates a health probe based on the HealthCheck config and sends + // it to endpoint(ip:port) of Host 1 and 2. Based on the HealthCheck + // configuration Envoy waits upon the arrival of the probe response and + // looks at the content of the response to decide whether the endpoint is + // healthy or not. If a response hasn't been received within the timeout + // interval, the endpoint health status is considered TIMEOUT. + // 4. Envoy reports results back in an EndpointHealthResponse message. + // Envoy streams responses as often as the interval configured by the + // management server in HealthCheckSpecifier. + // 5. The management Server collects health statuses for all endpoints in the + // cluster (for all clusters) and uses this information to construct + // EndpointDiscoveryResponse messages. + // 6. Once Envoy has a list of upstream endpoints to send traffic to, it load + // balances traffic to them without additional health checking. It may + // use inline healthcheck (i.e. consider endpoint UNHEALTHY if connection + // failed to a particular endpoint to account for health status propagation + // delay between HDS and EDS). + // + // By default, can_healthcheck is true. If can_healthcheck is false, Cluster + // configuration may not contain HealthCheck message. + // TODO(htuch): How is can_healthcheck communicated to CDS to ensure the above + // invariant? + // TODO(htuch): Add @amb67's diagram. + StreamHealthCheck(ctx context.Context, opts ...grpc.CallOption) (HealthDiscoveryService_StreamHealthCheckClient, error) + // TODO(htuch): Unlike the gRPC version, there is no stream-based binding of + // request/response. Should we add an identifier to the HealthCheckSpecifier + // to bind with the response? + FetchHealthCheck(ctx context.Context, in *HealthCheckRequestOrEndpointHealthResponse, opts ...grpc.CallOption) (*HealthCheckSpecifier, error) +} + +type healthDiscoveryServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewHealthDiscoveryServiceClient(cc grpc.ClientConnInterface) HealthDiscoveryServiceClient { + return &healthDiscoveryServiceClient{cc} +} + +func (c *healthDiscoveryServiceClient) StreamHealthCheck(ctx context.Context, opts ...grpc.CallOption) (HealthDiscoveryService_StreamHealthCheckClient, error) { + stream, err := c.cc.NewStream(ctx, &_HealthDiscoveryService_serviceDesc.Streams[0], "/envoy.service.health.v3.HealthDiscoveryService/StreamHealthCheck", opts...) + if err != nil { + return nil, err + } + x := &healthDiscoveryServiceStreamHealthCheckClient{stream} + return x, nil +} + +type HealthDiscoveryService_StreamHealthCheckClient interface { + Send(*HealthCheckRequestOrEndpointHealthResponse) error + Recv() (*HealthCheckSpecifier, error) + grpc.ClientStream +} + +type healthDiscoveryServiceStreamHealthCheckClient struct { + grpc.ClientStream +} + +func (x *healthDiscoveryServiceStreamHealthCheckClient) Send(m *HealthCheckRequestOrEndpointHealthResponse) error { + return x.ClientStream.SendMsg(m) +} + +func (x *healthDiscoveryServiceStreamHealthCheckClient) Recv() (*HealthCheckSpecifier, error) { + m := new(HealthCheckSpecifier) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *healthDiscoveryServiceClient) FetchHealthCheck(ctx context.Context, in *HealthCheckRequestOrEndpointHealthResponse, opts ...grpc.CallOption) (*HealthCheckSpecifier, error) { + out := new(HealthCheckSpecifier) + err := c.cc.Invoke(ctx, "/envoy.service.health.v3.HealthDiscoveryService/FetchHealthCheck", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// HealthDiscoveryServiceServer is the server API for HealthDiscoveryService service. +type HealthDiscoveryServiceServer interface { + // 1. Envoy starts up and if its can_healthcheck option in the static + // bootstrap config is enabled, sends HealthCheckRequest to the management + // server. It supplies its capabilities (which protocol it can health check + // with, what zone it resides in, etc.). + // 2. In response to (1), the management server designates this Envoy as a + // healthchecker to health check a subset of all upstream hosts for a given + // cluster (for example upstream Host 1 and Host 2). It streams + // HealthCheckSpecifier messages with cluster related configuration for all + // clusters this Envoy is designated to health check. Subsequent + // HealthCheckSpecifier message will be sent on changes to: + // a. Endpoints to health checks + // b. Per cluster configuration change + // 3. Envoy creates a health probe based on the HealthCheck config and sends + // it to endpoint(ip:port) of Host 1 and 2. Based on the HealthCheck + // configuration Envoy waits upon the arrival of the probe response and + // looks at the content of the response to decide whether the endpoint is + // healthy or not. If a response hasn't been received within the timeout + // interval, the endpoint health status is considered TIMEOUT. + // 4. Envoy reports results back in an EndpointHealthResponse message. + // Envoy streams responses as often as the interval configured by the + // management server in HealthCheckSpecifier. + // 5. The management Server collects health statuses for all endpoints in the + // cluster (for all clusters) and uses this information to construct + // EndpointDiscoveryResponse messages. + // 6. Once Envoy has a list of upstream endpoints to send traffic to, it load + // balances traffic to them without additional health checking. It may + // use inline healthcheck (i.e. consider endpoint UNHEALTHY if connection + // failed to a particular endpoint to account for health status propagation + // delay between HDS and EDS). + // + // By default, can_healthcheck is true. If can_healthcheck is false, Cluster + // configuration may not contain HealthCheck message. + // TODO(htuch): How is can_healthcheck communicated to CDS to ensure the above + // invariant? + // TODO(htuch): Add @amb67's diagram. + StreamHealthCheck(HealthDiscoveryService_StreamHealthCheckServer) error + // TODO(htuch): Unlike the gRPC version, there is no stream-based binding of + // request/response. Should we add an identifier to the HealthCheckSpecifier + // to bind with the response? + FetchHealthCheck(context.Context, *HealthCheckRequestOrEndpointHealthResponse) (*HealthCheckSpecifier, error) +} + +// UnimplementedHealthDiscoveryServiceServer can be embedded to have forward compatible implementations. +type UnimplementedHealthDiscoveryServiceServer struct { +} + +func (*UnimplementedHealthDiscoveryServiceServer) StreamHealthCheck(HealthDiscoveryService_StreamHealthCheckServer) error { + return status.Errorf(codes.Unimplemented, "method StreamHealthCheck not implemented") +} +func (*UnimplementedHealthDiscoveryServiceServer) FetchHealthCheck(context.Context, *HealthCheckRequestOrEndpointHealthResponse) (*HealthCheckSpecifier, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchHealthCheck not implemented") +} + +func RegisterHealthDiscoveryServiceServer(s *grpc.Server, srv HealthDiscoveryServiceServer) { + s.RegisterService(&_HealthDiscoveryService_serviceDesc, srv) +} + +func _HealthDiscoveryService_StreamHealthCheck_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(HealthDiscoveryServiceServer).StreamHealthCheck(&healthDiscoveryServiceStreamHealthCheckServer{stream}) +} + +type HealthDiscoveryService_StreamHealthCheckServer interface { + Send(*HealthCheckSpecifier) error + Recv() (*HealthCheckRequestOrEndpointHealthResponse, error) + grpc.ServerStream +} + +type healthDiscoveryServiceStreamHealthCheckServer struct { + grpc.ServerStream +} + +func (x *healthDiscoveryServiceStreamHealthCheckServer) Send(m *HealthCheckSpecifier) error { + return x.ServerStream.SendMsg(m) +} + +func (x *healthDiscoveryServiceStreamHealthCheckServer) Recv() (*HealthCheckRequestOrEndpointHealthResponse, error) { + m := new(HealthCheckRequestOrEndpointHealthResponse) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _HealthDiscoveryService_FetchHealthCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HealthCheckRequestOrEndpointHealthResponse) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HealthDiscoveryServiceServer).FetchHealthCheck(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/envoy.service.health.v3.HealthDiscoveryService/FetchHealthCheck", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HealthDiscoveryServiceServer).FetchHealthCheck(ctx, req.(*HealthCheckRequestOrEndpointHealthResponse)) + } + return interceptor(ctx, in, info, handler) +} + +var _HealthDiscoveryService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "envoy.service.health.v3.HealthDiscoveryService", + HandlerType: (*HealthDiscoveryServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "FetchHealthCheck", + Handler: _HealthDiscoveryService_FetchHealthCheck_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamHealthCheck", + Handler: _HealthDiscoveryService_StreamHealthCheck_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "envoy/service/health/v3/hds.proto", +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/health/v3/hds.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/service/health/v3/hds.pb.validate.go new file mode 100644 index 0000000000000..b4c5b686bbdf5 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/health/v3/hds.pb.validate.go @@ -0,0 +1,1699 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/service/health/v3/hds.proto + +package healthv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" + + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort + + _ = v3.HealthStatus(0) +) + +// Validate checks the field values on Capability 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 *Capability) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Capability 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 CapabilityMultiError, or +// nil if none found. +func (m *Capability) ValidateAll() error { + return m.validate(true) +} + +func (m *Capability) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return CapabilityMultiError(errors) + } + return nil +} + +// CapabilityMultiError is an error wrapping multiple validation errors +// returned by Capability.ValidateAll() if the designated constraints aren't met. +type CapabilityMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CapabilityMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CapabilityMultiError) AllErrors() []error { return m } + +// CapabilityValidationError is the validation error returned by +// Capability.Validate if the designated constraints aren't met. +type CapabilityValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CapabilityValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CapabilityValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CapabilityValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CapabilityValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CapabilityValidationError) ErrorName() string { return "CapabilityValidationError" } + +// Error satisfies the builtin error interface +func (e CapabilityValidationError) 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 %sCapability.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CapabilityValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CapabilityValidationError{} + +// Validate checks the field values on HealthCheckRequest 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 *HealthCheckRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheckRequest 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 +// HealthCheckRequestMultiError, or nil if none found. +func (m *HealthCheckRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheckRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheckRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetCapability()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckRequestValidationError{ + field: "Capability", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckRequestValidationError{ + field: "Capability", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCapability()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheckRequestValidationError{ + field: "Capability", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return HealthCheckRequestMultiError(errors) + } + return nil +} + +// HealthCheckRequestMultiError is an error wrapping multiple validation errors +// returned by HealthCheckRequest.ValidateAll() if the designated constraints +// aren't met. +type HealthCheckRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckRequestMultiError) AllErrors() []error { return m } + +// HealthCheckRequestValidationError is the validation error returned by +// HealthCheckRequest.Validate if the designated constraints aren't met. +type HealthCheckRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HealthCheckRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HealthCheckRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HealthCheckRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HealthCheckRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HealthCheckRequestValidationError) ErrorName() string { + return "HealthCheckRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e HealthCheckRequestValidationError) 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 %sHealthCheckRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HealthCheckRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HealthCheckRequestValidationError{} + +// Validate checks the field values on EndpointHealth 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 *EndpointHealth) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on EndpointHealth 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 EndpointHealthMultiError, +// or nil if none found. +func (m *EndpointHealth) ValidateAll() error { + return m.validate(true) +} + +func (m *EndpointHealth) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetEndpoint()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointHealthValidationError{ + field: "Endpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointHealthValidationError{ + field: "Endpoint", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEndpoint()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return EndpointHealthValidationError{ + field: "Endpoint", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for HealthStatus + + if len(errors) > 0 { + return EndpointHealthMultiError(errors) + } + return nil +} + +// EndpointHealthMultiError is an error wrapping multiple validation errors +// returned by EndpointHealth.ValidateAll() if the designated constraints +// aren't met. +type EndpointHealthMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EndpointHealthMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EndpointHealthMultiError) AllErrors() []error { return m } + +// EndpointHealthValidationError is the validation error returned by +// EndpointHealth.Validate if the designated constraints aren't met. +type EndpointHealthValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e EndpointHealthValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e EndpointHealthValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e EndpointHealthValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e EndpointHealthValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e EndpointHealthValidationError) ErrorName() string { return "EndpointHealthValidationError" } + +// Error satisfies the builtin error interface +func (e EndpointHealthValidationError) 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 %sEndpointHealth.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = EndpointHealthValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = EndpointHealthValidationError{} + +// Validate checks the field values on LocalityEndpointsHealth 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 *LocalityEndpointsHealth) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LocalityEndpointsHealth 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 +// LocalityEndpointsHealthMultiError, or nil if none found. +func (m *LocalityEndpointsHealth) ValidateAll() error { + return m.validate(true) +} + +func (m *LocalityEndpointsHealth) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetLocality()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalityEndpointsHealthValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalityEndpointsHealthValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LocalityEndpointsHealthValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetEndpointsHealth() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalityEndpointsHealthValidationError{ + field: fmt.Sprintf("EndpointsHealth[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalityEndpointsHealthValidationError{ + field: fmt.Sprintf("EndpointsHealth[%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 LocalityEndpointsHealthValidationError{ + field: fmt.Sprintf("EndpointsHealth[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return LocalityEndpointsHealthMultiError(errors) + } + return nil +} + +// LocalityEndpointsHealthMultiError is an error wrapping multiple validation +// errors returned by LocalityEndpointsHealth.ValidateAll() if the designated +// constraints aren't met. +type LocalityEndpointsHealthMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LocalityEndpointsHealthMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LocalityEndpointsHealthMultiError) AllErrors() []error { return m } + +// LocalityEndpointsHealthValidationError is the validation error returned by +// LocalityEndpointsHealth.Validate if the designated constraints aren't met. +type LocalityEndpointsHealthValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e LocalityEndpointsHealthValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e LocalityEndpointsHealthValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e LocalityEndpointsHealthValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e LocalityEndpointsHealthValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e LocalityEndpointsHealthValidationError) ErrorName() string { + return "LocalityEndpointsHealthValidationError" +} + +// Error satisfies the builtin error interface +func (e LocalityEndpointsHealthValidationError) 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 %sLocalityEndpointsHealth.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = LocalityEndpointsHealthValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = LocalityEndpointsHealthValidationError{} + +// Validate checks the field values on ClusterEndpointsHealth 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 *ClusterEndpointsHealth) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterEndpointsHealth 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 +// ClusterEndpointsHealthMultiError, or nil if none found. +func (m *ClusterEndpointsHealth) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterEndpointsHealth) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for ClusterName + + for idx, item := range m.GetLocalityEndpointsHealth() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterEndpointsHealthValidationError{ + field: fmt.Sprintf("LocalityEndpointsHealth[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterEndpointsHealthValidationError{ + field: fmt.Sprintf("LocalityEndpointsHealth[%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 ClusterEndpointsHealthValidationError{ + field: fmt.Sprintf("LocalityEndpointsHealth[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ClusterEndpointsHealthMultiError(errors) + } + return nil +} + +// ClusterEndpointsHealthMultiError is an error wrapping multiple validation +// errors returned by ClusterEndpointsHealth.ValidateAll() if the designated +// constraints aren't met. +type ClusterEndpointsHealthMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterEndpointsHealthMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterEndpointsHealthMultiError) AllErrors() []error { return m } + +// ClusterEndpointsHealthValidationError is the validation error returned by +// ClusterEndpointsHealth.Validate if the designated constraints aren't met. +type ClusterEndpointsHealthValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ClusterEndpointsHealthValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ClusterEndpointsHealthValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ClusterEndpointsHealthValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ClusterEndpointsHealthValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ClusterEndpointsHealthValidationError) ErrorName() string { + return "ClusterEndpointsHealthValidationError" +} + +// Error satisfies the builtin error interface +func (e ClusterEndpointsHealthValidationError) 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 %sClusterEndpointsHealth.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ClusterEndpointsHealthValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ClusterEndpointsHealthValidationError{} + +// Validate checks the field values on EndpointHealthResponse 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 *EndpointHealthResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on EndpointHealthResponse 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 +// EndpointHealthResponseMultiError, or nil if none found. +func (m *EndpointHealthResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *EndpointHealthResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetEndpointsHealth() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointHealthResponseValidationError{ + field: fmt.Sprintf("EndpointsHealth[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointHealthResponseValidationError{ + field: fmt.Sprintf("EndpointsHealth[%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 EndpointHealthResponseValidationError{ + field: fmt.Sprintf("EndpointsHealth[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetClusterEndpointsHealth() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EndpointHealthResponseValidationError{ + field: fmt.Sprintf("ClusterEndpointsHealth[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EndpointHealthResponseValidationError{ + field: fmt.Sprintf("ClusterEndpointsHealth[%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 EndpointHealthResponseValidationError{ + field: fmt.Sprintf("ClusterEndpointsHealth[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return EndpointHealthResponseMultiError(errors) + } + return nil +} + +// EndpointHealthResponseMultiError is an error wrapping multiple validation +// errors returned by EndpointHealthResponse.ValidateAll() if the designated +// constraints aren't met. +type EndpointHealthResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EndpointHealthResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EndpointHealthResponseMultiError) AllErrors() []error { return m } + +// EndpointHealthResponseValidationError is the validation error returned by +// EndpointHealthResponse.Validate if the designated constraints aren't met. +type EndpointHealthResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e EndpointHealthResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e EndpointHealthResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e EndpointHealthResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e EndpointHealthResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e EndpointHealthResponseValidationError) ErrorName() string { + return "EndpointHealthResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e EndpointHealthResponseValidationError) 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 %sEndpointHealthResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = EndpointHealthResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = EndpointHealthResponseValidationError{} + +// Validate checks the field values on +// HealthCheckRequestOrEndpointHealthResponse 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 *HealthCheckRequestOrEndpointHealthResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// HealthCheckRequestOrEndpointHealthResponse 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 +// HealthCheckRequestOrEndpointHealthResponseMultiError, or nil if none found. +func (m *HealthCheckRequestOrEndpointHealthResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheckRequestOrEndpointHealthResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.RequestType.(type) { + + case *HealthCheckRequestOrEndpointHealthResponse_HealthCheckRequest: + + if all { + switch v := interface{}(m.GetHealthCheckRequest()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckRequestOrEndpointHealthResponseValidationError{ + field: "HealthCheckRequest", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckRequestOrEndpointHealthResponseValidationError{ + field: "HealthCheckRequest", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHealthCheckRequest()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheckRequestOrEndpointHealthResponseValidationError{ + field: "HealthCheckRequest", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *HealthCheckRequestOrEndpointHealthResponse_EndpointHealthResponse: + + if all { + switch v := interface{}(m.GetEndpointHealthResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckRequestOrEndpointHealthResponseValidationError{ + field: "EndpointHealthResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckRequestOrEndpointHealthResponseValidationError{ + field: "EndpointHealthResponse", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEndpointHealthResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheckRequestOrEndpointHealthResponseValidationError{ + field: "EndpointHealthResponse", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return HealthCheckRequestOrEndpointHealthResponseMultiError(errors) + } + return nil +} + +// HealthCheckRequestOrEndpointHealthResponseMultiError is an error wrapping +// multiple validation errors returned by +// HealthCheckRequestOrEndpointHealthResponse.ValidateAll() if the designated +// constraints aren't met. +type HealthCheckRequestOrEndpointHealthResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckRequestOrEndpointHealthResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckRequestOrEndpointHealthResponseMultiError) AllErrors() []error { return m } + +// HealthCheckRequestOrEndpointHealthResponseValidationError is the validation +// error returned by HealthCheckRequestOrEndpointHealthResponse.Validate if +// the designated constraints aren't met. +type HealthCheckRequestOrEndpointHealthResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HealthCheckRequestOrEndpointHealthResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HealthCheckRequestOrEndpointHealthResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HealthCheckRequestOrEndpointHealthResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HealthCheckRequestOrEndpointHealthResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HealthCheckRequestOrEndpointHealthResponseValidationError) ErrorName() string { + return "HealthCheckRequestOrEndpointHealthResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e HealthCheckRequestOrEndpointHealthResponseValidationError) 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 %sHealthCheckRequestOrEndpointHealthResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HealthCheckRequestOrEndpointHealthResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HealthCheckRequestOrEndpointHealthResponseValidationError{} + +// Validate checks the field values on LocalityEndpoints 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 *LocalityEndpoints) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LocalityEndpoints 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 +// LocalityEndpointsMultiError, or nil if none found. +func (m *LocalityEndpoints) ValidateAll() error { + return m.validate(true) +} + +func (m *LocalityEndpoints) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetLocality()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalityEndpointsValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalityEndpointsValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLocality()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LocalityEndpointsValidationError{ + field: "Locality", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetEndpoints() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LocalityEndpointsValidationError{ + field: fmt.Sprintf("Endpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LocalityEndpointsValidationError{ + field: fmt.Sprintf("Endpoints[%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 LocalityEndpointsValidationError{ + field: fmt.Sprintf("Endpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return LocalityEndpointsMultiError(errors) + } + return nil +} + +// LocalityEndpointsMultiError is an error wrapping multiple validation errors +// returned by LocalityEndpoints.ValidateAll() if the designated constraints +// aren't met. +type LocalityEndpointsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LocalityEndpointsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LocalityEndpointsMultiError) AllErrors() []error { return m } + +// LocalityEndpointsValidationError is the validation error returned by +// LocalityEndpoints.Validate if the designated constraints aren't met. +type LocalityEndpointsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e LocalityEndpointsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e LocalityEndpointsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e LocalityEndpointsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e LocalityEndpointsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e LocalityEndpointsValidationError) ErrorName() string { + return "LocalityEndpointsValidationError" +} + +// Error satisfies the builtin error interface +func (e LocalityEndpointsValidationError) 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 %sLocalityEndpoints.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = LocalityEndpointsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = LocalityEndpointsValidationError{} + +// Validate checks the field values on ClusterHealthCheck 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 *ClusterHealthCheck) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClusterHealthCheck 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 +// ClusterHealthCheckMultiError, or nil if none found. +func (m *ClusterHealthCheck) ValidateAll() error { + return m.validate(true) +} + +func (m *ClusterHealthCheck) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for ClusterName + + for idx, item := range m.GetHealthChecks() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterHealthCheckValidationError{ + field: fmt.Sprintf("HealthChecks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterHealthCheckValidationError{ + field: fmt.Sprintf("HealthChecks[%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 ClusterHealthCheckValidationError{ + field: fmt.Sprintf("HealthChecks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetLocalityEndpoints() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterHealthCheckValidationError{ + field: fmt.Sprintf("LocalityEndpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterHealthCheckValidationError{ + field: fmt.Sprintf("LocalityEndpoints[%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 ClusterHealthCheckValidationError{ + field: fmt.Sprintf("LocalityEndpoints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetTransportSocketMatches() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClusterHealthCheckValidationError{ + field: fmt.Sprintf("TransportSocketMatches[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClusterHealthCheckValidationError{ + field: fmt.Sprintf("TransportSocketMatches[%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 ClusterHealthCheckValidationError{ + field: fmt.Sprintf("TransportSocketMatches[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ClusterHealthCheckMultiError(errors) + } + return nil +} + +// ClusterHealthCheckMultiError is an error wrapping multiple validation errors +// returned by ClusterHealthCheck.ValidateAll() if the designated constraints +// aren't met. +type ClusterHealthCheckMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClusterHealthCheckMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClusterHealthCheckMultiError) AllErrors() []error { return m } + +// ClusterHealthCheckValidationError is the validation error returned by +// ClusterHealthCheck.Validate if the designated constraints aren't met. +type ClusterHealthCheckValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ClusterHealthCheckValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ClusterHealthCheckValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ClusterHealthCheckValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ClusterHealthCheckValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ClusterHealthCheckValidationError) ErrorName() string { + return "ClusterHealthCheckValidationError" +} + +// Error satisfies the builtin error interface +func (e ClusterHealthCheckValidationError) 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 %sClusterHealthCheck.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ClusterHealthCheckValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ClusterHealthCheckValidationError{} + +// Validate checks the field values on HealthCheckSpecifier 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 *HealthCheckSpecifier) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HealthCheckSpecifier 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 +// HealthCheckSpecifierMultiError, or nil if none found. +func (m *HealthCheckSpecifier) ValidateAll() error { + return m.validate(true) +} + +func (m *HealthCheckSpecifier) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetClusterHealthChecks() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckSpecifierValidationError{ + field: fmt.Sprintf("ClusterHealthChecks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckSpecifierValidationError{ + field: fmt.Sprintf("ClusterHealthChecks[%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 HealthCheckSpecifierValidationError{ + field: fmt.Sprintf("ClusterHealthChecks[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetInterval()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HealthCheckSpecifierValidationError{ + field: "Interval", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HealthCheckSpecifierValidationError{ + field: "Interval", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInterval()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HealthCheckSpecifierValidationError{ + field: "Interval", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return HealthCheckSpecifierMultiError(errors) + } + return nil +} + +// HealthCheckSpecifierMultiError is an error wrapping multiple validation +// errors returned by HealthCheckSpecifier.ValidateAll() if the designated +// constraints aren't met. +type HealthCheckSpecifierMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HealthCheckSpecifierMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HealthCheckSpecifierMultiError) AllErrors() []error { return m } + +// HealthCheckSpecifierValidationError is the validation error returned by +// HealthCheckSpecifier.Validate if the designated constraints aren't met. +type HealthCheckSpecifierValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HealthCheckSpecifierValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HealthCheckSpecifierValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HealthCheckSpecifierValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HealthCheckSpecifierValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HealthCheckSpecifierValidationError) ErrorName() string { + return "HealthCheckSpecifierValidationError" +} + +// Error satisfies the builtin error interface +func (e HealthCheckSpecifierValidationError) 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 %sHealthCheckSpecifier.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HealthCheckSpecifierValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HealthCheckSpecifierValidationError{} + +// Validate checks the field values on HdsDummy 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 *HdsDummy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HdsDummy 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 HdsDummyMultiError, or nil +// if none found. +func (m *HdsDummy) ValidateAll() error { + return m.validate(true) +} + +func (m *HdsDummy) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return HdsDummyMultiError(errors) + } + return nil +} + +// HdsDummyMultiError is an error wrapping multiple validation errors returned +// by HdsDummy.ValidateAll() if the designated constraints aren't met. +type HdsDummyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HdsDummyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HdsDummyMultiError) AllErrors() []error { return m } + +// HdsDummyValidationError is the validation error returned by +// HdsDummy.Validate if the designated constraints aren't met. +type HdsDummyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HdsDummyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HdsDummyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HdsDummyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HdsDummyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HdsDummyValidationError) ErrorName() string { return "HdsDummyValidationError" } + +// Error satisfies the builtin error interface +func (e HdsDummyValidationError) 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 %sHdsDummy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HdsDummyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HdsDummyValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/load_stats/v3/lrs.pb.go b/vendor/github.com/cilium/proxy/go/envoy/service/load_stats/v3/lrs.pb.go new file mode 100644 index 0000000000000..ebc20eac6e410 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/load_stats/v3/lrs.pb.go @@ -0,0 +1,504 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/service/load_stats/v3/lrs.proto + +package load_statsv3 + +import ( + context "context" + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + v31 "github.com/cilium/proxy/go/envoy/config/endpoint/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// A load report Envoy sends to the management server. +type LoadStatsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Node identifier for Envoy instance. + Node *v3.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + // A list of load stats to report. + ClusterStats []*v31.ClusterStats `protobuf:"bytes,2,rep,name=cluster_stats,json=clusterStats,proto3" json:"cluster_stats,omitempty"` +} + +func (x *LoadStatsRequest) Reset() { + *x = LoadStatsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_load_stats_v3_lrs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LoadStatsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoadStatsRequest) ProtoMessage() {} + +func (x *LoadStatsRequest) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_load_stats_v3_lrs_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LoadStatsRequest.ProtoReflect.Descriptor instead. +func (*LoadStatsRequest) Descriptor() ([]byte, []int) { + return file_envoy_service_load_stats_v3_lrs_proto_rawDescGZIP(), []int{0} +} + +func (x *LoadStatsRequest) GetNode() *v3.Node { + if x != nil { + return x.Node + } + return nil +} + +func (x *LoadStatsRequest) GetClusterStats() []*v31.ClusterStats { + if x != nil { + return x.ClusterStats + } + return nil +} + +// The management server sends envoy a LoadStatsResponse with all clusters it +// is interested in learning load stats about. +type LoadStatsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Clusters to report stats for. + // Not populated if “send_all_clusters“ is true. + Clusters []string `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"` + // If true, the client should send all clusters it knows about. + // Only clients that advertise the "envoy.lrs.supports_send_all_clusters" capability in their + // :ref:`client_features` field will honor this field. + SendAllClusters bool `protobuf:"varint,4,opt,name=send_all_clusters,json=sendAllClusters,proto3" json:"send_all_clusters,omitempty"` + // The minimum interval of time to collect stats over. This is only a minimum for two reasons: + // + // 1. There may be some delay from when the timer fires until stats sampling occurs. + // 2. For clusters that were already feature in the previous “LoadStatsResponse“, any traffic + // that is observed in between the corresponding previous “LoadStatsRequest“ and this + // “LoadStatsResponse“ will also be accumulated and billed to the cluster. This avoids a period + // of inobservability that might otherwise exists between the messages. New clusters are not + // subject to this consideration. + LoadReportingInterval *durationpb.Duration `protobuf:"bytes,2,opt,name=load_reporting_interval,json=loadReportingInterval,proto3" json:"load_reporting_interval,omitempty"` + // Set to “true“ if the management server supports endpoint granularity + // report. + ReportEndpointGranularity bool `protobuf:"varint,3,opt,name=report_endpoint_granularity,json=reportEndpointGranularity,proto3" json:"report_endpoint_granularity,omitempty"` +} + +func (x *LoadStatsResponse) Reset() { + *x = LoadStatsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_load_stats_v3_lrs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LoadStatsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoadStatsResponse) ProtoMessage() {} + +func (x *LoadStatsResponse) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_load_stats_v3_lrs_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LoadStatsResponse.ProtoReflect.Descriptor instead. +func (*LoadStatsResponse) Descriptor() ([]byte, []int) { + return file_envoy_service_load_stats_v3_lrs_proto_rawDescGZIP(), []int{1} +} + +func (x *LoadStatsResponse) GetClusters() []string { + if x != nil { + return x.Clusters + } + return nil +} + +func (x *LoadStatsResponse) GetSendAllClusters() bool { + if x != nil { + return x.SendAllClusters + } + return false +} + +func (x *LoadStatsResponse) GetLoadReportingInterval() *durationpb.Duration { + if x != nil { + return x.LoadReportingInterval + } + return nil +} + +func (x *LoadStatsResponse) GetReportEndpointGranularity() bool { + if x != nil { + return x.ReportEndpointGranularity + } + return false +} + +var File_envoy_service_load_stats_v3_lrs_proto protoreflect.FileDescriptor + +var file_envoy_service_load_stats_v3_lrs_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x6c, 0x72, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x33, 0x2f, + 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xc4, 0x01, 0x0a, 0x10, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, + 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x4b, 0x0a, 0x0d, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xa4, 0x02, 0x0a, 0x11, 0x4c, + 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, 0x11, + 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x73, 0x65, 0x6e, 0x64, 0x41, 0x6c, 0x6c, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x17, 0x6c, 0x6f, 0x61, 0x64, + 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x3e, 0x0a, 0x1b, 0x72, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x67, + 0x72, 0x61, 0x6e, 0x75, 0x6c, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x19, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x47, 0x72, 0x61, 0x6e, 0x75, 0x6c, 0x61, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x34, 0x9a, 0xc5, 0x88, + 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, + 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x32, 0x8e, 0x01, 0x0a, 0x14, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x76, 0x0a, 0x0f, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2d, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, + 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x61, 0x64, + 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, + 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, + 0x30, 0x01, 0x42, 0x93, 0x01, 0x0a, 0x29, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x33, + 0x42, 0x08, 0x4c, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4f, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2f, 0x76, 0x33, + 0x3b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x76, 0x33, 0x88, 0x01, 0x01, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_service_load_stats_v3_lrs_proto_rawDescOnce sync.Once + file_envoy_service_load_stats_v3_lrs_proto_rawDescData = file_envoy_service_load_stats_v3_lrs_proto_rawDesc +) + +func file_envoy_service_load_stats_v3_lrs_proto_rawDescGZIP() []byte { + file_envoy_service_load_stats_v3_lrs_proto_rawDescOnce.Do(func() { + file_envoy_service_load_stats_v3_lrs_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_load_stats_v3_lrs_proto_rawDescData) + }) + return file_envoy_service_load_stats_v3_lrs_proto_rawDescData +} + +var file_envoy_service_load_stats_v3_lrs_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_service_load_stats_v3_lrs_proto_goTypes = []interface{}{ + (*LoadStatsRequest)(nil), // 0: envoy.service.load_stats.v3.LoadStatsRequest + (*LoadStatsResponse)(nil), // 1: envoy.service.load_stats.v3.LoadStatsResponse + (*v3.Node)(nil), // 2: envoy.config.core.v3.Node + (*v31.ClusterStats)(nil), // 3: envoy.config.endpoint.v3.ClusterStats + (*durationpb.Duration)(nil), // 4: google.protobuf.Duration +} +var file_envoy_service_load_stats_v3_lrs_proto_depIdxs = []int32{ + 2, // 0: envoy.service.load_stats.v3.LoadStatsRequest.node:type_name -> envoy.config.core.v3.Node + 3, // 1: envoy.service.load_stats.v3.LoadStatsRequest.cluster_stats:type_name -> envoy.config.endpoint.v3.ClusterStats + 4, // 2: envoy.service.load_stats.v3.LoadStatsResponse.load_reporting_interval:type_name -> google.protobuf.Duration + 0, // 3: envoy.service.load_stats.v3.LoadReportingService.StreamLoadStats:input_type -> envoy.service.load_stats.v3.LoadStatsRequest + 1, // 4: envoy.service.load_stats.v3.LoadReportingService.StreamLoadStats:output_type -> envoy.service.load_stats.v3.LoadStatsResponse + 4, // [4:5] is the sub-list for method output_type + 3, // [3:4] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_envoy_service_load_stats_v3_lrs_proto_init() } +func file_envoy_service_load_stats_v3_lrs_proto_init() { + if File_envoy_service_load_stats_v3_lrs_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_service_load_stats_v3_lrs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LoadStatsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_load_stats_v3_lrs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LoadStatsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_service_load_stats_v3_lrs_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_envoy_service_load_stats_v3_lrs_proto_goTypes, + DependencyIndexes: file_envoy_service_load_stats_v3_lrs_proto_depIdxs, + MessageInfos: file_envoy_service_load_stats_v3_lrs_proto_msgTypes, + }.Build() + File_envoy_service_load_stats_v3_lrs_proto = out.File + file_envoy_service_load_stats_v3_lrs_proto_rawDesc = nil + file_envoy_service_load_stats_v3_lrs_proto_goTypes = nil + file_envoy_service_load_stats_v3_lrs_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// LoadReportingServiceClient is the client API for LoadReportingService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type LoadReportingServiceClient interface { + // Advanced API to allow for multi-dimensional load balancing by remote + // server. For receiving LB assignments, the steps are: + // 1, The management server is configured with per cluster/zone/load metric + // + // capacity configuration. The capacity configuration definition is + // outside of the scope of this document. + // 2. Envoy issues a standard {Stream,Fetch}Endpoints request for the clusters + // to balance. + // + // Independently, Envoy will initiate a StreamLoadStats bidi stream with a + // management server: + // 1. Once a connection establishes, the management server publishes a + // LoadStatsResponse for all clusters it is interested in learning load + // stats about. + // 2. For each cluster, Envoy load balances incoming traffic to upstream hosts + // based on per-zone weights and/or per-instance weights (if specified) + // based on intra-zone LbPolicy. This information comes from the above + // {Stream,Fetch}Endpoints. + // 3. When upstream hosts reply, they optionally add header with ASCII representation of EndpointLoadMetricStats. + // 4. Envoy aggregates load reports over the period of time given to it in + // LoadStatsResponse.load_reporting_interval. This includes aggregation + // stats Envoy maintains by itself (total_requests, rpc_errors etc.) as + // well as load metrics from upstream hosts. + // 5. When the timer of load_reporting_interval expires, Envoy sends new + // LoadStatsRequest filled with load reports for each cluster. + // 6. The management server uses the load reports from all reported Envoys + // from around the world, computes global assignment and prepares traffic + // assignment destined for each zone Envoys are located in. Goto 2. + StreamLoadStats(ctx context.Context, opts ...grpc.CallOption) (LoadReportingService_StreamLoadStatsClient, error) +} + +type loadReportingServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewLoadReportingServiceClient(cc grpc.ClientConnInterface) LoadReportingServiceClient { + return &loadReportingServiceClient{cc} +} + +func (c *loadReportingServiceClient) StreamLoadStats(ctx context.Context, opts ...grpc.CallOption) (LoadReportingService_StreamLoadStatsClient, error) { + stream, err := c.cc.NewStream(ctx, &_LoadReportingService_serviceDesc.Streams[0], "/envoy.service.load_stats.v3.LoadReportingService/StreamLoadStats", opts...) + if err != nil { + return nil, err + } + x := &loadReportingServiceStreamLoadStatsClient{stream} + return x, nil +} + +type LoadReportingService_StreamLoadStatsClient interface { + Send(*LoadStatsRequest) error + Recv() (*LoadStatsResponse, error) + grpc.ClientStream +} + +type loadReportingServiceStreamLoadStatsClient struct { + grpc.ClientStream +} + +func (x *loadReportingServiceStreamLoadStatsClient) Send(m *LoadStatsRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *loadReportingServiceStreamLoadStatsClient) Recv() (*LoadStatsResponse, error) { + m := new(LoadStatsResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// LoadReportingServiceServer is the server API for LoadReportingService service. +type LoadReportingServiceServer interface { + // Advanced API to allow for multi-dimensional load balancing by remote + // server. For receiving LB assignments, the steps are: + // 1, The management server is configured with per cluster/zone/load metric + // + // capacity configuration. The capacity configuration definition is + // outside of the scope of this document. + // 2. Envoy issues a standard {Stream,Fetch}Endpoints request for the clusters + // to balance. + // + // Independently, Envoy will initiate a StreamLoadStats bidi stream with a + // management server: + // 1. Once a connection establishes, the management server publishes a + // LoadStatsResponse for all clusters it is interested in learning load + // stats about. + // 2. For each cluster, Envoy load balances incoming traffic to upstream hosts + // based on per-zone weights and/or per-instance weights (if specified) + // based on intra-zone LbPolicy. This information comes from the above + // {Stream,Fetch}Endpoints. + // 3. When upstream hosts reply, they optionally add header with ASCII representation of EndpointLoadMetricStats. + // 4. Envoy aggregates load reports over the period of time given to it in + // LoadStatsResponse.load_reporting_interval. This includes aggregation + // stats Envoy maintains by itself (total_requests, rpc_errors etc.) as + // well as load metrics from upstream hosts. + // 5. When the timer of load_reporting_interval expires, Envoy sends new + // LoadStatsRequest filled with load reports for each cluster. + // 6. The management server uses the load reports from all reported Envoys + // from around the world, computes global assignment and prepares traffic + // assignment destined for each zone Envoys are located in. Goto 2. + StreamLoadStats(LoadReportingService_StreamLoadStatsServer) error +} + +// UnimplementedLoadReportingServiceServer can be embedded to have forward compatible implementations. +type UnimplementedLoadReportingServiceServer struct { +} + +func (*UnimplementedLoadReportingServiceServer) StreamLoadStats(LoadReportingService_StreamLoadStatsServer) error { + return status.Errorf(codes.Unimplemented, "method StreamLoadStats not implemented") +} + +func RegisterLoadReportingServiceServer(s *grpc.Server, srv LoadReportingServiceServer) { + s.RegisterService(&_LoadReportingService_serviceDesc, srv) +} + +func _LoadReportingService_StreamLoadStats_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(LoadReportingServiceServer).StreamLoadStats(&loadReportingServiceStreamLoadStatsServer{stream}) +} + +type LoadReportingService_StreamLoadStatsServer interface { + Send(*LoadStatsResponse) error + Recv() (*LoadStatsRequest, error) + grpc.ServerStream +} + +type loadReportingServiceStreamLoadStatsServer struct { + grpc.ServerStream +} + +func (x *loadReportingServiceStreamLoadStatsServer) Send(m *LoadStatsResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *loadReportingServiceStreamLoadStatsServer) Recv() (*LoadStatsRequest, error) { + m := new(LoadStatsRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +var _LoadReportingService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "envoy.service.load_stats.v3.LoadReportingService", + HandlerType: (*LoadReportingServiceServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamLoadStats", + Handler: _LoadReportingService_StreamLoadStats_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "envoy/service/load_stats/v3/lrs.proto", +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/load_stats/v3/lrs.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/service/load_stats/v3/lrs.pb.validate.go new file mode 100644 index 0000000000000..7f2dba1bb077b --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/load_stats/v3/lrs.pb.validate.go @@ -0,0 +1,332 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/service/load_stats/v3/lrs.proto + +package load_statsv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on LoadStatsRequest 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 *LoadStatsRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LoadStatsRequest 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 +// LoadStatsRequestMultiError, or nil if none found. +func (m *LoadStatsRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *LoadStatsRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LoadStatsRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LoadStatsRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LoadStatsRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetClusterStats() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LoadStatsRequestValidationError{ + field: fmt.Sprintf("ClusterStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LoadStatsRequestValidationError{ + field: fmt.Sprintf("ClusterStats[%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 LoadStatsRequestValidationError{ + field: fmt.Sprintf("ClusterStats[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return LoadStatsRequestMultiError(errors) + } + return nil +} + +// LoadStatsRequestMultiError is an error wrapping multiple validation errors +// returned by LoadStatsRequest.ValidateAll() if the designated constraints +// aren't met. +type LoadStatsRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LoadStatsRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LoadStatsRequestMultiError) AllErrors() []error { return m } + +// LoadStatsRequestValidationError is the validation error returned by +// LoadStatsRequest.Validate if the designated constraints aren't met. +type LoadStatsRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e LoadStatsRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e LoadStatsRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e LoadStatsRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e LoadStatsRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e LoadStatsRequestValidationError) ErrorName() string { return "LoadStatsRequestValidationError" } + +// Error satisfies the builtin error interface +func (e LoadStatsRequestValidationError) 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 %sLoadStatsRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = LoadStatsRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = LoadStatsRequestValidationError{} + +// Validate checks the field values on LoadStatsResponse 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 *LoadStatsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LoadStatsResponse 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 +// LoadStatsResponseMultiError, or nil if none found. +func (m *LoadStatsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *LoadStatsResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for SendAllClusters + + if all { + switch v := interface{}(m.GetLoadReportingInterval()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LoadStatsResponseValidationError{ + field: "LoadReportingInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LoadStatsResponseValidationError{ + field: "LoadReportingInterval", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLoadReportingInterval()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LoadStatsResponseValidationError{ + field: "LoadReportingInterval", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ReportEndpointGranularity + + if len(errors) > 0 { + return LoadStatsResponseMultiError(errors) + } + return nil +} + +// LoadStatsResponseMultiError is an error wrapping multiple validation errors +// returned by LoadStatsResponse.ValidateAll() if the designated constraints +// aren't met. +type LoadStatsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LoadStatsResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LoadStatsResponseMultiError) AllErrors() []error { return m } + +// LoadStatsResponseValidationError is the validation error returned by +// LoadStatsResponse.Validate if the designated constraints aren't met. +type LoadStatsResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e LoadStatsResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e LoadStatsResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e LoadStatsResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e LoadStatsResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e LoadStatsResponseValidationError) ErrorName() string { + return "LoadStatsResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e LoadStatsResponseValidationError) 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 %sLoadStatsResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = LoadStatsResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = LoadStatsResponseValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/metrics/v3/metrics_service.pb.go b/vendor/github.com/cilium/proxy/go/envoy/service/metrics/v3/metrics_service.pb.go new file mode 100644 index 0000000000000..7275c18c4afaa --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/metrics/v3/metrics_service.pb.go @@ -0,0 +1,459 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/service/metrics/v3/metrics_service.proto + +package metricsv3 + +import ( + context "context" + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + _go "github.com/prometheus/client_model/go" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type StreamMetricsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StreamMetricsResponse) Reset() { + *x = StreamMetricsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_metrics_v3_metrics_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamMetricsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamMetricsResponse) ProtoMessage() {} + +func (x *StreamMetricsResponse) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_metrics_v3_metrics_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamMetricsResponse.ProtoReflect.Descriptor instead. +func (*StreamMetricsResponse) Descriptor() ([]byte, []int) { + return file_envoy_service_metrics_v3_metrics_service_proto_rawDescGZIP(), []int{0} +} + +type StreamMetricsMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier data effectively is a structured metadata. As a performance optimization this will + // only be sent in the first message on the stream. + Identifier *StreamMetricsMessage_Identifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` + // A list of metric entries + EnvoyMetrics []*_go.MetricFamily `protobuf:"bytes,2,rep,name=envoy_metrics,json=envoyMetrics,proto3" json:"envoy_metrics,omitempty"` +} + +func (x *StreamMetricsMessage) Reset() { + *x = StreamMetricsMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_metrics_v3_metrics_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamMetricsMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamMetricsMessage) ProtoMessage() {} + +func (x *StreamMetricsMessage) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_metrics_v3_metrics_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamMetricsMessage.ProtoReflect.Descriptor instead. +func (*StreamMetricsMessage) Descriptor() ([]byte, []int) { + return file_envoy_service_metrics_v3_metrics_service_proto_rawDescGZIP(), []int{1} +} + +func (x *StreamMetricsMessage) GetIdentifier() *StreamMetricsMessage_Identifier { + if x != nil { + return x.Identifier + } + return nil +} + +func (x *StreamMetricsMessage) GetEnvoyMetrics() []*_go.MetricFamily { + if x != nil { + return x.EnvoyMetrics + } + return nil +} + +type StreamMetricsMessage_Identifier struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The node sending metrics over the stream. + Node *v3.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` +} + +func (x *StreamMetricsMessage_Identifier) Reset() { + *x = StreamMetricsMessage_Identifier{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_metrics_v3_metrics_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamMetricsMessage_Identifier) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamMetricsMessage_Identifier) ProtoMessage() {} + +func (x *StreamMetricsMessage_Identifier) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_metrics_v3_metrics_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamMetricsMessage_Identifier.ProtoReflect.Descriptor instead. +func (*StreamMetricsMessage_Identifier) Descriptor() ([]byte, []int) { + return file_envoy_service_metrics_v3_metrics_service_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *StreamMetricsMessage_Identifier) GetNode() *v3.Node { + if x != nil { + return x.Node + } + return nil +} + +var File_envoy_service_metrics_v3_metrics_service_proto protoreflect.FileDescriptor + +var file_envoy_service_metrics_v3_metrics_service_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, + 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x69, 0x6f, 0x2f, + 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0x4e, 0x0a, 0x15, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfa, 0x02, 0x0a, 0x14, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x59, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, + 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, + 0x65, 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x47, + 0x0a, 0x0d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, + 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x0c, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x1a, 0x87, 0x01, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, + 0x3a, 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, + 0x32, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, + 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x86, 0x01, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x74, 0x0a, 0x0d, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x2e, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x2f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, + 0x42, 0x95, 0x01, 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x13, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x76, 0x33, 0x88, 0x01, 0x01, + 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_service_metrics_v3_metrics_service_proto_rawDescOnce sync.Once + file_envoy_service_metrics_v3_metrics_service_proto_rawDescData = file_envoy_service_metrics_v3_metrics_service_proto_rawDesc +) + +func file_envoy_service_metrics_v3_metrics_service_proto_rawDescGZIP() []byte { + file_envoy_service_metrics_v3_metrics_service_proto_rawDescOnce.Do(func() { + file_envoy_service_metrics_v3_metrics_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_metrics_v3_metrics_service_proto_rawDescData) + }) + return file_envoy_service_metrics_v3_metrics_service_proto_rawDescData +} + +var file_envoy_service_metrics_v3_metrics_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_service_metrics_v3_metrics_service_proto_goTypes = []interface{}{ + (*StreamMetricsResponse)(nil), // 0: envoy.service.metrics.v3.StreamMetricsResponse + (*StreamMetricsMessage)(nil), // 1: envoy.service.metrics.v3.StreamMetricsMessage + (*StreamMetricsMessage_Identifier)(nil), // 2: envoy.service.metrics.v3.StreamMetricsMessage.Identifier + (*_go.MetricFamily)(nil), // 3: io.prometheus.client.MetricFamily + (*v3.Node)(nil), // 4: envoy.config.core.v3.Node +} +var file_envoy_service_metrics_v3_metrics_service_proto_depIdxs = []int32{ + 2, // 0: envoy.service.metrics.v3.StreamMetricsMessage.identifier:type_name -> envoy.service.metrics.v3.StreamMetricsMessage.Identifier + 3, // 1: envoy.service.metrics.v3.StreamMetricsMessage.envoy_metrics:type_name -> io.prometheus.client.MetricFamily + 4, // 2: envoy.service.metrics.v3.StreamMetricsMessage.Identifier.node:type_name -> envoy.config.core.v3.Node + 1, // 3: envoy.service.metrics.v3.MetricsService.StreamMetrics:input_type -> envoy.service.metrics.v3.StreamMetricsMessage + 0, // 4: envoy.service.metrics.v3.MetricsService.StreamMetrics:output_type -> envoy.service.metrics.v3.StreamMetricsResponse + 4, // [4:5] is the sub-list for method output_type + 3, // [3:4] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_envoy_service_metrics_v3_metrics_service_proto_init() } +func file_envoy_service_metrics_v3_metrics_service_proto_init() { + if File_envoy_service_metrics_v3_metrics_service_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_service_metrics_v3_metrics_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamMetricsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_metrics_v3_metrics_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamMetricsMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_metrics_v3_metrics_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamMetricsMessage_Identifier); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_service_metrics_v3_metrics_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_envoy_service_metrics_v3_metrics_service_proto_goTypes, + DependencyIndexes: file_envoy_service_metrics_v3_metrics_service_proto_depIdxs, + MessageInfos: file_envoy_service_metrics_v3_metrics_service_proto_msgTypes, + }.Build() + File_envoy_service_metrics_v3_metrics_service_proto = out.File + file_envoy_service_metrics_v3_metrics_service_proto_rawDesc = nil + file_envoy_service_metrics_v3_metrics_service_proto_goTypes = nil + file_envoy_service_metrics_v3_metrics_service_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// MetricsServiceClient is the client API for MetricsService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MetricsServiceClient interface { + // Envoy will connect and send StreamMetricsMessage messages forever. It does not expect any + // response to be sent as nothing would be done in the case of failure. + StreamMetrics(ctx context.Context, opts ...grpc.CallOption) (MetricsService_StreamMetricsClient, error) +} + +type metricsServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewMetricsServiceClient(cc grpc.ClientConnInterface) MetricsServiceClient { + return &metricsServiceClient{cc} +} + +func (c *metricsServiceClient) StreamMetrics(ctx context.Context, opts ...grpc.CallOption) (MetricsService_StreamMetricsClient, error) { + stream, err := c.cc.NewStream(ctx, &_MetricsService_serviceDesc.Streams[0], "/envoy.service.metrics.v3.MetricsService/StreamMetrics", opts...) + if err != nil { + return nil, err + } + x := &metricsServiceStreamMetricsClient{stream} + return x, nil +} + +type MetricsService_StreamMetricsClient interface { + Send(*StreamMetricsMessage) error + CloseAndRecv() (*StreamMetricsResponse, error) + grpc.ClientStream +} + +type metricsServiceStreamMetricsClient struct { + grpc.ClientStream +} + +func (x *metricsServiceStreamMetricsClient) Send(m *StreamMetricsMessage) error { + return x.ClientStream.SendMsg(m) +} + +func (x *metricsServiceStreamMetricsClient) CloseAndRecv() (*StreamMetricsResponse, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(StreamMetricsResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// MetricsServiceServer is the server API for MetricsService service. +type MetricsServiceServer interface { + // Envoy will connect and send StreamMetricsMessage messages forever. It does not expect any + // response to be sent as nothing would be done in the case of failure. + StreamMetrics(MetricsService_StreamMetricsServer) error +} + +// UnimplementedMetricsServiceServer can be embedded to have forward compatible implementations. +type UnimplementedMetricsServiceServer struct { +} + +func (*UnimplementedMetricsServiceServer) StreamMetrics(MetricsService_StreamMetricsServer) error { + return status.Errorf(codes.Unimplemented, "method StreamMetrics not implemented") +} + +func RegisterMetricsServiceServer(s *grpc.Server, srv MetricsServiceServer) { + s.RegisterService(&_MetricsService_serviceDesc, srv) +} + +func _MetricsService_StreamMetrics_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(MetricsServiceServer).StreamMetrics(&metricsServiceStreamMetricsServer{stream}) +} + +type MetricsService_StreamMetricsServer interface { + SendAndClose(*StreamMetricsResponse) error + Recv() (*StreamMetricsMessage, error) + grpc.ServerStream +} + +type metricsServiceStreamMetricsServer struct { + grpc.ServerStream +} + +func (x *metricsServiceStreamMetricsServer) SendAndClose(m *StreamMetricsResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *metricsServiceStreamMetricsServer) Recv() (*StreamMetricsMessage, error) { + m := new(StreamMetricsMessage) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +var _MetricsService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "envoy.service.metrics.v3.MetricsService", + HandlerType: (*MetricsServiceServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamMetrics", + Handler: _MetricsService_StreamMetrics_Handler, + ClientStreams: true, + }, + }, + Metadata: "envoy/service/metrics/v3/metrics_service.proto", +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/metrics/v3/metrics_service.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/service/metrics/v3/metrics_service.pb.validate.go new file mode 100644 index 0000000000000..3828ccd429444 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/metrics/v3/metrics_service.pb.validate.go @@ -0,0 +1,443 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/service/metrics/v3/metrics_service.proto + +package metricsv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on StreamMetricsResponse 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 *StreamMetricsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamMetricsResponse 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 +// StreamMetricsResponseMultiError, or nil if none found. +func (m *StreamMetricsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamMetricsResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return StreamMetricsResponseMultiError(errors) + } + return nil +} + +// StreamMetricsResponseMultiError is an error wrapping multiple validation +// errors returned by StreamMetricsResponse.ValidateAll() if the designated +// constraints aren't met. +type StreamMetricsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamMetricsResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamMetricsResponseMultiError) AllErrors() []error { return m } + +// StreamMetricsResponseValidationError is the validation error returned by +// StreamMetricsResponse.Validate if the designated constraints aren't met. +type StreamMetricsResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StreamMetricsResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StreamMetricsResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StreamMetricsResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StreamMetricsResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StreamMetricsResponseValidationError) ErrorName() string { + return "StreamMetricsResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e StreamMetricsResponseValidationError) 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 %sStreamMetricsResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StreamMetricsResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StreamMetricsResponseValidationError{} + +// Validate checks the field values on StreamMetricsMessage 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 *StreamMetricsMessage) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamMetricsMessage 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 +// StreamMetricsMessageMultiError, or nil if none found. +func (m *StreamMetricsMessage) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamMetricsMessage) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetIdentifier()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamMetricsMessageValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamMetricsMessageValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StreamMetricsMessageValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetEnvoyMetrics() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamMetricsMessageValidationError{ + field: fmt.Sprintf("EnvoyMetrics[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamMetricsMessageValidationError{ + field: fmt.Sprintf("EnvoyMetrics[%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 StreamMetricsMessageValidationError{ + field: fmt.Sprintf("EnvoyMetrics[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return StreamMetricsMessageMultiError(errors) + } + return nil +} + +// StreamMetricsMessageMultiError is an error wrapping multiple validation +// errors returned by StreamMetricsMessage.ValidateAll() if the designated +// constraints aren't met. +type StreamMetricsMessageMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamMetricsMessageMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamMetricsMessageMultiError) AllErrors() []error { return m } + +// StreamMetricsMessageValidationError is the validation error returned by +// StreamMetricsMessage.Validate if the designated constraints aren't met. +type StreamMetricsMessageValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StreamMetricsMessageValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StreamMetricsMessageValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StreamMetricsMessageValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StreamMetricsMessageValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StreamMetricsMessageValidationError) ErrorName() string { + return "StreamMetricsMessageValidationError" +} + +// Error satisfies the builtin error interface +func (e StreamMetricsMessageValidationError) 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 %sStreamMetricsMessage.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StreamMetricsMessageValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StreamMetricsMessageValidationError{} + +// Validate checks the field values on StreamMetricsMessage_Identifier 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 *StreamMetricsMessage_Identifier) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamMetricsMessage_Identifier 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 +// StreamMetricsMessage_IdentifierMultiError, or nil if none found. +func (m *StreamMetricsMessage_Identifier) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamMetricsMessage_Identifier) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetNode() == nil { + err := StreamMetricsMessage_IdentifierValidationError{ + field: "Node", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamMetricsMessage_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamMetricsMessage_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StreamMetricsMessage_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return StreamMetricsMessage_IdentifierMultiError(errors) + } + return nil +} + +// StreamMetricsMessage_IdentifierMultiError is an error wrapping multiple +// validation errors returned by StreamMetricsMessage_Identifier.ValidateAll() +// if the designated constraints aren't met. +type StreamMetricsMessage_IdentifierMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamMetricsMessage_IdentifierMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamMetricsMessage_IdentifierMultiError) AllErrors() []error { return m } + +// StreamMetricsMessage_IdentifierValidationError is the validation error +// returned by StreamMetricsMessage_Identifier.Validate if the designated +// constraints aren't met. +type StreamMetricsMessage_IdentifierValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StreamMetricsMessage_IdentifierValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StreamMetricsMessage_IdentifierValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StreamMetricsMessage_IdentifierValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StreamMetricsMessage_IdentifierValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StreamMetricsMessage_IdentifierValidationError) ErrorName() string { + return "StreamMetricsMessage_IdentifierValidationError" +} + +// Error satisfies the builtin error interface +func (e StreamMetricsMessage_IdentifierValidationError) 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 %sStreamMetricsMessage_Identifier.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StreamMetricsMessage_IdentifierValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StreamMetricsMessage_IdentifierValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/rate_limit_quota/v3/rlqs.pb.go b/vendor/github.com/cilium/proxy/go/envoy/service/rate_limit_quota/v3/rlqs.pb.go new file mode 100644 index 0000000000000..705465958b35f --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/rate_limit_quota/v3/rlqs.pb.go @@ -0,0 +1,994 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/service/rate_limit_quota/v3/rlqs.proto + +package rate_limit_quotav3 + +import ( + context "context" + v3 "github.com/cilium/proxy/go/envoy/type/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/cncf/xds/go/xds/annotations/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type RateLimitQuotaUsageReports struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // All quota requests must specify the domain. This enables sharing the quota + // server between different applications without fear of overlap. + // E.g., "envoy". + // + // Should only be provided in the first report, all subsequent messages on the same + // stream are considered to be in the same domain. In case the domain needs to be + // changes, close the stream, and reopen a new one with the different domain. + Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` + // A list of quota usage reports. The list is processed by the RLQS server in the same order + // it's provided by the client. + BucketQuotaUsages []*RateLimitQuotaUsageReports_BucketQuotaUsage `protobuf:"bytes,2,rep,name=bucket_quota_usages,json=bucketQuotaUsages,proto3" json:"bucket_quota_usages,omitempty"` +} + +func (x *RateLimitQuotaUsageReports) Reset() { + *x = RateLimitQuotaUsageReports{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitQuotaUsageReports) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitQuotaUsageReports) ProtoMessage() {} + +func (x *RateLimitQuotaUsageReports) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitQuotaUsageReports.ProtoReflect.Descriptor instead. +func (*RateLimitQuotaUsageReports) Descriptor() ([]byte, []int) { + return file_envoy_service_rate_limit_quota_v3_rlqs_proto_rawDescGZIP(), []int{0} +} + +func (x *RateLimitQuotaUsageReports) GetDomain() string { + if x != nil { + return x.Domain + } + return "" +} + +func (x *RateLimitQuotaUsageReports) GetBucketQuotaUsages() []*RateLimitQuotaUsageReports_BucketQuotaUsage { + if x != nil { + return x.BucketQuotaUsages + } + return nil +} + +type RateLimitQuotaResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // An ordered list of actions to be applied to the buckets. The actions are applied in the + // given order, from top to bottom. + BucketAction []*RateLimitQuotaResponse_BucketAction `protobuf:"bytes,1,rep,name=bucket_action,json=bucketAction,proto3" json:"bucket_action,omitempty"` +} + +func (x *RateLimitQuotaResponse) Reset() { + *x = RateLimitQuotaResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitQuotaResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitQuotaResponse) ProtoMessage() {} + +func (x *RateLimitQuotaResponse) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitQuotaResponse.ProtoReflect.Descriptor instead. +func (*RateLimitQuotaResponse) Descriptor() ([]byte, []int) { + return file_envoy_service_rate_limit_quota_v3_rlqs_proto_rawDescGZIP(), []int{1} +} + +func (x *RateLimitQuotaResponse) GetBucketAction() []*RateLimitQuotaResponse_BucketAction { + if x != nil { + return x.BucketAction + } + return nil +} + +// The identifier for the bucket. Used to match the bucket between the control plane (RLQS server), +// and the data plane (RLQS client), f.e.: +// +// - the data plane sends a usage report for requests matched into the bucket with “BucketId“ +// to the control plane +// - the control plane sends an assignment for the bucket with “BucketId“ to the data plane +// Bucket ID. +// +// Example: +// +// .. validated-code-block:: yaml +// +// :type-name: envoy.service.rate_limit_quota.v3.BucketId +// +// bucket: +// name: my_bucket +// env: staging +// +// .. note:: +// +// The order of ``BucketId`` keys do not matter. Buckets ``{ a: 'A', b: 'B' }`` and +// ``{ b: 'B', a: 'A' }`` are identical. +type BucketId struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bucket map[string]string `protobuf:"bytes,1,rep,name=bucket,proto3" json:"bucket,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *BucketId) Reset() { + *x = BucketId{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BucketId) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BucketId) ProtoMessage() {} + +func (x *BucketId) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BucketId.ProtoReflect.Descriptor instead. +func (*BucketId) Descriptor() ([]byte, []int) { + return file_envoy_service_rate_limit_quota_v3_rlqs_proto_rawDescGZIP(), []int{2} +} + +func (x *BucketId) GetBucket() map[string]string { + if x != nil { + return x.Bucket + } + return nil +} + +// The usage report for a bucket. +// +// .. note:: +// +// Note that the first report sent for a ``BucketId`` indicates to the RLQS server that +// the RLQS client is subscribing for the future assignments for this ``BucketId``. +type RateLimitQuotaUsageReports_BucketQuotaUsage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // “BucketId“ for which request quota usage is reported. + BucketId *BucketId `protobuf:"bytes,1,opt,name=bucket_id,json=bucketId,proto3" json:"bucket_id,omitempty"` + // Time elapsed since the last report. + TimeElapsed *durationpb.Duration `protobuf:"bytes,2,opt,name=time_elapsed,json=timeElapsed,proto3" json:"time_elapsed,omitempty"` + // Requests the data plane has allowed through. + NumRequestsAllowed uint64 `protobuf:"varint,3,opt,name=num_requests_allowed,json=numRequestsAllowed,proto3" json:"num_requests_allowed,omitempty"` + // Requests throttled. + NumRequestsDenied uint64 `protobuf:"varint,4,opt,name=num_requests_denied,json=numRequestsDenied,proto3" json:"num_requests_denied,omitempty"` +} + +func (x *RateLimitQuotaUsageReports_BucketQuotaUsage) Reset() { + *x = RateLimitQuotaUsageReports_BucketQuotaUsage{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitQuotaUsageReports_BucketQuotaUsage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitQuotaUsageReports_BucketQuotaUsage) ProtoMessage() {} + +func (x *RateLimitQuotaUsageReports_BucketQuotaUsage) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitQuotaUsageReports_BucketQuotaUsage.ProtoReflect.Descriptor instead. +func (*RateLimitQuotaUsageReports_BucketQuotaUsage) Descriptor() ([]byte, []int) { + return file_envoy_service_rate_limit_quota_v3_rlqs_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *RateLimitQuotaUsageReports_BucketQuotaUsage) GetBucketId() *BucketId { + if x != nil { + return x.BucketId + } + return nil +} + +func (x *RateLimitQuotaUsageReports_BucketQuotaUsage) GetTimeElapsed() *durationpb.Duration { + if x != nil { + return x.TimeElapsed + } + return nil +} + +func (x *RateLimitQuotaUsageReports_BucketQuotaUsage) GetNumRequestsAllowed() uint64 { + if x != nil { + return x.NumRequestsAllowed + } + return 0 +} + +func (x *RateLimitQuotaUsageReports_BucketQuotaUsage) GetNumRequestsDenied() uint64 { + if x != nil { + return x.NumRequestsDenied + } + return 0 +} + +// Commands the data plane to apply one of the actions to the bucket with the +// :ref:`bucket_id `. +type RateLimitQuotaResponse_BucketAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // “BucketId“ for which request the action is applied. + BucketId *BucketId `protobuf:"bytes,1,opt,name=bucket_id,json=bucketId,proto3" json:"bucket_id,omitempty"` + // Types that are assignable to BucketAction: + // + // *RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction_ + // *RateLimitQuotaResponse_BucketAction_AbandonAction_ + BucketAction isRateLimitQuotaResponse_BucketAction_BucketAction `protobuf_oneof:"bucket_action"` +} + +func (x *RateLimitQuotaResponse_BucketAction) Reset() { + *x = RateLimitQuotaResponse_BucketAction{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitQuotaResponse_BucketAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitQuotaResponse_BucketAction) ProtoMessage() {} + +func (x *RateLimitQuotaResponse_BucketAction) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitQuotaResponse_BucketAction.ProtoReflect.Descriptor instead. +func (*RateLimitQuotaResponse_BucketAction) Descriptor() ([]byte, []int) { + return file_envoy_service_rate_limit_quota_v3_rlqs_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *RateLimitQuotaResponse_BucketAction) GetBucketId() *BucketId { + if x != nil { + return x.BucketId + } + return nil +} + +func (m *RateLimitQuotaResponse_BucketAction) GetBucketAction() isRateLimitQuotaResponse_BucketAction_BucketAction { + if m != nil { + return m.BucketAction + } + return nil +} + +func (x *RateLimitQuotaResponse_BucketAction) GetQuotaAssignmentAction() *RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction { + if x, ok := x.GetBucketAction().(*RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction_); ok { + return x.QuotaAssignmentAction + } + return nil +} + +func (x *RateLimitQuotaResponse_BucketAction) GetAbandonAction() *RateLimitQuotaResponse_BucketAction_AbandonAction { + if x, ok := x.GetBucketAction().(*RateLimitQuotaResponse_BucketAction_AbandonAction_); ok { + return x.AbandonAction + } + return nil +} + +type isRateLimitQuotaResponse_BucketAction_BucketAction interface { + isRateLimitQuotaResponse_BucketAction_BucketAction() +} + +type RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction_ struct { + // Apply the quota assignment to the bucket. + // + // Commands the data plane to apply a rate limiting strategy to the bucket. + // The process of applying and expiring the rate limiting strategy is detailed in the + // :ref:`QuotaAssignmentAction + // ` + // message. + QuotaAssignmentAction *RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction `protobuf:"bytes,2,opt,name=quota_assignment_action,json=quotaAssignmentAction,proto3,oneof"` +} + +type RateLimitQuotaResponse_BucketAction_AbandonAction_ struct { + // Abandon the bucket. + // + // Commands the data plane to abandon the bucket. + // The process of abandoning the bucket is described in the :ref:`AbandonAction + // ` + // message. + AbandonAction *RateLimitQuotaResponse_BucketAction_AbandonAction `protobuf:"bytes,3,opt,name=abandon_action,json=abandonAction,proto3,oneof"` +} + +func (*RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction_) isRateLimitQuotaResponse_BucketAction_BucketAction() { +} + +func (*RateLimitQuotaResponse_BucketAction_AbandonAction_) isRateLimitQuotaResponse_BucketAction_BucketAction() { +} + +// Quota assignment for the bucket. Configures the rate limiting strategy and the duration +// for the given :ref:`bucket_id +// `. +// +// **Applying the first assignment to the bucket** +// +// Once the data plane receives the “QuotaAssignmentAction“, it must send the current usage +// report for the bucket, and start rate limiting requests matched into the bucket +// using the strategy configured in the :ref:`rate_limit_strategy +// ` +// field. The assignment becomes bucket's “active“ assignment. +// +// **Expiring the assignment** +// +// The duration of the assignment defined in the :ref:`assignment_time_to_live +// ` +// field. When the duration runs off, the assignment is “expired“, and no longer “active“. +// The data plane should stop applying the rate limiting strategy to the bucket, and transition +// the bucket to the "expired assignment" state. This activates the behavior configured in the +// :ref:`expired_assignment_behavior ` +// field. +// +// **Replacing the assignment** +// +// - If the rate limiting strategy is different from bucket's “active“ assignment, or +// the current bucket assignment is “expired“, the data plane must immediately +// end the current assignment, report the bucket usage, and apply the new assignment. +// The new assignment becomes bucket's “active“ assignment. +// +// “ If the rate limiting strategy is the same as the bucket's “active“ (not “expired“) +// +// assignment, the data plane should extend the duration of the ``active`` assignment +// for the duration of the new assignment provided in the :ref:`assignment_time_to_live +// ` +// field. The ``active`` assignment is considered unchanged. +type RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A duration after which the assignment is be considered “expired“. The process of the + // expiration is described :ref:`above + // `. + // + // - If unset, the assignment has no expiration date. + // - If set to “0“, the assignment expires immediately, forcing the client into the + // :ref:`"expired assignment" + // ` + // state. This may be used by the RLQS server in cases when it needs clients to proactively + // fall back to the pre-configured :ref:`ExpiredAssignmentBehavior + // `, + // f.e. before the server going into restart. + // + // .. attention:: + // + // Note that :ref:`expiring + // ` + // the assignment is not the same as :ref:`abandoning + // ` + // the assignment. While expiring the assignment just transitions the bucket to + // the "expired assignment" state; abandoning the assignment completely erases + // the bucket from the data plane memory, and stops the usage reports. + AssignmentTimeToLive *durationpb.Duration `protobuf:"bytes,2,opt,name=assignment_time_to_live,json=assignmentTimeToLive,proto3" json:"assignment_time_to_live,omitempty"` + // Configures the local rate limiter for the request matched to the bucket. + // + // If not set, allow all requests. + RateLimitStrategy *v3.RateLimitStrategy `protobuf:"bytes,3,opt,name=rate_limit_strategy,json=rateLimitStrategy,proto3" json:"rate_limit_strategy,omitempty"` +} + +func (x *RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction) Reset() { + *x = RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction) ProtoMessage() {} + +func (x *RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction.ProtoReflect.Descriptor instead. +func (*RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction) Descriptor() ([]byte, []int) { + return file_envoy_service_rate_limit_quota_v3_rlqs_proto_rawDescGZIP(), []int{1, 0, 0} +} + +func (x *RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction) GetAssignmentTimeToLive() *durationpb.Duration { + if x != nil { + return x.AssignmentTimeToLive + } + return nil +} + +func (x *RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction) GetRateLimitStrategy() *v3.RateLimitStrategy { + if x != nil { + return x.RateLimitStrategy + } + return nil +} + +// Abandon action for the bucket. Indicates that the RLQS server will no longer be +// sending updates for the given :ref:`bucket_id +// `. +// +// If no requests are reported for a bucket, after some time the server considers the bucket +// inactive. The server stops tracking the bucket, and instructs the the data plane to abandon +// the bucket via this message. +// +// **Abandoning the assignment** +// +// The data plane is to erase the bucket (including its usage data) from the memory. +// It should stop tracking the bucket, and stop reporting its usage. This effectively resets +// the data plane to the state prior to matching the first request into the bucket. +// +// **Restarting the subscription** +// +// If a new request is matched into a bucket previously abandoned, the data plane must behave +// as if it has never tracked the bucket, and it's the first request matched into it: +// +// 1. The process of :ref:`subscription and reporting +// ` +// starts from the beginning. +// 2. The bucket transitions to the :ref:`"no assignment" +// ` +// state. +// 3. Once the new assignment is received, it's applied per +// "Applying the first assignment to the bucket" section of the :ref:`QuotaAssignmentAction +// `. +type RateLimitQuotaResponse_BucketAction_AbandonAction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RateLimitQuotaResponse_BucketAction_AbandonAction) Reset() { + *x = RateLimitQuotaResponse_BucketAction_AbandonAction{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitQuotaResponse_BucketAction_AbandonAction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitQuotaResponse_BucketAction_AbandonAction) ProtoMessage() {} + +func (x *RateLimitQuotaResponse_BucketAction_AbandonAction) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitQuotaResponse_BucketAction_AbandonAction.ProtoReflect.Descriptor instead. +func (*RateLimitQuotaResponse_BucketAction_AbandonAction) Descriptor() ([]byte, []int) { + return file_envoy_service_rate_limit_quota_v3_rlqs_proto_rawDescGZIP(), []int{1, 0, 1} +} + +var File_envoy_service_rate_limit_quota_v3_rlqs_proto protoreflect.FileDescriptor + +var file_envoy_service_rate_limit_quota_v3_rlqs_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x61, + 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6c, 0x71, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, + 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x2e, 0x76, + 0x33, 0x1a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, + 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x65, 0x67, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 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, 0xdd, 0x03, 0x0a, 0x1a, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x51, 0x75, 0x6f, 0x74, 0x61, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x73, 0x12, 0x1f, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, + 0x69, 0x6e, 0x12, 0x88, 0x01, 0x0a, 0x13, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x71, 0x75, + 0x6f, 0x74, 0x61, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x4e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, + 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x51, 0x75, + 0x6f, 0x74, 0x61, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, + 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x55, 0x73, 0x61, 0x67, 0x65, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x11, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x55, 0x73, 0x61, 0x67, 0x65, 0x73, 0x1a, 0x92, 0x02, + 0x0a, 0x10, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x55, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x52, 0x0a, 0x09, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x62, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x65, + 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x08, + 0x01, 0x2a, 0x00, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, + 0x12, 0x30, 0x0a, 0x14, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, + 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, + 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x41, 0x6c, 0x6c, 0x6f, 0x77, + 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x73, 0x5f, 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x11, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x44, 0x65, 0x6e, 0x69, + 0x65, 0x64, 0x22, 0xfb, 0x05, 0x0a, 0x16, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, + 0x0d, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, + 0x71, 0x75, 0x6f, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0c, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xe9, 0x04, 0x0a, 0x0c, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x09, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x08, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x96, 0x01, 0x0a, 0x17, 0x71, 0x75, + 0x6f, 0x74, 0x61, 0x5f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x5c, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, + 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, + 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x15, 0x71, 0x75, 0x6f, + 0x74, 0x61, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x7d, 0x0a, 0x0e, 0x61, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x5f, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x54, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x0d, 0x61, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x1a, 0xc5, 0x01, 0x0a, 0x15, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x41, 0x73, 0x73, 0x69, 0x67, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5a, 0x0a, 0x17, 0x61, + 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x74, + 0x6f, 0x5f, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x32, + 0x00, 0x52, 0x14, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x54, 0x6f, 0x4c, 0x69, 0x76, 0x65, 0x12, 0x50, 0x0a, 0x13, 0x72, 0x61, 0x74, 0x65, 0x5f, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x74, + 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x11, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x1a, 0x0f, 0x0a, 0x0d, 0x41, 0x62, 0x61, + 0x6e, 0x64, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x14, 0x0a, 0x0d, 0x62, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, + 0x22, 0xac, 0x01, 0x0a, 0x08, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x65, 0x0a, + 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, + 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x2e, 0x76, + 0x33, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, + 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x14, 0xfa, 0x42, 0x11, 0x9a, 0x01, 0x0e, 0x08, 0x01, + 0x22, 0x04, 0x72, 0x02, 0x10, 0x01, 0x2a, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x62, 0x75, + 0x63, 0x6b, 0x65, 0x74, 0x1a, 0x39, 0x0a, 0x0b, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, + 0xb1, 0x01, 0x0a, 0x15, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, + 0x74, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x97, 0x01, 0x0a, 0x15, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, + 0x74, 0x61, 0x73, 0x12, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x71, + 0x75, 0x6f, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x73, 0x1a, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x71, 0x75, + 0x6f, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, + 0x01, 0x30, 0x01, 0x42, 0xae, 0x01, 0x0a, 0x2f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x71, + 0x75, 0x6f, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x52, 0x6c, 0x71, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x5f, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x2f, 0x76, 0x33, 0x3b, 0x72, + 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x76, + 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0xd2, 0xc6, 0xa4, 0xe1, + 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_service_rate_limit_quota_v3_rlqs_proto_rawDescOnce sync.Once + file_envoy_service_rate_limit_quota_v3_rlqs_proto_rawDescData = file_envoy_service_rate_limit_quota_v3_rlqs_proto_rawDesc +) + +func file_envoy_service_rate_limit_quota_v3_rlqs_proto_rawDescGZIP() []byte { + file_envoy_service_rate_limit_quota_v3_rlqs_proto_rawDescOnce.Do(func() { + file_envoy_service_rate_limit_quota_v3_rlqs_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_rate_limit_quota_v3_rlqs_proto_rawDescData) + }) + return file_envoy_service_rate_limit_quota_v3_rlqs_proto_rawDescData +} + +var file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_envoy_service_rate_limit_quota_v3_rlqs_proto_goTypes = []interface{}{ + (*RateLimitQuotaUsageReports)(nil), // 0: envoy.service.rate_limit_quota.v3.RateLimitQuotaUsageReports + (*RateLimitQuotaResponse)(nil), // 1: envoy.service.rate_limit_quota.v3.RateLimitQuotaResponse + (*BucketId)(nil), // 2: envoy.service.rate_limit_quota.v3.BucketId + (*RateLimitQuotaUsageReports_BucketQuotaUsage)(nil), // 3: envoy.service.rate_limit_quota.v3.RateLimitQuotaUsageReports.BucketQuotaUsage + (*RateLimitQuotaResponse_BucketAction)(nil), // 4: envoy.service.rate_limit_quota.v3.RateLimitQuotaResponse.BucketAction + (*RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction)(nil), // 5: envoy.service.rate_limit_quota.v3.RateLimitQuotaResponse.BucketAction.QuotaAssignmentAction + (*RateLimitQuotaResponse_BucketAction_AbandonAction)(nil), // 6: envoy.service.rate_limit_quota.v3.RateLimitQuotaResponse.BucketAction.AbandonAction + nil, // 7: envoy.service.rate_limit_quota.v3.BucketId.BucketEntry + (*durationpb.Duration)(nil), // 8: google.protobuf.Duration + (*v3.RateLimitStrategy)(nil), // 9: envoy.type.v3.RateLimitStrategy +} +var file_envoy_service_rate_limit_quota_v3_rlqs_proto_depIdxs = []int32{ + 3, // 0: envoy.service.rate_limit_quota.v3.RateLimitQuotaUsageReports.bucket_quota_usages:type_name -> envoy.service.rate_limit_quota.v3.RateLimitQuotaUsageReports.BucketQuotaUsage + 4, // 1: envoy.service.rate_limit_quota.v3.RateLimitQuotaResponse.bucket_action:type_name -> envoy.service.rate_limit_quota.v3.RateLimitQuotaResponse.BucketAction + 7, // 2: envoy.service.rate_limit_quota.v3.BucketId.bucket:type_name -> envoy.service.rate_limit_quota.v3.BucketId.BucketEntry + 2, // 3: envoy.service.rate_limit_quota.v3.RateLimitQuotaUsageReports.BucketQuotaUsage.bucket_id:type_name -> envoy.service.rate_limit_quota.v3.BucketId + 8, // 4: envoy.service.rate_limit_quota.v3.RateLimitQuotaUsageReports.BucketQuotaUsage.time_elapsed:type_name -> google.protobuf.Duration + 2, // 5: envoy.service.rate_limit_quota.v3.RateLimitQuotaResponse.BucketAction.bucket_id:type_name -> envoy.service.rate_limit_quota.v3.BucketId + 5, // 6: envoy.service.rate_limit_quota.v3.RateLimitQuotaResponse.BucketAction.quota_assignment_action:type_name -> envoy.service.rate_limit_quota.v3.RateLimitQuotaResponse.BucketAction.QuotaAssignmentAction + 6, // 7: envoy.service.rate_limit_quota.v3.RateLimitQuotaResponse.BucketAction.abandon_action:type_name -> envoy.service.rate_limit_quota.v3.RateLimitQuotaResponse.BucketAction.AbandonAction + 8, // 8: envoy.service.rate_limit_quota.v3.RateLimitQuotaResponse.BucketAction.QuotaAssignmentAction.assignment_time_to_live:type_name -> google.protobuf.Duration + 9, // 9: envoy.service.rate_limit_quota.v3.RateLimitQuotaResponse.BucketAction.QuotaAssignmentAction.rate_limit_strategy:type_name -> envoy.type.v3.RateLimitStrategy + 0, // 10: envoy.service.rate_limit_quota.v3.RateLimitQuotaService.StreamRateLimitQuotas:input_type -> envoy.service.rate_limit_quota.v3.RateLimitQuotaUsageReports + 1, // 11: envoy.service.rate_limit_quota.v3.RateLimitQuotaService.StreamRateLimitQuotas:output_type -> envoy.service.rate_limit_quota.v3.RateLimitQuotaResponse + 11, // [11:12] is the sub-list for method output_type + 10, // [10:11] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_envoy_service_rate_limit_quota_v3_rlqs_proto_init() } +func file_envoy_service_rate_limit_quota_v3_rlqs_proto_init() { + if File_envoy_service_rate_limit_quota_v3_rlqs_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitQuotaUsageReports); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitQuotaResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BucketId); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitQuotaUsageReports_BucketQuotaUsage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitQuotaResponse_BucketAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitQuotaResponse_BucketAction_AbandonAction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction_)(nil), + (*RateLimitQuotaResponse_BucketAction_AbandonAction_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_service_rate_limit_quota_v3_rlqs_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_envoy_service_rate_limit_quota_v3_rlqs_proto_goTypes, + DependencyIndexes: file_envoy_service_rate_limit_quota_v3_rlqs_proto_depIdxs, + MessageInfos: file_envoy_service_rate_limit_quota_v3_rlqs_proto_msgTypes, + }.Build() + File_envoy_service_rate_limit_quota_v3_rlqs_proto = out.File + file_envoy_service_rate_limit_quota_v3_rlqs_proto_rawDesc = nil + file_envoy_service_rate_limit_quota_v3_rlqs_proto_goTypes = nil + file_envoy_service_rate_limit_quota_v3_rlqs_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// RateLimitQuotaServiceClient is the client API for RateLimitQuotaService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type RateLimitQuotaServiceClient interface { + // Main communication channel: the data plane sends usage reports to the RLQS server, + // and the server asynchronously responding with the assignments. + StreamRateLimitQuotas(ctx context.Context, opts ...grpc.CallOption) (RateLimitQuotaService_StreamRateLimitQuotasClient, error) +} + +type rateLimitQuotaServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewRateLimitQuotaServiceClient(cc grpc.ClientConnInterface) RateLimitQuotaServiceClient { + return &rateLimitQuotaServiceClient{cc} +} + +func (c *rateLimitQuotaServiceClient) StreamRateLimitQuotas(ctx context.Context, opts ...grpc.CallOption) (RateLimitQuotaService_StreamRateLimitQuotasClient, error) { + stream, err := c.cc.NewStream(ctx, &_RateLimitQuotaService_serviceDesc.Streams[0], "/envoy.service.rate_limit_quota.v3.RateLimitQuotaService/StreamRateLimitQuotas", opts...) + if err != nil { + return nil, err + } + x := &rateLimitQuotaServiceStreamRateLimitQuotasClient{stream} + return x, nil +} + +type RateLimitQuotaService_StreamRateLimitQuotasClient interface { + Send(*RateLimitQuotaUsageReports) error + Recv() (*RateLimitQuotaResponse, error) + grpc.ClientStream +} + +type rateLimitQuotaServiceStreamRateLimitQuotasClient struct { + grpc.ClientStream +} + +func (x *rateLimitQuotaServiceStreamRateLimitQuotasClient) Send(m *RateLimitQuotaUsageReports) error { + return x.ClientStream.SendMsg(m) +} + +func (x *rateLimitQuotaServiceStreamRateLimitQuotasClient) Recv() (*RateLimitQuotaResponse, error) { + m := new(RateLimitQuotaResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// RateLimitQuotaServiceServer is the server API for RateLimitQuotaService service. +type RateLimitQuotaServiceServer interface { + // Main communication channel: the data plane sends usage reports to the RLQS server, + // and the server asynchronously responding with the assignments. + StreamRateLimitQuotas(RateLimitQuotaService_StreamRateLimitQuotasServer) error +} + +// UnimplementedRateLimitQuotaServiceServer can be embedded to have forward compatible implementations. +type UnimplementedRateLimitQuotaServiceServer struct { +} + +func (*UnimplementedRateLimitQuotaServiceServer) StreamRateLimitQuotas(RateLimitQuotaService_StreamRateLimitQuotasServer) error { + return status.Errorf(codes.Unimplemented, "method StreamRateLimitQuotas not implemented") +} + +func RegisterRateLimitQuotaServiceServer(s *grpc.Server, srv RateLimitQuotaServiceServer) { + s.RegisterService(&_RateLimitQuotaService_serviceDesc, srv) +} + +func _RateLimitQuotaService_StreamRateLimitQuotas_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(RateLimitQuotaServiceServer).StreamRateLimitQuotas(&rateLimitQuotaServiceStreamRateLimitQuotasServer{stream}) +} + +type RateLimitQuotaService_StreamRateLimitQuotasServer interface { + Send(*RateLimitQuotaResponse) error + Recv() (*RateLimitQuotaUsageReports, error) + grpc.ServerStream +} + +type rateLimitQuotaServiceStreamRateLimitQuotasServer struct { + grpc.ServerStream +} + +func (x *rateLimitQuotaServiceStreamRateLimitQuotasServer) Send(m *RateLimitQuotaResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *rateLimitQuotaServiceStreamRateLimitQuotasServer) Recv() (*RateLimitQuotaUsageReports, error) { + m := new(RateLimitQuotaUsageReports) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +var _RateLimitQuotaService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "envoy.service.rate_limit_quota.v3.RateLimitQuotaService", + HandlerType: (*RateLimitQuotaServiceServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamRateLimitQuotas", + Handler: _RateLimitQuotaService_StreamRateLimitQuotas_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "envoy/service/rate_limit_quota/v3/rlqs.proto", +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/rate_limit_quota/v3/rlqs.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/service/rate_limit_quota/v3/rlqs.pb.validate.go new file mode 100644 index 0000000000000..5014dbb94fd85 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/rate_limit_quota/v3/rlqs.pb.validate.go @@ -0,0 +1,1183 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/service/rate_limit_quota/v3/rlqs.proto + +package rate_limit_quotav3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RateLimitQuotaUsageReports 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 *RateLimitQuotaUsageReports) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitQuotaUsageReports 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 +// RateLimitQuotaUsageReportsMultiError, or nil if none found. +func (m *RateLimitQuotaUsageReports) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitQuotaUsageReports) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetDomain()) < 1 { + err := RateLimitQuotaUsageReportsValidationError{ + field: "Domain", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(m.GetBucketQuotaUsages()) < 1 { + err := RateLimitQuotaUsageReportsValidationError{ + field: "BucketQuotaUsages", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetBucketQuotaUsages() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaUsageReportsValidationError{ + field: fmt.Sprintf("BucketQuotaUsages[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaUsageReportsValidationError{ + field: fmt.Sprintf("BucketQuotaUsages[%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 RateLimitQuotaUsageReportsValidationError{ + field: fmt.Sprintf("BucketQuotaUsages[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return RateLimitQuotaUsageReportsMultiError(errors) + } + return nil +} + +// RateLimitQuotaUsageReportsMultiError is an error wrapping multiple +// validation errors returned by RateLimitQuotaUsageReports.ValidateAll() if +// the designated constraints aren't met. +type RateLimitQuotaUsageReportsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitQuotaUsageReportsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitQuotaUsageReportsMultiError) AllErrors() []error { return m } + +// RateLimitQuotaUsageReportsValidationError is the validation error returned +// by RateLimitQuotaUsageReports.Validate if the designated constraints aren't met. +type RateLimitQuotaUsageReportsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitQuotaUsageReportsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitQuotaUsageReportsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitQuotaUsageReportsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitQuotaUsageReportsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitQuotaUsageReportsValidationError) ErrorName() string { + return "RateLimitQuotaUsageReportsValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitQuotaUsageReportsValidationError) 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 %sRateLimitQuotaUsageReports.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitQuotaUsageReportsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitQuotaUsageReportsValidationError{} + +// Validate checks the field values on RateLimitQuotaResponse 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 *RateLimitQuotaResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitQuotaResponse 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 +// RateLimitQuotaResponseMultiError, or nil if none found. +func (m *RateLimitQuotaResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitQuotaResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetBucketAction()) < 1 { + err := RateLimitQuotaResponseValidationError{ + field: "BucketAction", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetBucketAction() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaResponseValidationError{ + field: fmt.Sprintf("BucketAction[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaResponseValidationError{ + field: fmt.Sprintf("BucketAction[%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 RateLimitQuotaResponseValidationError{ + field: fmt.Sprintf("BucketAction[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return RateLimitQuotaResponseMultiError(errors) + } + return nil +} + +// RateLimitQuotaResponseMultiError is an error wrapping multiple validation +// errors returned by RateLimitQuotaResponse.ValidateAll() if the designated +// constraints aren't met. +type RateLimitQuotaResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitQuotaResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitQuotaResponseMultiError) AllErrors() []error { return m } + +// RateLimitQuotaResponseValidationError is the validation error returned by +// RateLimitQuotaResponse.Validate if the designated constraints aren't met. +type RateLimitQuotaResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitQuotaResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitQuotaResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitQuotaResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitQuotaResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitQuotaResponseValidationError) ErrorName() string { + return "RateLimitQuotaResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitQuotaResponseValidationError) 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 %sRateLimitQuotaResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitQuotaResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitQuotaResponseValidationError{} + +// Validate checks the field values on BucketId 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 *BucketId) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BucketId 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 BucketIdMultiError, or nil +// if none found. +func (m *BucketId) ValidateAll() error { + return m.validate(true) +} + +func (m *BucketId) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetBucket()) < 1 { + err := BucketIdValidationError{ + field: "Bucket", + reason: "value must contain at least 1 pair(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + { + sorted_keys := make([]string, len(m.GetBucket())) + i := 0 + for key := range m.GetBucket() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetBucket()[key] + _ = val + + if utf8.RuneCountInString(key) < 1 { + err := BucketIdValidationError{ + field: fmt.Sprintf("Bucket[%v]", key), + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if utf8.RuneCountInString(val) < 1 { + err := BucketIdValidationError{ + field: fmt.Sprintf("Bucket[%v]", key), + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if len(errors) > 0 { + return BucketIdMultiError(errors) + } + return nil +} + +// BucketIdMultiError is an error wrapping multiple validation errors returned +// by BucketId.ValidateAll() if the designated constraints aren't met. +type BucketIdMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BucketIdMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BucketIdMultiError) AllErrors() []error { return m } + +// BucketIdValidationError is the validation error returned by +// BucketId.Validate if the designated constraints aren't met. +type BucketIdValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BucketIdValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BucketIdValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BucketIdValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BucketIdValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BucketIdValidationError) ErrorName() string { return "BucketIdValidationError" } + +// Error satisfies the builtin error interface +func (e BucketIdValidationError) 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 %sBucketId.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BucketIdValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BucketIdValidationError{} + +// Validate checks the field values on +// RateLimitQuotaUsageReports_BucketQuotaUsage 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 *RateLimitQuotaUsageReports_BucketQuotaUsage) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// RateLimitQuotaUsageReports_BucketQuotaUsage 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 +// RateLimitQuotaUsageReports_BucketQuotaUsageMultiError, or nil if none found. +func (m *RateLimitQuotaUsageReports_BucketQuotaUsage) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitQuotaUsageReports_BucketQuotaUsage) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetBucketId() == nil { + err := RateLimitQuotaUsageReports_BucketQuotaUsageValidationError{ + field: "BucketId", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetBucketId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaUsageReports_BucketQuotaUsageValidationError{ + field: "BucketId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaUsageReports_BucketQuotaUsageValidationError{ + field: "BucketId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBucketId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitQuotaUsageReports_BucketQuotaUsageValidationError{ + field: "BucketId", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetTimeElapsed() == nil { + err := RateLimitQuotaUsageReports_BucketQuotaUsageValidationError{ + field: "TimeElapsed", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if d := m.GetTimeElapsed(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = RateLimitQuotaUsageReports_BucketQuotaUsageValidationError{ + field: "TimeElapsed", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := RateLimitQuotaUsageReports_BucketQuotaUsageValidationError{ + field: "TimeElapsed", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + // no validation rules for NumRequestsAllowed + + // no validation rules for NumRequestsDenied + + if len(errors) > 0 { + return RateLimitQuotaUsageReports_BucketQuotaUsageMultiError(errors) + } + return nil +} + +// RateLimitQuotaUsageReports_BucketQuotaUsageMultiError is an error wrapping +// multiple validation errors returned by +// RateLimitQuotaUsageReports_BucketQuotaUsage.ValidateAll() if the designated +// constraints aren't met. +type RateLimitQuotaUsageReports_BucketQuotaUsageMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitQuotaUsageReports_BucketQuotaUsageMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitQuotaUsageReports_BucketQuotaUsageMultiError) AllErrors() []error { return m } + +// RateLimitQuotaUsageReports_BucketQuotaUsageValidationError is the validation +// error returned by RateLimitQuotaUsageReports_BucketQuotaUsage.Validate if +// the designated constraints aren't met. +type RateLimitQuotaUsageReports_BucketQuotaUsageValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitQuotaUsageReports_BucketQuotaUsageValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitQuotaUsageReports_BucketQuotaUsageValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitQuotaUsageReports_BucketQuotaUsageValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitQuotaUsageReports_BucketQuotaUsageValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitQuotaUsageReports_BucketQuotaUsageValidationError) ErrorName() string { + return "RateLimitQuotaUsageReports_BucketQuotaUsageValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitQuotaUsageReports_BucketQuotaUsageValidationError) 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 %sRateLimitQuotaUsageReports_BucketQuotaUsage.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitQuotaUsageReports_BucketQuotaUsageValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitQuotaUsageReports_BucketQuotaUsageValidationError{} + +// Validate checks the field values on RateLimitQuotaResponse_BucketAction 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 *RateLimitQuotaResponse_BucketAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitQuotaResponse_BucketAction +// 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 +// RateLimitQuotaResponse_BucketActionMultiError, or nil if none found. +func (m *RateLimitQuotaResponse_BucketAction) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitQuotaResponse_BucketAction) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetBucketId() == nil { + err := RateLimitQuotaResponse_BucketActionValidationError{ + field: "BucketId", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetBucketId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaResponse_BucketActionValidationError{ + field: "BucketId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaResponse_BucketActionValidationError{ + field: "BucketId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBucketId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitQuotaResponse_BucketActionValidationError{ + field: "BucketId", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch m.BucketAction.(type) { + + case *RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction_: + + if all { + switch v := interface{}(m.GetQuotaAssignmentAction()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaResponse_BucketActionValidationError{ + field: "QuotaAssignmentAction", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaResponse_BucketActionValidationError{ + field: "QuotaAssignmentAction", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetQuotaAssignmentAction()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitQuotaResponse_BucketActionValidationError{ + field: "QuotaAssignmentAction", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *RateLimitQuotaResponse_BucketAction_AbandonAction_: + + if all { + switch v := interface{}(m.GetAbandonAction()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaResponse_BucketActionValidationError{ + field: "AbandonAction", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaResponse_BucketActionValidationError{ + field: "AbandonAction", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAbandonAction()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitQuotaResponse_BucketActionValidationError{ + field: "AbandonAction", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := RateLimitQuotaResponse_BucketActionValidationError{ + field: "BucketAction", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return RateLimitQuotaResponse_BucketActionMultiError(errors) + } + return nil +} + +// RateLimitQuotaResponse_BucketActionMultiError is an error wrapping multiple +// validation errors returned by +// RateLimitQuotaResponse_BucketAction.ValidateAll() if the designated +// constraints aren't met. +type RateLimitQuotaResponse_BucketActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitQuotaResponse_BucketActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitQuotaResponse_BucketActionMultiError) AllErrors() []error { return m } + +// RateLimitQuotaResponse_BucketActionValidationError is the validation error +// returned by RateLimitQuotaResponse_BucketAction.Validate if the designated +// constraints aren't met. +type RateLimitQuotaResponse_BucketActionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitQuotaResponse_BucketActionValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitQuotaResponse_BucketActionValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitQuotaResponse_BucketActionValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitQuotaResponse_BucketActionValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitQuotaResponse_BucketActionValidationError) ErrorName() string { + return "RateLimitQuotaResponse_BucketActionValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitQuotaResponse_BucketActionValidationError) 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 %sRateLimitQuotaResponse_BucketAction.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitQuotaResponse_BucketActionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitQuotaResponse_BucketActionValidationError{} + +// Validate checks the field values on +// RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction 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 *RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction 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 +// RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionMultiError, or nil +// if none found. +func (m *RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if d := m.GetAssignmentTimeToLive(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError{ + field: "AssignmentTimeToLive", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gte := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur < gte { + err := RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError{ + field: "AssignmentTimeToLive", + reason: "value must be greater than or equal to 0s", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if all { + switch v := interface{}(m.GetRateLimitStrategy()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError{ + field: "RateLimitStrategy", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError{ + field: "RateLimitStrategy", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRateLimitStrategy()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError{ + field: "RateLimitStrategy", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionMultiError(errors) + } + return nil +} + +// RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionMultiError is an +// error wrapping multiple validation errors returned by +// RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction.ValidateAll() if +// the designated constraints aren't met. +type RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionMultiError) AllErrors() []error { + return m +} + +// RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError is +// the validation error returned by +// RateLimitQuotaResponse_BucketAction_QuotaAssignmentAction.Validate if the +// designated constraints aren't met. +type RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError) Field() string { + return e.field +} + +// Reason function returns reason value. +func (e RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError) Cause() error { + return e.cause +} + +// Key function returns key value. +func (e RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError) Key() bool { + return e.key +} + +// ErrorName returns error name. +func (e RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError) ErrorName() string { + return "RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError) 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 %sRateLimitQuotaResponse_BucketAction_QuotaAssignmentAction.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitQuotaResponse_BucketAction_QuotaAssignmentActionValidationError{} + +// Validate checks the field values on +// RateLimitQuotaResponse_BucketAction_AbandonAction 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 *RateLimitQuotaResponse_BucketAction_AbandonAction) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// RateLimitQuotaResponse_BucketAction_AbandonAction 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 +// RateLimitQuotaResponse_BucketAction_AbandonActionMultiError, or nil if none found. +func (m *RateLimitQuotaResponse_BucketAction_AbandonAction) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitQuotaResponse_BucketAction_AbandonAction) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return RateLimitQuotaResponse_BucketAction_AbandonActionMultiError(errors) + } + return nil +} + +// RateLimitQuotaResponse_BucketAction_AbandonActionMultiError is an error +// wrapping multiple validation errors returned by +// RateLimitQuotaResponse_BucketAction_AbandonAction.ValidateAll() if the +// designated constraints aren't met. +type RateLimitQuotaResponse_BucketAction_AbandonActionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitQuotaResponse_BucketAction_AbandonActionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitQuotaResponse_BucketAction_AbandonActionMultiError) AllErrors() []error { return m } + +// RateLimitQuotaResponse_BucketAction_AbandonActionValidationError is the +// validation error returned by +// RateLimitQuotaResponse_BucketAction_AbandonAction.Validate if the +// designated constraints aren't met. +type RateLimitQuotaResponse_BucketAction_AbandonActionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitQuotaResponse_BucketAction_AbandonActionValidationError) Field() string { + return e.field +} + +// Reason function returns reason value. +func (e RateLimitQuotaResponse_BucketAction_AbandonActionValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e RateLimitQuotaResponse_BucketAction_AbandonActionValidationError) Cause() error { + return e.cause +} + +// Key function returns key value. +func (e RateLimitQuotaResponse_BucketAction_AbandonActionValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitQuotaResponse_BucketAction_AbandonActionValidationError) ErrorName() string { + return "RateLimitQuotaResponse_BucketAction_AbandonActionValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitQuotaResponse_BucketAction_AbandonActionValidationError) 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 %sRateLimitQuotaResponse_BucketAction_AbandonAction.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitQuotaResponse_BucketAction_AbandonActionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitQuotaResponse_BucketAction_AbandonActionValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/ratelimit/v3/rls.pb.go b/vendor/github.com/cilium/proxy/go/envoy/service/ratelimit/v3/rls.pb.go new file mode 100644 index 0000000000000..71116724fa168 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/ratelimit/v3/rls.pb.go @@ -0,0 +1,1008 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/service/ratelimit/v3/rls.proto + +package ratelimitv3 + +import ( + context "context" + v31 "github.com/cilium/proxy/go/envoy/config/core/v3" + v3 "github.com/cilium/proxy/go/envoy/extensions/common/ratelimit/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + structpb "google.golang.org/protobuf/types/known/structpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type RateLimitResponse_Code int32 + +const ( + // The response code is not known. + RateLimitResponse_UNKNOWN RateLimitResponse_Code = 0 + // The response code to notify that the number of requests are under limit. + RateLimitResponse_OK RateLimitResponse_Code = 1 + // The response code to notify that the number of requests are over limit. + RateLimitResponse_OVER_LIMIT RateLimitResponse_Code = 2 +) + +// Enum value maps for RateLimitResponse_Code. +var ( + RateLimitResponse_Code_name = map[int32]string{ + 0: "UNKNOWN", + 1: "OK", + 2: "OVER_LIMIT", + } + RateLimitResponse_Code_value = map[string]int32{ + "UNKNOWN": 0, + "OK": 1, + "OVER_LIMIT": 2, + } +) + +func (x RateLimitResponse_Code) Enum() *RateLimitResponse_Code { + p := new(RateLimitResponse_Code) + *p = x + return p +} + +func (x RateLimitResponse_Code) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RateLimitResponse_Code) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_service_ratelimit_v3_rls_proto_enumTypes[0].Descriptor() +} + +func (RateLimitResponse_Code) Type() protoreflect.EnumType { + return &file_envoy_service_ratelimit_v3_rls_proto_enumTypes[0] +} + +func (x RateLimitResponse_Code) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RateLimitResponse_Code.Descriptor instead. +func (RateLimitResponse_Code) EnumDescriptor() ([]byte, []int) { + return file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP(), []int{1, 0} +} + +// Identifies the unit of of time for rate limit. +// [#comment: replace by envoy/type/v3/ratelimit_unit.proto in v4] +type RateLimitResponse_RateLimit_Unit int32 + +const ( + // The time unit is not known. + RateLimitResponse_RateLimit_UNKNOWN RateLimitResponse_RateLimit_Unit = 0 + // The time unit representing a second. + RateLimitResponse_RateLimit_SECOND RateLimitResponse_RateLimit_Unit = 1 + // The time unit representing a minute. + RateLimitResponse_RateLimit_MINUTE RateLimitResponse_RateLimit_Unit = 2 + // The time unit representing an hour. + RateLimitResponse_RateLimit_HOUR RateLimitResponse_RateLimit_Unit = 3 + // The time unit representing a day. + RateLimitResponse_RateLimit_DAY RateLimitResponse_RateLimit_Unit = 4 +) + +// Enum value maps for RateLimitResponse_RateLimit_Unit. +var ( + RateLimitResponse_RateLimit_Unit_name = map[int32]string{ + 0: "UNKNOWN", + 1: "SECOND", + 2: "MINUTE", + 3: "HOUR", + 4: "DAY", + } + RateLimitResponse_RateLimit_Unit_value = map[string]int32{ + "UNKNOWN": 0, + "SECOND": 1, + "MINUTE": 2, + "HOUR": 3, + "DAY": 4, + } +) + +func (x RateLimitResponse_RateLimit_Unit) Enum() *RateLimitResponse_RateLimit_Unit { + p := new(RateLimitResponse_RateLimit_Unit) + *p = x + return p +} + +func (x RateLimitResponse_RateLimit_Unit) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RateLimitResponse_RateLimit_Unit) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_service_ratelimit_v3_rls_proto_enumTypes[1].Descriptor() +} + +func (RateLimitResponse_RateLimit_Unit) Type() protoreflect.EnumType { + return &file_envoy_service_ratelimit_v3_rls_proto_enumTypes[1] +} + +func (x RateLimitResponse_RateLimit_Unit) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RateLimitResponse_RateLimit_Unit.Descriptor instead. +func (RateLimitResponse_RateLimit_Unit) EnumDescriptor() ([]byte, []int) { + return file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP(), []int{1, 0, 0} +} + +// Main message for a rate limit request. The rate limit service is designed to be fully generic +// in the sense that it can operate on arbitrary hierarchical key/value pairs. The loaded +// configuration will parse the request and find the most specific limit to apply. In addition, +// a RateLimitRequest can contain multiple "descriptors" to limit on. When multiple descriptors +// are provided, the server will limit on *ALL* of them and return an OVER_LIMIT response if any +// of them are over limit. This enables more complex application level rate limiting scenarios +// if desired. +type RateLimitRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // All rate limit requests must specify a domain. This enables the configuration to be per + // application without fear of overlap. E.g., "envoy". + Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` + // All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is + // processed by the service (see below). If any of the descriptors are over limit, the entire + // request is considered to be over limit. + Descriptors []*v3.RateLimitDescriptor `protobuf:"bytes,2,rep,name=descriptors,proto3" json:"descriptors,omitempty"` + // Rate limit requests can optionally specify the number of hits a request adds to the matched + // limit. If the value is not set in the message, a request increases the matched limit by 1. + HitsAddend uint32 `protobuf:"varint,3,opt,name=hits_addend,json=hitsAddend,proto3" json:"hits_addend,omitempty"` +} + +func (x *RateLimitRequest) Reset() { + *x = RateLimitRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitRequest) ProtoMessage() {} + +func (x *RateLimitRequest) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitRequest.ProtoReflect.Descriptor instead. +func (*RateLimitRequest) Descriptor() ([]byte, []int) { + return file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP(), []int{0} +} + +func (x *RateLimitRequest) GetDomain() string { + if x != nil { + return x.Domain + } + return "" +} + +func (x *RateLimitRequest) GetDescriptors() []*v3.RateLimitDescriptor { + if x != nil { + return x.Descriptors + } + return nil +} + +func (x *RateLimitRequest) GetHitsAddend() uint32 { + if x != nil { + return x.HitsAddend + } + return 0 +} + +// A response from a ShouldRateLimit call. +// [#next-free-field: 8] +type RateLimitResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The overall response code which takes into account all of the descriptors that were passed + // in the RateLimitRequest message. + OverallCode RateLimitResponse_Code `protobuf:"varint,1,opt,name=overall_code,json=overallCode,proto3,enum=envoy.service.ratelimit.v3.RateLimitResponse_Code" json:"overall_code,omitempty"` + // A list of DescriptorStatus messages which matches the length of the descriptor list passed + // in the RateLimitRequest. This can be used by the caller to determine which individual + // descriptors failed and/or what the currently configured limits are for all of them. + Statuses []*RateLimitResponse_DescriptorStatus `protobuf:"bytes,2,rep,name=statuses,proto3" json:"statuses,omitempty"` + // A list of headers to add to the response + ResponseHeadersToAdd []*v31.HeaderValue `protobuf:"bytes,3,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"` + // A list of headers to add to the request when forwarded + RequestHeadersToAdd []*v31.HeaderValue `protobuf:"bytes,4,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"` + // A response body to send to the downstream client when the response code is not OK. + RawBody []byte `protobuf:"bytes,5,opt,name=raw_body,json=rawBody,proto3" json:"raw_body,omitempty"` + // Optional response metadata that will be emitted as dynamic metadata to be consumed by the next + // filter. This metadata lives in a namespace specified by the canonical name of extension filter + // that requires it: + // + // - :ref:`envoy.filters.http.ratelimit ` for HTTP filter. + // - :ref:`envoy.filters.network.ratelimit ` for network filter. + // - :ref:`envoy.filters.thrift.rate_limit ` for Thrift filter. + DynamicMetadata *structpb.Struct `protobuf:"bytes,6,opt,name=dynamic_metadata,json=dynamicMetadata,proto3" json:"dynamic_metadata,omitempty"` + // Quota is available for a request if its entire descriptor set has cached quota available. + // This is a union of all descriptors in the descriptor set. Clients can use the quota for future matches if and only if the descriptor set matches what was sent in the request that originated this response. + // + // If quota is available, a RLS request will not be made and the quota will be reduced by 1. + // If quota is not available (i.e., a cached entry doesn't exist for a RLS descriptor set), a RLS request will be triggered. + // If the server did not provide a quota, such as the quota message is empty then the request admission is determined by the + // :ref:`overall_code `. + // + // If there is not sufficient quota and the cached entry exists for a RLS descriptor set is out-of-quota but not expired, + // the request will be treated as OVER_LIMIT. + // [#not-implemented-hide:] + Quota *RateLimitResponse_Quota `protobuf:"bytes,7,opt,name=quota,proto3" json:"quota,omitempty"` +} + +func (x *RateLimitResponse) Reset() { + *x = RateLimitResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitResponse) ProtoMessage() {} + +func (x *RateLimitResponse) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitResponse.ProtoReflect.Descriptor instead. +func (*RateLimitResponse) Descriptor() ([]byte, []int) { + return file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP(), []int{1} +} + +func (x *RateLimitResponse) GetOverallCode() RateLimitResponse_Code { + if x != nil { + return x.OverallCode + } + return RateLimitResponse_UNKNOWN +} + +func (x *RateLimitResponse) GetStatuses() []*RateLimitResponse_DescriptorStatus { + if x != nil { + return x.Statuses + } + return nil +} + +func (x *RateLimitResponse) GetResponseHeadersToAdd() []*v31.HeaderValue { + if x != nil { + return x.ResponseHeadersToAdd + } + return nil +} + +func (x *RateLimitResponse) GetRequestHeadersToAdd() []*v31.HeaderValue { + if x != nil { + return x.RequestHeadersToAdd + } + return nil +} + +func (x *RateLimitResponse) GetRawBody() []byte { + if x != nil { + return x.RawBody + } + return nil +} + +func (x *RateLimitResponse) GetDynamicMetadata() *structpb.Struct { + if x != nil { + return x.DynamicMetadata + } + return nil +} + +func (x *RateLimitResponse) GetQuota() *RateLimitResponse_Quota { + if x != nil { + return x.Quota + } + return nil +} + +// Defines an actual rate limit in terms of requests per unit of time and the unit itself. +type RateLimitResponse_RateLimit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A name or description of this limit. + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + // The number of requests per unit of time. + RequestsPerUnit uint32 `protobuf:"varint,1,opt,name=requests_per_unit,json=requestsPerUnit,proto3" json:"requests_per_unit,omitempty"` + // The unit of time. + Unit RateLimitResponse_RateLimit_Unit `protobuf:"varint,2,opt,name=unit,proto3,enum=envoy.service.ratelimit.v3.RateLimitResponse_RateLimit_Unit" json:"unit,omitempty"` +} + +func (x *RateLimitResponse_RateLimit) Reset() { + *x = RateLimitResponse_RateLimit{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitResponse_RateLimit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitResponse_RateLimit) ProtoMessage() {} + +func (x *RateLimitResponse_RateLimit) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitResponse_RateLimit.ProtoReflect.Descriptor instead. +func (*RateLimitResponse_RateLimit) Descriptor() ([]byte, []int) { + return file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *RateLimitResponse_RateLimit) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RateLimitResponse_RateLimit) GetRequestsPerUnit() uint32 { + if x != nil { + return x.RequestsPerUnit + } + return 0 +} + +func (x *RateLimitResponse_RateLimit) GetUnit() RateLimitResponse_RateLimit_Unit { + if x != nil { + return x.Unit + } + return RateLimitResponse_RateLimit_UNKNOWN +} + +// Cacheable quota for responses. +// Quota can be granted at different levels: either for each individual descriptor or for the whole descriptor set. +// This is a certain number of requests over a period of time. +// The client may cache this result and apply the effective RateLimitResponse to future matching +// requests without querying rate limit service. +// +// When quota expires due to timeout, a new RLS request will also be made. +// The implementation may choose to preemptively query the rate limit server for more quota on or +// before expiration or before the available quota runs out. +// [#not-implemented-hide:] +type RateLimitResponse_Quota struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Number of matching requests granted in quota. Must be 1 or more. + Requests uint32 `protobuf:"varint,1,opt,name=requests,proto3" json:"requests,omitempty"` + // Types that are assignable to ExpirationSpecifier: + // + // *RateLimitResponse_Quota_ValidUntil + ExpirationSpecifier isRateLimitResponse_Quota_ExpirationSpecifier `protobuf_oneof:"expiration_specifier"` + // The unique id that is associated with each Quota either at individual descriptor level or whole descriptor set level. + // + // For a matching policy with boolean logic, for example, match: "request.headers['environment'] == 'staging' || request.headers['environment'] == 'dev'"), + // the request_headers action produces a distinct list of descriptors for each possible value of the ‘environment’ header even though the granted quota is same. + // Thus, the client will use this id information (returned from RLS server) to correctly correlate the multiple descriptors/descriptor sets that have been granted with same quota (i.e., share the same quota among multiple descriptors or descriptor sets.) + // + // If id is empty, this id field will be ignored. If quota for the same id changes (e.g. due to configuration update), the old quota will be overridden by the new one. Shared quotas referenced by ID will still adhere to expiration after `valid_until`. + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *RateLimitResponse_Quota) Reset() { + *x = RateLimitResponse_Quota{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitResponse_Quota) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitResponse_Quota) ProtoMessage() {} + +func (x *RateLimitResponse_Quota) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitResponse_Quota.ProtoReflect.Descriptor instead. +func (*RateLimitResponse_Quota) Descriptor() ([]byte, []int) { + return file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP(), []int{1, 1} +} + +func (x *RateLimitResponse_Quota) GetRequests() uint32 { + if x != nil { + return x.Requests + } + return 0 +} + +func (m *RateLimitResponse_Quota) GetExpirationSpecifier() isRateLimitResponse_Quota_ExpirationSpecifier { + if m != nil { + return m.ExpirationSpecifier + } + return nil +} + +func (x *RateLimitResponse_Quota) GetValidUntil() *timestamppb.Timestamp { + if x, ok := x.GetExpirationSpecifier().(*RateLimitResponse_Quota_ValidUntil); ok { + return x.ValidUntil + } + return nil +} + +func (x *RateLimitResponse_Quota) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type isRateLimitResponse_Quota_ExpirationSpecifier interface { + isRateLimitResponse_Quota_ExpirationSpecifier() +} + +type RateLimitResponse_Quota_ValidUntil struct { + // Point in time at which the quota expires. + ValidUntil *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=valid_until,json=validUntil,proto3,oneof"` +} + +func (*RateLimitResponse_Quota_ValidUntil) isRateLimitResponse_Quota_ExpirationSpecifier() {} + +// [#next-free-field: 6] +type RateLimitResponse_DescriptorStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The response code for an individual descriptor. + Code RateLimitResponse_Code `protobuf:"varint,1,opt,name=code,proto3,enum=envoy.service.ratelimit.v3.RateLimitResponse_Code" json:"code,omitempty"` + // The current limit as configured by the server. Useful for debugging, etc. + CurrentLimit *RateLimitResponse_RateLimit `protobuf:"bytes,2,opt,name=current_limit,json=currentLimit,proto3" json:"current_limit,omitempty"` + // The limit remaining in the current time unit. + LimitRemaining uint32 `protobuf:"varint,3,opt,name=limit_remaining,json=limitRemaining,proto3" json:"limit_remaining,omitempty"` + // Duration until reset of the current limit window. + DurationUntilReset *durationpb.Duration `protobuf:"bytes,4,opt,name=duration_until_reset,json=durationUntilReset,proto3" json:"duration_until_reset,omitempty"` + // Quota is available for a request if its descriptor set has cached quota available for all + // descriptors. + // This is for each individual descriptor in the descriptor set. The client will perform matches for each individual descriptor against available per-descriptor quota. + // + // If quota is available, a RLS request will not be made and the quota will be reduced by 1 for + // all matching descriptors. + // + // If there is not sufficient quota, there are three cases: + // 1. A cached entry exists for a RLS descriptor that is out-of-quota, but not expired. + // In this case, the request will be treated as OVER_LIMIT. + // 2. Some RLS descriptors have a cached entry that has valid quota but some RLS descriptors + // have no cached entry. This will trigger a new RLS request. + // When the result is returned, a single unit will be consumed from the quota for all + // matching descriptors. + // If the server did not provide a quota, such as the quota message is empty for some of + // the descriptors, then the request admission is determined by the + // :ref:`overall_code `. + // 3. All RLS descriptors lack a cached entry, this will trigger a new RLS request, + // When the result is returned, a single unit will be consumed from the quota for all + // matching descriptors. + // If the server did not provide a quota, such as the quota message is empty for some of + // the descriptors, then the request admission is determined by the + // :ref:`overall_code `. + // + // [#not-implemented-hide:] + Quota *RateLimitResponse_Quota `protobuf:"bytes,5,opt,name=quota,proto3" json:"quota,omitempty"` +} + +func (x *RateLimitResponse_DescriptorStatus) Reset() { + *x = RateLimitResponse_DescriptorStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RateLimitResponse_DescriptorStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RateLimitResponse_DescriptorStatus) ProtoMessage() {} + +func (x *RateLimitResponse_DescriptorStatus) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_ratelimit_v3_rls_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RateLimitResponse_DescriptorStatus.ProtoReflect.Descriptor instead. +func (*RateLimitResponse_DescriptorStatus) Descriptor() ([]byte, []int) { + return file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP(), []int{1, 2} +} + +func (x *RateLimitResponse_DescriptorStatus) GetCode() RateLimitResponse_Code { + if x != nil { + return x.Code + } + return RateLimitResponse_UNKNOWN +} + +func (x *RateLimitResponse_DescriptorStatus) GetCurrentLimit() *RateLimitResponse_RateLimit { + if x != nil { + return x.CurrentLimit + } + return nil +} + +func (x *RateLimitResponse_DescriptorStatus) GetLimitRemaining() uint32 { + if x != nil { + return x.LimitRemaining + } + return 0 +} + +func (x *RateLimitResponse_DescriptorStatus) GetDurationUntilReset() *durationpb.Duration { + if x != nil { + return x.DurationUntilReset + } + return nil +} + +func (x *RateLimitResponse_DescriptorStatus) GetQuota() *RateLimitResponse_Quota { + if x != nil { + return x.Quota + } + return nil +} + +var File_envoy_service_ratelimit_v3_rls_proto protoreflect.FileDescriptor + +var file_envoy_service_ratelimit_v3_rls_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6c, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, + 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x72, 0x61, 0x74, + 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 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, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x69, 0x6e, 0x67, 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, 0xdc, 0x01, 0x0a, 0x10, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, + 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, + 0x12, 0x5b, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, + 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x1f, 0x0a, + 0x0b, 0x68, 0x69, 0x74, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x0a, 0x68, 0x69, 0x74, 0x73, 0x41, 0x64, 0x64, 0x65, 0x6e, 0x64, 0x3a, 0x32, + 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, + 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0xfb, 0x0b, 0x0a, 0x11, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x0c, 0x6f, 0x76, 0x65, 0x72, + 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, + 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, + 0x64, 0x65, 0x52, 0x0b, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x5a, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x17, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, + 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x56, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x19, 0x0a, + 0x08, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x07, 0x72, 0x61, 0x77, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x42, 0x0a, 0x10, 0x64, 0x79, 0x6e, 0x61, + 0x6d, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0f, 0x64, 0x79, 0x6e, + 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x49, 0x0a, 0x05, + 0x71, 0x75, 0x6f, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x61, + 0x52, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x1a, 0x9c, 0x02, 0x0a, 0x09, 0x52, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x50, 0x65, + 0x72, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x50, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, + 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x55, 0x6e, 0x69, + 0x74, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x22, 0x3e, 0x0a, 0x04, 0x55, 0x6e, 0x69, 0x74, 0x12, + 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, + 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x49, 0x4e, 0x55, + 0x54, 0x45, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f, 0x55, 0x52, 0x10, 0x03, 0x12, 0x07, + 0x0a, 0x03, 0x44, 0x41, 0x59, 0x10, 0x04, 0x3a, 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, + 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0x93, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x6f, 0x74, 0x61, + 0x12, 0x23, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x08, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x75, + 0x6e, 0x74, 0x69, 0x6c, 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, 0x48, 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x55, + 0x6e, 0x74, 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x42, 0x16, 0x0a, 0x14, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x1a, 0xbf, 0x03, 0x0a, + 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x46, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, + 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x5c, 0x0a, 0x0d, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, + 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x5f, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x0e, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, + 0x12, 0x4b, 0x0a, 0x14, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x6e, 0x74, + 0x69, 0x6c, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x65, 0x74, 0x12, 0x49, 0x0a, + 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, + 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x51, 0x75, 0x6f, 0x74, + 0x61, 0x52, 0x05, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x3a, 0x44, 0x9a, 0xc5, 0x88, 0x1e, 0x3f, 0x0a, + 0x3d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, + 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x2b, + 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, + 0x56, 0x45, 0x52, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x10, 0x02, 0x3a, 0x33, 0x9a, 0xc5, 0x88, + 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x32, 0x84, 0x01, 0x0a, 0x10, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x70, 0x0a, 0x0f, 0x53, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x90, 0x01, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x52, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x76, 0x33, 0x88, + 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_envoy_service_ratelimit_v3_rls_proto_rawDescOnce sync.Once + file_envoy_service_ratelimit_v3_rls_proto_rawDescData = file_envoy_service_ratelimit_v3_rls_proto_rawDesc +) + +func file_envoy_service_ratelimit_v3_rls_proto_rawDescGZIP() []byte { + file_envoy_service_ratelimit_v3_rls_proto_rawDescOnce.Do(func() { + file_envoy_service_ratelimit_v3_rls_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_ratelimit_v3_rls_proto_rawDescData) + }) + return file_envoy_service_ratelimit_v3_rls_proto_rawDescData +} + +var file_envoy_service_ratelimit_v3_rls_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_envoy_service_ratelimit_v3_rls_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_envoy_service_ratelimit_v3_rls_proto_goTypes = []interface{}{ + (RateLimitResponse_Code)(0), // 0: envoy.service.ratelimit.v3.RateLimitResponse.Code + (RateLimitResponse_RateLimit_Unit)(0), // 1: envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit + (*RateLimitRequest)(nil), // 2: envoy.service.ratelimit.v3.RateLimitRequest + (*RateLimitResponse)(nil), // 3: envoy.service.ratelimit.v3.RateLimitResponse + (*RateLimitResponse_RateLimit)(nil), // 4: envoy.service.ratelimit.v3.RateLimitResponse.RateLimit + (*RateLimitResponse_Quota)(nil), // 5: envoy.service.ratelimit.v3.RateLimitResponse.Quota + (*RateLimitResponse_DescriptorStatus)(nil), // 6: envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus + (*v3.RateLimitDescriptor)(nil), // 7: envoy.extensions.common.ratelimit.v3.RateLimitDescriptor + (*v31.HeaderValue)(nil), // 8: envoy.config.core.v3.HeaderValue + (*structpb.Struct)(nil), // 9: google.protobuf.Struct + (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 11: google.protobuf.Duration +} +var file_envoy_service_ratelimit_v3_rls_proto_depIdxs = []int32{ + 7, // 0: envoy.service.ratelimit.v3.RateLimitRequest.descriptors:type_name -> envoy.extensions.common.ratelimit.v3.RateLimitDescriptor + 0, // 1: envoy.service.ratelimit.v3.RateLimitResponse.overall_code:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.Code + 6, // 2: envoy.service.ratelimit.v3.RateLimitResponse.statuses:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus + 8, // 3: envoy.service.ratelimit.v3.RateLimitResponse.response_headers_to_add:type_name -> envoy.config.core.v3.HeaderValue + 8, // 4: envoy.service.ratelimit.v3.RateLimitResponse.request_headers_to_add:type_name -> envoy.config.core.v3.HeaderValue + 9, // 5: envoy.service.ratelimit.v3.RateLimitResponse.dynamic_metadata:type_name -> google.protobuf.Struct + 5, // 6: envoy.service.ratelimit.v3.RateLimitResponse.quota:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.Quota + 1, // 7: envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.unit:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.RateLimit.Unit + 10, // 8: envoy.service.ratelimit.v3.RateLimitResponse.Quota.valid_until:type_name -> google.protobuf.Timestamp + 0, // 9: envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.code:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.Code + 4, // 10: envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.current_limit:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.RateLimit + 11, // 11: envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.duration_until_reset:type_name -> google.protobuf.Duration + 5, // 12: envoy.service.ratelimit.v3.RateLimitResponse.DescriptorStatus.quota:type_name -> envoy.service.ratelimit.v3.RateLimitResponse.Quota + 2, // 13: envoy.service.ratelimit.v3.RateLimitService.ShouldRateLimit:input_type -> envoy.service.ratelimit.v3.RateLimitRequest + 3, // 14: envoy.service.ratelimit.v3.RateLimitService.ShouldRateLimit:output_type -> envoy.service.ratelimit.v3.RateLimitResponse + 14, // [14:15] is the sub-list for method output_type + 13, // [13:14] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name +} + +func init() { file_envoy_service_ratelimit_v3_rls_proto_init() } +func file_envoy_service_ratelimit_v3_rls_proto_init() { + if File_envoy_service_ratelimit_v3_rls_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_service_ratelimit_v3_rls_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_ratelimit_v3_rls_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_ratelimit_v3_rls_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitResponse_RateLimit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_ratelimit_v3_rls_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitResponse_Quota); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_ratelimit_v3_rls_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RateLimitResponse_DescriptorStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_service_ratelimit_v3_rls_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*RateLimitResponse_Quota_ValidUntil)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_service_ratelimit_v3_rls_proto_rawDesc, + NumEnums: 2, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_envoy_service_ratelimit_v3_rls_proto_goTypes, + DependencyIndexes: file_envoy_service_ratelimit_v3_rls_proto_depIdxs, + EnumInfos: file_envoy_service_ratelimit_v3_rls_proto_enumTypes, + MessageInfos: file_envoy_service_ratelimit_v3_rls_proto_msgTypes, + }.Build() + File_envoy_service_ratelimit_v3_rls_proto = out.File + file_envoy_service_ratelimit_v3_rls_proto_rawDesc = nil + file_envoy_service_ratelimit_v3_rls_proto_goTypes = nil + file_envoy_service_ratelimit_v3_rls_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// RateLimitServiceClient is the client API for RateLimitService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type RateLimitServiceClient interface { + // Determine whether rate limiting should take place. + ShouldRateLimit(ctx context.Context, in *RateLimitRequest, opts ...grpc.CallOption) (*RateLimitResponse, error) +} + +type rateLimitServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewRateLimitServiceClient(cc grpc.ClientConnInterface) RateLimitServiceClient { + return &rateLimitServiceClient{cc} +} + +func (c *rateLimitServiceClient) ShouldRateLimit(ctx context.Context, in *RateLimitRequest, opts ...grpc.CallOption) (*RateLimitResponse, error) { + out := new(RateLimitResponse) + err := c.cc.Invoke(ctx, "/envoy.service.ratelimit.v3.RateLimitService/ShouldRateLimit", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RateLimitServiceServer is the server API for RateLimitService service. +type RateLimitServiceServer interface { + // Determine whether rate limiting should take place. + ShouldRateLimit(context.Context, *RateLimitRequest) (*RateLimitResponse, error) +} + +// UnimplementedRateLimitServiceServer can be embedded to have forward compatible implementations. +type UnimplementedRateLimitServiceServer struct { +} + +func (*UnimplementedRateLimitServiceServer) ShouldRateLimit(context.Context, *RateLimitRequest) (*RateLimitResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ShouldRateLimit not implemented") +} + +func RegisterRateLimitServiceServer(s *grpc.Server, srv RateLimitServiceServer) { + s.RegisterService(&_RateLimitService_serviceDesc, srv) +} + +func _RateLimitService_ShouldRateLimit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RateLimitRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RateLimitServiceServer).ShouldRateLimit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/envoy.service.ratelimit.v3.RateLimitService/ShouldRateLimit", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RateLimitServiceServer).ShouldRateLimit(ctx, req.(*RateLimitRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _RateLimitService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "envoy.service.ratelimit.v3.RateLimitService", + HandlerType: (*RateLimitServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ShouldRateLimit", + Handler: _RateLimitService_ShouldRateLimit_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "envoy/service/ratelimit/v3/rls.proto", +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/ratelimit/v3/rls.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/service/ratelimit/v3/rls.pb.validate.go new file mode 100644 index 0000000000000..f4bb8980b105b --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/ratelimit/v3/rls.pb.validate.go @@ -0,0 +1,890 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/service/ratelimit/v3/rls.proto + +package ratelimitv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RateLimitRequest 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 *RateLimitRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitRequest 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 +// RateLimitRequestMultiError, or nil if none found. +func (m *RateLimitRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Domain + + for idx, item := range m.GetDescriptors() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitRequestValidationError{ + field: fmt.Sprintf("Descriptors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitRequestValidationError{ + field: fmt.Sprintf("Descriptors[%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 RateLimitRequestValidationError{ + field: fmt.Sprintf("Descriptors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for HitsAddend + + if len(errors) > 0 { + return RateLimitRequestMultiError(errors) + } + return nil +} + +// RateLimitRequestMultiError is an error wrapping multiple validation errors +// returned by RateLimitRequest.ValidateAll() if the designated constraints +// aren't met. +type RateLimitRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitRequestMultiError) AllErrors() []error { return m } + +// RateLimitRequestValidationError is the validation error returned by +// RateLimitRequest.Validate if the designated constraints aren't met. +type RateLimitRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitRequestValidationError) ErrorName() string { return "RateLimitRequestValidationError" } + +// Error satisfies the builtin error interface +func (e RateLimitRequestValidationError) 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 %sRateLimitRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitRequestValidationError{} + +// Validate checks the field values on RateLimitResponse 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 *RateLimitResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitResponse 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 +// RateLimitResponseMultiError, or nil if none found. +func (m *RateLimitResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for OverallCode + + for idx, item := range m.GetStatuses() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: fmt.Sprintf("Statuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: fmt.Sprintf("Statuses[%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 RateLimitResponseValidationError{ + field: fmt.Sprintf("Statuses[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetResponseHeadersToAdd() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%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 RateLimitResponseValidationError{ + field: fmt.Sprintf("ResponseHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetRequestHeadersToAdd() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%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 RateLimitResponseValidationError{ + field: fmt.Sprintf("RequestHeadersToAdd[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for RawBody + + if all { + switch v := interface{}(m.GetDynamicMetadata()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDynamicMetadata()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitResponseValidationError{ + field: "DynamicMetadata", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetQuota()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: "Quota", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitResponseValidationError{ + field: "Quota", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetQuota()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitResponseValidationError{ + field: "Quota", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RateLimitResponseMultiError(errors) + } + return nil +} + +// RateLimitResponseMultiError is an error wrapping multiple validation errors +// returned by RateLimitResponse.ValidateAll() if the designated constraints +// aren't met. +type RateLimitResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitResponseMultiError) AllErrors() []error { return m } + +// RateLimitResponseValidationError is the validation error returned by +// RateLimitResponse.Validate if the designated constraints aren't met. +type RateLimitResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitResponseValidationError) ErrorName() string { + return "RateLimitResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitResponseValidationError) 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 %sRateLimitResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitResponseValidationError{} + +// Validate checks the field values on RateLimitResponse_RateLimit 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 *RateLimitResponse_RateLimit) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitResponse_RateLimit 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 +// RateLimitResponse_RateLimitMultiError, or nil if none found. +func (m *RateLimitResponse_RateLimit) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitResponse_RateLimit) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + // no validation rules for RequestsPerUnit + + // no validation rules for Unit + + if len(errors) > 0 { + return RateLimitResponse_RateLimitMultiError(errors) + } + return nil +} + +// RateLimitResponse_RateLimitMultiError is an error wrapping multiple +// validation errors returned by RateLimitResponse_RateLimit.ValidateAll() if +// the designated constraints aren't met. +type RateLimitResponse_RateLimitMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitResponse_RateLimitMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitResponse_RateLimitMultiError) AllErrors() []error { return m } + +// RateLimitResponse_RateLimitValidationError is the validation error returned +// by RateLimitResponse_RateLimit.Validate if the designated constraints +// aren't met. +type RateLimitResponse_RateLimitValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitResponse_RateLimitValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitResponse_RateLimitValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitResponse_RateLimitValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitResponse_RateLimitValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitResponse_RateLimitValidationError) ErrorName() string { + return "RateLimitResponse_RateLimitValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitResponse_RateLimitValidationError) 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 %sRateLimitResponse_RateLimit.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitResponse_RateLimitValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitResponse_RateLimitValidationError{} + +// Validate checks the field values on RateLimitResponse_Quota 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 *RateLimitResponse_Quota) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitResponse_Quota 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 +// RateLimitResponse_QuotaMultiError, or nil if none found. +func (m *RateLimitResponse_Quota) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitResponse_Quota) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetRequests() <= 0 { + err := RateLimitResponse_QuotaValidationError{ + field: "Requests", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for Id + + switch m.ExpirationSpecifier.(type) { + + case *RateLimitResponse_Quota_ValidUntil: + + if all { + switch v := interface{}(m.GetValidUntil()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitResponse_QuotaValidationError{ + field: "ValidUntil", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitResponse_QuotaValidationError{ + field: "ValidUntil", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValidUntil()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitResponse_QuotaValidationError{ + field: "ValidUntil", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return RateLimitResponse_QuotaMultiError(errors) + } + return nil +} + +// RateLimitResponse_QuotaMultiError is an error wrapping multiple validation +// errors returned by RateLimitResponse_Quota.ValidateAll() if the designated +// constraints aren't met. +type RateLimitResponse_QuotaMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitResponse_QuotaMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitResponse_QuotaMultiError) AllErrors() []error { return m } + +// RateLimitResponse_QuotaValidationError is the validation error returned by +// RateLimitResponse_Quota.Validate if the designated constraints aren't met. +type RateLimitResponse_QuotaValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitResponse_QuotaValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitResponse_QuotaValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitResponse_QuotaValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitResponse_QuotaValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitResponse_QuotaValidationError) ErrorName() string { + return "RateLimitResponse_QuotaValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitResponse_QuotaValidationError) 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 %sRateLimitResponse_Quota.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitResponse_QuotaValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitResponse_QuotaValidationError{} + +// Validate checks the field values on RateLimitResponse_DescriptorStatus 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 *RateLimitResponse_DescriptorStatus) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RateLimitResponse_DescriptorStatus +// 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 +// RateLimitResponse_DescriptorStatusMultiError, or nil if none found. +func (m *RateLimitResponse_DescriptorStatus) ValidateAll() error { + return m.validate(true) +} + +func (m *RateLimitResponse_DescriptorStatus) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Code + + if all { + switch v := interface{}(m.GetCurrentLimit()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitResponse_DescriptorStatusValidationError{ + field: "CurrentLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitResponse_DescriptorStatusValidationError{ + field: "CurrentLimit", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCurrentLimit()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitResponse_DescriptorStatusValidationError{ + field: "CurrentLimit", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for LimitRemaining + + if all { + switch v := interface{}(m.GetDurationUntilReset()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitResponse_DescriptorStatusValidationError{ + field: "DurationUntilReset", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitResponse_DescriptorStatusValidationError{ + field: "DurationUntilReset", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDurationUntilReset()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitResponse_DescriptorStatusValidationError{ + field: "DurationUntilReset", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetQuota()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RateLimitResponse_DescriptorStatusValidationError{ + field: "Quota", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RateLimitResponse_DescriptorStatusValidationError{ + field: "Quota", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetQuota()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RateLimitResponse_DescriptorStatusValidationError{ + field: "Quota", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RateLimitResponse_DescriptorStatusMultiError(errors) + } + return nil +} + +// RateLimitResponse_DescriptorStatusMultiError is an error wrapping multiple +// validation errors returned by +// RateLimitResponse_DescriptorStatus.ValidateAll() if the designated +// constraints aren't met. +type RateLimitResponse_DescriptorStatusMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RateLimitResponse_DescriptorStatusMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RateLimitResponse_DescriptorStatusMultiError) AllErrors() []error { return m } + +// RateLimitResponse_DescriptorStatusValidationError is the validation error +// returned by RateLimitResponse_DescriptorStatus.Validate if the designated +// constraints aren't met. +type RateLimitResponse_DescriptorStatusValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RateLimitResponse_DescriptorStatusValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RateLimitResponse_DescriptorStatusValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RateLimitResponse_DescriptorStatusValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RateLimitResponse_DescriptorStatusValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RateLimitResponse_DescriptorStatusValidationError) ErrorName() string { + return "RateLimitResponse_DescriptorStatusValidationError" +} + +// Error satisfies the builtin error interface +func (e RateLimitResponse_DescriptorStatusValidationError) 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 %sRateLimitResponse_DescriptorStatus.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RateLimitResponse_DescriptorStatusValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RateLimitResponse_DescriptorStatusValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/runtime/v3/rtds.pb.go b/vendor/github.com/cilium/proxy/go/envoy/service/runtime/v3/rtds.pb.go new file mode 100644 index 0000000000000..7cc5573ecb0c0 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/runtime/v3/rtds.pb.go @@ -0,0 +1,513 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/service/runtime/v3/rtds.proto + +package runtimev3 + +import ( + context "context" + _ "github.com/cilium/proxy/go/envoy/annotations" + v3 "github.com/cilium/proxy/go/envoy/service/discovery/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing +// services: https://github.com/google/protobuf/issues/4221 +type RtdsDummy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RtdsDummy) Reset() { + *x = RtdsDummy{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_runtime_v3_rtds_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RtdsDummy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RtdsDummy) ProtoMessage() {} + +func (x *RtdsDummy) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_runtime_v3_rtds_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RtdsDummy.ProtoReflect.Descriptor instead. +func (*RtdsDummy) Descriptor() ([]byte, []int) { + return file_envoy_service_runtime_v3_rtds_proto_rawDescGZIP(), []int{0} +} + +// RTDS resource type. This describes a layer in the runtime virtual filesystem. +type Runtime struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Runtime resource name. This makes the Runtime a self-describing xDS + // resource. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Layer *structpb.Struct `protobuf:"bytes,2,opt,name=layer,proto3" json:"layer,omitempty"` +} + +func (x *Runtime) Reset() { + *x = Runtime{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_runtime_v3_rtds_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Runtime) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Runtime) ProtoMessage() {} + +func (x *Runtime) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_runtime_v3_rtds_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Runtime.ProtoReflect.Descriptor instead. +func (*Runtime) Descriptor() ([]byte, []int) { + return file_envoy_service_runtime_v3_rtds_proto_rawDescGZIP(), []int{1} +} + +func (x *Runtime) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Runtime) GetLayer() *structpb.Struct { + if x != nil { + return x.Layer + } + return nil +} + +var File_envoy_service_runtime_v3_rtds_proto protoreflect.FileDescriptor + +var file_envoy_service_runtime_v3_rtds_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x74, 0x64, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x33, 0x1a, + 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0x38, 0x0a, 0x09, 0x52, 0x74, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, + 0x79, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x74, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x22, 0x80, + 0x01, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, + 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, + 0x05, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x32, 0xca, 0x03, 0x0a, 0x17, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x72, 0x0a, + 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x2c, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, + 0x01, 0x12, 0x7b, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x12, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, + 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, + 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x93, + 0x01, 0x0a, 0x0c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, + 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, + 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x17, 0x22, 0x15, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x3a, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x28, 0x8a, 0xa4, 0x96, 0xf3, 0x07, 0x22, 0x0a, 0x20, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x8b, + 0x01, 0x0a, 0x26, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x52, 0x74, 0x64, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x72, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x76, + 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_service_runtime_v3_rtds_proto_rawDescOnce sync.Once + file_envoy_service_runtime_v3_rtds_proto_rawDescData = file_envoy_service_runtime_v3_rtds_proto_rawDesc +) + +func file_envoy_service_runtime_v3_rtds_proto_rawDescGZIP() []byte { + file_envoy_service_runtime_v3_rtds_proto_rawDescOnce.Do(func() { + file_envoy_service_runtime_v3_rtds_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_runtime_v3_rtds_proto_rawDescData) + }) + return file_envoy_service_runtime_v3_rtds_proto_rawDescData +} + +var file_envoy_service_runtime_v3_rtds_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_service_runtime_v3_rtds_proto_goTypes = []interface{}{ + (*RtdsDummy)(nil), // 0: envoy.service.runtime.v3.RtdsDummy + (*Runtime)(nil), // 1: envoy.service.runtime.v3.Runtime + (*structpb.Struct)(nil), // 2: google.protobuf.Struct + (*v3.DiscoveryRequest)(nil), // 3: envoy.service.discovery.v3.DiscoveryRequest + (*v3.DeltaDiscoveryRequest)(nil), // 4: envoy.service.discovery.v3.DeltaDiscoveryRequest + (*v3.DiscoveryResponse)(nil), // 5: envoy.service.discovery.v3.DiscoveryResponse + (*v3.DeltaDiscoveryResponse)(nil), // 6: envoy.service.discovery.v3.DeltaDiscoveryResponse +} +var file_envoy_service_runtime_v3_rtds_proto_depIdxs = []int32{ + 2, // 0: envoy.service.runtime.v3.Runtime.layer:type_name -> google.protobuf.Struct + 3, // 1: envoy.service.runtime.v3.RuntimeDiscoveryService.StreamRuntime:input_type -> envoy.service.discovery.v3.DiscoveryRequest + 4, // 2: envoy.service.runtime.v3.RuntimeDiscoveryService.DeltaRuntime:input_type -> envoy.service.discovery.v3.DeltaDiscoveryRequest + 3, // 3: envoy.service.runtime.v3.RuntimeDiscoveryService.FetchRuntime:input_type -> envoy.service.discovery.v3.DiscoveryRequest + 5, // 4: envoy.service.runtime.v3.RuntimeDiscoveryService.StreamRuntime:output_type -> envoy.service.discovery.v3.DiscoveryResponse + 6, // 5: envoy.service.runtime.v3.RuntimeDiscoveryService.DeltaRuntime:output_type -> envoy.service.discovery.v3.DeltaDiscoveryResponse + 5, // 6: envoy.service.runtime.v3.RuntimeDiscoveryService.FetchRuntime:output_type -> envoy.service.discovery.v3.DiscoveryResponse + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_service_runtime_v3_rtds_proto_init() } +func file_envoy_service_runtime_v3_rtds_proto_init() { + if File_envoy_service_runtime_v3_rtds_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_service_runtime_v3_rtds_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RtdsDummy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_runtime_v3_rtds_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Runtime); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_service_runtime_v3_rtds_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_envoy_service_runtime_v3_rtds_proto_goTypes, + DependencyIndexes: file_envoy_service_runtime_v3_rtds_proto_depIdxs, + MessageInfos: file_envoy_service_runtime_v3_rtds_proto_msgTypes, + }.Build() + File_envoy_service_runtime_v3_rtds_proto = out.File + file_envoy_service_runtime_v3_rtds_proto_rawDesc = nil + file_envoy_service_runtime_v3_rtds_proto_goTypes = nil + file_envoy_service_runtime_v3_rtds_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// RuntimeDiscoveryServiceClient is the client API for RuntimeDiscoveryService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type RuntimeDiscoveryServiceClient interface { + StreamRuntime(ctx context.Context, opts ...grpc.CallOption) (RuntimeDiscoveryService_StreamRuntimeClient, error) + DeltaRuntime(ctx context.Context, opts ...grpc.CallOption) (RuntimeDiscoveryService_DeltaRuntimeClient, error) + FetchRuntime(ctx context.Context, in *v3.DiscoveryRequest, opts ...grpc.CallOption) (*v3.DiscoveryResponse, error) +} + +type runtimeDiscoveryServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewRuntimeDiscoveryServiceClient(cc grpc.ClientConnInterface) RuntimeDiscoveryServiceClient { + return &runtimeDiscoveryServiceClient{cc} +} + +func (c *runtimeDiscoveryServiceClient) StreamRuntime(ctx context.Context, opts ...grpc.CallOption) (RuntimeDiscoveryService_StreamRuntimeClient, error) { + stream, err := c.cc.NewStream(ctx, &_RuntimeDiscoveryService_serviceDesc.Streams[0], "/envoy.service.runtime.v3.RuntimeDiscoveryService/StreamRuntime", opts...) + if err != nil { + return nil, err + } + x := &runtimeDiscoveryServiceStreamRuntimeClient{stream} + return x, nil +} + +type RuntimeDiscoveryService_StreamRuntimeClient interface { + Send(*v3.DiscoveryRequest) error + Recv() (*v3.DiscoveryResponse, error) + grpc.ClientStream +} + +type runtimeDiscoveryServiceStreamRuntimeClient struct { + grpc.ClientStream +} + +func (x *runtimeDiscoveryServiceStreamRuntimeClient) Send(m *v3.DiscoveryRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *runtimeDiscoveryServiceStreamRuntimeClient) Recv() (*v3.DiscoveryResponse, error) { + m := new(v3.DiscoveryResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *runtimeDiscoveryServiceClient) DeltaRuntime(ctx context.Context, opts ...grpc.CallOption) (RuntimeDiscoveryService_DeltaRuntimeClient, error) { + stream, err := c.cc.NewStream(ctx, &_RuntimeDiscoveryService_serviceDesc.Streams[1], "/envoy.service.runtime.v3.RuntimeDiscoveryService/DeltaRuntime", opts...) + if err != nil { + return nil, err + } + x := &runtimeDiscoveryServiceDeltaRuntimeClient{stream} + return x, nil +} + +type RuntimeDiscoveryService_DeltaRuntimeClient interface { + Send(*v3.DeltaDiscoveryRequest) error + Recv() (*v3.DeltaDiscoveryResponse, error) + grpc.ClientStream +} + +type runtimeDiscoveryServiceDeltaRuntimeClient struct { + grpc.ClientStream +} + +func (x *runtimeDiscoveryServiceDeltaRuntimeClient) Send(m *v3.DeltaDiscoveryRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *runtimeDiscoveryServiceDeltaRuntimeClient) Recv() (*v3.DeltaDiscoveryResponse, error) { + m := new(v3.DeltaDiscoveryResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *runtimeDiscoveryServiceClient) FetchRuntime(ctx context.Context, in *v3.DiscoveryRequest, opts ...grpc.CallOption) (*v3.DiscoveryResponse, error) { + out := new(v3.DiscoveryResponse) + err := c.cc.Invoke(ctx, "/envoy.service.runtime.v3.RuntimeDiscoveryService/FetchRuntime", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RuntimeDiscoveryServiceServer is the server API for RuntimeDiscoveryService service. +type RuntimeDiscoveryServiceServer interface { + StreamRuntime(RuntimeDiscoveryService_StreamRuntimeServer) error + DeltaRuntime(RuntimeDiscoveryService_DeltaRuntimeServer) error + FetchRuntime(context.Context, *v3.DiscoveryRequest) (*v3.DiscoveryResponse, error) +} + +// UnimplementedRuntimeDiscoveryServiceServer can be embedded to have forward compatible implementations. +type UnimplementedRuntimeDiscoveryServiceServer struct { +} + +func (*UnimplementedRuntimeDiscoveryServiceServer) StreamRuntime(RuntimeDiscoveryService_StreamRuntimeServer) error { + return status.Errorf(codes.Unimplemented, "method StreamRuntime not implemented") +} +func (*UnimplementedRuntimeDiscoveryServiceServer) DeltaRuntime(RuntimeDiscoveryService_DeltaRuntimeServer) error { + return status.Errorf(codes.Unimplemented, "method DeltaRuntime not implemented") +} +func (*UnimplementedRuntimeDiscoveryServiceServer) FetchRuntime(context.Context, *v3.DiscoveryRequest) (*v3.DiscoveryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchRuntime not implemented") +} + +func RegisterRuntimeDiscoveryServiceServer(s *grpc.Server, srv RuntimeDiscoveryServiceServer) { + s.RegisterService(&_RuntimeDiscoveryService_serviceDesc, srv) +} + +func _RuntimeDiscoveryService_StreamRuntime_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(RuntimeDiscoveryServiceServer).StreamRuntime(&runtimeDiscoveryServiceStreamRuntimeServer{stream}) +} + +type RuntimeDiscoveryService_StreamRuntimeServer interface { + Send(*v3.DiscoveryResponse) error + Recv() (*v3.DiscoveryRequest, error) + grpc.ServerStream +} + +type runtimeDiscoveryServiceStreamRuntimeServer struct { + grpc.ServerStream +} + +func (x *runtimeDiscoveryServiceStreamRuntimeServer) Send(m *v3.DiscoveryResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *runtimeDiscoveryServiceStreamRuntimeServer) Recv() (*v3.DiscoveryRequest, error) { + m := new(v3.DiscoveryRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _RuntimeDiscoveryService_DeltaRuntime_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(RuntimeDiscoveryServiceServer).DeltaRuntime(&runtimeDiscoveryServiceDeltaRuntimeServer{stream}) +} + +type RuntimeDiscoveryService_DeltaRuntimeServer interface { + Send(*v3.DeltaDiscoveryResponse) error + Recv() (*v3.DeltaDiscoveryRequest, error) + grpc.ServerStream +} + +type runtimeDiscoveryServiceDeltaRuntimeServer struct { + grpc.ServerStream +} + +func (x *runtimeDiscoveryServiceDeltaRuntimeServer) Send(m *v3.DeltaDiscoveryResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *runtimeDiscoveryServiceDeltaRuntimeServer) Recv() (*v3.DeltaDiscoveryRequest, error) { + m := new(v3.DeltaDiscoveryRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _RuntimeDiscoveryService_FetchRuntime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v3.DiscoveryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RuntimeDiscoveryServiceServer).FetchRuntime(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/envoy.service.runtime.v3.RuntimeDiscoveryService/FetchRuntime", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RuntimeDiscoveryServiceServer).FetchRuntime(ctx, req.(*v3.DiscoveryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _RuntimeDiscoveryService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "envoy.service.runtime.v3.RuntimeDiscoveryService", + HandlerType: (*RuntimeDiscoveryServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "FetchRuntime", + Handler: _RuntimeDiscoveryService_FetchRuntime_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamRuntime", + Handler: _RuntimeDiscoveryService_StreamRuntime_Handler, + ServerStreams: true, + ClientStreams: true, + }, + { + StreamName: "DeltaRuntime", + Handler: _RuntimeDiscoveryService_DeltaRuntime_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "envoy/service/runtime/v3/rtds.proto", +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/runtime/v3/rtds.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/service/runtime/v3/rtds.pb.validate.go new file mode 100644 index 0000000000000..b8884c02c7489 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/runtime/v3/rtds.pb.validate.go @@ -0,0 +1,271 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/service/runtime/v3/rtds.proto + +package runtimev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RtdsDummy 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 *RtdsDummy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RtdsDummy 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 RtdsDummyMultiError, or nil +// if none found. +func (m *RtdsDummy) ValidateAll() error { + return m.validate(true) +} + +func (m *RtdsDummy) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return RtdsDummyMultiError(errors) + } + return nil +} + +// RtdsDummyMultiError is an error wrapping multiple validation errors returned +// by RtdsDummy.ValidateAll() if the designated constraints aren't met. +type RtdsDummyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RtdsDummyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RtdsDummyMultiError) AllErrors() []error { return m } + +// RtdsDummyValidationError is the validation error returned by +// RtdsDummy.Validate if the designated constraints aren't met. +type RtdsDummyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RtdsDummyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RtdsDummyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RtdsDummyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RtdsDummyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RtdsDummyValidationError) ErrorName() string { return "RtdsDummyValidationError" } + +// Error satisfies the builtin error interface +func (e RtdsDummyValidationError) 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 %sRtdsDummy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RtdsDummyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RtdsDummyValidationError{} + +// Validate checks the field values on Runtime 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 *Runtime) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Runtime 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 RuntimeMultiError, or nil if none found. +func (m *Runtime) ValidateAll() error { + return m.validate(true) +} + +func (m *Runtime) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetName()) < 1 { + err := RuntimeValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetLayer()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RuntimeValidationError{ + field: "Layer", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RuntimeValidationError{ + field: "Layer", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLayer()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RuntimeValidationError{ + field: "Layer", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RuntimeMultiError(errors) + } + return nil +} + +// RuntimeMultiError is an error wrapping multiple validation errors returned +// by Runtime.ValidateAll() if the designated constraints aren't met. +type RuntimeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RuntimeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RuntimeMultiError) AllErrors() []error { return m } + +// RuntimeValidationError is the validation error returned by Runtime.Validate +// if the designated constraints aren't met. +type RuntimeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RuntimeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RuntimeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RuntimeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RuntimeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RuntimeValidationError) ErrorName() string { return "RuntimeValidationError" } + +// Error satisfies the builtin error interface +func (e RuntimeValidationError) 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 %sRuntime.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RuntimeValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RuntimeValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/status/v3/csds.pb.go b/vendor/github.com/cilium/proxy/go/envoy/service/status/v3/csds.pb.go new file mode 100644 index 0000000000000..6ba3cf6a94eb2 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/status/v3/csds.pb.go @@ -0,0 +1,1116 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/service/status/v3/csds.proto + +package statusv3 + +import ( + context "context" + v32 "github.com/cilium/proxy/go/envoy/admin/v3" + _ "github.com/cilium/proxy/go/envoy/annotations" + v31 "github.com/cilium/proxy/go/envoy/config/core/v3" + v3 "github.com/cilium/proxy/go/envoy/type/matcher/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Status of a config from a management server view. +type ConfigStatus int32 + +const ( + // Status info is not available/unknown. + ConfigStatus_UNKNOWN ConfigStatus = 0 + // Management server has sent the config to client and received ACK. + ConfigStatus_SYNCED ConfigStatus = 1 + // Config is not sent. + ConfigStatus_NOT_SENT ConfigStatus = 2 + // Management server has sent the config to client but hasn’t received + // ACK/NACK. + ConfigStatus_STALE ConfigStatus = 3 + // Management server has sent the config to client but received NACK. The + // attached config dump will be the latest config (the rejected one), since + // it is the persisted version in the management server. + ConfigStatus_ERROR ConfigStatus = 4 +) + +// Enum value maps for ConfigStatus. +var ( + ConfigStatus_name = map[int32]string{ + 0: "UNKNOWN", + 1: "SYNCED", + 2: "NOT_SENT", + 3: "STALE", + 4: "ERROR", + } + ConfigStatus_value = map[string]int32{ + "UNKNOWN": 0, + "SYNCED": 1, + "NOT_SENT": 2, + "STALE": 3, + "ERROR": 4, + } +) + +func (x ConfigStatus) Enum() *ConfigStatus { + p := new(ConfigStatus) + *p = x + return p +} + +func (x ConfigStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ConfigStatus) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_service_status_v3_csds_proto_enumTypes[0].Descriptor() +} + +func (ConfigStatus) Type() protoreflect.EnumType { + return &file_envoy_service_status_v3_csds_proto_enumTypes[0] +} + +func (x ConfigStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ConfigStatus.Descriptor instead. +func (ConfigStatus) EnumDescriptor() ([]byte, []int) { + return file_envoy_service_status_v3_csds_proto_rawDescGZIP(), []int{0} +} + +// Config status from a client-side view. +type ClientConfigStatus int32 + +const ( + // Config status is not available/unknown. + ClientConfigStatus_CLIENT_UNKNOWN ClientConfigStatus = 0 + // Client requested the config but hasn't received any config from management + // server yet. + ClientConfigStatus_CLIENT_REQUESTED ClientConfigStatus = 1 + // Client received the config and replied with ACK. + ClientConfigStatus_CLIENT_ACKED ClientConfigStatus = 2 + // Client received the config and replied with NACK. Notably, the attached + // config dump is not the NACKed version, but the most recent accepted one. If + // no config is accepted yet, the attached config dump will be empty. + ClientConfigStatus_CLIENT_NACKED ClientConfigStatus = 3 +) + +// Enum value maps for ClientConfigStatus. +var ( + ClientConfigStatus_name = map[int32]string{ + 0: "CLIENT_UNKNOWN", + 1: "CLIENT_REQUESTED", + 2: "CLIENT_ACKED", + 3: "CLIENT_NACKED", + } + ClientConfigStatus_value = map[string]int32{ + "CLIENT_UNKNOWN": 0, + "CLIENT_REQUESTED": 1, + "CLIENT_ACKED": 2, + "CLIENT_NACKED": 3, + } +) + +func (x ClientConfigStatus) Enum() *ClientConfigStatus { + p := new(ClientConfigStatus) + *p = x + return p +} + +func (x ClientConfigStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ClientConfigStatus) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_service_status_v3_csds_proto_enumTypes[1].Descriptor() +} + +func (ClientConfigStatus) Type() protoreflect.EnumType { + return &file_envoy_service_status_v3_csds_proto_enumTypes[1] +} + +func (x ClientConfigStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ClientConfigStatus.Descriptor instead. +func (ClientConfigStatus) EnumDescriptor() ([]byte, []int) { + return file_envoy_service_status_v3_csds_proto_rawDescGZIP(), []int{1} +} + +// Request for client status of clients identified by a list of NodeMatchers. +type ClientStatusRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Management server can use these match criteria to identify clients. + // The match follows OR semantics. + NodeMatchers []*v3.NodeMatcher `protobuf:"bytes,1,rep,name=node_matchers,json=nodeMatchers,proto3" json:"node_matchers,omitempty"` + // The node making the csds request. + Node *v31.Node `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty"` +} + +func (x *ClientStatusRequest) Reset() { + *x = ClientStatusRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_status_v3_csds_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClientStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientStatusRequest) ProtoMessage() {} + +func (x *ClientStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_status_v3_csds_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClientStatusRequest.ProtoReflect.Descriptor instead. +func (*ClientStatusRequest) Descriptor() ([]byte, []int) { + return file_envoy_service_status_v3_csds_proto_rawDescGZIP(), []int{0} +} + +func (x *ClientStatusRequest) GetNodeMatchers() []*v3.NodeMatcher { + if x != nil { + return x.NodeMatchers + } + return nil +} + +func (x *ClientStatusRequest) GetNode() *v31.Node { + if x != nil { + return x.Node + } + return nil +} + +// Detailed config (per xDS) with status. +// [#next-free-field: 8] +type PerXdsConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Config status generated by management servers. Will not be present if the + // CSDS server is an xDS client. + Status ConfigStatus `protobuf:"varint,1,opt,name=status,proto3,enum=envoy.service.status.v3.ConfigStatus" json:"status,omitempty"` + // Client config status is populated by xDS clients. Will not be present if + // the CSDS server is an xDS server. No matter what the client config status + // is, xDS clients should always dump the most recent accepted xDS config. + // + // .. attention:: + // + // This field is deprecated. Use :ref:`ClientResourceStatus + // ` for per-resource + // config status instead. + // + // Deprecated: Do not use. + ClientStatus ClientConfigStatus `protobuf:"varint,7,opt,name=client_status,json=clientStatus,proto3,enum=envoy.service.status.v3.ClientConfigStatus" json:"client_status,omitempty"` + // Types that are assignable to PerXdsConfig: + // + // *PerXdsConfig_ListenerConfig + // *PerXdsConfig_ClusterConfig + // *PerXdsConfig_RouteConfig + // *PerXdsConfig_ScopedRouteConfig + // *PerXdsConfig_EndpointConfig + PerXdsConfig isPerXdsConfig_PerXdsConfig `protobuf_oneof:"per_xds_config"` +} + +func (x *PerXdsConfig) Reset() { + *x = PerXdsConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_status_v3_csds_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PerXdsConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PerXdsConfig) ProtoMessage() {} + +func (x *PerXdsConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_status_v3_csds_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PerXdsConfig.ProtoReflect.Descriptor instead. +func (*PerXdsConfig) Descriptor() ([]byte, []int) { + return file_envoy_service_status_v3_csds_proto_rawDescGZIP(), []int{1} +} + +func (x *PerXdsConfig) GetStatus() ConfigStatus { + if x != nil { + return x.Status + } + return ConfigStatus_UNKNOWN +} + +// Deprecated: Do not use. +func (x *PerXdsConfig) GetClientStatus() ClientConfigStatus { + if x != nil { + return x.ClientStatus + } + return ClientConfigStatus_CLIENT_UNKNOWN +} + +func (m *PerXdsConfig) GetPerXdsConfig() isPerXdsConfig_PerXdsConfig { + if m != nil { + return m.PerXdsConfig + } + return nil +} + +func (x *PerXdsConfig) GetListenerConfig() *v32.ListenersConfigDump { + if x, ok := x.GetPerXdsConfig().(*PerXdsConfig_ListenerConfig); ok { + return x.ListenerConfig + } + return nil +} + +func (x *PerXdsConfig) GetClusterConfig() *v32.ClustersConfigDump { + if x, ok := x.GetPerXdsConfig().(*PerXdsConfig_ClusterConfig); ok { + return x.ClusterConfig + } + return nil +} + +func (x *PerXdsConfig) GetRouteConfig() *v32.RoutesConfigDump { + if x, ok := x.GetPerXdsConfig().(*PerXdsConfig_RouteConfig); ok { + return x.RouteConfig + } + return nil +} + +func (x *PerXdsConfig) GetScopedRouteConfig() *v32.ScopedRoutesConfigDump { + if x, ok := x.GetPerXdsConfig().(*PerXdsConfig_ScopedRouteConfig); ok { + return x.ScopedRouteConfig + } + return nil +} + +func (x *PerXdsConfig) GetEndpointConfig() *v32.EndpointsConfigDump { + if x, ok := x.GetPerXdsConfig().(*PerXdsConfig_EndpointConfig); ok { + return x.EndpointConfig + } + return nil +} + +type isPerXdsConfig_PerXdsConfig interface { + isPerXdsConfig_PerXdsConfig() +} + +type PerXdsConfig_ListenerConfig struct { + ListenerConfig *v32.ListenersConfigDump `protobuf:"bytes,2,opt,name=listener_config,json=listenerConfig,proto3,oneof"` +} + +type PerXdsConfig_ClusterConfig struct { + ClusterConfig *v32.ClustersConfigDump `protobuf:"bytes,3,opt,name=cluster_config,json=clusterConfig,proto3,oneof"` +} + +type PerXdsConfig_RouteConfig struct { + RouteConfig *v32.RoutesConfigDump `protobuf:"bytes,4,opt,name=route_config,json=routeConfig,proto3,oneof"` +} + +type PerXdsConfig_ScopedRouteConfig struct { + ScopedRouteConfig *v32.ScopedRoutesConfigDump `protobuf:"bytes,5,opt,name=scoped_route_config,json=scopedRouteConfig,proto3,oneof"` +} + +type PerXdsConfig_EndpointConfig struct { + EndpointConfig *v32.EndpointsConfigDump `protobuf:"bytes,6,opt,name=endpoint_config,json=endpointConfig,proto3,oneof"` +} + +func (*PerXdsConfig_ListenerConfig) isPerXdsConfig_PerXdsConfig() {} + +func (*PerXdsConfig_ClusterConfig) isPerXdsConfig_PerXdsConfig() {} + +func (*PerXdsConfig_RouteConfig) isPerXdsConfig_PerXdsConfig() {} + +func (*PerXdsConfig_ScopedRouteConfig) isPerXdsConfig_PerXdsConfig() {} + +func (*PerXdsConfig_EndpointConfig) isPerXdsConfig_PerXdsConfig() {} + +// All xds configs for a particular client. +type ClientConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Node for a particular client. + Node *v31.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + // This field is deprecated in favor of generic_xds_configs which is + // much simpler and uniform in structure. + // + // Deprecated: Do not use. + XdsConfig []*PerXdsConfig `protobuf:"bytes,2,rep,name=xds_config,json=xdsConfig,proto3" json:"xds_config,omitempty"` + // Represents generic xDS config and the exact config structure depends on + // the type URL (like Cluster if it is CDS) + GenericXdsConfigs []*ClientConfig_GenericXdsConfig `protobuf:"bytes,3,rep,name=generic_xds_configs,json=genericXdsConfigs,proto3" json:"generic_xds_configs,omitempty"` +} + +func (x *ClientConfig) Reset() { + *x = ClientConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_status_v3_csds_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClientConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientConfig) ProtoMessage() {} + +func (x *ClientConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_status_v3_csds_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead. +func (*ClientConfig) Descriptor() ([]byte, []int) { + return file_envoy_service_status_v3_csds_proto_rawDescGZIP(), []int{2} +} + +func (x *ClientConfig) GetNode() *v31.Node { + if x != nil { + return x.Node + } + return nil +} + +// Deprecated: Do not use. +func (x *ClientConfig) GetXdsConfig() []*PerXdsConfig { + if x != nil { + return x.XdsConfig + } + return nil +} + +func (x *ClientConfig) GetGenericXdsConfigs() []*ClientConfig_GenericXdsConfig { + if x != nil { + return x.GenericXdsConfigs + } + return nil +} + +type ClientStatusResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Client configs for the clients specified in the ClientStatusRequest. + Config []*ClientConfig `protobuf:"bytes,1,rep,name=config,proto3" json:"config,omitempty"` +} + +func (x *ClientStatusResponse) Reset() { + *x = ClientStatusResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_status_v3_csds_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClientStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientStatusResponse) ProtoMessage() {} + +func (x *ClientStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_status_v3_csds_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClientStatusResponse.ProtoReflect.Descriptor instead. +func (*ClientStatusResponse) Descriptor() ([]byte, []int) { + return file_envoy_service_status_v3_csds_proto_rawDescGZIP(), []int{3} +} + +func (x *ClientStatusResponse) GetConfig() []*ClientConfig { + if x != nil { + return x.Config + } + return nil +} + +// GenericXdsConfig is used to specify the config status and the dump +// of any xDS resource identified by their type URL. It is the generalized +// version of the now deprecated ListenersConfigDump, ClustersConfigDump etc +// [#next-free-field: 10] +type ClientConfig_GenericXdsConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Type_url represents the fully qualified name of xDS resource type + // like envoy.v3.Cluster, envoy.v3.ClusterLoadAssignment etc. + TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` + // Name of the xDS resource + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // This is the :ref:`version_info ` + // in the last processed xDS discovery response. If there are only + // static bootstrap listeners, this field will be "" + VersionInfo string `protobuf:"bytes,3,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` + // The xDS resource config. Actual content depends on the type + XdsConfig *anypb.Any `protobuf:"bytes,4,opt,name=xds_config,json=xdsConfig,proto3" json:"xds_config,omitempty"` + // Timestamp when the xDS resource was last updated + LastUpdated *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` + // Per xDS resource config status. It is generated by management servers. + // It will not be present if the CSDS server is an xDS client. + ConfigStatus ConfigStatus `protobuf:"varint,6,opt,name=config_status,json=configStatus,proto3,enum=envoy.service.status.v3.ConfigStatus" json:"config_status,omitempty"` + // Per xDS resource status from the view of a xDS client + ClientStatus v32.ClientResourceStatus `protobuf:"varint,7,opt,name=client_status,json=clientStatus,proto3,enum=envoy.admin.v3.ClientResourceStatus" json:"client_status,omitempty"` + // Set if the last update failed, cleared after the next successful + // update. The *error_state* field contains the rejected version of + // this particular resource along with the reason and timestamp. For + // successfully updated or acknowledged resource, this field should + // be empty. + // [#not-implemented-hide:] + ErrorState *v32.UpdateFailureState `protobuf:"bytes,8,opt,name=error_state,json=errorState,proto3" json:"error_state,omitempty"` + // Is static resource is true if it is specified in the config supplied + // through the file at the startup. + IsStaticResource bool `protobuf:"varint,9,opt,name=is_static_resource,json=isStaticResource,proto3" json:"is_static_resource,omitempty"` +} + +func (x *ClientConfig_GenericXdsConfig) Reset() { + *x = ClientConfig_GenericXdsConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_status_v3_csds_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClientConfig_GenericXdsConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientConfig_GenericXdsConfig) ProtoMessage() {} + +func (x *ClientConfig_GenericXdsConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_status_v3_csds_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClientConfig_GenericXdsConfig.ProtoReflect.Descriptor instead. +func (*ClientConfig_GenericXdsConfig) Descriptor() ([]byte, []int) { + return file_envoy_service_status_v3_csds_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *ClientConfig_GenericXdsConfig) GetTypeUrl() string { + if x != nil { + return x.TypeUrl + } + return "" +} + +func (x *ClientConfig_GenericXdsConfig) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ClientConfig_GenericXdsConfig) GetVersionInfo() string { + if x != nil { + return x.VersionInfo + } + return "" +} + +func (x *ClientConfig_GenericXdsConfig) GetXdsConfig() *anypb.Any { + if x != nil { + return x.XdsConfig + } + return nil +} + +func (x *ClientConfig_GenericXdsConfig) GetLastUpdated() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdated + } + return nil +} + +func (x *ClientConfig_GenericXdsConfig) GetConfigStatus() ConfigStatus { + if x != nil { + return x.ConfigStatus + } + return ConfigStatus_UNKNOWN +} + +func (x *ClientConfig_GenericXdsConfig) GetClientStatus() v32.ClientResourceStatus { + if x != nil { + return x.ClientStatus + } + return v32.ClientResourceStatus_UNKNOWN +} + +func (x *ClientConfig_GenericXdsConfig) GetErrorState() *v32.UpdateFailureState { + if x != nil { + return x.ErrorState + } + return nil +} + +func (x *ClientConfig_GenericXdsConfig) GetIsStaticResource() bool { + if x != nil { + return x.IsStaticResource + } + return false +} + +var File_envoy_service_status_v3_csds_proto protoreflect.FileDescriptor + +var file_envoy_service_status_v3_csds_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x73, 0x64, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x27, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 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, 0x1a, 0x1f, 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, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc2, 0x01, 0x0a, 0x13, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x47, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0c, 0x6e, + 0x6f, 0x64, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x04, 0x6e, + 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, + 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x3a, 0x32, 0x9a, 0xc5, 0x88, + 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0xf9, 0x04, 0x0a, 0x0c, 0x50, 0x65, 0x72, 0x58, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x5d, 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, + 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, + 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4e, + 0x0a, 0x0f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0e, + 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4b, + 0x0a, 0x0e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x0c, 0x72, + 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, + 0x75, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x58, 0x0a, 0x13, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, + 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x11, 0x73, 0x63, 0x6f, 0x70, 0x65, + 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x0f, + 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0e, 0x65, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x2b, 0x9a, 0xc5, + 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x65, 0x72, + 0x58, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x10, 0x0a, 0x0e, 0x70, 0x65, 0x72, + 0x5f, 0x78, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8b, 0x06, 0x0a, 0x0c, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x04, + 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x51, 0x0a, 0x0a, + 0x78, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x58, 0x64, + 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0b, 0x18, 0x01, 0x92, 0xc7, 0x86, 0xd8, 0x04, + 0x03, 0x33, 0x2e, 0x30, 0x52, 0x09, 0x78, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x66, 0x0a, 0x13, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x78, 0x64, 0x73, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x58, 0x64, 0x73, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x58, 0x64, 0x73, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0xe2, 0x03, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x69, 0x63, 0x58, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x19, 0x0a, 0x08, + 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x33, + 0x0a, 0x0a, 0x78, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, + 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, 0x09, 0x78, 0x64, 0x73, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x18, 0x05, 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, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x12, 0x4a, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x49, + 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x43, 0x0a, 0x0b, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2c, + 0x0a, 0x12, 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x2b, 0x9a, 0xc5, + 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8a, 0x01, 0x0a, 0x14, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, + 0x32, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x4b, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x59, 0x4e, 0x43, 0x45, 0x44, 0x10, 0x01, 0x12, + 0x0c, 0x0a, 0x08, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x09, 0x0a, + 0x05, 0x53, 0x54, 0x41, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, + 0x52, 0x10, 0x04, 0x2a, 0x63, 0x0a, 0x12, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4c, 0x49, + 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, + 0x10, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x45, + 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x43, + 0x4b, 0x45, 0x44, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, + 0x4e, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x03, 0x32, 0xb8, 0x02, 0x0a, 0x1c, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x77, 0x0a, 0x12, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, + 0x30, 0x01, 0x12, 0x9e, 0x01, 0x0a, 0x11, 0x46, 0x65, 0x74, 0x63, 0x68, 0x43, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, + 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, + 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x1b, 0x2f, + 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, + 0x3a, 0x01, 0x2a, 0x42, 0x88, 0x01, 0x0a, 0x25, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x43, + 0x73, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x76, 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_service_status_v3_csds_proto_rawDescOnce sync.Once + file_envoy_service_status_v3_csds_proto_rawDescData = file_envoy_service_status_v3_csds_proto_rawDesc +) + +func file_envoy_service_status_v3_csds_proto_rawDescGZIP() []byte { + file_envoy_service_status_v3_csds_proto_rawDescOnce.Do(func() { + file_envoy_service_status_v3_csds_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_status_v3_csds_proto_rawDescData) + }) + return file_envoy_service_status_v3_csds_proto_rawDescData +} + +var file_envoy_service_status_v3_csds_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_envoy_service_status_v3_csds_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_envoy_service_status_v3_csds_proto_goTypes = []interface{}{ + (ConfigStatus)(0), // 0: envoy.service.status.v3.ConfigStatus + (ClientConfigStatus)(0), // 1: envoy.service.status.v3.ClientConfigStatus + (*ClientStatusRequest)(nil), // 2: envoy.service.status.v3.ClientStatusRequest + (*PerXdsConfig)(nil), // 3: envoy.service.status.v3.PerXdsConfig + (*ClientConfig)(nil), // 4: envoy.service.status.v3.ClientConfig + (*ClientStatusResponse)(nil), // 5: envoy.service.status.v3.ClientStatusResponse + (*ClientConfig_GenericXdsConfig)(nil), // 6: envoy.service.status.v3.ClientConfig.GenericXdsConfig + (*v3.NodeMatcher)(nil), // 7: envoy.type.matcher.v3.NodeMatcher + (*v31.Node)(nil), // 8: envoy.config.core.v3.Node + (*v32.ListenersConfigDump)(nil), // 9: envoy.admin.v3.ListenersConfigDump + (*v32.ClustersConfigDump)(nil), // 10: envoy.admin.v3.ClustersConfigDump + (*v32.RoutesConfigDump)(nil), // 11: envoy.admin.v3.RoutesConfigDump + (*v32.ScopedRoutesConfigDump)(nil), // 12: envoy.admin.v3.ScopedRoutesConfigDump + (*v32.EndpointsConfigDump)(nil), // 13: envoy.admin.v3.EndpointsConfigDump + (*anypb.Any)(nil), // 14: google.protobuf.Any + (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp + (v32.ClientResourceStatus)(0), // 16: envoy.admin.v3.ClientResourceStatus + (*v32.UpdateFailureState)(nil), // 17: envoy.admin.v3.UpdateFailureState +} +var file_envoy_service_status_v3_csds_proto_depIdxs = []int32{ + 7, // 0: envoy.service.status.v3.ClientStatusRequest.node_matchers:type_name -> envoy.type.matcher.v3.NodeMatcher + 8, // 1: envoy.service.status.v3.ClientStatusRequest.node:type_name -> envoy.config.core.v3.Node + 0, // 2: envoy.service.status.v3.PerXdsConfig.status:type_name -> envoy.service.status.v3.ConfigStatus + 1, // 3: envoy.service.status.v3.PerXdsConfig.client_status:type_name -> envoy.service.status.v3.ClientConfigStatus + 9, // 4: envoy.service.status.v3.PerXdsConfig.listener_config:type_name -> envoy.admin.v3.ListenersConfigDump + 10, // 5: envoy.service.status.v3.PerXdsConfig.cluster_config:type_name -> envoy.admin.v3.ClustersConfigDump + 11, // 6: envoy.service.status.v3.PerXdsConfig.route_config:type_name -> envoy.admin.v3.RoutesConfigDump + 12, // 7: envoy.service.status.v3.PerXdsConfig.scoped_route_config:type_name -> envoy.admin.v3.ScopedRoutesConfigDump + 13, // 8: envoy.service.status.v3.PerXdsConfig.endpoint_config:type_name -> envoy.admin.v3.EndpointsConfigDump + 8, // 9: envoy.service.status.v3.ClientConfig.node:type_name -> envoy.config.core.v3.Node + 3, // 10: envoy.service.status.v3.ClientConfig.xds_config:type_name -> envoy.service.status.v3.PerXdsConfig + 6, // 11: envoy.service.status.v3.ClientConfig.generic_xds_configs:type_name -> envoy.service.status.v3.ClientConfig.GenericXdsConfig + 4, // 12: envoy.service.status.v3.ClientStatusResponse.config:type_name -> envoy.service.status.v3.ClientConfig + 14, // 13: envoy.service.status.v3.ClientConfig.GenericXdsConfig.xds_config:type_name -> google.protobuf.Any + 15, // 14: envoy.service.status.v3.ClientConfig.GenericXdsConfig.last_updated:type_name -> google.protobuf.Timestamp + 0, // 15: envoy.service.status.v3.ClientConfig.GenericXdsConfig.config_status:type_name -> envoy.service.status.v3.ConfigStatus + 16, // 16: envoy.service.status.v3.ClientConfig.GenericXdsConfig.client_status:type_name -> envoy.admin.v3.ClientResourceStatus + 17, // 17: envoy.service.status.v3.ClientConfig.GenericXdsConfig.error_state:type_name -> envoy.admin.v3.UpdateFailureState + 2, // 18: envoy.service.status.v3.ClientStatusDiscoveryService.StreamClientStatus:input_type -> envoy.service.status.v3.ClientStatusRequest + 2, // 19: envoy.service.status.v3.ClientStatusDiscoveryService.FetchClientStatus:input_type -> envoy.service.status.v3.ClientStatusRequest + 5, // 20: envoy.service.status.v3.ClientStatusDiscoveryService.StreamClientStatus:output_type -> envoy.service.status.v3.ClientStatusResponse + 5, // 21: envoy.service.status.v3.ClientStatusDiscoveryService.FetchClientStatus:output_type -> envoy.service.status.v3.ClientStatusResponse + 20, // [20:22] is the sub-list for method output_type + 18, // [18:20] is the sub-list for method input_type + 18, // [18:18] is the sub-list for extension type_name + 18, // [18:18] is the sub-list for extension extendee + 0, // [0:18] is the sub-list for field type_name +} + +func init() { file_envoy_service_status_v3_csds_proto_init() } +func file_envoy_service_status_v3_csds_proto_init() { + if File_envoy_service_status_v3_csds_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_service_status_v3_csds_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClientStatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_status_v3_csds_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PerXdsConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_status_v3_csds_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClientConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_status_v3_csds_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClientStatusResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_status_v3_csds_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClientConfig_GenericXdsConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_service_status_v3_csds_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*PerXdsConfig_ListenerConfig)(nil), + (*PerXdsConfig_ClusterConfig)(nil), + (*PerXdsConfig_RouteConfig)(nil), + (*PerXdsConfig_ScopedRouteConfig)(nil), + (*PerXdsConfig_EndpointConfig)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_service_status_v3_csds_proto_rawDesc, + NumEnums: 2, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_envoy_service_status_v3_csds_proto_goTypes, + DependencyIndexes: file_envoy_service_status_v3_csds_proto_depIdxs, + EnumInfos: file_envoy_service_status_v3_csds_proto_enumTypes, + MessageInfos: file_envoy_service_status_v3_csds_proto_msgTypes, + }.Build() + File_envoy_service_status_v3_csds_proto = out.File + file_envoy_service_status_v3_csds_proto_rawDesc = nil + file_envoy_service_status_v3_csds_proto_goTypes = nil + file_envoy_service_status_v3_csds_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// ClientStatusDiscoveryServiceClient is the client API for ClientStatusDiscoveryService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ClientStatusDiscoveryServiceClient interface { + StreamClientStatus(ctx context.Context, opts ...grpc.CallOption) (ClientStatusDiscoveryService_StreamClientStatusClient, error) + FetchClientStatus(ctx context.Context, in *ClientStatusRequest, opts ...grpc.CallOption) (*ClientStatusResponse, error) +} + +type clientStatusDiscoveryServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewClientStatusDiscoveryServiceClient(cc grpc.ClientConnInterface) ClientStatusDiscoveryServiceClient { + return &clientStatusDiscoveryServiceClient{cc} +} + +func (c *clientStatusDiscoveryServiceClient) StreamClientStatus(ctx context.Context, opts ...grpc.CallOption) (ClientStatusDiscoveryService_StreamClientStatusClient, error) { + stream, err := c.cc.NewStream(ctx, &_ClientStatusDiscoveryService_serviceDesc.Streams[0], "/envoy.service.status.v3.ClientStatusDiscoveryService/StreamClientStatus", opts...) + if err != nil { + return nil, err + } + x := &clientStatusDiscoveryServiceStreamClientStatusClient{stream} + return x, nil +} + +type ClientStatusDiscoveryService_StreamClientStatusClient interface { + Send(*ClientStatusRequest) error + Recv() (*ClientStatusResponse, error) + grpc.ClientStream +} + +type clientStatusDiscoveryServiceStreamClientStatusClient struct { + grpc.ClientStream +} + +func (x *clientStatusDiscoveryServiceStreamClientStatusClient) Send(m *ClientStatusRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *clientStatusDiscoveryServiceStreamClientStatusClient) Recv() (*ClientStatusResponse, error) { + m := new(ClientStatusResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *clientStatusDiscoveryServiceClient) FetchClientStatus(ctx context.Context, in *ClientStatusRequest, opts ...grpc.CallOption) (*ClientStatusResponse, error) { + out := new(ClientStatusResponse) + err := c.cc.Invoke(ctx, "/envoy.service.status.v3.ClientStatusDiscoveryService/FetchClientStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ClientStatusDiscoveryServiceServer is the server API for ClientStatusDiscoveryService service. +type ClientStatusDiscoveryServiceServer interface { + StreamClientStatus(ClientStatusDiscoveryService_StreamClientStatusServer) error + FetchClientStatus(context.Context, *ClientStatusRequest) (*ClientStatusResponse, error) +} + +// UnimplementedClientStatusDiscoveryServiceServer can be embedded to have forward compatible implementations. +type UnimplementedClientStatusDiscoveryServiceServer struct { +} + +func (*UnimplementedClientStatusDiscoveryServiceServer) StreamClientStatus(ClientStatusDiscoveryService_StreamClientStatusServer) error { + return status.Errorf(codes.Unimplemented, "method StreamClientStatus not implemented") +} +func (*UnimplementedClientStatusDiscoveryServiceServer) FetchClientStatus(context.Context, *ClientStatusRequest) (*ClientStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchClientStatus not implemented") +} + +func RegisterClientStatusDiscoveryServiceServer(s *grpc.Server, srv ClientStatusDiscoveryServiceServer) { + s.RegisterService(&_ClientStatusDiscoveryService_serviceDesc, srv) +} + +func _ClientStatusDiscoveryService_StreamClientStatus_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(ClientStatusDiscoveryServiceServer).StreamClientStatus(&clientStatusDiscoveryServiceStreamClientStatusServer{stream}) +} + +type ClientStatusDiscoveryService_StreamClientStatusServer interface { + Send(*ClientStatusResponse) error + Recv() (*ClientStatusRequest, error) + grpc.ServerStream +} + +type clientStatusDiscoveryServiceStreamClientStatusServer struct { + grpc.ServerStream +} + +func (x *clientStatusDiscoveryServiceStreamClientStatusServer) Send(m *ClientStatusResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *clientStatusDiscoveryServiceStreamClientStatusServer) Recv() (*ClientStatusRequest, error) { + m := new(ClientStatusRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _ClientStatusDiscoveryService_FetchClientStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ClientStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClientStatusDiscoveryServiceServer).FetchClientStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/envoy.service.status.v3.ClientStatusDiscoveryService/FetchClientStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClientStatusDiscoveryServiceServer).FetchClientStatus(ctx, req.(*ClientStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ClientStatusDiscoveryService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "envoy.service.status.v3.ClientStatusDiscoveryService", + HandlerType: (*ClientStatusDiscoveryServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "FetchClientStatus", + Handler: _ClientStatusDiscoveryService_FetchClientStatus_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamClientStatus", + Handler: _ClientStatusDiscoveryService_StreamClientStatus_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "envoy/service/status/v3/csds.proto", +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/status/v3/csds.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/service/status/v3/csds.pb.validate.go new file mode 100644 index 0000000000000..a42492726958b --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/status/v3/csds.pb.validate.go @@ -0,0 +1,996 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/service/status/v3/csds.proto + +package statusv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" + + v3 "github.com/cilium/proxy/go/envoy/admin/v3" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort + + _ = v3.ClientResourceStatus(0) +) + +// Validate checks the field values on ClientStatusRequest 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 *ClientStatusRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClientStatusRequest 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 +// ClientStatusRequestMultiError, or nil if none found. +func (m *ClientStatusRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ClientStatusRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetNodeMatchers() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientStatusRequestValidationError{ + field: fmt.Sprintf("NodeMatchers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientStatusRequestValidationError{ + field: fmt.Sprintf("NodeMatchers[%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 ClientStatusRequestValidationError{ + field: fmt.Sprintf("NodeMatchers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientStatusRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientStatusRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClientStatusRequestValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ClientStatusRequestMultiError(errors) + } + return nil +} + +// ClientStatusRequestMultiError is an error wrapping multiple validation +// errors returned by ClientStatusRequest.ValidateAll() if the designated +// constraints aren't met. +type ClientStatusRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClientStatusRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClientStatusRequestMultiError) AllErrors() []error { return m } + +// ClientStatusRequestValidationError is the validation error returned by +// ClientStatusRequest.Validate if the designated constraints aren't met. +type ClientStatusRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ClientStatusRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ClientStatusRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ClientStatusRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ClientStatusRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ClientStatusRequestValidationError) ErrorName() string { + return "ClientStatusRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ClientStatusRequestValidationError) 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 %sClientStatusRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ClientStatusRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ClientStatusRequestValidationError{} + +// Validate checks the field values on PerXdsConfig 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 *PerXdsConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PerXdsConfig 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 PerXdsConfigMultiError, or +// nil if none found. +func (m *PerXdsConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *PerXdsConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Status + + // no validation rules for ClientStatus + + switch m.PerXdsConfig.(type) { + + case *PerXdsConfig_ListenerConfig: + + if all { + switch v := interface{}(m.GetListenerConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "ListenerConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "ListenerConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetListenerConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PerXdsConfigValidationError{ + field: "ListenerConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *PerXdsConfig_ClusterConfig: + + if all { + switch v := interface{}(m.GetClusterConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "ClusterConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "ClusterConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetClusterConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PerXdsConfigValidationError{ + field: "ClusterConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *PerXdsConfig_RouteConfig: + + if all { + switch v := interface{}(m.GetRouteConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PerXdsConfigValidationError{ + field: "RouteConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *PerXdsConfig_ScopedRouteConfig: + + if all { + switch v := interface{}(m.GetScopedRouteConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "ScopedRouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "ScopedRouteConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetScopedRouteConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PerXdsConfigValidationError{ + field: "ScopedRouteConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *PerXdsConfig_EndpointConfig: + + if all { + switch v := interface{}(m.GetEndpointConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "EndpointConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PerXdsConfigValidationError{ + field: "EndpointConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEndpointConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PerXdsConfigValidationError{ + field: "EndpointConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return PerXdsConfigMultiError(errors) + } + return nil +} + +// PerXdsConfigMultiError is an error wrapping multiple validation errors +// returned by PerXdsConfig.ValidateAll() if the designated constraints aren't met. +type PerXdsConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PerXdsConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PerXdsConfigMultiError) AllErrors() []error { return m } + +// PerXdsConfigValidationError is the validation error returned by +// PerXdsConfig.Validate if the designated constraints aren't met. +type PerXdsConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PerXdsConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PerXdsConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PerXdsConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PerXdsConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PerXdsConfigValidationError) ErrorName() string { return "PerXdsConfigValidationError" } + +// Error satisfies the builtin error interface +func (e PerXdsConfigValidationError) 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 %sPerXdsConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PerXdsConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PerXdsConfigValidationError{} + +// Validate checks the field values on ClientConfig 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 *ClientConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClientConfig 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 ClientConfigMultiError, or +// nil if none found. +func (m *ClientConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *ClientConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientConfigValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientConfigValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClientConfigValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetXdsConfig() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientConfigValidationError{ + field: fmt.Sprintf("XdsConfig[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientConfigValidationError{ + field: fmt.Sprintf("XdsConfig[%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 ClientConfigValidationError{ + field: fmt.Sprintf("XdsConfig[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetGenericXdsConfigs() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientConfigValidationError{ + field: fmt.Sprintf("GenericXdsConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientConfigValidationError{ + field: fmt.Sprintf("GenericXdsConfigs[%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 ClientConfigValidationError{ + field: fmt.Sprintf("GenericXdsConfigs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ClientConfigMultiError(errors) + } + return nil +} + +// ClientConfigMultiError is an error wrapping multiple validation errors +// returned by ClientConfig.ValidateAll() if the designated constraints aren't met. +type ClientConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClientConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClientConfigMultiError) AllErrors() []error { return m } + +// ClientConfigValidationError is the validation error returned by +// ClientConfig.Validate if the designated constraints aren't met. +type ClientConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ClientConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ClientConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ClientConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ClientConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ClientConfigValidationError) ErrorName() string { return "ClientConfigValidationError" } + +// Error satisfies the builtin error interface +func (e ClientConfigValidationError) 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 %sClientConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ClientConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ClientConfigValidationError{} + +// Validate checks the field values on ClientStatusResponse 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 *ClientStatusResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClientStatusResponse 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 +// ClientStatusResponseMultiError, or nil if none found. +func (m *ClientStatusResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ClientStatusResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetConfig() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientStatusResponseValidationError{ + field: fmt.Sprintf("Config[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientStatusResponseValidationError{ + field: fmt.Sprintf("Config[%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 ClientStatusResponseValidationError{ + field: fmt.Sprintf("Config[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ClientStatusResponseMultiError(errors) + } + return nil +} + +// ClientStatusResponseMultiError is an error wrapping multiple validation +// errors returned by ClientStatusResponse.ValidateAll() if the designated +// constraints aren't met. +type ClientStatusResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClientStatusResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClientStatusResponseMultiError) AllErrors() []error { return m } + +// ClientStatusResponseValidationError is the validation error returned by +// ClientStatusResponse.Validate if the designated constraints aren't met. +type ClientStatusResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ClientStatusResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ClientStatusResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ClientStatusResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ClientStatusResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ClientStatusResponseValidationError) ErrorName() string { + return "ClientStatusResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ClientStatusResponseValidationError) 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 %sClientStatusResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ClientStatusResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ClientStatusResponseValidationError{} + +// Validate checks the field values on ClientConfig_GenericXdsConfig 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 *ClientConfig_GenericXdsConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ClientConfig_GenericXdsConfig 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 +// ClientConfig_GenericXdsConfigMultiError, or nil if none found. +func (m *ClientConfig_GenericXdsConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *ClientConfig_GenericXdsConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for TypeUrl + + // no validation rules for Name + + // no validation rules for VersionInfo + + if all { + switch v := interface{}(m.GetXdsConfig()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientConfig_GenericXdsConfigValidationError{ + field: "XdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientConfig_GenericXdsConfigValidationError{ + field: "XdsConfig", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetXdsConfig()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClientConfig_GenericXdsConfigValidationError{ + field: "XdsConfig", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientConfig_GenericXdsConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientConfig_GenericXdsConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClientConfig_GenericXdsConfigValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ConfigStatus + + // no validation rules for ClientStatus + + if all { + switch v := interface{}(m.GetErrorState()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ClientConfig_GenericXdsConfigValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ClientConfig_GenericXdsConfigValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ClientConfig_GenericXdsConfigValidationError{ + field: "ErrorState", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for IsStaticResource + + if len(errors) > 0 { + return ClientConfig_GenericXdsConfigMultiError(errors) + } + return nil +} + +// ClientConfig_GenericXdsConfigMultiError is an error wrapping multiple +// validation errors returned by ClientConfig_GenericXdsConfig.ValidateAll() +// if the designated constraints aren't met. +type ClientConfig_GenericXdsConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ClientConfig_GenericXdsConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ClientConfig_GenericXdsConfigMultiError) AllErrors() []error { return m } + +// ClientConfig_GenericXdsConfigValidationError is the validation error +// returned by ClientConfig_GenericXdsConfig.Validate if the designated +// constraints aren't met. +type ClientConfig_GenericXdsConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ClientConfig_GenericXdsConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ClientConfig_GenericXdsConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ClientConfig_GenericXdsConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ClientConfig_GenericXdsConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ClientConfig_GenericXdsConfigValidationError) ErrorName() string { + return "ClientConfig_GenericXdsConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e ClientConfig_GenericXdsConfigValidationError) 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 %sClientConfig_GenericXdsConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ClientConfig_GenericXdsConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ClientConfig_GenericXdsConfigValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/tap/v3/tap.pb.go b/vendor/github.com/cilium/proxy/go/envoy/service/tap/v3/tap.pb.go new file mode 100644 index 0000000000000..bf70d856a1576 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/tap/v3/tap.pb.go @@ -0,0 +1,481 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/service/tap/v3/tap.proto + +package tapv3 + +import ( + context "context" + v31 "github.com/cilium/proxy/go/envoy/config/core/v3" + v3 "github.com/cilium/proxy/go/envoy/data/tap/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// [#not-implemented-hide:] Stream message for the Tap API. Envoy will open a stream to the server +// and stream taps without ever expecting a response. +type StreamTapsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier data effectively is a structured metadata. As a performance optimization this will + // only be sent in the first message on the stream. + Identifier *StreamTapsRequest_Identifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` + // The trace id. this can be used to merge together a streaming trace. Note that the trace_id + // is not guaranteed to be spatially or temporally unique. + TraceId uint64 `protobuf:"varint,2,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` + // The trace data. + Trace *v3.TraceWrapper `protobuf:"bytes,3,opt,name=trace,proto3" json:"trace,omitempty"` +} + +func (x *StreamTapsRequest) Reset() { + *x = StreamTapsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_tap_v3_tap_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamTapsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamTapsRequest) ProtoMessage() {} + +func (x *StreamTapsRequest) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_tap_v3_tap_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamTapsRequest.ProtoReflect.Descriptor instead. +func (*StreamTapsRequest) Descriptor() ([]byte, []int) { + return file_envoy_service_tap_v3_tap_proto_rawDescGZIP(), []int{0} +} + +func (x *StreamTapsRequest) GetIdentifier() *StreamTapsRequest_Identifier { + if x != nil { + return x.Identifier + } + return nil +} + +func (x *StreamTapsRequest) GetTraceId() uint64 { + if x != nil { + return x.TraceId + } + return 0 +} + +func (x *StreamTapsRequest) GetTrace() *v3.TraceWrapper { + if x != nil { + return x.Trace + } + return nil +} + +// [#not-implemented-hide:] +type StreamTapsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StreamTapsResponse) Reset() { + *x = StreamTapsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_tap_v3_tap_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamTapsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamTapsResponse) ProtoMessage() {} + +func (x *StreamTapsResponse) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_tap_v3_tap_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamTapsResponse.ProtoReflect.Descriptor instead. +func (*StreamTapsResponse) Descriptor() ([]byte, []int) { + return file_envoy_service_tap_v3_tap_proto_rawDescGZIP(), []int{1} +} + +type StreamTapsRequest_Identifier struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The node sending taps over the stream. + Node *v31.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + // The opaque identifier that was set in the :ref:`output config + // `. + TapId string `protobuf:"bytes,2,opt,name=tap_id,json=tapId,proto3" json:"tap_id,omitempty"` +} + +func (x *StreamTapsRequest_Identifier) Reset() { + *x = StreamTapsRequest_Identifier{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_tap_v3_tap_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamTapsRequest_Identifier) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamTapsRequest_Identifier) ProtoMessage() {} + +func (x *StreamTapsRequest_Identifier) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_tap_v3_tap_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamTapsRequest_Identifier.ProtoReflect.Descriptor instead. +func (*StreamTapsRequest_Identifier) Descriptor() ([]byte, []int) { + return file_envoy_service_tap_v3_tap_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *StreamTapsRequest_Identifier) GetNode() *v31.Node { + if x != nil { + return x.Node + } + return nil +} + +func (x *StreamTapsRequest_Identifier) GetTapId() string { + if x != nil { + return x.TapId + } + return "" +} + +var File_envoy_service_tap_v3_tap_proto protoreflect.FileDescriptor + +var file_envoy_service_tap_v3_tap_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x74, 0x61, 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x61, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x14, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x2f, 0x74, 0x61, 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, + 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x69, 0x6e, 0x67, 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, 0x8c, 0x03, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, + 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x52, 0x0a, 0x0a, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, + 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x70, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x19, 0x0a, + 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x05, 0x74, 0x72, 0x61, 0x63, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x72, 0x61, 0x63, + 0x65, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x05, 0x74, 0x72, 0x61, 0x63, 0x65, 0x1a, + 0x9c, 0x01, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x38, + 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, + 0x10, 0x01, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x74, 0x61, 0x70, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x70, 0x49, 0x64, 0x3a, + 0x3d, 0x9a, 0xc5, 0x88, 0x1e, 0x38, 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3a, 0x32, + 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x49, 0x0a, 0x12, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x70, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, + 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, + 0x61, 0x70, 0x2e, 0x76, 0x32, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x54, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x75, 0x0a, + 0x0e, 0x54, 0x61, 0x70, 0x53, 0x69, 0x6e, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x63, 0x0a, 0x0a, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x70, 0x73, 0x12, 0x27, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, + 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x70, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x54, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x28, 0x01, 0x42, 0x7e, 0x0a, 0x22, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x74, 0x61, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x54, 0x61, 0x70, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x74, 0x61, 0x70, + 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x61, 0x70, 0x76, 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_service_tap_v3_tap_proto_rawDescOnce sync.Once + file_envoy_service_tap_v3_tap_proto_rawDescData = file_envoy_service_tap_v3_tap_proto_rawDesc +) + +func file_envoy_service_tap_v3_tap_proto_rawDescGZIP() []byte { + file_envoy_service_tap_v3_tap_proto_rawDescOnce.Do(func() { + file_envoy_service_tap_v3_tap_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_tap_v3_tap_proto_rawDescData) + }) + return file_envoy_service_tap_v3_tap_proto_rawDescData +} + +var file_envoy_service_tap_v3_tap_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_service_tap_v3_tap_proto_goTypes = []interface{}{ + (*StreamTapsRequest)(nil), // 0: envoy.service.tap.v3.StreamTapsRequest + (*StreamTapsResponse)(nil), // 1: envoy.service.tap.v3.StreamTapsResponse + (*StreamTapsRequest_Identifier)(nil), // 2: envoy.service.tap.v3.StreamTapsRequest.Identifier + (*v3.TraceWrapper)(nil), // 3: envoy.data.tap.v3.TraceWrapper + (*v31.Node)(nil), // 4: envoy.config.core.v3.Node +} +var file_envoy_service_tap_v3_tap_proto_depIdxs = []int32{ + 2, // 0: envoy.service.tap.v3.StreamTapsRequest.identifier:type_name -> envoy.service.tap.v3.StreamTapsRequest.Identifier + 3, // 1: envoy.service.tap.v3.StreamTapsRequest.trace:type_name -> envoy.data.tap.v3.TraceWrapper + 4, // 2: envoy.service.tap.v3.StreamTapsRequest.Identifier.node:type_name -> envoy.config.core.v3.Node + 0, // 3: envoy.service.tap.v3.TapSinkService.StreamTaps:input_type -> envoy.service.tap.v3.StreamTapsRequest + 1, // 4: envoy.service.tap.v3.TapSinkService.StreamTaps:output_type -> envoy.service.tap.v3.StreamTapsResponse + 4, // [4:5] is the sub-list for method output_type + 3, // [3:4] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_envoy_service_tap_v3_tap_proto_init() } +func file_envoy_service_tap_v3_tap_proto_init() { + if File_envoy_service_tap_v3_tap_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_service_tap_v3_tap_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamTapsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_tap_v3_tap_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamTapsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_tap_v3_tap_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamTapsRequest_Identifier); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_service_tap_v3_tap_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_envoy_service_tap_v3_tap_proto_goTypes, + DependencyIndexes: file_envoy_service_tap_v3_tap_proto_depIdxs, + MessageInfos: file_envoy_service_tap_v3_tap_proto_msgTypes, + }.Build() + File_envoy_service_tap_v3_tap_proto = out.File + file_envoy_service_tap_v3_tap_proto_rawDesc = nil + file_envoy_service_tap_v3_tap_proto_goTypes = nil + file_envoy_service_tap_v3_tap_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// TapSinkServiceClient is the client API for TapSinkService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type TapSinkServiceClient interface { + // Envoy will connect and send StreamTapsRequest messages forever. It does not expect any + // response to be sent as nothing would be done in the case of failure. The server should + // disconnect if it expects Envoy to reconnect. + StreamTaps(ctx context.Context, opts ...grpc.CallOption) (TapSinkService_StreamTapsClient, error) +} + +type tapSinkServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewTapSinkServiceClient(cc grpc.ClientConnInterface) TapSinkServiceClient { + return &tapSinkServiceClient{cc} +} + +func (c *tapSinkServiceClient) StreamTaps(ctx context.Context, opts ...grpc.CallOption) (TapSinkService_StreamTapsClient, error) { + stream, err := c.cc.NewStream(ctx, &_TapSinkService_serviceDesc.Streams[0], "/envoy.service.tap.v3.TapSinkService/StreamTaps", opts...) + if err != nil { + return nil, err + } + x := &tapSinkServiceStreamTapsClient{stream} + return x, nil +} + +type TapSinkService_StreamTapsClient interface { + Send(*StreamTapsRequest) error + CloseAndRecv() (*StreamTapsResponse, error) + grpc.ClientStream +} + +type tapSinkServiceStreamTapsClient struct { + grpc.ClientStream +} + +func (x *tapSinkServiceStreamTapsClient) Send(m *StreamTapsRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *tapSinkServiceStreamTapsClient) CloseAndRecv() (*StreamTapsResponse, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(StreamTapsResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// TapSinkServiceServer is the server API for TapSinkService service. +type TapSinkServiceServer interface { + // Envoy will connect and send StreamTapsRequest messages forever. It does not expect any + // response to be sent as nothing would be done in the case of failure. The server should + // disconnect if it expects Envoy to reconnect. + StreamTaps(TapSinkService_StreamTapsServer) error +} + +// UnimplementedTapSinkServiceServer can be embedded to have forward compatible implementations. +type UnimplementedTapSinkServiceServer struct { +} + +func (*UnimplementedTapSinkServiceServer) StreamTaps(TapSinkService_StreamTapsServer) error { + return status.Errorf(codes.Unimplemented, "method StreamTaps not implemented") +} + +func RegisterTapSinkServiceServer(s *grpc.Server, srv TapSinkServiceServer) { + s.RegisterService(&_TapSinkService_serviceDesc, srv) +} + +func _TapSinkService_StreamTaps_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(TapSinkServiceServer).StreamTaps(&tapSinkServiceStreamTapsServer{stream}) +} + +type TapSinkService_StreamTapsServer interface { + SendAndClose(*StreamTapsResponse) error + Recv() (*StreamTapsRequest, error) + grpc.ServerStream +} + +type tapSinkServiceStreamTapsServer struct { + grpc.ServerStream +} + +func (x *tapSinkServiceStreamTapsServer) SendAndClose(m *StreamTapsResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *tapSinkServiceStreamTapsServer) Recv() (*StreamTapsRequest, error) { + m := new(StreamTapsRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +var _TapSinkService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "envoy.service.tap.v3.TapSinkService", + HandlerType: (*TapSinkServiceServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamTaps", + Handler: _TapSinkService_StreamTaps_Handler, + ClientStreams: true, + }, + }, + Metadata: "envoy/service/tap/v3/tap.proto", +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/tap/v3/tap.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/service/tap/v3/tap.pb.validate.go new file mode 100644 index 0000000000000..1a5fe4d98c6b8 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/tap/v3/tap.pb.validate.go @@ -0,0 +1,442 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/service/tap/v3/tap.proto + +package tapv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on StreamTapsRequest 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 *StreamTapsRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamTapsRequest 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 +// StreamTapsRequestMultiError, or nil if none found. +func (m *StreamTapsRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamTapsRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetIdentifier()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamTapsRequestValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamTapsRequestValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StreamTapsRequestValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for TraceId + + if all { + switch v := interface{}(m.GetTrace()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamTapsRequestValidationError{ + field: "Trace", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamTapsRequestValidationError{ + field: "Trace", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTrace()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StreamTapsRequestValidationError{ + field: "Trace", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return StreamTapsRequestMultiError(errors) + } + return nil +} + +// StreamTapsRequestMultiError is an error wrapping multiple validation errors +// returned by StreamTapsRequest.ValidateAll() if the designated constraints +// aren't met. +type StreamTapsRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamTapsRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamTapsRequestMultiError) AllErrors() []error { return m } + +// StreamTapsRequestValidationError is the validation error returned by +// StreamTapsRequest.Validate if the designated constraints aren't met. +type StreamTapsRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StreamTapsRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StreamTapsRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StreamTapsRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StreamTapsRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StreamTapsRequestValidationError) ErrorName() string { + return "StreamTapsRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e StreamTapsRequestValidationError) 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 %sStreamTapsRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StreamTapsRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StreamTapsRequestValidationError{} + +// Validate checks the field values on StreamTapsResponse 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 *StreamTapsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamTapsResponse 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 +// StreamTapsResponseMultiError, or nil if none found. +func (m *StreamTapsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamTapsResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return StreamTapsResponseMultiError(errors) + } + return nil +} + +// StreamTapsResponseMultiError is an error wrapping multiple validation errors +// returned by StreamTapsResponse.ValidateAll() if the designated constraints +// aren't met. +type StreamTapsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamTapsResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamTapsResponseMultiError) AllErrors() []error { return m } + +// StreamTapsResponseValidationError is the validation error returned by +// StreamTapsResponse.Validate if the designated constraints aren't met. +type StreamTapsResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StreamTapsResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StreamTapsResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StreamTapsResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StreamTapsResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StreamTapsResponseValidationError) ErrorName() string { + return "StreamTapsResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e StreamTapsResponseValidationError) 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 %sStreamTapsResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StreamTapsResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StreamTapsResponseValidationError{} + +// Validate checks the field values on StreamTapsRequest_Identifier 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 *StreamTapsRequest_Identifier) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamTapsRequest_Identifier 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 +// StreamTapsRequest_IdentifierMultiError, or nil if none found. +func (m *StreamTapsRequest_Identifier) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamTapsRequest_Identifier) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetNode() == nil { + err := StreamTapsRequest_IdentifierValidationError{ + field: "Node", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamTapsRequest_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamTapsRequest_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StreamTapsRequest_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for TapId + + if len(errors) > 0 { + return StreamTapsRequest_IdentifierMultiError(errors) + } + return nil +} + +// StreamTapsRequest_IdentifierMultiError is an error wrapping multiple +// validation errors returned by StreamTapsRequest_Identifier.ValidateAll() if +// the designated constraints aren't met. +type StreamTapsRequest_IdentifierMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamTapsRequest_IdentifierMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamTapsRequest_IdentifierMultiError) AllErrors() []error { return m } + +// StreamTapsRequest_IdentifierValidationError is the validation error returned +// by StreamTapsRequest_Identifier.Validate if the designated constraints +// aren't met. +type StreamTapsRequest_IdentifierValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StreamTapsRequest_IdentifierValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StreamTapsRequest_IdentifierValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StreamTapsRequest_IdentifierValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StreamTapsRequest_IdentifierValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StreamTapsRequest_IdentifierValidationError) ErrorName() string { + return "StreamTapsRequest_IdentifierValidationError" +} + +// Error satisfies the builtin error interface +func (e StreamTapsRequest_IdentifierValidationError) 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 %sStreamTapsRequest_Identifier.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StreamTapsRequest_IdentifierValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StreamTapsRequest_IdentifierValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/trace/v3/trace_service.pb.go b/vendor/github.com/cilium/proxy/go/envoy/service/trace/v3/trace_service.pb.go new file mode 100644 index 0000000000000..bd892306d1625 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/trace/v3/trace_service.pb.go @@ -0,0 +1,459 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/service/trace/v3/trace_service.proto + +package tracev3 + +import ( + context "context" + v1 "github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1" + v3 "github.com/cilium/proxy/go/envoy/config/core/v3" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type StreamTracesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StreamTracesResponse) Reset() { + *x = StreamTracesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_trace_v3_trace_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamTracesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamTracesResponse) ProtoMessage() {} + +func (x *StreamTracesResponse) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_trace_v3_trace_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamTracesResponse.ProtoReflect.Descriptor instead. +func (*StreamTracesResponse) Descriptor() ([]byte, []int) { + return file_envoy_service_trace_v3_trace_service_proto_rawDescGZIP(), []int{0} +} + +type StreamTracesMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier data effectively is a structured metadata. + // As a performance optimization this will only be sent in the first message + // on the stream. + Identifier *StreamTracesMessage_Identifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` + // A list of Span entries + Spans []*v1.Span `protobuf:"bytes,2,rep,name=spans,proto3" json:"spans,omitempty"` +} + +func (x *StreamTracesMessage) Reset() { + *x = StreamTracesMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_trace_v3_trace_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamTracesMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamTracesMessage) ProtoMessage() {} + +func (x *StreamTracesMessage) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_trace_v3_trace_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamTracesMessage.ProtoReflect.Descriptor instead. +func (*StreamTracesMessage) Descriptor() ([]byte, []int) { + return file_envoy_service_trace_v3_trace_service_proto_rawDescGZIP(), []int{1} +} + +func (x *StreamTracesMessage) GetIdentifier() *StreamTracesMessage_Identifier { + if x != nil { + return x.Identifier + } + return nil +} + +func (x *StreamTracesMessage) GetSpans() []*v1.Span { + if x != nil { + return x.Spans + } + return nil +} + +type StreamTracesMessage_Identifier struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The node sending the access log messages over the stream. + Node *v3.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` +} + +func (x *StreamTracesMessage_Identifier) Reset() { + *x = StreamTracesMessage_Identifier{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_service_trace_v3_trace_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StreamTracesMessage_Identifier) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StreamTracesMessage_Identifier) ProtoMessage() {} + +func (x *StreamTracesMessage_Identifier) ProtoReflect() protoreflect.Message { + mi := &file_envoy_service_trace_v3_trace_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StreamTracesMessage_Identifier.ProtoReflect.Descriptor instead. +func (*StreamTracesMessage_Identifier) Descriptor() ([]byte, []int) { + return file_envoy_service_trace_v3_trace_service_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *StreamTracesMessage_Identifier) GetNode() *v3.Node { + if x != nil { + return x.Node + } + return nil +} + +var File_envoy_service_trace_v3_trace_service_proto protoreflect.FileDescriptor + +var file_envoy_service_trace_v3_trace_service_proto_rawDesc = []byte{ + 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, + 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, + 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x31, + 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, + 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 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, 0x4a, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, + 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0xde, 0x02, 0x0a, 0x13, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, + 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x56, 0x0a, 0x0a, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, + 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x05, 0x73, 0x70, 0x61, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x70, 0x61, 0x6e, 0x52, 0x05, 0x73, 0x70, 0x61, 0x6e, 0x73, 0x1a, 0x84, 0x01, 0x0a, 0x0a, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x04, 0x6e, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, + 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, + 0x6f, 0x64, 0x65, 0x3a, 0x3c, 0x9a, 0xc5, 0x88, 0x1e, 0x37, 0x0a, 0x35, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, + 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c, 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, + 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x32, 0x7d, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x0c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, + 0x61, 0x63, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x1a, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x28, 0x01, 0x42, 0x8d, 0x01, 0x0a, 0x24, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x11, 0x54, 0x72, + 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, + 0x3b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x76, 0x33, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, + 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_service_trace_v3_trace_service_proto_rawDescOnce sync.Once + file_envoy_service_trace_v3_trace_service_proto_rawDescData = file_envoy_service_trace_v3_trace_service_proto_rawDesc +) + +func file_envoy_service_trace_v3_trace_service_proto_rawDescGZIP() []byte { + file_envoy_service_trace_v3_trace_service_proto_rawDescOnce.Do(func() { + file_envoy_service_trace_v3_trace_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_trace_v3_trace_service_proto_rawDescData) + }) + return file_envoy_service_trace_v3_trace_service_proto_rawDescData +} + +var file_envoy_service_trace_v3_trace_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_service_trace_v3_trace_service_proto_goTypes = []interface{}{ + (*StreamTracesResponse)(nil), // 0: envoy.service.trace.v3.StreamTracesResponse + (*StreamTracesMessage)(nil), // 1: envoy.service.trace.v3.StreamTracesMessage + (*StreamTracesMessage_Identifier)(nil), // 2: envoy.service.trace.v3.StreamTracesMessage.Identifier + (*v1.Span)(nil), // 3: opencensus.proto.trace.v1.Span + (*v3.Node)(nil), // 4: envoy.config.core.v3.Node +} +var file_envoy_service_trace_v3_trace_service_proto_depIdxs = []int32{ + 2, // 0: envoy.service.trace.v3.StreamTracesMessage.identifier:type_name -> envoy.service.trace.v3.StreamTracesMessage.Identifier + 3, // 1: envoy.service.trace.v3.StreamTracesMessage.spans:type_name -> opencensus.proto.trace.v1.Span + 4, // 2: envoy.service.trace.v3.StreamTracesMessage.Identifier.node:type_name -> envoy.config.core.v3.Node + 1, // 3: envoy.service.trace.v3.TraceService.StreamTraces:input_type -> envoy.service.trace.v3.StreamTracesMessage + 0, // 4: envoy.service.trace.v3.TraceService.StreamTraces:output_type -> envoy.service.trace.v3.StreamTracesResponse + 4, // [4:5] is the sub-list for method output_type + 3, // [3:4] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_envoy_service_trace_v3_trace_service_proto_init() } +func file_envoy_service_trace_v3_trace_service_proto_init() { + if File_envoy_service_trace_v3_trace_service_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_service_trace_v3_trace_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamTracesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_trace_v3_trace_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamTracesMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_service_trace_v3_trace_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamTracesMessage_Identifier); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_service_trace_v3_trace_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_envoy_service_trace_v3_trace_service_proto_goTypes, + DependencyIndexes: file_envoy_service_trace_v3_trace_service_proto_depIdxs, + MessageInfos: file_envoy_service_trace_v3_trace_service_proto_msgTypes, + }.Build() + File_envoy_service_trace_v3_trace_service_proto = out.File + file_envoy_service_trace_v3_trace_service_proto_rawDesc = nil + file_envoy_service_trace_v3_trace_service_proto_goTypes = nil + file_envoy_service_trace_v3_trace_service_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// TraceServiceClient is the client API for TraceService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type TraceServiceClient interface { + // Envoy will connect and send StreamTracesMessage messages forever. It does + // not expect any response to be sent as nothing would be done in the case + // of failure. + StreamTraces(ctx context.Context, opts ...grpc.CallOption) (TraceService_StreamTracesClient, error) +} + +type traceServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewTraceServiceClient(cc grpc.ClientConnInterface) TraceServiceClient { + return &traceServiceClient{cc} +} + +func (c *traceServiceClient) StreamTraces(ctx context.Context, opts ...grpc.CallOption) (TraceService_StreamTracesClient, error) { + stream, err := c.cc.NewStream(ctx, &_TraceService_serviceDesc.Streams[0], "/envoy.service.trace.v3.TraceService/StreamTraces", opts...) + if err != nil { + return nil, err + } + x := &traceServiceStreamTracesClient{stream} + return x, nil +} + +type TraceService_StreamTracesClient interface { + Send(*StreamTracesMessage) error + CloseAndRecv() (*StreamTracesResponse, error) + grpc.ClientStream +} + +type traceServiceStreamTracesClient struct { + grpc.ClientStream +} + +func (x *traceServiceStreamTracesClient) Send(m *StreamTracesMessage) error { + return x.ClientStream.SendMsg(m) +} + +func (x *traceServiceStreamTracesClient) CloseAndRecv() (*StreamTracesResponse, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(StreamTracesResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// TraceServiceServer is the server API for TraceService service. +type TraceServiceServer interface { + // Envoy will connect and send StreamTracesMessage messages forever. It does + // not expect any response to be sent as nothing would be done in the case + // of failure. + StreamTraces(TraceService_StreamTracesServer) error +} + +// UnimplementedTraceServiceServer can be embedded to have forward compatible implementations. +type UnimplementedTraceServiceServer struct { +} + +func (*UnimplementedTraceServiceServer) StreamTraces(TraceService_StreamTracesServer) error { + return status.Errorf(codes.Unimplemented, "method StreamTraces not implemented") +} + +func RegisterTraceServiceServer(s *grpc.Server, srv TraceServiceServer) { + s.RegisterService(&_TraceService_serviceDesc, srv) +} + +func _TraceService_StreamTraces_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(TraceServiceServer).StreamTraces(&traceServiceStreamTracesServer{stream}) +} + +type TraceService_StreamTracesServer interface { + SendAndClose(*StreamTracesResponse) error + Recv() (*StreamTracesMessage, error) + grpc.ServerStream +} + +type traceServiceStreamTracesServer struct { + grpc.ServerStream +} + +func (x *traceServiceStreamTracesServer) SendAndClose(m *StreamTracesResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *traceServiceStreamTracesServer) Recv() (*StreamTracesMessage, error) { + m := new(StreamTracesMessage) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +var _TraceService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "envoy.service.trace.v3.TraceService", + HandlerType: (*TraceServiceServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "StreamTraces", + Handler: _TraceService_StreamTraces_Handler, + ClientStreams: true, + }, + }, + Metadata: "envoy/service/trace/v3/trace_service.proto", +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/service/trace/v3/trace_service.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/service/trace/v3/trace_service.pb.validate.go new file mode 100644 index 0000000000000..bf77a4439faca --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/service/trace/v3/trace_service.pb.validate.go @@ -0,0 +1,443 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/service/trace/v3/trace_service.proto + +package tracev3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on StreamTracesResponse 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 *StreamTracesResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamTracesResponse 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 +// StreamTracesResponseMultiError, or nil if none found. +func (m *StreamTracesResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamTracesResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return StreamTracesResponseMultiError(errors) + } + return nil +} + +// StreamTracesResponseMultiError is an error wrapping multiple validation +// errors returned by StreamTracesResponse.ValidateAll() if the designated +// constraints aren't met. +type StreamTracesResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamTracesResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamTracesResponseMultiError) AllErrors() []error { return m } + +// StreamTracesResponseValidationError is the validation error returned by +// StreamTracesResponse.Validate if the designated constraints aren't met. +type StreamTracesResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StreamTracesResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StreamTracesResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StreamTracesResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StreamTracesResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StreamTracesResponseValidationError) ErrorName() string { + return "StreamTracesResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e StreamTracesResponseValidationError) 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 %sStreamTracesResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StreamTracesResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StreamTracesResponseValidationError{} + +// Validate checks the field values on StreamTracesMessage 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 *StreamTracesMessage) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamTracesMessage 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 +// StreamTracesMessageMultiError, or nil if none found. +func (m *StreamTracesMessage) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamTracesMessage) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetIdentifier()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamTracesMessageValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamTracesMessageValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIdentifier()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StreamTracesMessageValidationError{ + field: "Identifier", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetSpans() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamTracesMessageValidationError{ + field: fmt.Sprintf("Spans[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamTracesMessageValidationError{ + field: fmt.Sprintf("Spans[%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 StreamTracesMessageValidationError{ + field: fmt.Sprintf("Spans[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return StreamTracesMessageMultiError(errors) + } + return nil +} + +// StreamTracesMessageMultiError is an error wrapping multiple validation +// errors returned by StreamTracesMessage.ValidateAll() if the designated +// constraints aren't met. +type StreamTracesMessageMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamTracesMessageMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamTracesMessageMultiError) AllErrors() []error { return m } + +// StreamTracesMessageValidationError is the validation error returned by +// StreamTracesMessage.Validate if the designated constraints aren't met. +type StreamTracesMessageValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StreamTracesMessageValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StreamTracesMessageValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StreamTracesMessageValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StreamTracesMessageValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StreamTracesMessageValidationError) ErrorName() string { + return "StreamTracesMessageValidationError" +} + +// Error satisfies the builtin error interface +func (e StreamTracesMessageValidationError) 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 %sStreamTracesMessage.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StreamTracesMessageValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StreamTracesMessageValidationError{} + +// Validate checks the field values on StreamTracesMessage_Identifier 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 *StreamTracesMessage_Identifier) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StreamTracesMessage_Identifier 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 +// StreamTracesMessage_IdentifierMultiError, or nil if none found. +func (m *StreamTracesMessage_Identifier) ValidateAll() error { + return m.validate(true) +} + +func (m *StreamTracesMessage_Identifier) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetNode() == nil { + err := StreamTracesMessage_IdentifierValidationError{ + field: "Node", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetNode()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StreamTracesMessage_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StreamTracesMessage_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StreamTracesMessage_IdentifierValidationError{ + field: "Node", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return StreamTracesMessage_IdentifierMultiError(errors) + } + return nil +} + +// StreamTracesMessage_IdentifierMultiError is an error wrapping multiple +// validation errors returned by StreamTracesMessage_Identifier.ValidateAll() +// if the designated constraints aren't met. +type StreamTracesMessage_IdentifierMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StreamTracesMessage_IdentifierMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StreamTracesMessage_IdentifierMultiError) AllErrors() []error { return m } + +// StreamTracesMessage_IdentifierValidationError is the validation error +// returned by StreamTracesMessage_Identifier.Validate if the designated +// constraints aren't met. +type StreamTracesMessage_IdentifierValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StreamTracesMessage_IdentifierValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StreamTracesMessage_IdentifierValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StreamTracesMessage_IdentifierValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StreamTracesMessage_IdentifierValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StreamTracesMessage_IdentifierValidationError) ErrorName() string { + return "StreamTracesMessage_IdentifierValidationError" +} + +// Error satisfies the builtin error interface +func (e StreamTracesMessage_IdentifierValidationError) 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 %sStreamTracesMessage_Identifier.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StreamTracesMessage_IdentifierValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StreamTracesMessage_IdentifierValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/hash_policy.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/hash_policy.pb.go new file mode 100644 index 0000000000000..fe16e46326f40 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/hash_policy.pb.go @@ -0,0 +1,242 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/type/hash_policy.proto + +package _type + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Specifies the hash policy +type HashPolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to PolicySpecifier: + // + // *HashPolicy_SourceIp_ + PolicySpecifier isHashPolicy_PolicySpecifier `protobuf_oneof:"policy_specifier"` +} + +func (x *HashPolicy) Reset() { + *x = HashPolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_hash_policy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HashPolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HashPolicy) ProtoMessage() {} + +func (x *HashPolicy) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_hash_policy_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HashPolicy.ProtoReflect.Descriptor instead. +func (*HashPolicy) Descriptor() ([]byte, []int) { + return file_envoy_type_hash_policy_proto_rawDescGZIP(), []int{0} +} + +func (m *HashPolicy) GetPolicySpecifier() isHashPolicy_PolicySpecifier { + if m != nil { + return m.PolicySpecifier + } + return nil +} + +func (x *HashPolicy) GetSourceIp() *HashPolicy_SourceIp { + if x, ok := x.GetPolicySpecifier().(*HashPolicy_SourceIp_); ok { + return x.SourceIp + } + return nil +} + +type isHashPolicy_PolicySpecifier interface { + isHashPolicy_PolicySpecifier() +} + +type HashPolicy_SourceIp_ struct { + SourceIp *HashPolicy_SourceIp `protobuf:"bytes,1,opt,name=source_ip,json=sourceIp,proto3,oneof"` +} + +func (*HashPolicy_SourceIp_) isHashPolicy_PolicySpecifier() {} + +// The source IP will be used to compute the hash used by hash-based load balancing +// algorithms. +type HashPolicy_SourceIp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *HashPolicy_SourceIp) Reset() { + *x = HashPolicy_SourceIp{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_hash_policy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HashPolicy_SourceIp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HashPolicy_SourceIp) ProtoMessage() {} + +func (x *HashPolicy_SourceIp) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_hash_policy_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HashPolicy_SourceIp.ProtoReflect.Descriptor instead. +func (*HashPolicy_SourceIp) Descriptor() ([]byte, []int) { + return file_envoy_type_hash_policy_proto_rawDescGZIP(), []int{0, 0} +} + +var File_envoy_type_hash_policy_proto protoreflect.FileDescriptor + +var file_envoy_type_hash_policy_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x68, 0x61, 0x73, + 0x68, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 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, 0x71, 0x0a, 0x0a, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x12, 0x3e, 0x0a, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x49, 0x70, 0x48, 0x00, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, + 0x1a, 0x0a, 0x0a, 0x08, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x42, 0x17, 0x0a, 0x10, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, + 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x68, 0x0a, 0x18, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x42, 0x0f, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_type_hash_policy_proto_rawDescOnce sync.Once + file_envoy_type_hash_policy_proto_rawDescData = file_envoy_type_hash_policy_proto_rawDesc +) + +func file_envoy_type_hash_policy_proto_rawDescGZIP() []byte { + file_envoy_type_hash_policy_proto_rawDescOnce.Do(func() { + file_envoy_type_hash_policy_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_hash_policy_proto_rawDescData) + }) + return file_envoy_type_hash_policy_proto_rawDescData +} + +var file_envoy_type_hash_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_type_hash_policy_proto_goTypes = []interface{}{ + (*HashPolicy)(nil), // 0: envoy.type.HashPolicy + (*HashPolicy_SourceIp)(nil), // 1: envoy.type.HashPolicy.SourceIp +} +var file_envoy_type_hash_policy_proto_depIdxs = []int32{ + 1, // 0: envoy.type.HashPolicy.source_ip:type_name -> envoy.type.HashPolicy.SourceIp + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_type_hash_policy_proto_init() } +func file_envoy_type_hash_policy_proto_init() { + if File_envoy_type_hash_policy_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_type_hash_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HashPolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_type_hash_policy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HashPolicy_SourceIp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_type_hash_policy_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*HashPolicy_SourceIp_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_type_hash_policy_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_type_hash_policy_proto_goTypes, + DependencyIndexes: file_envoy_type_hash_policy_proto_depIdxs, + MessageInfos: file_envoy_type_hash_policy_proto_msgTypes, + }.Build() + File_envoy_type_hash_policy_proto = out.File + file_envoy_type_hash_policy_proto_rawDesc = nil + file_envoy_type_hash_policy_proto_goTypes = nil + file_envoy_type_hash_policy_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/hash_policy.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/hash_policy.pb.validate.go new file mode 100644 index 0000000000000..c064e337014ec --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/hash_policy.pb.validate.go @@ -0,0 +1,280 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/hash_policy.proto + +package _type + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on HashPolicy 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 *HashPolicy) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HashPolicy 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 HashPolicyMultiError, or +// nil if none found. +func (m *HashPolicy) ValidateAll() error { + return m.validate(true) +} + +func (m *HashPolicy) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.PolicySpecifier.(type) { + + case *HashPolicy_SourceIp_: + + if all { + switch v := interface{}(m.GetSourceIp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HashPolicyValidationError{ + field: "SourceIp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HashPolicyValidationError{ + field: "SourceIp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSourceIp()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HashPolicyValidationError{ + field: "SourceIp", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := HashPolicyValidationError{ + field: "PolicySpecifier", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return HashPolicyMultiError(errors) + } + return nil +} + +// HashPolicyMultiError is an error wrapping multiple validation errors +// returned by HashPolicy.ValidateAll() if the designated constraints aren't met. +type HashPolicyMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HashPolicyMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HashPolicyMultiError) AllErrors() []error { return m } + +// HashPolicyValidationError is the validation error returned by +// HashPolicy.Validate if the designated constraints aren't met. +type HashPolicyValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HashPolicyValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HashPolicyValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HashPolicyValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HashPolicyValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HashPolicyValidationError) ErrorName() string { return "HashPolicyValidationError" } + +// Error satisfies the builtin error interface +func (e HashPolicyValidationError) 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 %sHashPolicy.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HashPolicyValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HashPolicyValidationError{} + +// Validate checks the field values on HashPolicy_SourceIp 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 *HashPolicy_SourceIp) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HashPolicy_SourceIp 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 +// HashPolicy_SourceIpMultiError, or nil if none found. +func (m *HashPolicy_SourceIp) ValidateAll() error { + return m.validate(true) +} + +func (m *HashPolicy_SourceIp) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return HashPolicy_SourceIpMultiError(errors) + } + return nil +} + +// HashPolicy_SourceIpMultiError is an error wrapping multiple validation +// errors returned by HashPolicy_SourceIp.ValidateAll() if the designated +// constraints aren't met. +type HashPolicy_SourceIpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HashPolicy_SourceIpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HashPolicy_SourceIpMultiError) AllErrors() []error { return m } + +// HashPolicy_SourceIpValidationError is the validation error returned by +// HashPolicy_SourceIp.Validate if the designated constraints aren't met. +type HashPolicy_SourceIpValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HashPolicy_SourceIpValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HashPolicy_SourceIpValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HashPolicy_SourceIpValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HashPolicy_SourceIpValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HashPolicy_SourceIpValidationError) ErrorName() string { + return "HashPolicy_SourceIpValidationError" +} + +// Error satisfies the builtin error interface +func (e HashPolicy_SourceIpValidationError) 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 %sHashPolicy_SourceIp.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HashPolicy_SourceIpValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HashPolicy_SourceIpValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/http.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/http.pb.go new file mode 100644 index 0000000000000..c409e0cb8e619 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/http.pb.go @@ -0,0 +1,148 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/type/http.proto + +package _type + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type CodecClientType int32 + +const ( + CodecClientType_HTTP1 CodecClientType = 0 + CodecClientType_HTTP2 CodecClientType = 1 + // [#not-implemented-hide:] QUIC implementation is not production ready yet. Use this enum with + // caution to prevent accidental execution of QUIC code. I.e. `!= HTTP2` is no longer sufficient + // to distinguish HTTP1 and HTTP2 traffic. + CodecClientType_HTTP3 CodecClientType = 2 +) + +// Enum value maps for CodecClientType. +var ( + CodecClientType_name = map[int32]string{ + 0: "HTTP1", + 1: "HTTP2", + 2: "HTTP3", + } + CodecClientType_value = map[string]int32{ + "HTTP1": 0, + "HTTP2": 1, + "HTTP3": 2, + } +) + +func (x CodecClientType) Enum() *CodecClientType { + p := new(CodecClientType) + *p = x + return p +} + +func (x CodecClientType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CodecClientType) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_type_http_proto_enumTypes[0].Descriptor() +} + +func (CodecClientType) Type() protoreflect.EnumType { + return &file_envoy_type_http_proto_enumTypes[0] +} + +func (x CodecClientType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CodecClientType.Descriptor instead. +func (CodecClientType) EnumDescriptor() ([]byte, []int) { + return file_envoy_type_http_proto_rawDescGZIP(), []int{0} +} + +var File_envoy_type_http_proto protoreflect.FileDescriptor + +var file_envoy_type_http_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2a, 0x32, 0x0a, 0x0f, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x31, 0x10, 0x00, + 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x32, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x48, + 0x54, 0x54, 0x50, 0x33, 0x10, 0x02, 0x42, 0x62, 0x0a, 0x18, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x42, 0x09, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_envoy_type_http_proto_rawDescOnce sync.Once + file_envoy_type_http_proto_rawDescData = file_envoy_type_http_proto_rawDesc +) + +func file_envoy_type_http_proto_rawDescGZIP() []byte { + file_envoy_type_http_proto_rawDescOnce.Do(func() { + file_envoy_type_http_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_http_proto_rawDescData) + }) + return file_envoy_type_http_proto_rawDescData +} + +var file_envoy_type_http_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_type_http_proto_goTypes = []interface{}{ + (CodecClientType)(0), // 0: envoy.type.CodecClientType +} +var file_envoy_type_http_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_type_http_proto_init() } +func file_envoy_type_http_proto_init() { + if File_envoy_type_http_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_type_http_proto_rawDesc, + NumEnums: 1, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_type_http_proto_goTypes, + DependencyIndexes: file_envoy_type_http_proto_depIdxs, + EnumInfos: file_envoy_type_http_proto_enumTypes, + }.Build() + File_envoy_type_http_proto = out.File + file_envoy_type_http_proto_rawDesc = nil + file_envoy_type_http_proto_goTypes = nil + file_envoy_type_http_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/http.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/http.pb.validate.go new file mode 100644 index 0000000000000..69e27cb1e5c7a --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/http.pb.validate.go @@ -0,0 +1,36 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/http.proto + +package _type + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/http_status.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/http_status.pb.go new file mode 100644 index 0000000000000..ec5edbc3ab438 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/http_status.pb.go @@ -0,0 +1,458 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/type/http_status.proto + +package _type + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// HTTP response codes supported in Envoy. +// For more details: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml +type StatusCode int32 + +const ( + // Empty - This code not part of the HTTP status code specification, but it is needed for proto + // `enum` type. + StatusCode_Empty StatusCode = 0 + StatusCode_Continue StatusCode = 100 + StatusCode_OK StatusCode = 200 + StatusCode_Created StatusCode = 201 + StatusCode_Accepted StatusCode = 202 + StatusCode_NonAuthoritativeInformation StatusCode = 203 + StatusCode_NoContent StatusCode = 204 + StatusCode_ResetContent StatusCode = 205 + StatusCode_PartialContent StatusCode = 206 + StatusCode_MultiStatus StatusCode = 207 + StatusCode_AlreadyReported StatusCode = 208 + StatusCode_IMUsed StatusCode = 226 + StatusCode_MultipleChoices StatusCode = 300 + StatusCode_MovedPermanently StatusCode = 301 + StatusCode_Found StatusCode = 302 + StatusCode_SeeOther StatusCode = 303 + StatusCode_NotModified StatusCode = 304 + StatusCode_UseProxy StatusCode = 305 + StatusCode_TemporaryRedirect StatusCode = 307 + StatusCode_PermanentRedirect StatusCode = 308 + StatusCode_BadRequest StatusCode = 400 + StatusCode_Unauthorized StatusCode = 401 + StatusCode_PaymentRequired StatusCode = 402 + StatusCode_Forbidden StatusCode = 403 + StatusCode_NotFound StatusCode = 404 + StatusCode_MethodNotAllowed StatusCode = 405 + StatusCode_NotAcceptable StatusCode = 406 + StatusCode_ProxyAuthenticationRequired StatusCode = 407 + StatusCode_RequestTimeout StatusCode = 408 + StatusCode_Conflict StatusCode = 409 + StatusCode_Gone StatusCode = 410 + StatusCode_LengthRequired StatusCode = 411 + StatusCode_PreconditionFailed StatusCode = 412 + StatusCode_PayloadTooLarge StatusCode = 413 + StatusCode_URITooLong StatusCode = 414 + StatusCode_UnsupportedMediaType StatusCode = 415 + StatusCode_RangeNotSatisfiable StatusCode = 416 + StatusCode_ExpectationFailed StatusCode = 417 + StatusCode_MisdirectedRequest StatusCode = 421 + StatusCode_UnprocessableEntity StatusCode = 422 + StatusCode_Locked StatusCode = 423 + StatusCode_FailedDependency StatusCode = 424 + StatusCode_UpgradeRequired StatusCode = 426 + StatusCode_PreconditionRequired StatusCode = 428 + StatusCode_TooManyRequests StatusCode = 429 + StatusCode_RequestHeaderFieldsTooLarge StatusCode = 431 + StatusCode_InternalServerError StatusCode = 500 + StatusCode_NotImplemented StatusCode = 501 + StatusCode_BadGateway StatusCode = 502 + StatusCode_ServiceUnavailable StatusCode = 503 + StatusCode_GatewayTimeout StatusCode = 504 + StatusCode_HTTPVersionNotSupported StatusCode = 505 + StatusCode_VariantAlsoNegotiates StatusCode = 506 + StatusCode_InsufficientStorage StatusCode = 507 + StatusCode_LoopDetected StatusCode = 508 + StatusCode_NotExtended StatusCode = 510 + StatusCode_NetworkAuthenticationRequired StatusCode = 511 +) + +// Enum value maps for StatusCode. +var ( + StatusCode_name = map[int32]string{ + 0: "Empty", + 100: "Continue", + 200: "OK", + 201: "Created", + 202: "Accepted", + 203: "NonAuthoritativeInformation", + 204: "NoContent", + 205: "ResetContent", + 206: "PartialContent", + 207: "MultiStatus", + 208: "AlreadyReported", + 226: "IMUsed", + 300: "MultipleChoices", + 301: "MovedPermanently", + 302: "Found", + 303: "SeeOther", + 304: "NotModified", + 305: "UseProxy", + 307: "TemporaryRedirect", + 308: "PermanentRedirect", + 400: "BadRequest", + 401: "Unauthorized", + 402: "PaymentRequired", + 403: "Forbidden", + 404: "NotFound", + 405: "MethodNotAllowed", + 406: "NotAcceptable", + 407: "ProxyAuthenticationRequired", + 408: "RequestTimeout", + 409: "Conflict", + 410: "Gone", + 411: "LengthRequired", + 412: "PreconditionFailed", + 413: "PayloadTooLarge", + 414: "URITooLong", + 415: "UnsupportedMediaType", + 416: "RangeNotSatisfiable", + 417: "ExpectationFailed", + 421: "MisdirectedRequest", + 422: "UnprocessableEntity", + 423: "Locked", + 424: "FailedDependency", + 426: "UpgradeRequired", + 428: "PreconditionRequired", + 429: "TooManyRequests", + 431: "RequestHeaderFieldsTooLarge", + 500: "InternalServerError", + 501: "NotImplemented", + 502: "BadGateway", + 503: "ServiceUnavailable", + 504: "GatewayTimeout", + 505: "HTTPVersionNotSupported", + 506: "VariantAlsoNegotiates", + 507: "InsufficientStorage", + 508: "LoopDetected", + 510: "NotExtended", + 511: "NetworkAuthenticationRequired", + } + StatusCode_value = map[string]int32{ + "Empty": 0, + "Continue": 100, + "OK": 200, + "Created": 201, + "Accepted": 202, + "NonAuthoritativeInformation": 203, + "NoContent": 204, + "ResetContent": 205, + "PartialContent": 206, + "MultiStatus": 207, + "AlreadyReported": 208, + "IMUsed": 226, + "MultipleChoices": 300, + "MovedPermanently": 301, + "Found": 302, + "SeeOther": 303, + "NotModified": 304, + "UseProxy": 305, + "TemporaryRedirect": 307, + "PermanentRedirect": 308, + "BadRequest": 400, + "Unauthorized": 401, + "PaymentRequired": 402, + "Forbidden": 403, + "NotFound": 404, + "MethodNotAllowed": 405, + "NotAcceptable": 406, + "ProxyAuthenticationRequired": 407, + "RequestTimeout": 408, + "Conflict": 409, + "Gone": 410, + "LengthRequired": 411, + "PreconditionFailed": 412, + "PayloadTooLarge": 413, + "URITooLong": 414, + "UnsupportedMediaType": 415, + "RangeNotSatisfiable": 416, + "ExpectationFailed": 417, + "MisdirectedRequest": 421, + "UnprocessableEntity": 422, + "Locked": 423, + "FailedDependency": 424, + "UpgradeRequired": 426, + "PreconditionRequired": 428, + "TooManyRequests": 429, + "RequestHeaderFieldsTooLarge": 431, + "InternalServerError": 500, + "NotImplemented": 501, + "BadGateway": 502, + "ServiceUnavailable": 503, + "GatewayTimeout": 504, + "HTTPVersionNotSupported": 505, + "VariantAlsoNegotiates": 506, + "InsufficientStorage": 507, + "LoopDetected": 508, + "NotExtended": 510, + "NetworkAuthenticationRequired": 511, + } +) + +func (x StatusCode) Enum() *StatusCode { + p := new(StatusCode) + *p = x + return p +} + +func (x StatusCode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StatusCode) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_type_http_status_proto_enumTypes[0].Descriptor() +} + +func (StatusCode) Type() protoreflect.EnumType { + return &file_envoy_type_http_status_proto_enumTypes[0] +} + +func (x StatusCode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StatusCode.Descriptor instead. +func (StatusCode) EnumDescriptor() ([]byte, []int) { + return file_envoy_type_http_status_proto_rawDescGZIP(), []int{0} +} + +// HTTP status. +type HttpStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Supplies HTTP response code. + Code StatusCode `protobuf:"varint,1,opt,name=code,proto3,enum=envoy.type.StatusCode" json:"code,omitempty"` +} + +func (x *HttpStatus) Reset() { + *x = HttpStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_http_status_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpStatus) ProtoMessage() {} + +func (x *HttpStatus) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_http_status_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpStatus.ProtoReflect.Descriptor instead. +func (*HttpStatus) Descriptor() ([]byte, []int) { + return file_envoy_type_http_status_proto_rawDescGZIP(), []int{0} +} + +func (x *HttpStatus) GetCode() StatusCode { + if x != nil { + return x.Code + } + return StatusCode_Empty +} + +var File_envoy_type_http_status_proto protoreflect.FileDescriptor + +var file_envoy_type_http_status_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 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, 0x44, 0x0a, 0x0a, 0x48, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x36, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x82, 0x01, 0x04, 0x10, 0x01, + 0x20, 0x00, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x2a, 0xb5, 0x09, 0x0a, 0x0a, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x10, 0x64, + 0x12, 0x07, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0xc8, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x10, 0xc9, 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x65, 0x70, + 0x74, 0x65, 0x64, 0x10, 0xca, 0x01, 0x12, 0x20, 0x0a, 0x1b, 0x4e, 0x6f, 0x6e, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0xcb, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x4e, 0x6f, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x10, 0xcc, 0x01, 0x12, 0x11, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x65, + 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x10, 0xcd, 0x01, 0x12, 0x13, 0x0a, 0x0e, 0x50, + 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x10, 0xce, 0x01, + 0x12, 0x10, 0x0a, 0x0b, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x10, + 0xcf, 0x01, 0x12, 0x14, 0x0a, 0x0f, 0x41, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x64, 0x10, 0xd0, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x49, 0x4d, 0x55, 0x73, + 0x65, 0x64, 0x10, 0xe2, 0x01, 0x12, 0x14, 0x0a, 0x0f, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, + 0x65, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x10, 0xac, 0x02, 0x12, 0x15, 0x0a, 0x10, 0x4d, + 0x6f, 0x76, 0x65, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x10, + 0xad, 0x02, 0x12, 0x0a, 0x0a, 0x05, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xae, 0x02, 0x12, 0x0d, + 0x0a, 0x08, 0x53, 0x65, 0x65, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x10, 0xaf, 0x02, 0x12, 0x10, 0x0a, + 0x0b, 0x4e, 0x6f, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0xb0, 0x02, 0x12, + 0x0d, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x10, 0xb1, 0x02, 0x12, 0x16, + 0x0a, 0x11, 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72, 0x79, 0x52, 0x65, 0x64, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x10, 0xb3, 0x02, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x65, 0x72, 0x6d, 0x61, 0x6e, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x10, 0xb4, 0x02, 0x12, 0x0f, + 0x0a, 0x0a, 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x90, 0x03, 0x12, + 0x11, 0x0a, 0x0c, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x10, + 0x91, 0x03, 0x12, 0x14, 0x0a, 0x0f, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x64, 0x10, 0x92, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x46, 0x6f, 0x72, 0x62, + 0x69, 0x64, 0x64, 0x65, 0x6e, 0x10, 0x93, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x4e, 0x6f, 0x74, 0x46, + 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x94, 0x03, 0x12, 0x15, 0x0a, 0x10, 0x4d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x4e, 0x6f, 0x74, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x10, 0x95, 0x03, 0x12, 0x12, + 0x0a, 0x0d, 0x4e, 0x6f, 0x74, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x10, + 0x96, 0x03, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x41, 0x75, 0x74, 0x68, 0x65, + 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 0x10, 0x97, 0x03, 0x12, 0x13, 0x0a, 0x0e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x10, 0x98, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x43, 0x6f, 0x6e, + 0x66, 0x6c, 0x69, 0x63, 0x74, 0x10, 0x99, 0x03, 0x12, 0x09, 0x0a, 0x04, 0x47, 0x6f, 0x6e, 0x65, + 0x10, 0x9a, 0x03, 0x12, 0x13, 0x0a, 0x0e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x64, 0x10, 0x9b, 0x03, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x72, 0x65, 0x63, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x9c, + 0x03, 0x12, 0x14, 0x0a, 0x0f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x6f, 0x6f, 0x4c, + 0x61, 0x72, 0x67, 0x65, 0x10, 0x9d, 0x03, 0x12, 0x0f, 0x0a, 0x0a, 0x55, 0x52, 0x49, 0x54, 0x6f, + 0x6f, 0x4c, 0x6f, 0x6e, 0x67, 0x10, 0x9e, 0x03, 0x12, 0x19, 0x0a, 0x14, 0x55, 0x6e, 0x73, 0x75, + 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, + 0x10, 0x9f, 0x03, 0x12, 0x18, 0x0a, 0x13, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4e, 0x6f, 0x74, 0x53, + 0x61, 0x74, 0x69, 0x73, 0x66, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x10, 0xa0, 0x03, 0x12, 0x16, 0x0a, + 0x11, 0x45, 0x78, 0x70, 0x65, 0x63, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, + 0x65, 0x64, 0x10, 0xa1, 0x03, 0x12, 0x17, 0x0a, 0x12, 0x4d, 0x69, 0x73, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0xa5, 0x03, 0x12, 0x18, + 0x0a, 0x13, 0x55, 0x6e, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x45, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x10, 0xa6, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x4c, 0x6f, 0x63, 0x6b, + 0x65, 0x64, 0x10, 0xa7, 0x03, 0x12, 0x15, 0x0a, 0x10, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x44, + 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x10, 0xa8, 0x03, 0x12, 0x14, 0x0a, 0x0f, + 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x10, + 0xaa, 0x03, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x10, 0xac, 0x03, 0x12, 0x14, 0x0a, + 0x0f, 0x54, 0x6f, 0x6f, 0x4d, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, + 0x10, 0xad, 0x03, 0x12, 0x20, 0x0a, 0x1b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x54, 0x6f, 0x6f, 0x4c, 0x61, 0x72, + 0x67, 0x65, 0x10, 0xaf, 0x03, 0x12, 0x18, 0x0a, 0x13, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xf4, 0x03, 0x12, + 0x13, 0x0a, 0x0e, 0x4e, 0x6f, 0x74, 0x49, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x65, + 0x64, 0x10, 0xf5, 0x03, 0x12, 0x0f, 0x0a, 0x0a, 0x42, 0x61, 0x64, 0x47, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x10, 0xf6, 0x03, 0x12, 0x17, 0x0a, 0x12, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x55, 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x10, 0xf7, 0x03, 0x12, 0x13, + 0x0a, 0x0e, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x10, 0xf8, 0x03, 0x12, 0x1c, 0x0a, 0x17, 0x48, 0x54, 0x54, 0x50, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x10, 0xf9, + 0x03, 0x12, 0x1a, 0x0a, 0x15, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x73, 0x6f, + 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x65, 0x73, 0x10, 0xfa, 0x03, 0x12, 0x18, 0x0a, + 0x13, 0x49, 0x6e, 0x73, 0x75, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x10, 0xfb, 0x03, 0x12, 0x11, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x44, + 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x10, 0xfc, 0x03, 0x12, 0x10, 0x0a, 0x0b, 0x4e, 0x6f, + 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x10, 0xfe, 0x03, 0x12, 0x22, 0x0a, 0x1d, + 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x10, 0xff, 0x03, + 0x42, 0x68, 0x0a, 0x18, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0f, 0x48, 0x74, + 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_envoy_type_http_status_proto_rawDescOnce sync.Once + file_envoy_type_http_status_proto_rawDescData = file_envoy_type_http_status_proto_rawDesc +) + +func file_envoy_type_http_status_proto_rawDescGZIP() []byte { + file_envoy_type_http_status_proto_rawDescOnce.Do(func() { + file_envoy_type_http_status_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_http_status_proto_rawDescData) + }) + return file_envoy_type_http_status_proto_rawDescData +} + +var file_envoy_type_http_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_type_http_status_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_type_http_status_proto_goTypes = []interface{}{ + (StatusCode)(0), // 0: envoy.type.StatusCode + (*HttpStatus)(nil), // 1: envoy.type.HttpStatus +} +var file_envoy_type_http_status_proto_depIdxs = []int32{ + 0, // 0: envoy.type.HttpStatus.code:type_name -> envoy.type.StatusCode + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_type_http_status_proto_init() } +func file_envoy_type_http_status_proto_init() { + if File_envoy_type_http_status_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_type_http_status_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_type_http_status_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_type_http_status_proto_goTypes, + DependencyIndexes: file_envoy_type_http_status_proto_depIdxs, + EnumInfos: file_envoy_type_http_status_proto_enumTypes, + MessageInfos: file_envoy_type_http_status_proto_msgTypes, + }.Build() + File_envoy_type_http_status_proto = out.File + file_envoy_type_http_status_proto_rawDesc = nil + file_envoy_type_http_status_proto_goTypes = nil + file_envoy_type_http_status_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/http_status.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/http_status.pb.validate.go new file mode 100644 index 0000000000000..0364d77b911aa --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/http_status.pb.validate.go @@ -0,0 +1,160 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/http_status.proto + +package _type + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on HttpStatus 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 *HttpStatus) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpStatus 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 HttpStatusMultiError, or +// nil if none found. +func (m *HttpStatus) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpStatus) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if _, ok := _HttpStatus_Code_NotInLookup[m.GetCode()]; ok { + err := HttpStatusValidationError{ + field: "Code", + reason: "value must not be in list [0]", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := StatusCode_name[int32(m.GetCode())]; !ok { + err := HttpStatusValidationError{ + field: "Code", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return HttpStatusMultiError(errors) + } + return nil +} + +// HttpStatusMultiError is an error wrapping multiple validation errors +// returned by HttpStatus.ValidateAll() if the designated constraints aren't met. +type HttpStatusMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpStatusMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpStatusMultiError) AllErrors() []error { return m } + +// HttpStatusValidationError is the validation error returned by +// HttpStatus.Validate if the designated constraints aren't met. +type HttpStatusValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpStatusValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpStatusValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpStatusValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpStatusValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpStatusValidationError) ErrorName() string { return "HttpStatusValidationError" } + +// Error satisfies the builtin error interface +func (e HttpStatusValidationError) 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 %sHttpStatus.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpStatusValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpStatusValidationError{} + +var _HttpStatus_Code_NotInLookup = map[StatusCode]struct{}{ + 0: {}, +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/metadata.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/metadata.pb.go new file mode 100644 index 0000000000000..1724a59a0ce36 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/metadata.pb.go @@ -0,0 +1,288 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/type/matcher/metadata.proto + +package matcher + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// [#next-major-version: MetadataMatcher should use StructMatcher] +type MetadataMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The filter name to retrieve the Struct from the Metadata. + Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` + // The path to retrieve the Value from the Struct. + Path []*MetadataMatcher_PathSegment `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"` + // The MetadataMatcher is matched if the value retrieved by path is matched to this value. + Value *ValueMatcher `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *MetadataMatcher) Reset() { + *x = MetadataMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_matcher_metadata_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MetadataMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetadataMatcher) ProtoMessage() {} + +func (x *MetadataMatcher) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_matcher_metadata_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetadataMatcher.ProtoReflect.Descriptor instead. +func (*MetadataMatcher) Descriptor() ([]byte, []int) { + return file_envoy_type_matcher_metadata_proto_rawDescGZIP(), []int{0} +} + +func (x *MetadataMatcher) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *MetadataMatcher) GetPath() []*MetadataMatcher_PathSegment { + if x != nil { + return x.Path + } + return nil +} + +func (x *MetadataMatcher) GetValue() *ValueMatcher { + if x != nil { + return x.Value + } + return nil +} + +// Specifies the segment in a path to retrieve value from Metadata. +// Note: Currently it's not supported to retrieve a value from a list in Metadata. This means that +// if the segment key refers to a list, it has to be the last segment in a path. +type MetadataMatcher_PathSegment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Segment: + // + // *MetadataMatcher_PathSegment_Key + Segment isMetadataMatcher_PathSegment_Segment `protobuf_oneof:"segment"` +} + +func (x *MetadataMatcher_PathSegment) Reset() { + *x = MetadataMatcher_PathSegment{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_matcher_metadata_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MetadataMatcher_PathSegment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetadataMatcher_PathSegment) ProtoMessage() {} + +func (x *MetadataMatcher_PathSegment) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_matcher_metadata_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetadataMatcher_PathSegment.ProtoReflect.Descriptor instead. +func (*MetadataMatcher_PathSegment) Descriptor() ([]byte, []int) { + return file_envoy_type_matcher_metadata_proto_rawDescGZIP(), []int{0, 0} +} + +func (m *MetadataMatcher_PathSegment) GetSegment() isMetadataMatcher_PathSegment_Segment { + if m != nil { + return m.Segment + } + return nil +} + +func (x *MetadataMatcher_PathSegment) GetKey() string { + if x, ok := x.GetSegment().(*MetadataMatcher_PathSegment_Key); ok { + return x.Key + } + return "" +} + +type isMetadataMatcher_PathSegment_Segment interface { + isMetadataMatcher_PathSegment_Segment() +} + +type MetadataMatcher_PathSegment_Key struct { + // If specified, use the key to retrieve the value in a Struct. + Key string `protobuf:"bytes,1,opt,name=key,proto3,oneof"` +} + +func (*MetadataMatcher_PathSegment_Key) isMetadataMatcher_PathSegment_Segment() {} + +var File_envoy_type_matcher_metadata_proto protoreflect.FileDescriptor + +var file_envoy_type_matcher_metadata_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x1a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 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, + 0xff, 0x01, 0x0a, 0x0f, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, + 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x12, 0x40, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x3a, 0x0a, 0x0b, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x42, 0x0e, 0x0a, 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x03, 0xf8, 0x42, + 0x01, 0x42, 0x76, 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_type_matcher_metadata_proto_rawDescOnce sync.Once + file_envoy_type_matcher_metadata_proto_rawDescData = file_envoy_type_matcher_metadata_proto_rawDesc +) + +func file_envoy_type_matcher_metadata_proto_rawDescGZIP() []byte { + file_envoy_type_matcher_metadata_proto_rawDescOnce.Do(func() { + file_envoy_type_matcher_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_metadata_proto_rawDescData) + }) + return file_envoy_type_matcher_metadata_proto_rawDescData +} + +var file_envoy_type_matcher_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_type_matcher_metadata_proto_goTypes = []interface{}{ + (*MetadataMatcher)(nil), // 0: envoy.type.matcher.MetadataMatcher + (*MetadataMatcher_PathSegment)(nil), // 1: envoy.type.matcher.MetadataMatcher.PathSegment + (*ValueMatcher)(nil), // 2: envoy.type.matcher.ValueMatcher +} +var file_envoy_type_matcher_metadata_proto_depIdxs = []int32{ + 1, // 0: envoy.type.matcher.MetadataMatcher.path:type_name -> envoy.type.matcher.MetadataMatcher.PathSegment + 2, // 1: envoy.type.matcher.MetadataMatcher.value:type_name -> envoy.type.matcher.ValueMatcher + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_type_matcher_metadata_proto_init() } +func file_envoy_type_matcher_metadata_proto_init() { + if File_envoy_type_matcher_metadata_proto != nil { + return + } + file_envoy_type_matcher_value_proto_init() + if !protoimpl.UnsafeEnabled { + file_envoy_type_matcher_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MetadataMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_type_matcher_metadata_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MetadataMatcher_PathSegment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_type_matcher_metadata_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*MetadataMatcher_PathSegment_Key)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_type_matcher_metadata_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_type_matcher_metadata_proto_goTypes, + DependencyIndexes: file_envoy_type_matcher_metadata_proto_depIdxs, + MessageInfos: file_envoy_type_matcher_metadata_proto_msgTypes, + }.Build() + File_envoy_type_matcher_metadata_proto = out.File + file_envoy_type_matcher_metadata_proto_rawDesc = nil + file_envoy_type_matcher_metadata_proto_goTypes = nil + file_envoy_type_matcher_metadata_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/metadata.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/metadata.pb.validate.go new file mode 100644 index 0000000000000..e1eb3cfc44870 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/metadata.pb.validate.go @@ -0,0 +1,360 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/matcher/metadata.proto + +package matcher + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on MetadataMatcher 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 *MetadataMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetadataMatcher 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 +// MetadataMatcherMultiError, or nil if none found. +func (m *MetadataMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *MetadataMatcher) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetFilter()) < 1 { + err := MetadataMatcherValidationError{ + field: "Filter", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(m.GetPath()) < 1 { + err := MetadataMatcherValidationError{ + field: "Path", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetPath() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetadataMatcherValidationError{ + field: fmt.Sprintf("Path[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetadataMatcherValidationError{ + field: fmt.Sprintf("Path[%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 MetadataMatcherValidationError{ + field: fmt.Sprintf("Path[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if m.GetValue() == nil { + err := MetadataMatcherValidationError{ + field: "Value", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetValue()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MetadataMatcherValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MetadataMatcherValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MetadataMatcherValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return MetadataMatcherMultiError(errors) + } + return nil +} + +// MetadataMatcherMultiError is an error wrapping multiple validation errors +// returned by MetadataMatcher.ValidateAll() if the designated constraints +// aren't met. +type MetadataMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataMatcherMultiError) AllErrors() []error { return m } + +// MetadataMatcherValidationError is the validation error returned by +// MetadataMatcher.Validate if the designated constraints aren't met. +type MetadataMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MetadataMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MetadataMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MetadataMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MetadataMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MetadataMatcherValidationError) ErrorName() string { return "MetadataMatcherValidationError" } + +// Error satisfies the builtin error interface +func (e MetadataMatcherValidationError) 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 %sMetadataMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MetadataMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MetadataMatcherValidationError{} + +// Validate checks the field values on MetadataMatcher_PathSegment 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 *MetadataMatcher_PathSegment) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MetadataMatcher_PathSegment 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 +// MetadataMatcher_PathSegmentMultiError, or nil if none found. +func (m *MetadataMatcher_PathSegment) ValidateAll() error { + return m.validate(true) +} + +func (m *MetadataMatcher_PathSegment) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.Segment.(type) { + + case *MetadataMatcher_PathSegment_Key: + + if utf8.RuneCountInString(m.GetKey()) < 1 { + err := MetadataMatcher_PathSegmentValidationError{ + field: "Key", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + default: + err := MetadataMatcher_PathSegmentValidationError{ + field: "Segment", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return MetadataMatcher_PathSegmentMultiError(errors) + } + return nil +} + +// MetadataMatcher_PathSegmentMultiError is an error wrapping multiple +// validation errors returned by MetadataMatcher_PathSegment.ValidateAll() if +// the designated constraints aren't met. +type MetadataMatcher_PathSegmentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MetadataMatcher_PathSegmentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MetadataMatcher_PathSegmentMultiError) AllErrors() []error { return m } + +// MetadataMatcher_PathSegmentValidationError is the validation error returned +// by MetadataMatcher_PathSegment.Validate if the designated constraints +// aren't met. +type MetadataMatcher_PathSegmentValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MetadataMatcher_PathSegmentValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MetadataMatcher_PathSegmentValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MetadataMatcher_PathSegmentValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MetadataMatcher_PathSegmentValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MetadataMatcher_PathSegmentValidationError) ErrorName() string { + return "MetadataMatcher_PathSegmentValidationError" +} + +// Error satisfies the builtin error interface +func (e MetadataMatcher_PathSegmentValidationError) 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 %sMetadataMatcher_PathSegment.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MetadataMatcher_PathSegmentValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MetadataMatcher_PathSegmentValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/node.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/node.pb.go new file mode 100644 index 0000000000000..766cb04614030 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/node.pb.go @@ -0,0 +1,187 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/type/matcher/node.proto + +package matcher + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Specifies the way to match a Node. +// The match follows AND semantics. +type NodeMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies match criteria on the node id. + NodeId *StringMatcher `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + // Specifies match criteria on the node metadata. + NodeMetadatas []*StructMatcher `protobuf:"bytes,2,rep,name=node_metadatas,json=nodeMetadatas,proto3" json:"node_metadatas,omitempty"` +} + +func (x *NodeMatcher) Reset() { + *x = NodeMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_matcher_node_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NodeMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeMatcher) ProtoMessage() {} + +func (x *NodeMatcher) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_matcher_node_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NodeMatcher.ProtoReflect.Descriptor instead. +func (*NodeMatcher) Descriptor() ([]byte, []int) { + return file_envoy_type_matcher_node_proto_rawDescGZIP(), []int{0} +} + +func (x *NodeMatcher) GetNodeId() *StringMatcher { + if x != nil { + return x.NodeId + } + return nil +} + +func (x *NodeMatcher) GetNodeMetadatas() []*StructMatcher { + if x != nil { + return x.NodeMetadatas + } + return nil +} + +var File_envoy_type_matcher_node_proto protoreflect.FileDescriptor + +var file_envoy_type_matcher_node_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x12, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x93, 0x01, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, + 0x12, 0x48, 0x0a, 0x0e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d, 0x6e, 0x6f, 0x64, + 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x73, 0x42, 0x72, 0x0a, 0x20, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x09, + 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_type_matcher_node_proto_rawDescOnce sync.Once + file_envoy_type_matcher_node_proto_rawDescData = file_envoy_type_matcher_node_proto_rawDesc +) + +func file_envoy_type_matcher_node_proto_rawDescGZIP() []byte { + file_envoy_type_matcher_node_proto_rawDescOnce.Do(func() { + file_envoy_type_matcher_node_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_node_proto_rawDescData) + }) + return file_envoy_type_matcher_node_proto_rawDescData +} + +var file_envoy_type_matcher_node_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_type_matcher_node_proto_goTypes = []interface{}{ + (*NodeMatcher)(nil), // 0: envoy.type.matcher.NodeMatcher + (*StringMatcher)(nil), // 1: envoy.type.matcher.StringMatcher + (*StructMatcher)(nil), // 2: envoy.type.matcher.StructMatcher +} +var file_envoy_type_matcher_node_proto_depIdxs = []int32{ + 1, // 0: envoy.type.matcher.NodeMatcher.node_id:type_name -> envoy.type.matcher.StringMatcher + 2, // 1: envoy.type.matcher.NodeMatcher.node_metadatas:type_name -> envoy.type.matcher.StructMatcher + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_type_matcher_node_proto_init() } +func file_envoy_type_matcher_node_proto_init() { + if File_envoy_type_matcher_node_proto != nil { + return + } + file_envoy_type_matcher_string_proto_init() + file_envoy_type_matcher_struct_proto_init() + if !protoimpl.UnsafeEnabled { + file_envoy_type_matcher_node_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NodeMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_type_matcher_node_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_type_matcher_node_proto_goTypes, + DependencyIndexes: file_envoy_type_matcher_node_proto_depIdxs, + MessageInfos: file_envoy_type_matcher_node_proto_msgTypes, + }.Build() + File_envoy_type_matcher_node_proto = out.File + file_envoy_type_matcher_node_proto_rawDesc = nil + file_envoy_type_matcher_node_proto_goTypes = nil + file_envoy_type_matcher_node_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/node.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/node.pb.validate.go new file mode 100644 index 0000000000000..2b163e51e4f85 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/node.pb.validate.go @@ -0,0 +1,197 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/matcher/node.proto + +package matcher + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on NodeMatcher 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 *NodeMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on NodeMatcher 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 NodeMatcherMultiError, or +// nil if none found. +func (m *NodeMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *NodeMatcher) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetNodeId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, NodeMatcherValidationError{ + field: "NodeId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, NodeMatcherValidationError{ + field: "NodeId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNodeId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return NodeMatcherValidationError{ + field: "NodeId", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetNodeMetadatas() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, NodeMatcherValidationError{ + field: fmt.Sprintf("NodeMetadatas[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, NodeMatcherValidationError{ + field: fmt.Sprintf("NodeMetadatas[%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 NodeMatcherValidationError{ + field: fmt.Sprintf("NodeMetadatas[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return NodeMatcherMultiError(errors) + } + return nil +} + +// NodeMatcherMultiError is an error wrapping multiple validation errors +// returned by NodeMatcher.ValidateAll() if the designated constraints aren't met. +type NodeMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m NodeMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m NodeMatcherMultiError) AllErrors() []error { return m } + +// NodeMatcherValidationError is the validation error returned by +// NodeMatcher.Validate if the designated constraints aren't met. +type NodeMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e NodeMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e NodeMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e NodeMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e NodeMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e NodeMatcherValidationError) ErrorName() string { return "NodeMatcherValidationError" } + +// Error satisfies the builtin error interface +func (e NodeMatcherValidationError) 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 %sNodeMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = NodeMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = NodeMatcherValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/number.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/number.pb.go new file mode 100644 index 0000000000000..b423e4141fa18 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/number.pb.go @@ -0,0 +1,212 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/type/matcher/number.proto + +package matcher + +import ( + _type "github.com/cilium/proxy/go/envoy/type" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Specifies the way to match a double value. +type DoubleMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to MatchPattern: + // + // *DoubleMatcher_Range + // *DoubleMatcher_Exact + MatchPattern isDoubleMatcher_MatchPattern `protobuf_oneof:"match_pattern"` +} + +func (x *DoubleMatcher) Reset() { + *x = DoubleMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_matcher_number_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DoubleMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DoubleMatcher) ProtoMessage() {} + +func (x *DoubleMatcher) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_matcher_number_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DoubleMatcher.ProtoReflect.Descriptor instead. +func (*DoubleMatcher) Descriptor() ([]byte, []int) { + return file_envoy_type_matcher_number_proto_rawDescGZIP(), []int{0} +} + +func (m *DoubleMatcher) GetMatchPattern() isDoubleMatcher_MatchPattern { + if m != nil { + return m.MatchPattern + } + return nil +} + +func (x *DoubleMatcher) GetRange() *_type.DoubleRange { + if x, ok := x.GetMatchPattern().(*DoubleMatcher_Range); ok { + return x.Range + } + return nil +} + +func (x *DoubleMatcher) GetExact() float64 { + if x, ok := x.GetMatchPattern().(*DoubleMatcher_Exact); ok { + return x.Exact + } + return 0 +} + +type isDoubleMatcher_MatchPattern interface { + isDoubleMatcher_MatchPattern() +} + +type DoubleMatcher_Range struct { + // If specified, the input double value must be in the range specified here. + // Note: The range is using half-open interval semantics [start, end). + Range *_type.DoubleRange `protobuf:"bytes,1,opt,name=range,proto3,oneof"` +} + +type DoubleMatcher_Exact struct { + // If specified, the input double value must be equal to the value specified here. + Exact float64 `protobuf:"fixed64,2,opt,name=exact,proto3,oneof"` +} + +func (*DoubleMatcher_Range) isDoubleMatcher_MatchPattern() {} + +func (*DoubleMatcher_Exact) isDoubleMatcher_MatchPattern() {} + +var File_envoy_type_matcher_number_proto protoreflect.FileDescriptor + +var file_envoy_type_matcher_number_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x12, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x1a, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x6e, 0x0a, 0x0d, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, + 0x52, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x42, + 0x14, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x74, 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x0b, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_type_matcher_number_proto_rawDescOnce sync.Once + file_envoy_type_matcher_number_proto_rawDescData = file_envoy_type_matcher_number_proto_rawDesc +) + +func file_envoy_type_matcher_number_proto_rawDescGZIP() []byte { + file_envoy_type_matcher_number_proto_rawDescOnce.Do(func() { + file_envoy_type_matcher_number_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_number_proto_rawDescData) + }) + return file_envoy_type_matcher_number_proto_rawDescData +} + +var file_envoy_type_matcher_number_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_type_matcher_number_proto_goTypes = []interface{}{ + (*DoubleMatcher)(nil), // 0: envoy.type.matcher.DoubleMatcher + (*_type.DoubleRange)(nil), // 1: envoy.type.DoubleRange +} +var file_envoy_type_matcher_number_proto_depIdxs = []int32{ + 1, // 0: envoy.type.matcher.DoubleMatcher.range:type_name -> envoy.type.DoubleRange + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_type_matcher_number_proto_init() } +func file_envoy_type_matcher_number_proto_init() { + if File_envoy_type_matcher_number_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_type_matcher_number_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DoubleMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_type_matcher_number_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*DoubleMatcher_Range)(nil), + (*DoubleMatcher_Exact)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_type_matcher_number_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_type_matcher_number_proto_goTypes, + DependencyIndexes: file_envoy_type_matcher_number_proto_depIdxs, + MessageInfos: file_envoy_type_matcher_number_proto_msgTypes, + }.Build() + File_envoy_type_matcher_number_proto = out.File + file_envoy_type_matcher_number_proto_rawDesc = nil + file_envoy_type_matcher_number_proto_goTypes = nil + file_envoy_type_matcher_number_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/number.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/number.pb.validate.go new file mode 100644 index 0000000000000..fee3b2704e3ee --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/number.pb.validate.go @@ -0,0 +1,183 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/matcher/number.proto + +package matcher + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on DoubleMatcher 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 *DoubleMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DoubleMatcher 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 DoubleMatcherMultiError, or +// nil if none found. +func (m *DoubleMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *DoubleMatcher) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.MatchPattern.(type) { + + case *DoubleMatcher_Range: + + if all { + switch v := interface{}(m.GetRange()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DoubleMatcherValidationError{ + field: "Range", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DoubleMatcherValidationError{ + field: "Range", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRange()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DoubleMatcherValidationError{ + field: "Range", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *DoubleMatcher_Exact: + // no validation rules for Exact + + default: + err := DoubleMatcherValidationError{ + field: "MatchPattern", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return DoubleMatcherMultiError(errors) + } + return nil +} + +// DoubleMatcherMultiError is an error wrapping multiple validation errors +// returned by DoubleMatcher.ValidateAll() if the designated constraints +// aren't met. +type DoubleMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DoubleMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DoubleMatcherMultiError) AllErrors() []error { return m } + +// DoubleMatcherValidationError is the validation error returned by +// DoubleMatcher.Validate if the designated constraints aren't met. +type DoubleMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DoubleMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DoubleMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DoubleMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DoubleMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DoubleMatcherValidationError) ErrorName() string { return "DoubleMatcherValidationError" } + +// Error satisfies the builtin error interface +func (e DoubleMatcherValidationError) 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 %sDoubleMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DoubleMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DoubleMatcherValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/path.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/path.pb.go new file mode 100644 index 0000000000000..8aee77a17260d --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/path.pb.go @@ -0,0 +1,196 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/type/matcher/path.proto + +package matcher + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Specifies the way to match a path on HTTP request. +type PathMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Rule: + // + // *PathMatcher_Path + Rule isPathMatcher_Rule `protobuf_oneof:"rule"` +} + +func (x *PathMatcher) Reset() { + *x = PathMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_matcher_path_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PathMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PathMatcher) ProtoMessage() {} + +func (x *PathMatcher) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_matcher_path_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PathMatcher.ProtoReflect.Descriptor instead. +func (*PathMatcher) Descriptor() ([]byte, []int) { + return file_envoy_type_matcher_path_proto_rawDescGZIP(), []int{0} +} + +func (m *PathMatcher) GetRule() isPathMatcher_Rule { + if m != nil { + return m.Rule + } + return nil +} + +func (x *PathMatcher) GetPath() *StringMatcher { + if x, ok := x.GetRule().(*PathMatcher_Path); ok { + return x.Path + } + return nil +} + +type isPathMatcher_Rule interface { + isPathMatcher_Rule() +} + +type PathMatcher_Path struct { + // The `path` must match the URL path portion of the :path header. The query and fragment + // string (if present) are removed in the URL path portion. + // For example, the path */data* will match the *:path* header */data#fragment?param=value*. + Path *StringMatcher `protobuf:"bytes,1,opt,name=path,proto3,oneof"` +} + +func (*PathMatcher_Path) isPathMatcher_Rule() {} + +var File_envoy_type_matcher_path_proto protoreflect.FileDescriptor + +var file_envoy_type_matcher_path_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x12, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x5d, 0x0a, 0x0b, + 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, 0x0b, + 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x72, 0x0a, 0x20, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, + 0x09, 0x50, 0x61, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_type_matcher_path_proto_rawDescOnce sync.Once + file_envoy_type_matcher_path_proto_rawDescData = file_envoy_type_matcher_path_proto_rawDesc +) + +func file_envoy_type_matcher_path_proto_rawDescGZIP() []byte { + file_envoy_type_matcher_path_proto_rawDescOnce.Do(func() { + file_envoy_type_matcher_path_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_path_proto_rawDescData) + }) + return file_envoy_type_matcher_path_proto_rawDescData +} + +var file_envoy_type_matcher_path_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_type_matcher_path_proto_goTypes = []interface{}{ + (*PathMatcher)(nil), // 0: envoy.type.matcher.PathMatcher + (*StringMatcher)(nil), // 1: envoy.type.matcher.StringMatcher +} +var file_envoy_type_matcher_path_proto_depIdxs = []int32{ + 1, // 0: envoy.type.matcher.PathMatcher.path:type_name -> envoy.type.matcher.StringMatcher + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_type_matcher_path_proto_init() } +func file_envoy_type_matcher_path_proto_init() { + if File_envoy_type_matcher_path_proto != nil { + return + } + file_envoy_type_matcher_string_proto_init() + if !protoimpl.UnsafeEnabled { + file_envoy_type_matcher_path_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PathMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_type_matcher_path_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*PathMatcher_Path)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_type_matcher_path_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_type_matcher_path_proto_goTypes, + DependencyIndexes: file_envoy_type_matcher_path_proto_depIdxs, + MessageInfos: file_envoy_type_matcher_path_proto_msgTypes, + }.Build() + File_envoy_type_matcher_path_proto = out.File + file_envoy_type_matcher_path_proto_rawDesc = nil + file_envoy_type_matcher_path_proto_goTypes = nil + file_envoy_type_matcher_path_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/path.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/path.pb.validate.go new file mode 100644 index 0000000000000..0cb48e3b79635 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/path.pb.validate.go @@ -0,0 +1,190 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/matcher/path.proto + +package matcher + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on PathMatcher 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 *PathMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PathMatcher 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 PathMatcherMultiError, or +// nil if none found. +func (m *PathMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *PathMatcher) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.Rule.(type) { + + case *PathMatcher_Path: + + if m.GetPath() == nil { + err := PathMatcherValidationError{ + field: "Path", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetPath()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PathMatcherValidationError{ + field: "Path", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PathMatcherValidationError{ + field: "Path", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPath()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PathMatcherValidationError{ + field: "Path", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := PathMatcherValidationError{ + field: "Rule", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return PathMatcherMultiError(errors) + } + return nil +} + +// PathMatcherMultiError is an error wrapping multiple validation errors +// returned by PathMatcher.ValidateAll() if the designated constraints aren't met. +type PathMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PathMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PathMatcherMultiError) AllErrors() []error { return m } + +// PathMatcherValidationError is the validation error returned by +// PathMatcher.Validate if the designated constraints aren't met. +type PathMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PathMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PathMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PathMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PathMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PathMatcherValidationError) ErrorName() string { return "PathMatcherValidationError" } + +// Error satisfies the builtin error interface +func (e PathMatcherValidationError) 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 %sPathMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PathMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PathMatcherValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/regex.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/regex.pb.go new file mode 100644 index 0000000000000..345ca67544258 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/regex.pb.go @@ -0,0 +1,393 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/type/matcher/regex.proto + +package matcher + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// A regex matcher designed for safety when used with untrusted input. +type RegexMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to EngineType: + // + // *RegexMatcher_GoogleRe2 + EngineType isRegexMatcher_EngineType `protobuf_oneof:"engine_type"` + // The regex match string. The string must be supported by the configured engine. + Regex string `protobuf:"bytes,2,opt,name=regex,proto3" json:"regex,omitempty"` +} + +func (x *RegexMatcher) Reset() { + *x = RegexMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_matcher_regex_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegexMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegexMatcher) ProtoMessage() {} + +func (x *RegexMatcher) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_matcher_regex_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegexMatcher.ProtoReflect.Descriptor instead. +func (*RegexMatcher) Descriptor() ([]byte, []int) { + return file_envoy_type_matcher_regex_proto_rawDescGZIP(), []int{0} +} + +func (m *RegexMatcher) GetEngineType() isRegexMatcher_EngineType { + if m != nil { + return m.EngineType + } + return nil +} + +func (x *RegexMatcher) GetGoogleRe2() *RegexMatcher_GoogleRE2 { + if x, ok := x.GetEngineType().(*RegexMatcher_GoogleRe2); ok { + return x.GoogleRe2 + } + return nil +} + +func (x *RegexMatcher) GetRegex() string { + if x != nil { + return x.Regex + } + return "" +} + +type isRegexMatcher_EngineType interface { + isRegexMatcher_EngineType() +} + +type RegexMatcher_GoogleRe2 struct { + // Google's RE2 regex engine. + GoogleRe2 *RegexMatcher_GoogleRE2 `protobuf:"bytes,1,opt,name=google_re2,json=googleRe2,proto3,oneof"` +} + +func (*RegexMatcher_GoogleRe2) isRegexMatcher_EngineType() {} + +// Describes how to match a string and then produce a new string using a regular +// expression and a substitution string. +type RegexMatchAndSubstitute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The regular expression used to find portions of a string (hereafter called + // the "subject string") that should be replaced. When a new string is + // produced during the substitution operation, the new string is initially + // the same as the subject string, but then all matches in the subject string + // are replaced by the substitution string. If replacing all matches isn't + // desired, regular expression anchors can be used to ensure a single match, + // so as to replace just one occurrence of a pattern. Capture groups can be + // used in the pattern to extract portions of the subject string, and then + // referenced in the substitution string. + Pattern *RegexMatcher `protobuf:"bytes,1,opt,name=pattern,proto3" json:"pattern,omitempty"` + // The string that should be substituted into matching portions of the + // subject string during a substitution operation to produce a new string. + // Capture groups in the pattern can be referenced in the substitution + // string. Note, however, that the syntax for referring to capture groups is + // defined by the chosen regular expression engine. Google's `RE2 + // `_ regular expression engine uses a + // backslash followed by the capture group number to denote a numbered + // capture group. E.g., “\1“ refers to capture group 1, and “\2“ refers + // to capture group 2. + Substitution string `protobuf:"bytes,2,opt,name=substitution,proto3" json:"substitution,omitempty"` +} + +func (x *RegexMatchAndSubstitute) Reset() { + *x = RegexMatchAndSubstitute{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_matcher_regex_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegexMatchAndSubstitute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegexMatchAndSubstitute) ProtoMessage() {} + +func (x *RegexMatchAndSubstitute) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_matcher_regex_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegexMatchAndSubstitute.ProtoReflect.Descriptor instead. +func (*RegexMatchAndSubstitute) Descriptor() ([]byte, []int) { + return file_envoy_type_matcher_regex_proto_rawDescGZIP(), []int{1} +} + +func (x *RegexMatchAndSubstitute) GetPattern() *RegexMatcher { + if x != nil { + return x.Pattern + } + return nil +} + +func (x *RegexMatchAndSubstitute) GetSubstitution() string { + if x != nil { + return x.Substitution + } + return "" +} + +// Google's `RE2 `_ regex engine. The regex string must adhere to +// the documented `syntax `_. The engine is designed +// to complete execution in linear time as well as limit the amount of memory used. +// +// Envoy supports program size checking via runtime. The runtime keys “re2.max_program_size.error_level“ +// and “re2.max_program_size.warn_level“ can be set to integers as the maximum program size or +// complexity that a compiled regex can have before an exception is thrown or a warning is +// logged, respectively. “re2.max_program_size.error_level“ defaults to 100, and +// “re2.max_program_size.warn_level“ has no default if unset (will not check/log a warning). +// +// Envoy emits two stats for tracking the program size of regexes: the histogram `re2.program_size`, +// which records the program size, and the counter `re2.exceeded_warn_level`, which is incremented +// each time the program size exceeds the warn level threshold. +type RegexMatcher_GoogleRE2 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This field controls the RE2 "program size" which is a rough estimate of how complex a + // compiled regex is to evaluate. A regex that has a program size greater than the configured + // value will fail to compile. In this case, the configured max program size can be increased + // or the regex can be simplified. If not specified, the default is 100. + // + // This field is deprecated; regexp validation should be performed on the management server + // instead of being done by each individual client. + // + // Deprecated: Do not use. + MaxProgramSize *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=max_program_size,json=maxProgramSize,proto3" json:"max_program_size,omitempty"` +} + +func (x *RegexMatcher_GoogleRE2) Reset() { + *x = RegexMatcher_GoogleRE2{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_matcher_regex_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegexMatcher_GoogleRE2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegexMatcher_GoogleRE2) ProtoMessage() {} + +func (x *RegexMatcher_GoogleRE2) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_matcher_regex_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegexMatcher_GoogleRE2.ProtoReflect.Descriptor instead. +func (*RegexMatcher_GoogleRE2) Descriptor() ([]byte, []int) { + return file_envoy_type_matcher_regex_proto_rawDescGZIP(), []int{0, 0} +} + +// Deprecated: Do not use. +func (x *RegexMatcher_GoogleRE2) GetMaxProgramSize() *wrapperspb.UInt32Value { + if x != nil { + return x.MaxProgramSize + } + return nil +} + +var File_envoy_type_matcher_regex_proto protoreflect.FileDescriptor + +var file_envoy_type_matcher_regex_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x12, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xf1, 0x01, 0x0a, + 0x0c, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x55, 0x0a, + 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x45, 0x32, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x52, 0x65, 0x32, 0x12, 0x1d, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x72, 0x65, + 0x67, 0x65, 0x78, 0x1a, 0x57, 0x0a, 0x09, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x45, 0x32, + 0x12, 0x4a, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, + 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0e, 0x6d, 0x61, + 0x78, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x12, 0x0a, 0x0b, + 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, + 0x22, 0x79, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41, 0x6e, + 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x70, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x07, + 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x73, 0x74, + 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, + 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x73, 0x0a, 0x20, 0x69, + 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, + 0x0a, 0x52, 0x65, 0x67, 0x65, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_type_matcher_regex_proto_rawDescOnce sync.Once + file_envoy_type_matcher_regex_proto_rawDescData = file_envoy_type_matcher_regex_proto_rawDesc +) + +func file_envoy_type_matcher_regex_proto_rawDescGZIP() []byte { + file_envoy_type_matcher_regex_proto_rawDescOnce.Do(func() { + file_envoy_type_matcher_regex_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_regex_proto_rawDescData) + }) + return file_envoy_type_matcher_regex_proto_rawDescData +} + +var file_envoy_type_matcher_regex_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_type_matcher_regex_proto_goTypes = []interface{}{ + (*RegexMatcher)(nil), // 0: envoy.type.matcher.RegexMatcher + (*RegexMatchAndSubstitute)(nil), // 1: envoy.type.matcher.RegexMatchAndSubstitute + (*RegexMatcher_GoogleRE2)(nil), // 2: envoy.type.matcher.RegexMatcher.GoogleRE2 + (*wrapperspb.UInt32Value)(nil), // 3: google.protobuf.UInt32Value +} +var file_envoy_type_matcher_regex_proto_depIdxs = []int32{ + 2, // 0: envoy.type.matcher.RegexMatcher.google_re2:type_name -> envoy.type.matcher.RegexMatcher.GoogleRE2 + 0, // 1: envoy.type.matcher.RegexMatchAndSubstitute.pattern:type_name -> envoy.type.matcher.RegexMatcher + 3, // 2: envoy.type.matcher.RegexMatcher.GoogleRE2.max_program_size:type_name -> google.protobuf.UInt32Value + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_envoy_type_matcher_regex_proto_init() } +func file_envoy_type_matcher_regex_proto_init() { + if File_envoy_type_matcher_regex_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_type_matcher_regex_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegexMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_type_matcher_regex_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegexMatchAndSubstitute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_type_matcher_regex_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegexMatcher_GoogleRE2); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_type_matcher_regex_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*RegexMatcher_GoogleRe2)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_type_matcher_regex_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_type_matcher_regex_proto_goTypes, + DependencyIndexes: file_envoy_type_matcher_regex_proto_depIdxs, + MessageInfos: file_envoy_type_matcher_regex_proto_msgTypes, + }.Build() + File_envoy_type_matcher_regex_proto = out.File + file_envoy_type_matcher_regex_proto_rawDesc = nil + file_envoy_type_matcher_regex_proto_goTypes = nil + file_envoy_type_matcher_regex_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/regex.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/regex.pb.validate.go new file mode 100644 index 0000000000000..b6b2858ab7b80 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/regex.pb.validate.go @@ -0,0 +1,463 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/matcher/regex.proto + +package matcher + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RegexMatcher 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 *RegexMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RegexMatcher 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 RegexMatcherMultiError, or +// nil if none found. +func (m *RegexMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *RegexMatcher) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetRegex()) < 1 { + err := RegexMatcherValidationError{ + field: "Regex", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + switch m.EngineType.(type) { + + case *RegexMatcher_GoogleRe2: + + if m.GetGoogleRe2() == nil { + err := RegexMatcherValidationError{ + field: "GoogleRe2", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetGoogleRe2()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RegexMatcherValidationError{ + field: "GoogleRe2", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RegexMatcherValidationError{ + field: "GoogleRe2", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGoogleRe2()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RegexMatcherValidationError{ + field: "GoogleRe2", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := RegexMatcherValidationError{ + field: "EngineType", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return RegexMatcherMultiError(errors) + } + return nil +} + +// RegexMatcherMultiError is an error wrapping multiple validation errors +// returned by RegexMatcher.ValidateAll() if the designated constraints aren't met. +type RegexMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RegexMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RegexMatcherMultiError) AllErrors() []error { return m } + +// RegexMatcherValidationError is the validation error returned by +// RegexMatcher.Validate if the designated constraints aren't met. +type RegexMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RegexMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RegexMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RegexMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RegexMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RegexMatcherValidationError) ErrorName() string { return "RegexMatcherValidationError" } + +// Error satisfies the builtin error interface +func (e RegexMatcherValidationError) 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 %sRegexMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RegexMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RegexMatcherValidationError{} + +// Validate checks the field values on RegexMatchAndSubstitute 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 *RegexMatchAndSubstitute) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RegexMatchAndSubstitute 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 +// RegexMatchAndSubstituteMultiError, or nil if none found. +func (m *RegexMatchAndSubstitute) ValidateAll() error { + return m.validate(true) +} + +func (m *RegexMatchAndSubstitute) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetPattern()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RegexMatchAndSubstituteValidationError{ + field: "Pattern", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RegexMatchAndSubstituteValidationError{ + field: "Pattern", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPattern()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RegexMatchAndSubstituteValidationError{ + field: "Pattern", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Substitution + + if len(errors) > 0 { + return RegexMatchAndSubstituteMultiError(errors) + } + return nil +} + +// RegexMatchAndSubstituteMultiError is an error wrapping multiple validation +// errors returned by RegexMatchAndSubstitute.ValidateAll() if the designated +// constraints aren't met. +type RegexMatchAndSubstituteMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RegexMatchAndSubstituteMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RegexMatchAndSubstituteMultiError) AllErrors() []error { return m } + +// RegexMatchAndSubstituteValidationError is the validation error returned by +// RegexMatchAndSubstitute.Validate if the designated constraints aren't met. +type RegexMatchAndSubstituteValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RegexMatchAndSubstituteValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RegexMatchAndSubstituteValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RegexMatchAndSubstituteValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RegexMatchAndSubstituteValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RegexMatchAndSubstituteValidationError) ErrorName() string { + return "RegexMatchAndSubstituteValidationError" +} + +// Error satisfies the builtin error interface +func (e RegexMatchAndSubstituteValidationError) 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 %sRegexMatchAndSubstitute.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RegexMatchAndSubstituteValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RegexMatchAndSubstituteValidationError{} + +// Validate checks the field values on RegexMatcher_GoogleRE2 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 *RegexMatcher_GoogleRE2) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RegexMatcher_GoogleRE2 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 +// RegexMatcher_GoogleRE2MultiError, or nil if none found. +func (m *RegexMatcher_GoogleRE2) ValidateAll() error { + return m.validate(true) +} + +func (m *RegexMatcher_GoogleRE2) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetMaxProgramSize()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RegexMatcher_GoogleRE2ValidationError{ + field: "MaxProgramSize", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RegexMatcher_GoogleRE2ValidationError{ + field: "MaxProgramSize", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMaxProgramSize()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RegexMatcher_GoogleRE2ValidationError{ + field: "MaxProgramSize", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RegexMatcher_GoogleRE2MultiError(errors) + } + return nil +} + +// RegexMatcher_GoogleRE2MultiError is an error wrapping multiple validation +// errors returned by RegexMatcher_GoogleRE2.ValidateAll() if the designated +// constraints aren't met. +type RegexMatcher_GoogleRE2MultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RegexMatcher_GoogleRE2MultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RegexMatcher_GoogleRE2MultiError) AllErrors() []error { return m } + +// RegexMatcher_GoogleRE2ValidationError is the validation error returned by +// RegexMatcher_GoogleRE2.Validate if the designated constraints aren't met. +type RegexMatcher_GoogleRE2ValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RegexMatcher_GoogleRE2ValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RegexMatcher_GoogleRE2ValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RegexMatcher_GoogleRE2ValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RegexMatcher_GoogleRE2ValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RegexMatcher_GoogleRE2ValidationError) ErrorName() string { + return "RegexMatcher_GoogleRE2ValidationError" +} + +// Error satisfies the builtin error interface +func (e RegexMatcher_GoogleRE2ValidationError) 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 %sRegexMatcher_GoogleRE2.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RegexMatcher_GoogleRE2ValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RegexMatcher_GoogleRE2ValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/string.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/string.pb.go new file mode 100644 index 0000000000000..24acc0c7e4283 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/string.pb.go @@ -0,0 +1,383 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/type/matcher/string.proto + +package matcher + +import ( + _ "github.com/cilium/proxy/go/envoy/annotations" + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Specifies the way to match a string. +// [#next-free-field: 7] +type StringMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to MatchPattern: + // + // *StringMatcher_Exact + // *StringMatcher_Prefix + // *StringMatcher_Suffix + // *StringMatcher_Regex + // *StringMatcher_SafeRegex + MatchPattern isStringMatcher_MatchPattern `protobuf_oneof:"match_pattern"` + // If true, indicates the exact/prefix/suffix matching should be case insensitive. This has no + // effect for the safe_regex match. + // For example, the matcher *data* will match both input string *Data* and *data* if set to true. + IgnoreCase bool `protobuf:"varint,6,opt,name=ignore_case,json=ignoreCase,proto3" json:"ignore_case,omitempty"` +} + +func (x *StringMatcher) Reset() { + *x = StringMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_matcher_string_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StringMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StringMatcher) ProtoMessage() {} + +func (x *StringMatcher) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_matcher_string_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StringMatcher.ProtoReflect.Descriptor instead. +func (*StringMatcher) Descriptor() ([]byte, []int) { + return file_envoy_type_matcher_string_proto_rawDescGZIP(), []int{0} +} + +func (m *StringMatcher) GetMatchPattern() isStringMatcher_MatchPattern { + if m != nil { + return m.MatchPattern + } + return nil +} + +func (x *StringMatcher) GetExact() string { + if x, ok := x.GetMatchPattern().(*StringMatcher_Exact); ok { + return x.Exact + } + return "" +} + +func (x *StringMatcher) GetPrefix() string { + if x, ok := x.GetMatchPattern().(*StringMatcher_Prefix); ok { + return x.Prefix + } + return "" +} + +func (x *StringMatcher) GetSuffix() string { + if x, ok := x.GetMatchPattern().(*StringMatcher_Suffix); ok { + return x.Suffix + } + return "" +} + +// Deprecated: Do not use. +func (x *StringMatcher) GetRegex() string { + if x, ok := x.GetMatchPattern().(*StringMatcher_Regex); ok { + return x.Regex + } + return "" +} + +func (x *StringMatcher) GetSafeRegex() *RegexMatcher { + if x, ok := x.GetMatchPattern().(*StringMatcher_SafeRegex); ok { + return x.SafeRegex + } + return nil +} + +func (x *StringMatcher) GetIgnoreCase() bool { + if x != nil { + return x.IgnoreCase + } + return false +} + +type isStringMatcher_MatchPattern interface { + isStringMatcher_MatchPattern() +} + +type StringMatcher_Exact struct { + // The input string must match exactly the string specified here. + // + // Examples: + // + // * *abc* only matches the value *abc*. + Exact string `protobuf:"bytes,1,opt,name=exact,proto3,oneof"` +} + +type StringMatcher_Prefix struct { + // The input string must have the prefix specified here. + // Note: empty prefix is not allowed, please use regex instead. + // + // Examples: + // + // * *abc* matches the value *abc.xyz* + Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3,oneof"` +} + +type StringMatcher_Suffix struct { + // The input string must have the suffix specified here. + // Note: empty prefix is not allowed, please use regex instead. + // + // Examples: + // + // * *abc* matches the value *xyz.abc* + Suffix string `protobuf:"bytes,3,opt,name=suffix,proto3,oneof"` +} + +type StringMatcher_Regex struct { + // The input string must match the regular expression specified here. + // The regex grammar is defined `here + // `_. + // + // Examples: + // + // * The regex “\d{3}“ matches the value *123* + // * The regex “\d{3}“ does not match the value *1234* + // * The regex “\d{3}“ does not match the value *123.456* + // + // .. attention:: + // + // This field has been deprecated in favor of `safe_regex` as it is not safe for use with + // untrusted input in all cases. + // + // Deprecated: Do not use. + Regex string `protobuf:"bytes,4,opt,name=regex,proto3,oneof"` +} + +type StringMatcher_SafeRegex struct { + // The input string must match the regular expression specified here. + SafeRegex *RegexMatcher `protobuf:"bytes,5,opt,name=safe_regex,json=safeRegex,proto3,oneof"` +} + +func (*StringMatcher_Exact) isStringMatcher_MatchPattern() {} + +func (*StringMatcher_Prefix) isStringMatcher_MatchPattern() {} + +func (*StringMatcher_Suffix) isStringMatcher_MatchPattern() {} + +func (*StringMatcher_Regex) isStringMatcher_MatchPattern() {} + +func (*StringMatcher_SafeRegex) isStringMatcher_MatchPattern() {} + +// Specifies a list of ways to match a string. +type ListStringMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Patterns []*StringMatcher `protobuf:"bytes,1,rep,name=patterns,proto3" json:"patterns,omitempty"` +} + +func (x *ListStringMatcher) Reset() { + *x = ListStringMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_matcher_string_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListStringMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListStringMatcher) ProtoMessage() {} + +func (x *ListStringMatcher) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_matcher_string_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListStringMatcher.ProtoReflect.Descriptor instead. +func (*ListStringMatcher) Descriptor() ([]byte, []int) { + return file_envoy_type_matcher_string_proto_rawDescGZIP(), []int{1} +} + +func (x *ListStringMatcher) GetPatterns() []*StringMatcher { + if x != nil { + return x.Patterns + } + return nil +} + +var File_envoy_type_matcher_string_proto protoreflect.FileDescriptor + +var file_envoy_type_matcher_string_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x12, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x1a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 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, 0x9b, 0x02, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x12, 0x21, 0x0a, 0x06, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, + 0x21, 0x0a, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, + 0x69, 0x78, 0x12, 0x28, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x10, 0x18, 0x01, 0xfa, 0x42, 0x05, 0x72, 0x03, 0x28, 0x80, 0x08, 0xb8, 0xee, 0xf2, + 0xd2, 0x05, 0x01, 0x48, 0x00, 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x12, 0x4b, 0x0a, 0x0a, + 0x73, 0x61, 0x66, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, + 0x73, 0x61, 0x66, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x67, 0x6e, + 0x6f, 0x72, 0x65, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x43, 0x61, 0x73, 0x65, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, + 0x22, 0x5c, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, + 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x42, 0x74, + 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x42, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0xba, 0x80, 0xc8, 0xd1, + 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_type_matcher_string_proto_rawDescOnce sync.Once + file_envoy_type_matcher_string_proto_rawDescData = file_envoy_type_matcher_string_proto_rawDesc +) + +func file_envoy_type_matcher_string_proto_rawDescGZIP() []byte { + file_envoy_type_matcher_string_proto_rawDescOnce.Do(func() { + file_envoy_type_matcher_string_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_string_proto_rawDescData) + }) + return file_envoy_type_matcher_string_proto_rawDescData +} + +var file_envoy_type_matcher_string_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_type_matcher_string_proto_goTypes = []interface{}{ + (*StringMatcher)(nil), // 0: envoy.type.matcher.StringMatcher + (*ListStringMatcher)(nil), // 1: envoy.type.matcher.ListStringMatcher + (*RegexMatcher)(nil), // 2: envoy.type.matcher.RegexMatcher +} +var file_envoy_type_matcher_string_proto_depIdxs = []int32{ + 2, // 0: envoy.type.matcher.StringMatcher.safe_regex:type_name -> envoy.type.matcher.RegexMatcher + 0, // 1: envoy.type.matcher.ListStringMatcher.patterns:type_name -> envoy.type.matcher.StringMatcher + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_type_matcher_string_proto_init() } +func file_envoy_type_matcher_string_proto_init() { + if File_envoy_type_matcher_string_proto != nil { + return + } + file_envoy_type_matcher_regex_proto_init() + if !protoimpl.UnsafeEnabled { + file_envoy_type_matcher_string_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StringMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_type_matcher_string_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListStringMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_type_matcher_string_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*StringMatcher_Exact)(nil), + (*StringMatcher_Prefix)(nil), + (*StringMatcher_Suffix)(nil), + (*StringMatcher_Regex)(nil), + (*StringMatcher_SafeRegex)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_type_matcher_string_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_type_matcher_string_proto_goTypes, + DependencyIndexes: file_envoy_type_matcher_string_proto_depIdxs, + MessageInfos: file_envoy_type_matcher_string_proto_msgTypes, + }.Build() + File_envoy_type_matcher_string_proto = out.File + file_envoy_type_matcher_string_proto_rawDesc = nil + file_envoy_type_matcher_string_proto_goTypes = nil + file_envoy_type_matcher_string_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/string.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/string.pb.validate.go new file mode 100644 index 0000000000000..02e3b0608da85 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/string.pb.validate.go @@ -0,0 +1,381 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/matcher/string.proto + +package matcher + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on StringMatcher 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 *StringMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StringMatcher 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 StringMatcherMultiError, or +// nil if none found. +func (m *StringMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *StringMatcher) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for IgnoreCase + + switch m.MatchPattern.(type) { + + case *StringMatcher_Exact: + // no validation rules for Exact + + case *StringMatcher_Prefix: + + if utf8.RuneCountInString(m.GetPrefix()) < 1 { + err := StringMatcherValidationError{ + field: "Prefix", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *StringMatcher_Suffix: + + if utf8.RuneCountInString(m.GetSuffix()) < 1 { + err := StringMatcherValidationError{ + field: "Suffix", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *StringMatcher_Regex: + + if len(m.GetRegex()) > 1024 { + err := StringMatcherValidationError{ + field: "Regex", + reason: "value length must be at most 1024 bytes", + } + if !all { + return err + } + errors = append(errors, err) + } + + case *StringMatcher_SafeRegex: + + if m.GetSafeRegex() == nil { + err := StringMatcherValidationError{ + field: "SafeRegex", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetSafeRegex()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StringMatcherValidationError{ + field: "SafeRegex", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StringMatcherValidationError{ + field: "SafeRegex", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSafeRegex()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StringMatcherValidationError{ + field: "SafeRegex", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := StringMatcherValidationError{ + field: "MatchPattern", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return StringMatcherMultiError(errors) + } + return nil +} + +// StringMatcherMultiError is an error wrapping multiple validation errors +// returned by StringMatcher.ValidateAll() if the designated constraints +// aren't met. +type StringMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StringMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StringMatcherMultiError) AllErrors() []error { return m } + +// StringMatcherValidationError is the validation error returned by +// StringMatcher.Validate if the designated constraints aren't met. +type StringMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StringMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StringMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StringMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StringMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StringMatcherValidationError) ErrorName() string { return "StringMatcherValidationError" } + +// Error satisfies the builtin error interface +func (e StringMatcherValidationError) 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 %sStringMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StringMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StringMatcherValidationError{} + +// Validate checks the field values on ListStringMatcher 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 *ListStringMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListStringMatcher 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 +// ListStringMatcherMultiError, or nil if none found. +func (m *ListStringMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *ListStringMatcher) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetPatterns()) < 1 { + err := ListStringMatcherValidationError{ + field: "Patterns", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetPatterns() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListStringMatcherValidationError{ + field: fmt.Sprintf("Patterns[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListStringMatcherValidationError{ + field: fmt.Sprintf("Patterns[%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 ListStringMatcherValidationError{ + field: fmt.Sprintf("Patterns[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ListStringMatcherMultiError(errors) + } + return nil +} + +// ListStringMatcherMultiError is an error wrapping multiple validation errors +// returned by ListStringMatcher.ValidateAll() if the designated constraints +// aren't met. +type ListStringMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListStringMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListStringMatcherMultiError) AllErrors() []error { return m } + +// ListStringMatcherValidationError is the validation error returned by +// ListStringMatcher.Validate if the designated constraints aren't met. +type ListStringMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListStringMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListStringMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListStringMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListStringMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListStringMatcherValidationError) ErrorName() string { + return "ListStringMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e ListStringMatcherValidationError) 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 %sListStringMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListStringMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListStringMatcherValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/struct.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/struct.pb.go new file mode 100644 index 0000000000000..b61a615a4bd23 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/struct.pb.go @@ -0,0 +1,324 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/type/matcher/struct.proto + +package matcher + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// StructMatcher provides a general interface to check if a given value is matched in +// google.protobuf.Struct. It uses `path` to retrieve the value +// from the struct and then check if it's matched to the specified value. +// +// For example, for the following Struct: +// +// .. code-block:: yaml +// +// fields: +// a: +// struct_value: +// fields: +// b: +// struct_value: +// fields: +// c: +// string_value: pro +// t: +// list_value: +// values: +// - string_value: m +// - string_value: n +// +// The following MetadataMatcher is matched as the path [a, b, c] will retrieve a string value "pro" +// from the Metadata which is matched to the specified prefix match. +// +// .. code-block:: yaml +// +// path: +// - key: a +// - key: b +// - key: c +// value: +// string_match: +// prefix: pr +// +// The following StructMatcher is matched as the code will match one of the string values in the +// list at the path [a, t]. +// +// .. code-block:: yaml +// +// path: +// - key: a +// - key: t +// value: +// list_match: +// one_of: +// string_match: +// exact: m +// +// An example use of StructMatcher is to match metadata in envoy.v*.core.Node. +type StructMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path to retrieve the Value from the Struct. + Path []*StructMatcher_PathSegment `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"` + // The StructMatcher is matched if the value retrieved by path is matched to this value. + Value *ValueMatcher `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *StructMatcher) Reset() { + *x = StructMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_matcher_struct_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StructMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StructMatcher) ProtoMessage() {} + +func (x *StructMatcher) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_matcher_struct_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StructMatcher.ProtoReflect.Descriptor instead. +func (*StructMatcher) Descriptor() ([]byte, []int) { + return file_envoy_type_matcher_struct_proto_rawDescGZIP(), []int{0} +} + +func (x *StructMatcher) GetPath() []*StructMatcher_PathSegment { + if x != nil { + return x.Path + } + return nil +} + +func (x *StructMatcher) GetValue() *ValueMatcher { + if x != nil { + return x.Value + } + return nil +} + +// Specifies the segment in a path to retrieve value from Struct. +type StructMatcher_PathSegment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Segment: + // + // *StructMatcher_PathSegment_Key + Segment isStructMatcher_PathSegment_Segment `protobuf_oneof:"segment"` +} + +func (x *StructMatcher_PathSegment) Reset() { + *x = StructMatcher_PathSegment{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_matcher_struct_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StructMatcher_PathSegment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StructMatcher_PathSegment) ProtoMessage() {} + +func (x *StructMatcher_PathSegment) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_matcher_struct_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StructMatcher_PathSegment.ProtoReflect.Descriptor instead. +func (*StructMatcher_PathSegment) Descriptor() ([]byte, []int) { + return file_envoy_type_matcher_struct_proto_rawDescGZIP(), []int{0, 0} +} + +func (m *StructMatcher_PathSegment) GetSegment() isStructMatcher_PathSegment_Segment { + if m != nil { + return m.Segment + } + return nil +} + +func (x *StructMatcher_PathSegment) GetKey() string { + if x, ok := x.GetSegment().(*StructMatcher_PathSegment_Key); ok { + return x.Key + } + return "" +} + +type isStructMatcher_PathSegment_Segment interface { + isStructMatcher_PathSegment_Segment() +} + +type StructMatcher_PathSegment_Key struct { + // If specified, use the key to retrieve the value in a Struct. + Key string `protobuf:"bytes,1,opt,name=key,proto3,oneof"` +} + +func (*StructMatcher_PathSegment_Key) isStructMatcher_PathSegment_Segment() {} + +var File_envoy_type_matcher_struct_proto protoreflect.FileDescriptor + +var file_envoy_type_matcher_struct_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x12, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x1a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xda, 0x01, + 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, + 0x4b, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x2e, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x40, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x3a, + 0x0a, 0x0b, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, + 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x42, 0x0e, 0x0a, 0x07, 0x73, 0x65, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x74, 0x0a, 0x20, 0x69, 0x6f, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x0b, + 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, + 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_type_matcher_struct_proto_rawDescOnce sync.Once + file_envoy_type_matcher_struct_proto_rawDescData = file_envoy_type_matcher_struct_proto_rawDesc +) + +func file_envoy_type_matcher_struct_proto_rawDescGZIP() []byte { + file_envoy_type_matcher_struct_proto_rawDescOnce.Do(func() { + file_envoy_type_matcher_struct_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_struct_proto_rawDescData) + }) + return file_envoy_type_matcher_struct_proto_rawDescData +} + +var file_envoy_type_matcher_struct_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_type_matcher_struct_proto_goTypes = []interface{}{ + (*StructMatcher)(nil), // 0: envoy.type.matcher.StructMatcher + (*StructMatcher_PathSegment)(nil), // 1: envoy.type.matcher.StructMatcher.PathSegment + (*ValueMatcher)(nil), // 2: envoy.type.matcher.ValueMatcher +} +var file_envoy_type_matcher_struct_proto_depIdxs = []int32{ + 1, // 0: envoy.type.matcher.StructMatcher.path:type_name -> envoy.type.matcher.StructMatcher.PathSegment + 2, // 1: envoy.type.matcher.StructMatcher.value:type_name -> envoy.type.matcher.ValueMatcher + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_type_matcher_struct_proto_init() } +func file_envoy_type_matcher_struct_proto_init() { + if File_envoy_type_matcher_struct_proto != nil { + return + } + file_envoy_type_matcher_value_proto_init() + if !protoimpl.UnsafeEnabled { + file_envoy_type_matcher_struct_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StructMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_type_matcher_struct_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StructMatcher_PathSegment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_type_matcher_struct_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*StructMatcher_PathSegment_Key)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_type_matcher_struct_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_type_matcher_struct_proto_goTypes, + DependencyIndexes: file_envoy_type_matcher_struct_proto_depIdxs, + MessageInfos: file_envoy_type_matcher_struct_proto_msgTypes, + }.Build() + File_envoy_type_matcher_struct_proto = out.File + file_envoy_type_matcher_struct_proto_rawDesc = nil + file_envoy_type_matcher_struct_proto_goTypes = nil + file_envoy_type_matcher_struct_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/struct.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/struct.pb.validate.go new file mode 100644 index 0000000000000..2f0b0bc92b520 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/struct.pb.validate.go @@ -0,0 +1,348 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/matcher/struct.proto + +package matcher + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on StructMatcher 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 *StructMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StructMatcher 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 StructMatcherMultiError, or +// nil if none found. +func (m *StructMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *StructMatcher) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(m.GetPath()) < 1 { + err := StructMatcherValidationError{ + field: "Path", + reason: "value must contain at least 1 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetPath() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StructMatcherValidationError{ + field: fmt.Sprintf("Path[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StructMatcherValidationError{ + field: fmt.Sprintf("Path[%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 StructMatcherValidationError{ + field: fmt.Sprintf("Path[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if m.GetValue() == nil { + err := StructMatcherValidationError{ + field: "Value", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetValue()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StructMatcherValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StructMatcherValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StructMatcherValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return StructMatcherMultiError(errors) + } + return nil +} + +// StructMatcherMultiError is an error wrapping multiple validation errors +// returned by StructMatcher.ValidateAll() if the designated constraints +// aren't met. +type StructMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StructMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StructMatcherMultiError) AllErrors() []error { return m } + +// StructMatcherValidationError is the validation error returned by +// StructMatcher.Validate if the designated constraints aren't met. +type StructMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StructMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StructMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StructMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StructMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StructMatcherValidationError) ErrorName() string { return "StructMatcherValidationError" } + +// Error satisfies the builtin error interface +func (e StructMatcherValidationError) 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 %sStructMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StructMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StructMatcherValidationError{} + +// Validate checks the field values on StructMatcher_PathSegment 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 *StructMatcher_PathSegment) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StructMatcher_PathSegment 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 +// StructMatcher_PathSegmentMultiError, or nil if none found. +func (m *StructMatcher_PathSegment) ValidateAll() error { + return m.validate(true) +} + +func (m *StructMatcher_PathSegment) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.Segment.(type) { + + case *StructMatcher_PathSegment_Key: + + if utf8.RuneCountInString(m.GetKey()) < 1 { + err := StructMatcher_PathSegmentValidationError{ + field: "Key", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + default: + err := StructMatcher_PathSegmentValidationError{ + field: "Segment", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return StructMatcher_PathSegmentMultiError(errors) + } + return nil +} + +// StructMatcher_PathSegmentMultiError is an error wrapping multiple validation +// errors returned by StructMatcher_PathSegment.ValidateAll() if the +// designated constraints aren't met. +type StructMatcher_PathSegmentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StructMatcher_PathSegmentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StructMatcher_PathSegmentMultiError) AllErrors() []error { return m } + +// StructMatcher_PathSegmentValidationError is the validation error returned by +// StructMatcher_PathSegment.Validate if the designated constraints aren't met. +type StructMatcher_PathSegmentValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StructMatcher_PathSegmentValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StructMatcher_PathSegmentValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StructMatcher_PathSegmentValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StructMatcher_PathSegmentValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StructMatcher_PathSegmentValidationError) ErrorName() string { + return "StructMatcher_PathSegmentValidationError" +} + +// Error satisfies the builtin error interface +func (e StructMatcher_PathSegmentValidationError) 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 %sStructMatcher_PathSegment.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StructMatcher_PathSegmentValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StructMatcher_PathSegmentValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/value.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/value.pb.go new file mode 100644 index 0000000000000..d63329c3e1bff --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/value.pb.go @@ -0,0 +1,455 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/type/matcher/value.proto + +package matcher + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Specifies the way to match a ProtobufWkt::Value. Primitive values and ListValue are supported. +// StructValue is not supported and is always not matched. +// [#next-free-field: 7] +type ValueMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies how to match a value. + // + // Types that are assignable to MatchPattern: + // + // *ValueMatcher_NullMatch_ + // *ValueMatcher_DoubleMatch + // *ValueMatcher_StringMatch + // *ValueMatcher_BoolMatch + // *ValueMatcher_PresentMatch + // *ValueMatcher_ListMatch + MatchPattern isValueMatcher_MatchPattern `protobuf_oneof:"match_pattern"` +} + +func (x *ValueMatcher) Reset() { + *x = ValueMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_matcher_value_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValueMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValueMatcher) ProtoMessage() {} + +func (x *ValueMatcher) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_matcher_value_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValueMatcher.ProtoReflect.Descriptor instead. +func (*ValueMatcher) Descriptor() ([]byte, []int) { + return file_envoy_type_matcher_value_proto_rawDescGZIP(), []int{0} +} + +func (m *ValueMatcher) GetMatchPattern() isValueMatcher_MatchPattern { + if m != nil { + return m.MatchPattern + } + return nil +} + +func (x *ValueMatcher) GetNullMatch() *ValueMatcher_NullMatch { + if x, ok := x.GetMatchPattern().(*ValueMatcher_NullMatch_); ok { + return x.NullMatch + } + return nil +} + +func (x *ValueMatcher) GetDoubleMatch() *DoubleMatcher { + if x, ok := x.GetMatchPattern().(*ValueMatcher_DoubleMatch); ok { + return x.DoubleMatch + } + return nil +} + +func (x *ValueMatcher) GetStringMatch() *StringMatcher { + if x, ok := x.GetMatchPattern().(*ValueMatcher_StringMatch); ok { + return x.StringMatch + } + return nil +} + +func (x *ValueMatcher) GetBoolMatch() bool { + if x, ok := x.GetMatchPattern().(*ValueMatcher_BoolMatch); ok { + return x.BoolMatch + } + return false +} + +func (x *ValueMatcher) GetPresentMatch() bool { + if x, ok := x.GetMatchPattern().(*ValueMatcher_PresentMatch); ok { + return x.PresentMatch + } + return false +} + +func (x *ValueMatcher) GetListMatch() *ListMatcher { + if x, ok := x.GetMatchPattern().(*ValueMatcher_ListMatch); ok { + return x.ListMatch + } + return nil +} + +type isValueMatcher_MatchPattern interface { + isValueMatcher_MatchPattern() +} + +type ValueMatcher_NullMatch_ struct { + // If specified, a match occurs if and only if the target value is a NullValue. + NullMatch *ValueMatcher_NullMatch `protobuf:"bytes,1,opt,name=null_match,json=nullMatch,proto3,oneof"` +} + +type ValueMatcher_DoubleMatch struct { + // If specified, a match occurs if and only if the target value is a double value and is + // matched to this field. + DoubleMatch *DoubleMatcher `protobuf:"bytes,2,opt,name=double_match,json=doubleMatch,proto3,oneof"` +} + +type ValueMatcher_StringMatch struct { + // If specified, a match occurs if and only if the target value is a string value and is + // matched to this field. + StringMatch *StringMatcher `protobuf:"bytes,3,opt,name=string_match,json=stringMatch,proto3,oneof"` +} + +type ValueMatcher_BoolMatch struct { + // If specified, a match occurs if and only if the target value is a bool value and is equal + // to this field. + BoolMatch bool `protobuf:"varint,4,opt,name=bool_match,json=boolMatch,proto3,oneof"` +} + +type ValueMatcher_PresentMatch struct { + // If specified, value match will be performed based on whether the path is referring to a + // valid primitive value in the metadata. If the path is referring to a non-primitive value, + // the result is always not matched. + PresentMatch bool `protobuf:"varint,5,opt,name=present_match,json=presentMatch,proto3,oneof"` +} + +type ValueMatcher_ListMatch struct { + // If specified, a match occurs if and only if the target value is a list value and + // is matched to this field. + ListMatch *ListMatcher `protobuf:"bytes,6,opt,name=list_match,json=listMatch,proto3,oneof"` +} + +func (*ValueMatcher_NullMatch_) isValueMatcher_MatchPattern() {} + +func (*ValueMatcher_DoubleMatch) isValueMatcher_MatchPattern() {} + +func (*ValueMatcher_StringMatch) isValueMatcher_MatchPattern() {} + +func (*ValueMatcher_BoolMatch) isValueMatcher_MatchPattern() {} + +func (*ValueMatcher_PresentMatch) isValueMatcher_MatchPattern() {} + +func (*ValueMatcher_ListMatch) isValueMatcher_MatchPattern() {} + +// Specifies the way to match a list value. +type ListMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to MatchPattern: + // + // *ListMatcher_OneOf + MatchPattern isListMatcher_MatchPattern `protobuf_oneof:"match_pattern"` +} + +func (x *ListMatcher) Reset() { + *x = ListMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_matcher_value_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMatcher) ProtoMessage() {} + +func (x *ListMatcher) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_matcher_value_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListMatcher.ProtoReflect.Descriptor instead. +func (*ListMatcher) Descriptor() ([]byte, []int) { + return file_envoy_type_matcher_value_proto_rawDescGZIP(), []int{1} +} + +func (m *ListMatcher) GetMatchPattern() isListMatcher_MatchPattern { + if m != nil { + return m.MatchPattern + } + return nil +} + +func (x *ListMatcher) GetOneOf() *ValueMatcher { + if x, ok := x.GetMatchPattern().(*ListMatcher_OneOf); ok { + return x.OneOf + } + return nil +} + +type isListMatcher_MatchPattern interface { + isListMatcher_MatchPattern() +} + +type ListMatcher_OneOf struct { + // If specified, at least one of the values in the list must match the value specified. + OneOf *ValueMatcher `protobuf:"bytes,1,opt,name=one_of,json=oneOf,proto3,oneof"` +} + +func (*ListMatcher_OneOf) isListMatcher_MatchPattern() {} + +// NullMatch is an empty message to specify a null value. +type ValueMatcher_NullMatch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ValueMatcher_NullMatch) Reset() { + *x = ValueMatcher_NullMatch{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_matcher_value_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValueMatcher_NullMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValueMatcher_NullMatch) ProtoMessage() {} + +func (x *ValueMatcher_NullMatch) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_matcher_value_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValueMatcher_NullMatch.ProtoReflect.Descriptor instead. +func (*ValueMatcher_NullMatch) Descriptor() ([]byte, []int) { + return file_envoy_type_matcher_value_proto_rawDescGZIP(), []int{0, 0} +} + +var File_envoy_type_matcher_value_proto protoreflect.FileDescriptor + +var file_envoy_type_matcher_value_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x12, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x98, + 0x03, 0x0a, 0x0c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, + 0x4b, 0x0a, 0x0a, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, + 0x00, 0x52, 0x09, 0x6e, 0x75, 0x6c, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x46, 0x0a, 0x0c, + 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x12, 0x46, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, + 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1f, 0x0a, 0x0a, + 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x25, 0x0a, + 0x0d, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x12, 0x40, 0x0a, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x69, 0x73, + 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0x0b, 0x0a, 0x09, 0x4e, 0x75, 0x6c, 0x6c, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x5e, 0x0a, 0x0b, 0x4c, 0x69, 0x73, + 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x39, 0x0a, 0x06, 0x6f, 0x6e, 0x65, 0x5f, + 0x6f, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x05, 0x6f, 0x6e, + 0x65, 0x4f, 0x66, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x73, 0x0a, 0x20, 0x69, 0x6f, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x0a, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_type_matcher_value_proto_rawDescOnce sync.Once + file_envoy_type_matcher_value_proto_rawDescData = file_envoy_type_matcher_value_proto_rawDesc +) + +func file_envoy_type_matcher_value_proto_rawDescGZIP() []byte { + file_envoy_type_matcher_value_proto_rawDescOnce.Do(func() { + file_envoy_type_matcher_value_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_value_proto_rawDescData) + }) + return file_envoy_type_matcher_value_proto_rawDescData +} + +var file_envoy_type_matcher_value_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_type_matcher_value_proto_goTypes = []interface{}{ + (*ValueMatcher)(nil), // 0: envoy.type.matcher.ValueMatcher + (*ListMatcher)(nil), // 1: envoy.type.matcher.ListMatcher + (*ValueMatcher_NullMatch)(nil), // 2: envoy.type.matcher.ValueMatcher.NullMatch + (*DoubleMatcher)(nil), // 3: envoy.type.matcher.DoubleMatcher + (*StringMatcher)(nil), // 4: envoy.type.matcher.StringMatcher +} +var file_envoy_type_matcher_value_proto_depIdxs = []int32{ + 2, // 0: envoy.type.matcher.ValueMatcher.null_match:type_name -> envoy.type.matcher.ValueMatcher.NullMatch + 3, // 1: envoy.type.matcher.ValueMatcher.double_match:type_name -> envoy.type.matcher.DoubleMatcher + 4, // 2: envoy.type.matcher.ValueMatcher.string_match:type_name -> envoy.type.matcher.StringMatcher + 1, // 3: envoy.type.matcher.ValueMatcher.list_match:type_name -> envoy.type.matcher.ListMatcher + 0, // 4: envoy.type.matcher.ListMatcher.one_of:type_name -> envoy.type.matcher.ValueMatcher + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_envoy_type_matcher_value_proto_init() } +func file_envoy_type_matcher_value_proto_init() { + if File_envoy_type_matcher_value_proto != nil { + return + } + file_envoy_type_matcher_number_proto_init() + file_envoy_type_matcher_string_proto_init() + if !protoimpl.UnsafeEnabled { + file_envoy_type_matcher_value_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValueMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_type_matcher_value_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_type_matcher_value_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValueMatcher_NullMatch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_envoy_type_matcher_value_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*ValueMatcher_NullMatch_)(nil), + (*ValueMatcher_DoubleMatch)(nil), + (*ValueMatcher_StringMatch)(nil), + (*ValueMatcher_BoolMatch)(nil), + (*ValueMatcher_PresentMatch)(nil), + (*ValueMatcher_ListMatch)(nil), + } + file_envoy_type_matcher_value_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*ListMatcher_OneOf)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_type_matcher_value_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_type_matcher_value_proto_goTypes, + DependencyIndexes: file_envoy_type_matcher_value_proto_depIdxs, + MessageInfos: file_envoy_type_matcher_value_proto_msgTypes, + }.Build() + File_envoy_type_matcher_value_proto = out.File + file_envoy_type_matcher_value_proto_rawDesc = nil + file_envoy_type_matcher_value_proto_goTypes = nil + file_envoy_type_matcher_value_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/matcher/value.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/value.pb.validate.go new file mode 100644 index 0000000000000..522e717fad221 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/matcher/value.pb.validate.go @@ -0,0 +1,522 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/matcher/value.proto + +package matcher + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ValueMatcher 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 *ValueMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ValueMatcher 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 ValueMatcherMultiError, or +// nil if none found. +func (m *ValueMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *ValueMatcher) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.MatchPattern.(type) { + + case *ValueMatcher_NullMatch_: + + if all { + switch v := interface{}(m.GetNullMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "NullMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "NullMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetNullMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ValueMatcherValidationError{ + field: "NullMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ValueMatcher_DoubleMatch: + + if all { + switch v := interface{}(m.GetDoubleMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "DoubleMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "DoubleMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDoubleMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ValueMatcherValidationError{ + field: "DoubleMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ValueMatcher_StringMatch: + + if all { + switch v := interface{}(m.GetStringMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "StringMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "StringMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStringMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ValueMatcherValidationError{ + field: "StringMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ValueMatcher_BoolMatch: + // no validation rules for BoolMatch + + case *ValueMatcher_PresentMatch: + // no validation rules for PresentMatch + + case *ValueMatcher_ListMatch: + + if all { + switch v := interface{}(m.GetListMatch()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "ListMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ValueMatcherValidationError{ + field: "ListMatch", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetListMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ValueMatcherValidationError{ + field: "ListMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := ValueMatcherValidationError{ + field: "MatchPattern", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return ValueMatcherMultiError(errors) + } + return nil +} + +// ValueMatcherMultiError is an error wrapping multiple validation errors +// returned by ValueMatcher.ValidateAll() if the designated constraints aren't met. +type ValueMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ValueMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ValueMatcherMultiError) AllErrors() []error { return m } + +// ValueMatcherValidationError is the validation error returned by +// ValueMatcher.Validate if the designated constraints aren't met. +type ValueMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ValueMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ValueMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ValueMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ValueMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ValueMatcherValidationError) ErrorName() string { return "ValueMatcherValidationError" } + +// Error satisfies the builtin error interface +func (e ValueMatcherValidationError) 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 %sValueMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ValueMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ValueMatcherValidationError{} + +// Validate checks the field values on ListMatcher 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 *ListMatcher) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListMatcher 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 ListMatcherMultiError, or +// nil if none found. +func (m *ListMatcher) ValidateAll() error { + return m.validate(true) +} + +func (m *ListMatcher) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch m.MatchPattern.(type) { + + case *ListMatcher_OneOf: + + if all { + switch v := interface{}(m.GetOneOf()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListMatcherValidationError{ + field: "OneOf", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListMatcherValidationError{ + field: "OneOf", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOneOf()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListMatcherValidationError{ + field: "OneOf", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + err := ListMatcherValidationError{ + field: "MatchPattern", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + + } + + if len(errors) > 0 { + return ListMatcherMultiError(errors) + } + return nil +} + +// ListMatcherMultiError is an error wrapping multiple validation errors +// returned by ListMatcher.ValidateAll() if the designated constraints aren't met. +type ListMatcherMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListMatcherMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListMatcherMultiError) AllErrors() []error { return m } + +// ListMatcherValidationError is the validation error returned by +// ListMatcher.Validate if the designated constraints aren't met. +type ListMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListMatcherValidationError) ErrorName() string { return "ListMatcherValidationError" } + +// Error satisfies the builtin error interface +func (e ListMatcherValidationError) 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 %sListMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListMatcherValidationError{} + +// Validate checks the field values on ValueMatcher_NullMatch 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 *ValueMatcher_NullMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ValueMatcher_NullMatch 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 +// ValueMatcher_NullMatchMultiError, or nil if none found. +func (m *ValueMatcher_NullMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *ValueMatcher_NullMatch) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return ValueMatcher_NullMatchMultiError(errors) + } + return nil +} + +// ValueMatcher_NullMatchMultiError is an error wrapping multiple validation +// errors returned by ValueMatcher_NullMatch.ValidateAll() if the designated +// constraints aren't met. +type ValueMatcher_NullMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ValueMatcher_NullMatchMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ValueMatcher_NullMatchMultiError) AllErrors() []error { return m } + +// ValueMatcher_NullMatchValidationError is the validation error returned by +// ValueMatcher_NullMatch.Validate if the designated constraints aren't met. +type ValueMatcher_NullMatchValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ValueMatcher_NullMatchValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ValueMatcher_NullMatchValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ValueMatcher_NullMatchValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ValueMatcher_NullMatchValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ValueMatcher_NullMatchValidationError) ErrorName() string { + return "ValueMatcher_NullMatchValidationError" +} + +// Error satisfies the builtin error interface +func (e ValueMatcher_NullMatchValidationError) 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 %sValueMatcher_NullMatch.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ValueMatcher_NullMatchValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ValueMatcher_NullMatchValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/percent.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/percent.pb.go new file mode 100644 index 0000000000000..a0a9bf6b74eca --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/percent.pb.go @@ -0,0 +1,314 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/type/percent.proto + +package _type + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Fraction percentages support several fixed denominator values. +type FractionalPercent_DenominatorType int32 + +const ( + // 100. + // + // **Example**: 1/100 = 1%. + FractionalPercent_HUNDRED FractionalPercent_DenominatorType = 0 + // 10,000. + // + // **Example**: 1/10000 = 0.01%. + FractionalPercent_TEN_THOUSAND FractionalPercent_DenominatorType = 1 + // 1,000,000. + // + // **Example**: 1/1000000 = 0.0001%. + FractionalPercent_MILLION FractionalPercent_DenominatorType = 2 +) + +// Enum value maps for FractionalPercent_DenominatorType. +var ( + FractionalPercent_DenominatorType_name = map[int32]string{ + 0: "HUNDRED", + 1: "TEN_THOUSAND", + 2: "MILLION", + } + FractionalPercent_DenominatorType_value = map[string]int32{ + "HUNDRED": 0, + "TEN_THOUSAND": 1, + "MILLION": 2, + } +) + +func (x FractionalPercent_DenominatorType) Enum() *FractionalPercent_DenominatorType { + p := new(FractionalPercent_DenominatorType) + *p = x + return p +} + +func (x FractionalPercent_DenominatorType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FractionalPercent_DenominatorType) Descriptor() protoreflect.EnumDescriptor { + return file_envoy_type_percent_proto_enumTypes[0].Descriptor() +} + +func (FractionalPercent_DenominatorType) Type() protoreflect.EnumType { + return &file_envoy_type_percent_proto_enumTypes[0] +} + +func (x FractionalPercent_DenominatorType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FractionalPercent_DenominatorType.Descriptor instead. +func (FractionalPercent_DenominatorType) EnumDescriptor() ([]byte, []int) { + return file_envoy_type_percent_proto_rawDescGZIP(), []int{1, 0} +} + +// Identifies a percentage, in the range [0.0, 100.0]. +type Percent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *Percent) Reset() { + *x = Percent{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_percent_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Percent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Percent) ProtoMessage() {} + +func (x *Percent) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_percent_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Percent.ProtoReflect.Descriptor instead. +func (*Percent) Descriptor() ([]byte, []int) { + return file_envoy_type_percent_proto_rawDescGZIP(), []int{0} +} + +func (x *Percent) GetValue() float64 { + if x != nil { + return x.Value + } + return 0 +} + +// A fractional percentage is used in cases in which for performance reasons performing floating +// point to integer conversions during randomness calculations is undesirable. The message includes +// both a numerator and denominator that together determine the final fractional value. +// +// * **Example**: 1/100 = 1%. +// * **Example**: 3/10000 = 0.03%. +type FractionalPercent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies the numerator. Defaults to 0. + Numerator uint32 `protobuf:"varint,1,opt,name=numerator,proto3" json:"numerator,omitempty"` + // Specifies the denominator. If the denominator specified is less than the numerator, the final + // fractional percentage is capped at 1 (100%). + Denominator FractionalPercent_DenominatorType `protobuf:"varint,2,opt,name=denominator,proto3,enum=envoy.type.FractionalPercent_DenominatorType" json:"denominator,omitempty"` +} + +func (x *FractionalPercent) Reset() { + *x = FractionalPercent{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_percent_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FractionalPercent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FractionalPercent) ProtoMessage() {} + +func (x *FractionalPercent) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_percent_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FractionalPercent.ProtoReflect.Descriptor instead. +func (*FractionalPercent) Descriptor() ([]byte, []int) { + return file_envoy_type_percent_proto_rawDescGZIP(), []int{1} +} + +func (x *FractionalPercent) GetNumerator() uint32 { + if x != nil { + return x.Numerator + } + return 0 +} + +func (x *FractionalPercent) GetDenominator() FractionalPercent_DenominatorType { + if x != nil { + return x.Denominator + } + return FractionalPercent_HUNDRED +} + +var File_envoy_type_percent_proto protoreflect.FileDescriptor + +var file_envoy_type_percent_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x70, 0x65, 0x72, + 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x38, + 0x0a, 0x07, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xcb, 0x01, 0x0a, 0x11, 0x46, 0x72, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x1c, + 0x0a, 0x09, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x59, 0x0a, 0x0b, + 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x46, + 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, + 0x2e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x6e, 0x6f, + 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x3d, 0x0a, 0x0f, 0x44, 0x65, 0x6e, 0x6f, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x55, + 0x4e, 0x44, 0x52, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x45, 0x4e, 0x5f, 0x54, + 0x48, 0x4f, 0x55, 0x53, 0x41, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x49, 0x4c, + 0x4c, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x42, 0x65, 0x0a, 0x18, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x42, 0x0c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_type_percent_proto_rawDescOnce sync.Once + file_envoy_type_percent_proto_rawDescData = file_envoy_type_percent_proto_rawDesc +) + +func file_envoy_type_percent_proto_rawDescGZIP() []byte { + file_envoy_type_percent_proto_rawDescOnce.Do(func() { + file_envoy_type_percent_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_percent_proto_rawDescData) + }) + return file_envoy_type_percent_proto_rawDescData +} + +var file_envoy_type_percent_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_envoy_type_percent_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_type_percent_proto_goTypes = []interface{}{ + (FractionalPercent_DenominatorType)(0), // 0: envoy.type.FractionalPercent.DenominatorType + (*Percent)(nil), // 1: envoy.type.Percent + (*FractionalPercent)(nil), // 2: envoy.type.FractionalPercent +} +var file_envoy_type_percent_proto_depIdxs = []int32{ + 0, // 0: envoy.type.FractionalPercent.denominator:type_name -> envoy.type.FractionalPercent.DenominatorType + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_type_percent_proto_init() } +func file_envoy_type_percent_proto_init() { + if File_envoy_type_percent_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_type_percent_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Percent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_type_percent_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FractionalPercent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_type_percent_proto_rawDesc, + NumEnums: 1, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_type_percent_proto_goTypes, + DependencyIndexes: file_envoy_type_percent_proto_depIdxs, + EnumInfos: file_envoy_type_percent_proto_enumTypes, + MessageInfos: file_envoy_type_percent_proto_msgTypes, + }.Build() + File_envoy_type_percent_proto = out.File + file_envoy_type_percent_proto_rawDesc = nil + file_envoy_type_percent_proto_goTypes = nil + file_envoy_type_percent_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/percent.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/percent.pb.validate.go new file mode 100644 index 0000000000000..ccbd5cef13d76 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/percent.pb.validate.go @@ -0,0 +1,258 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/percent.proto + +package _type + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Percent 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 *Percent) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Percent 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 PercentMultiError, or nil if none found. +func (m *Percent) ValidateAll() error { + return m.validate(true) +} + +func (m *Percent) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if val := m.GetValue(); val < 0 || val > 100 { + err := PercentValidationError{ + field: "Value", + reason: "value must be inside range [0, 100]", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return PercentMultiError(errors) + } + return nil +} + +// PercentMultiError is an error wrapping multiple validation errors returned +// by Percent.ValidateAll() if the designated constraints aren't met. +type PercentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PercentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PercentMultiError) AllErrors() []error { return m } + +// PercentValidationError is the validation error returned by Percent.Validate +// if the designated constraints aren't met. +type PercentValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PercentValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PercentValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PercentValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PercentValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PercentValidationError) ErrorName() string { return "PercentValidationError" } + +// Error satisfies the builtin error interface +func (e PercentValidationError) 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 %sPercent.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PercentValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PercentValidationError{} + +// Validate checks the field values on FractionalPercent 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 *FractionalPercent) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FractionalPercent 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 +// FractionalPercentMultiError, or nil if none found. +func (m *FractionalPercent) ValidateAll() error { + return m.validate(true) +} + +func (m *FractionalPercent) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Numerator + + if _, ok := FractionalPercent_DenominatorType_name[int32(m.GetDenominator())]; !ok { + err := FractionalPercentValidationError{ + field: "Denominator", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return FractionalPercentMultiError(errors) + } + return nil +} + +// FractionalPercentMultiError is an error wrapping multiple validation errors +// returned by FractionalPercent.ValidateAll() if the designated constraints +// aren't met. +type FractionalPercentMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FractionalPercentMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FractionalPercentMultiError) AllErrors() []error { return m } + +// FractionalPercentValidationError is the validation error returned by +// FractionalPercent.Validate if the designated constraints aren't met. +type FractionalPercentValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FractionalPercentValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FractionalPercentValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FractionalPercentValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FractionalPercentValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FractionalPercentValidationError) ErrorName() string { + return "FractionalPercentValidationError" +} + +// Error satisfies the builtin error interface +func (e FractionalPercentValidationError) 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 %sFractionalPercent.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FractionalPercentValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FractionalPercentValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/range.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/range.pb.go new file mode 100644 index 0000000000000..6808346f71349 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/range.pb.go @@ -0,0 +1,320 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/type/range.proto + +package _type + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Specifies the int64 start and end of the range using half-open interval semantics [start, +// end). +type Int64Range struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // start of the range (inclusive) + Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` + // end of the range (exclusive) + End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` +} + +func (x *Int64Range) Reset() { + *x = Int64Range{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_range_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Int64Range) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Int64Range) ProtoMessage() {} + +func (x *Int64Range) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_range_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Int64Range.ProtoReflect.Descriptor instead. +func (*Int64Range) Descriptor() ([]byte, []int) { + return file_envoy_type_range_proto_rawDescGZIP(), []int{0} +} + +func (x *Int64Range) GetStart() int64 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *Int64Range) GetEnd() int64 { + if x != nil { + return x.End + } + return 0 +} + +// Specifies the int32 start and end of the range using half-open interval semantics [start, +// end). +type Int32Range struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // start of the range (inclusive) + Start int32 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` + // end of the range (exclusive) + End int32 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` +} + +func (x *Int32Range) Reset() { + *x = Int32Range{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_range_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Int32Range) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Int32Range) ProtoMessage() {} + +func (x *Int32Range) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_range_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Int32Range.ProtoReflect.Descriptor instead. +func (*Int32Range) Descriptor() ([]byte, []int) { + return file_envoy_type_range_proto_rawDescGZIP(), []int{1} +} + +func (x *Int32Range) GetStart() int32 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *Int32Range) GetEnd() int32 { + if x != nil { + return x.End + } + return 0 +} + +// Specifies the double start and end of the range using half-open interval semantics [start, +// end). +type DoubleRange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // start of the range (inclusive) + Start float64 `protobuf:"fixed64,1,opt,name=start,proto3" json:"start,omitempty"` + // end of the range (exclusive) + End float64 `protobuf:"fixed64,2,opt,name=end,proto3" json:"end,omitempty"` +} + +func (x *DoubleRange) Reset() { + *x = DoubleRange{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_range_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DoubleRange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DoubleRange) ProtoMessage() {} + +func (x *DoubleRange) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_range_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DoubleRange.ProtoReflect.Descriptor instead. +func (*DoubleRange) Descriptor() ([]byte, []int) { + return file_envoy_type_range_proto_rawDescGZIP(), []int{2} +} + +func (x *DoubleRange) GetStart() float64 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *DoubleRange) GetEnd() float64 { + if x != nil { + return x.End + } + return 0 +} + +var File_envoy_type_range_proto protoreflect.FileDescriptor + +var file_envoy_type_range_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x72, 0x61, 0x6e, + 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x34, 0x0a, 0x0a, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x34, 0x0a, 0x0a, 0x49, 0x6e, 0x74, + 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, + 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, + 0x35, 0x0a, 0x0b, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x01, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x42, 0x63, 0x0a, 0x18, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x42, 0x0a, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_type_range_proto_rawDescOnce sync.Once + file_envoy_type_range_proto_rawDescData = file_envoy_type_range_proto_rawDesc +) + +func file_envoy_type_range_proto_rawDescGZIP() []byte { + file_envoy_type_range_proto_rawDescOnce.Do(func() { + file_envoy_type_range_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_range_proto_rawDescData) + }) + return file_envoy_type_range_proto_rawDescData +} + +var file_envoy_type_range_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_envoy_type_range_proto_goTypes = []interface{}{ + (*Int64Range)(nil), // 0: envoy.type.Int64Range + (*Int32Range)(nil), // 1: envoy.type.Int32Range + (*DoubleRange)(nil), // 2: envoy.type.DoubleRange +} +var file_envoy_type_range_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_type_range_proto_init() } +func file_envoy_type_range_proto_init() { + if File_envoy_type_range_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_type_range_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Int64Range); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_type_range_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Int32Range); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_type_range_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DoubleRange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_type_range_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_type_range_proto_goTypes, + DependencyIndexes: file_envoy_type_range_proto_depIdxs, + MessageInfos: file_envoy_type_range_proto_msgTypes, + }.Build() + File_envoy_type_range_proto = out.File + file_envoy_type_range_proto_rawDesc = nil + file_envoy_type_range_proto_goTypes = nil + file_envoy_type_range_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/range.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/range.pb.validate.go new file mode 100644 index 0000000000000..7f37dc1fa0bc6 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/range.pb.validate.go @@ -0,0 +1,342 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/range.proto + +package _type + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Int64Range 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 *Int64Range) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Int64Range 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 Int64RangeMultiError, or +// nil if none found. +func (m *Int64Range) ValidateAll() error { + return m.validate(true) +} + +func (m *Int64Range) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Start + + // no validation rules for End + + if len(errors) > 0 { + return Int64RangeMultiError(errors) + } + return nil +} + +// Int64RangeMultiError is an error wrapping multiple validation errors +// returned by Int64Range.ValidateAll() if the designated constraints aren't met. +type Int64RangeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Int64RangeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Int64RangeMultiError) AllErrors() []error { return m } + +// Int64RangeValidationError is the validation error returned by +// Int64Range.Validate if the designated constraints aren't met. +type Int64RangeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Int64RangeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Int64RangeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Int64RangeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Int64RangeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Int64RangeValidationError) ErrorName() string { return "Int64RangeValidationError" } + +// Error satisfies the builtin error interface +func (e Int64RangeValidationError) 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 %sInt64Range.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Int64RangeValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Int64RangeValidationError{} + +// Validate checks the field values on Int32Range 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 *Int32Range) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Int32Range 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 Int32RangeMultiError, or +// nil if none found. +func (m *Int32Range) ValidateAll() error { + return m.validate(true) +} + +func (m *Int32Range) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Start + + // no validation rules for End + + if len(errors) > 0 { + return Int32RangeMultiError(errors) + } + return nil +} + +// Int32RangeMultiError is an error wrapping multiple validation errors +// returned by Int32Range.ValidateAll() if the designated constraints aren't met. +type Int32RangeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Int32RangeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Int32RangeMultiError) AllErrors() []error { return m } + +// Int32RangeValidationError is the validation error returned by +// Int32Range.Validate if the designated constraints aren't met. +type Int32RangeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Int32RangeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Int32RangeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Int32RangeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Int32RangeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Int32RangeValidationError) ErrorName() string { return "Int32RangeValidationError" } + +// Error satisfies the builtin error interface +func (e Int32RangeValidationError) 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 %sInt32Range.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Int32RangeValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Int32RangeValidationError{} + +// Validate checks the field values on DoubleRange 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 *DoubleRange) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DoubleRange 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 DoubleRangeMultiError, or +// nil if none found. +func (m *DoubleRange) ValidateAll() error { + return m.validate(true) +} + +func (m *DoubleRange) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Start + + // no validation rules for End + + if len(errors) > 0 { + return DoubleRangeMultiError(errors) + } + return nil +} + +// DoubleRangeMultiError is an error wrapping multiple validation errors +// returned by DoubleRange.ValidateAll() if the designated constraints aren't met. +type DoubleRangeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DoubleRangeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DoubleRangeMultiError) AllErrors() []error { return m } + +// DoubleRangeValidationError is the validation error returned by +// DoubleRange.Validate if the designated constraints aren't met. +type DoubleRangeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DoubleRangeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DoubleRangeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DoubleRangeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DoubleRangeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DoubleRangeValidationError) ErrorName() string { return "DoubleRangeValidationError" } + +// Error satisfies the builtin error interface +func (e DoubleRangeValidationError) 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 %sDoubleRange.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DoubleRangeValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DoubleRangeValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/semantic_version.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/semantic_version.pb.go new file mode 100644 index 0000000000000..c0bdabe09b537 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/semantic_version.pb.go @@ -0,0 +1,181 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/type/semantic_version.proto + +package _type + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Envoy uses SemVer (https://semver.org/). Major/minor versions indicate +// expected behaviors and APIs, the patch version field is used only +// for security fixes and can be generally ignored. +type SemanticVersion struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MajorNumber uint32 `protobuf:"varint,1,opt,name=major_number,json=majorNumber,proto3" json:"major_number,omitempty"` + MinorNumber uint32 `protobuf:"varint,2,opt,name=minor_number,json=minorNumber,proto3" json:"minor_number,omitempty"` + Patch uint32 `protobuf:"varint,3,opt,name=patch,proto3" json:"patch,omitempty"` +} + +func (x *SemanticVersion) Reset() { + *x = SemanticVersion{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_semantic_version_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SemanticVersion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SemanticVersion) ProtoMessage() {} + +func (x *SemanticVersion) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_semantic_version_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SemanticVersion.ProtoReflect.Descriptor instead. +func (*SemanticVersion) Descriptor() ([]byte, []int) { + return file_envoy_type_semantic_version_proto_rawDescGZIP(), []int{0} +} + +func (x *SemanticVersion) GetMajorNumber() uint32 { + if x != nil { + return x.MajorNumber + } + return 0 +} + +func (x *SemanticVersion) GetMinorNumber() uint32 { + if x != nil { + return x.MinorNumber + } + return 0 +} + +func (x *SemanticVersion) GetPatch() uint32 { + if x != nil { + return x.Patch + } + return 0 +} + +var File_envoy_type_semantic_version_proto protoreflect.FileDescriptor + +var file_envoy_type_semantic_version_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x73, 0x65, 0x6d, + 0x61, 0x6e, 0x74, 0x69, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x1a, + 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6d, + 0x0a, 0x0f, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x5f, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x6f, + 0x72, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x42, 0x6d, 0x0a, + 0x18, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x42, 0x14, 0x53, 0x65, 0x6d, 0x61, 0x6e, + 0x74, 0x69, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_type_semantic_version_proto_rawDescOnce sync.Once + file_envoy_type_semantic_version_proto_rawDescData = file_envoy_type_semantic_version_proto_rawDesc +) + +func file_envoy_type_semantic_version_proto_rawDescGZIP() []byte { + file_envoy_type_semantic_version_proto_rawDescOnce.Do(func() { + file_envoy_type_semantic_version_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_semantic_version_proto_rawDescData) + }) + return file_envoy_type_semantic_version_proto_rawDescData +} + +var file_envoy_type_semantic_version_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_type_semantic_version_proto_goTypes = []interface{}{ + (*SemanticVersion)(nil), // 0: envoy.type.SemanticVersion +} +var file_envoy_type_semantic_version_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_type_semantic_version_proto_init() } +func file_envoy_type_semantic_version_proto_init() { + if File_envoy_type_semantic_version_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_type_semantic_version_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SemanticVersion); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_type_semantic_version_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_type_semantic_version_proto_goTypes, + DependencyIndexes: file_envoy_type_semantic_version_proto_depIdxs, + MessageInfos: file_envoy_type_semantic_version_proto_msgTypes, + }.Build() + File_envoy_type_semantic_version_proto = out.File + file_envoy_type_semantic_version_proto_rawDesc = nil + file_envoy_type_semantic_version_proto_goTypes = nil + file_envoy_type_semantic_version_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/semantic_version.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/semantic_version.pb.validate.go new file mode 100644 index 0000000000000..db6422df309a8 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/semantic_version.pb.validate.go @@ -0,0 +1,141 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/semantic_version.proto + +package _type + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on SemanticVersion 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 *SemanticVersion) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SemanticVersion 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 +// SemanticVersionMultiError, or nil if none found. +func (m *SemanticVersion) ValidateAll() error { + return m.validate(true) +} + +func (m *SemanticVersion) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for MajorNumber + + // no validation rules for MinorNumber + + // no validation rules for Patch + + if len(errors) > 0 { + return SemanticVersionMultiError(errors) + } + return nil +} + +// SemanticVersionMultiError is an error wrapping multiple validation errors +// returned by SemanticVersion.ValidateAll() if the designated constraints +// aren't met. +type SemanticVersionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SemanticVersionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SemanticVersionMultiError) AllErrors() []error { return m } + +// SemanticVersionValidationError is the validation error returned by +// SemanticVersion.Validate if the designated constraints aren't met. +type SemanticVersionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SemanticVersionValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SemanticVersionValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SemanticVersionValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SemanticVersionValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SemanticVersionValidationError) ErrorName() string { return "SemanticVersionValidationError" } + +// Error satisfies the builtin error interface +func (e SemanticVersionValidationError) 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 %sSemanticVersion.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SemanticVersionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SemanticVersionValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/token_bucket.pb.go b/vendor/github.com/cilium/proxy/go/envoy/type/token_bucket.pb.go new file mode 100644 index 0000000000000..f46628edd805e --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/token_bucket.pb.go @@ -0,0 +1,204 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/type/token_bucket.proto + +package _type + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Configures a token bucket, typically used for rate limiting. +type TokenBucket struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The maximum tokens that the bucket can hold. This is also the number of tokens that the bucket + // initially contains. + MaxTokens uint32 `protobuf:"varint,1,opt,name=max_tokens,json=maxTokens,proto3" json:"max_tokens,omitempty"` + // The number of tokens added to the bucket during each fill interval. If not specified, defaults + // to a single token. + TokensPerFill *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=tokens_per_fill,json=tokensPerFill,proto3" json:"tokens_per_fill,omitempty"` + // The fill interval that tokens are added to the bucket. During each fill interval + // `tokens_per_fill` are added to the bucket. The bucket will never contain more than + // `max_tokens` tokens. + FillInterval *durationpb.Duration `protobuf:"bytes,3,opt,name=fill_interval,json=fillInterval,proto3" json:"fill_interval,omitempty"` +} + +func (x *TokenBucket) Reset() { + *x = TokenBucket{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_type_token_bucket_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TokenBucket) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenBucket) ProtoMessage() {} + +func (x *TokenBucket) ProtoReflect() protoreflect.Message { + mi := &file_envoy_type_token_bucket_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenBucket.ProtoReflect.Descriptor instead. +func (*TokenBucket) Descriptor() ([]byte, []int) { + return file_envoy_type_token_bucket_proto_rawDescGZIP(), []int{0} +} + +func (x *TokenBucket) GetMaxTokens() uint32 { + if x != nil { + return x.MaxTokens + } + return 0 +} + +func (x *TokenBucket) GetTokensPerFill() *wrapperspb.UInt32Value { + if x != nil { + return x.TokensPerFill + } + return nil +} + +func (x *TokenBucket) GetFillInterval() *durationpb.Duration { + if x != nil { + return x.FillInterval + } + return nil +} + +var File_envoy_type_token_bucket_proto protoreflect.FileDescriptor + +var file_envoy_type_token_bucket_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x0a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, + 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, + 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 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, 0xd0, 0x01, 0x0a, 0x0b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, + 0x6b, 0x65, 0x74, 0x12, 0x26, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, + 0x52, 0x09, 0x6d, 0x61, 0x78, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x4d, 0x0a, 0x0f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x0d, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x73, 0x50, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x6c, 0x12, 0x4a, 0x0a, 0x0d, 0x66, 0x69, + 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, + 0x07, 0xaa, 0x01, 0x04, 0x08, 0x01, 0x2a, 0x00, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x6c, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x69, 0x0a, 0x18, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x42, 0x10, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, + 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_type_token_bucket_proto_rawDescOnce sync.Once + file_envoy_type_token_bucket_proto_rawDescData = file_envoy_type_token_bucket_proto_rawDesc +) + +func file_envoy_type_token_bucket_proto_rawDescGZIP() []byte { + file_envoy_type_token_bucket_proto_rawDescOnce.Do(func() { + file_envoy_type_token_bucket_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_token_bucket_proto_rawDescData) + }) + return file_envoy_type_token_bucket_proto_rawDescData +} + +var file_envoy_type_token_bucket_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_type_token_bucket_proto_goTypes = []interface{}{ + (*TokenBucket)(nil), // 0: envoy.type.TokenBucket + (*wrapperspb.UInt32Value)(nil), // 1: google.protobuf.UInt32Value + (*durationpb.Duration)(nil), // 2: google.protobuf.Duration +} +var file_envoy_type_token_bucket_proto_depIdxs = []int32{ + 1, // 0: envoy.type.TokenBucket.tokens_per_fill:type_name -> google.protobuf.UInt32Value + 2, // 1: envoy.type.TokenBucket.fill_interval:type_name -> google.protobuf.Duration + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_envoy_type_token_bucket_proto_init() } +func file_envoy_type_token_bucket_proto_init() { + if File_envoy_type_token_bucket_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_type_token_bucket_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TokenBucket); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_type_token_bucket_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_type_token_bucket_proto_goTypes, + DependencyIndexes: file_envoy_type_token_bucket_proto_depIdxs, + MessageInfos: file_envoy_type_token_bucket_proto_msgTypes, + }.Build() + File_envoy_type_token_bucket_proto = out.File + file_envoy_type_token_bucket_proto_rawDesc = nil + file_envoy_type_token_bucket_proto_goTypes = nil + file_envoy_type_token_bucket_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/type/token_bucket.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/type/token_bucket.pb.validate.go new file mode 100644 index 0000000000000..0c86ec3deb7ba --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/type/token_bucket.pb.validate.go @@ -0,0 +1,201 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/type/token_bucket.proto + +package _type + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on TokenBucket 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 *TokenBucket) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TokenBucket 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 TokenBucketMultiError, or +// nil if none found. +func (m *TokenBucket) ValidateAll() error { + return m.validate(true) +} + +func (m *TokenBucket) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetMaxTokens() <= 0 { + err := TokenBucketValidationError{ + field: "MaxTokens", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + if wrapper := m.GetTokensPerFill(); wrapper != nil { + + if wrapper.GetValue() <= 0 { + err := TokenBucketValidationError{ + field: "TokensPerFill", + reason: "value must be greater than 0", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if m.GetFillInterval() == nil { + err := TokenBucketValidationError{ + field: "FillInterval", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if d := m.GetFillInterval(); d != nil { + dur, err := d.AsDuration(), d.CheckValid() + if err != nil { + err = TokenBucketValidationError{ + field: "FillInterval", + reason: "value is not a valid duration", + cause: err, + } + if !all { + return err + } + errors = append(errors, err) + } else { + + gt := time.Duration(0*time.Second + 0*time.Nanosecond) + + if dur <= gt { + err := TokenBucketValidationError{ + field: "FillInterval", + reason: "value must be greater than 0s", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + } + + if len(errors) > 0 { + return TokenBucketMultiError(errors) + } + return nil +} + +// TokenBucketMultiError is an error wrapping multiple validation errors +// returned by TokenBucket.ValidateAll() if the designated constraints aren't met. +type TokenBucketMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TokenBucketMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TokenBucketMultiError) AllErrors() []error { return m } + +// TokenBucketValidationError is the validation error returned by +// TokenBucket.Validate if the designated constraints aren't met. +type TokenBucketValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TokenBucketValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TokenBucketValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TokenBucketValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TokenBucketValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TokenBucketValidationError) ErrorName() string { return "TokenBucketValidationError" } + +// Error satisfies the builtin error interface +func (e TokenBucketValidationError) 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 %sTokenBucket.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TokenBucketValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TokenBucketValidationError{} diff --git a/vendor/github.com/cilium/proxy/go/envoy/watchdog/v3/abort_action.pb.go b/vendor/github.com/cilium/proxy/go/envoy/watchdog/v3/abort_action.pb.go new file mode 100644 index 0000000000000..e081aa5149814 --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/watchdog/v3/abort_action.pb.go @@ -0,0 +1,175 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.19.4 +// source: envoy/watchdog/v3/abort_action.proto + +package watchdogv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// A GuardDogAction that will terminate the process by killing the +// stuck thread. This would allow easier access to the call stack of the stuck +// thread since we would run signal handlers on that thread. By default +// this will be registered to run as the last watchdog action on KILL and +// MULTIKILL events if those are enabled. +type AbortActionConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // How long to wait for the thread to respond to the thread kill function + // before killing the process from this action. This is a blocking action. + // By default this is 5 seconds. + WaitDuration *durationpb.Duration `protobuf:"bytes,1,opt,name=wait_duration,json=waitDuration,proto3" json:"wait_duration,omitempty"` +} + +func (x *AbortActionConfig) Reset() { + *x = AbortActionConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_watchdog_v3_abort_action_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AbortActionConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AbortActionConfig) ProtoMessage() {} + +func (x *AbortActionConfig) ProtoReflect() protoreflect.Message { + mi := &file_envoy_watchdog_v3_abort_action_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AbortActionConfig.ProtoReflect.Descriptor instead. +func (*AbortActionConfig) Descriptor() ([]byte, []int) { + return file_envoy_watchdog_v3_abort_action_proto_rawDescGZIP(), []int{0} +} + +func (x *AbortActionConfig) GetWaitDuration() *durationpb.Duration { + if x != nil { + return x.WaitDuration + } + return nil +} + +var File_envoy_watchdog_v3_abort_action_proto protoreflect.FileDescriptor + +var file_envoy_watchdog_v3_abort_action_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, + 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x62, 0x6f, 0x72, 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x77, 0x61, + 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x53, 0x0a, 0x11, 0x41, 0x62, 0x6f, 0x72, + 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3e, 0x0a, + 0x0d, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0c, 0x77, 0x61, 0x69, 0x74, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x82, 0x01, + 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x2e, 0x76, + 0x33, 0x42, 0x10, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x2f, 0x76, 0x33, 0x3b, + 0x77, 0x61, 0x74, 0x63, 0x68, 0x64, 0x6f, 0x67, 0x76, 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, + 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_envoy_watchdog_v3_abort_action_proto_rawDescOnce sync.Once + file_envoy_watchdog_v3_abort_action_proto_rawDescData = file_envoy_watchdog_v3_abort_action_proto_rawDesc +) + +func file_envoy_watchdog_v3_abort_action_proto_rawDescGZIP() []byte { + file_envoy_watchdog_v3_abort_action_proto_rawDescOnce.Do(func() { + file_envoy_watchdog_v3_abort_action_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_watchdog_v3_abort_action_proto_rawDescData) + }) + return file_envoy_watchdog_v3_abort_action_proto_rawDescData +} + +var file_envoy_watchdog_v3_abort_action_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_envoy_watchdog_v3_abort_action_proto_goTypes = []interface{}{ + (*AbortActionConfig)(nil), // 0: envoy.watchdog.v3.AbortActionConfig + (*durationpb.Duration)(nil), // 1: google.protobuf.Duration +} +var file_envoy_watchdog_v3_abort_action_proto_depIdxs = []int32{ + 1, // 0: envoy.watchdog.v3.AbortActionConfig.wait_duration:type_name -> google.protobuf.Duration + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_envoy_watchdog_v3_abort_action_proto_init() } +func file_envoy_watchdog_v3_abort_action_proto_init() { + if File_envoy_watchdog_v3_abort_action_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_watchdog_v3_abort_action_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AbortActionConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_watchdog_v3_abort_action_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_watchdog_v3_abort_action_proto_goTypes, + DependencyIndexes: file_envoy_watchdog_v3_abort_action_proto_depIdxs, + MessageInfos: file_envoy_watchdog_v3_abort_action_proto_msgTypes, + }.Build() + File_envoy_watchdog_v3_abort_action_proto = out.File + file_envoy_watchdog_v3_abort_action_proto_rawDesc = nil + file_envoy_watchdog_v3_abort_action_proto_goTypes = nil + file_envoy_watchdog_v3_abort_action_proto_depIdxs = nil +} diff --git a/vendor/github.com/cilium/proxy/go/envoy/watchdog/v3/abort_action.pb.validate.go b/vendor/github.com/cilium/proxy/go/envoy/watchdog/v3/abort_action.pb.validate.go new file mode 100644 index 0000000000000..9a33360ad9eec --- /dev/null +++ b/vendor/github.com/cilium/proxy/go/envoy/watchdog/v3/abort_action.pb.validate.go @@ -0,0 +1,166 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/watchdog/v3/abort_action.proto + +package watchdogv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on AbortActionConfig 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 *AbortActionConfig) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AbortActionConfig 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 +// AbortActionConfigMultiError, or nil if none found. +func (m *AbortActionConfig) ValidateAll() error { + return m.validate(true) +} + +func (m *AbortActionConfig) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetWaitDuration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AbortActionConfigValidationError{ + field: "WaitDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AbortActionConfigValidationError{ + field: "WaitDuration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWaitDuration()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AbortActionConfigValidationError{ + field: "WaitDuration", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return AbortActionConfigMultiError(errors) + } + return nil +} + +// AbortActionConfigMultiError is an error wrapping multiple validation errors +// returned by AbortActionConfig.ValidateAll() if the designated constraints +// aren't met. +type AbortActionConfigMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AbortActionConfigMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AbortActionConfigMultiError) AllErrors() []error { return m } + +// AbortActionConfigValidationError is the validation error returned by +// AbortActionConfig.Validate if the designated constraints aren't met. +type AbortActionConfigValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AbortActionConfigValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AbortActionConfigValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AbortActionConfigValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AbortActionConfigValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AbortActionConfigValidationError) ErrorName() string { + return "AbortActionConfigValidationError" +} + +// Error satisfies the builtin error interface +func (e AbortActionConfigValidationError) 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 %sAbortActionConfig.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AbortActionConfigValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AbortActionConfigValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/cidr.pb.go b/vendor/github.com/cncf/xds/go/xds/core/v3/cidr.pb.go new file mode 100644 index 0000000000000..482db87f6f930 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/core/v3/cidr.pb.go @@ -0,0 +1,177 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.18.0 +// source: xds/core/v3/cidr.proto + +package v3 + +import ( + _ "github.com/cncf/xds/go/xds/annotations/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type CidrRange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AddressPrefix string `protobuf:"bytes,1,opt,name=address_prefix,json=addressPrefix,proto3" json:"address_prefix,omitempty"` + PrefixLen *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=prefix_len,json=prefixLen,proto3" json:"prefix_len,omitempty"` +} + +func (x *CidrRange) Reset() { + *x = CidrRange{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_core_v3_cidr_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CidrRange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CidrRange) ProtoMessage() {} + +func (x *CidrRange) ProtoReflect() protoreflect.Message { + mi := &file_xds_core_v3_cidr_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CidrRange.ProtoReflect.Descriptor instead. +func (*CidrRange) Descriptor() ([]byte, []int) { + return file_xds_core_v3_cidr_proto_rawDescGZIP(), []int{0} +} + +func (x *CidrRange) GetAddressPrefix() string { + if x != nil { + return x.AddressPrefix + } + return "" +} + +func (x *CidrRange) GetPrefixLen() *wrappers.UInt32Value { + if x != nil { + return x.PrefixLen + } + return nil +} + +var File_xds_core_v3_cidr_proto protoreflect.FileDescriptor + +var file_xds_core_v3_cidr_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x69, + 0x64, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, + 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, + 0x82, 0x01, 0x0a, 0x09, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x2e, 0x0a, + 0x0e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x45, 0x0a, + 0x0a, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x2a, 0x03, 0x18, 0x80, 0x01, 0x52, 0x09, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x4c, 0x65, 0x6e, 0x42, 0x56, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0e, + 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, + 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x76, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_xds_core_v3_cidr_proto_rawDescOnce sync.Once + file_xds_core_v3_cidr_proto_rawDescData = file_xds_core_v3_cidr_proto_rawDesc +) + +func file_xds_core_v3_cidr_proto_rawDescGZIP() []byte { + file_xds_core_v3_cidr_proto_rawDescOnce.Do(func() { + file_xds_core_v3_cidr_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_cidr_proto_rawDescData) + }) + return file_xds_core_v3_cidr_proto_rawDescData +} + +var file_xds_core_v3_cidr_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_xds_core_v3_cidr_proto_goTypes = []interface{}{ + (*CidrRange)(nil), // 0: xds.core.v3.CidrRange + (*wrappers.UInt32Value)(nil), // 1: google.protobuf.UInt32Value +} +var file_xds_core_v3_cidr_proto_depIdxs = []int32{ + 1, // 0: xds.core.v3.CidrRange.prefix_len:type_name -> google.protobuf.UInt32Value + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_xds_core_v3_cidr_proto_init() } +func file_xds_core_v3_cidr_proto_init() { + if File_xds_core_v3_cidr_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_xds_core_v3_cidr_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CidrRange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_xds_core_v3_cidr_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_xds_core_v3_cidr_proto_goTypes, + DependencyIndexes: file_xds_core_v3_cidr_proto_depIdxs, + MessageInfos: file_xds_core_v3_cidr_proto_msgTypes, + }.Build() + File_xds_core_v3_cidr_proto = out.File + file_xds_core_v3_cidr_proto_rawDesc = nil + file_xds_core_v3_cidr_proto_goTypes = nil + file_xds_core_v3_cidr_proto_depIdxs = nil +} diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/cidr.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/core/v3/cidr.pb.validate.go new file mode 100644 index 0000000000000..eb48b32ba2550 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/core/v3/cidr.pb.validate.go @@ -0,0 +1,116 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: xds/core/v3/cidr.proto + +package v3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} +) + +// Validate checks the field values on CidrRange with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *CidrRange) Validate() error { + if m == nil { + return nil + } + + if utf8.RuneCountInString(m.GetAddressPrefix()) < 1 { + return CidrRangeValidationError{ + field: "AddressPrefix", + reason: "value length must be at least 1 runes", + } + } + + if wrapper := m.GetPrefixLen(); wrapper != nil { + + if wrapper.GetValue() > 128 { + return CidrRangeValidationError{ + field: "PrefixLen", + reason: "value must be less than or equal to 128", + } + } + + } + + return nil +} + +// CidrRangeValidationError is the validation error returned by +// CidrRange.Validate if the designated constraints aren't met. +type CidrRangeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CidrRangeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CidrRangeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CidrRangeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CidrRangeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CidrRangeValidationError) ErrorName() string { return "CidrRangeValidationError" } + +// Error satisfies the builtin error interface +func (e CidrRangeValidationError) 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 %sCidrRange.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CidrRangeValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CidrRangeValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.go new file mode 100644 index 0000000000000..24b19ac0ae6d7 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.go @@ -0,0 +1,167 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.18.0 +// source: xds/type/matcher/v3/cel.proto + +package v3 + +import ( + _ "github.com/cncf/xds/go/xds/annotations/v3" + v3 "github.com/cncf/xds/go/xds/type/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type CelMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ExprMatch *v3.CelExpression `protobuf:"bytes,1,opt,name=expr_match,json=exprMatch,proto3" json:"expr_match,omitempty"` +} + +func (x *CelMatcher) Reset() { + *x = CelMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_cel_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CelMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CelMatcher) ProtoMessage() {} + +func (x *CelMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_cel_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CelMatcher.ProtoReflect.Descriptor instead. +func (*CelMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_cel_proto_rawDescGZIP(), []int{0} +} + +func (x *CelMatcher) GetExprMatch() *v3.CelExpression { + if x != nil { + return x.ExprMatch + } + return nil +} + +var File_xds_type_matcher_v3_cel_proto protoreflect.FileDescriptor + +var file_xds_type_matcher_v3_cel_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, + 0x76, 0x33, 0x2f, 0x63, 0x65, 0x6c, 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, 0x51, 0x0a, 0x0a, 0x43, 0x65, 0x6c, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x65, + 0x78, 0x70, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x60, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x43, 0x65, 0x6c, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, + 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, + 0x76, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_xds_type_matcher_v3_cel_proto_rawDescOnce sync.Once + file_xds_type_matcher_v3_cel_proto_rawDescData = file_xds_type_matcher_v3_cel_proto_rawDesc +) + +func file_xds_type_matcher_v3_cel_proto_rawDescGZIP() []byte { + file_xds_type_matcher_v3_cel_proto_rawDescOnce.Do(func() { + file_xds_type_matcher_v3_cel_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_cel_proto_rawDescData) + }) + return file_xds_type_matcher_v3_cel_proto_rawDescData +} + +var file_xds_type_matcher_v3_cel_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_xds_type_matcher_v3_cel_proto_goTypes = []interface{}{ + (*CelMatcher)(nil), // 0: xds.type.matcher.v3.CelMatcher + (*v3.CelExpression)(nil), // 1: xds.type.v3.CelExpression +} +var file_xds_type_matcher_v3_cel_proto_depIdxs = []int32{ + 1, // 0: xds.type.matcher.v3.CelMatcher.expr_match:type_name -> xds.type.v3.CelExpression + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_xds_type_matcher_v3_cel_proto_init() } +func file_xds_type_matcher_v3_cel_proto_init() { + if File_xds_type_matcher_v3_cel_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_xds_type_matcher_v3_cel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CelMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_xds_type_matcher_v3_cel_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_xds_type_matcher_v3_cel_proto_goTypes, + DependencyIndexes: file_xds_type_matcher_v3_cel_proto_depIdxs, + MessageInfos: file_xds_type_matcher_v3_cel_proto_msgTypes, + }.Build() + File_xds_type_matcher_v3_cel_proto = out.File + file_xds_type_matcher_v3_cel_proto_rawDesc = nil + file_xds_type_matcher_v3_cel_proto_goTypes = nil + file_xds_type_matcher_v3_cel_proto_depIdxs = nil +} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.validate.go new file mode 100644 index 0000000000000..c079a2a9d79a1 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.validate.go @@ -0,0 +1,115 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: xds/type/matcher/v3/cel.proto + +package v3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} +) + +// Validate checks the field values on CelMatcher with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *CelMatcher) Validate() error { + if m == nil { + return nil + } + + if m.GetExprMatch() == nil { + return CelMatcherValidationError{ + field: "ExprMatch", + reason: "value is required", + } + } + + if v, ok := interface{}(m.GetExprMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CelMatcherValidationError{ + field: "ExprMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// CelMatcherValidationError is the validation error returned by +// CelMatcher.Validate if the designated constraints aren't met. +type CelMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CelMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CelMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CelMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CelMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CelMatcherValidationError) ErrorName() string { return "CelMatcherValidationError" } + +// Error satisfies the builtin error interface +func (e CelMatcherValidationError) 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 %sCelMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CelMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CelMatcherValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.go new file mode 100644 index 0000000000000..38d9f57b2e224 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.go @@ -0,0 +1,247 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.18.0 +// source: xds/type/matcher/v3/domain.proto + +package v3 + +import ( + _ "github.com/cncf/xds/go/xds/annotations/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type ServerNameMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DomainMatchers []*ServerNameMatcher_DomainMatcher `protobuf:"bytes,1,rep,name=domain_matchers,json=domainMatchers,proto3" json:"domain_matchers,omitempty"` +} + +func (x *ServerNameMatcher) Reset() { + *x = ServerNameMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_domain_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerNameMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerNameMatcher) ProtoMessage() {} + +func (x *ServerNameMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_domain_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerNameMatcher.ProtoReflect.Descriptor instead. +func (*ServerNameMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_domain_proto_rawDescGZIP(), []int{0} +} + +func (x *ServerNameMatcher) GetDomainMatchers() []*ServerNameMatcher_DomainMatcher { + if x != nil { + return x.DomainMatchers + } + return nil +} + +type ServerNameMatcher_DomainMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Domains []string `protobuf:"bytes,1,rep,name=domains,proto3" json:"domains,omitempty"` + OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` +} + +func (x *ServerNameMatcher_DomainMatcher) Reset() { + *x = ServerNameMatcher_DomainMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_domain_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerNameMatcher_DomainMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerNameMatcher_DomainMatcher) ProtoMessage() {} + +func (x *ServerNameMatcher_DomainMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_domain_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerNameMatcher_DomainMatcher.ProtoReflect.Descriptor instead. +func (*ServerNameMatcher_DomainMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_domain_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *ServerNameMatcher_DomainMatcher) GetDomains() []string { + if x != nil { + return x.Domains + } + return nil +} + +func (x *ServerNameMatcher_DomainMatcher) GetOnMatch() *Matcher_OnMatch { + if x != nil { + return x.OnMatch + } + return nil +} + +var File_xds_type_matcher_v3_domain_proto protoreflect.FileDescriptor + +var file_xds_type_matcher_v3_domain_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 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, 0xe8, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, + 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x5d, 0x0a, 0x0f, 0x64, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x44, 0x6f, 0x6d, 0x61, + 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0e, 0x64, 0x6f, 0x6d, 0x61, 0x69, + 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0x74, 0x0a, 0x0d, 0x44, 0x6f, 0x6d, + 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x07, 0x64, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x3f, + 0x0a, 0x08, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, + 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, + 0x6e, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, + 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x42, 0x16, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, + 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_xds_type_matcher_v3_domain_proto_rawDescOnce sync.Once + file_xds_type_matcher_v3_domain_proto_rawDescData = file_xds_type_matcher_v3_domain_proto_rawDesc +) + +func file_xds_type_matcher_v3_domain_proto_rawDescGZIP() []byte { + file_xds_type_matcher_v3_domain_proto_rawDescOnce.Do(func() { + file_xds_type_matcher_v3_domain_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_domain_proto_rawDescData) + }) + return file_xds_type_matcher_v3_domain_proto_rawDescData +} + +var file_xds_type_matcher_v3_domain_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_xds_type_matcher_v3_domain_proto_goTypes = []interface{}{ + (*ServerNameMatcher)(nil), // 0: xds.type.matcher.v3.ServerNameMatcher + (*ServerNameMatcher_DomainMatcher)(nil), // 1: xds.type.matcher.v3.ServerNameMatcher.DomainMatcher + (*Matcher_OnMatch)(nil), // 2: xds.type.matcher.v3.Matcher.OnMatch +} +var file_xds_type_matcher_v3_domain_proto_depIdxs = []int32{ + 1, // 0: xds.type.matcher.v3.ServerNameMatcher.domain_matchers:type_name -> xds.type.matcher.v3.ServerNameMatcher.DomainMatcher + 2, // 1: xds.type.matcher.v3.ServerNameMatcher.DomainMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_xds_type_matcher_v3_domain_proto_init() } +func file_xds_type_matcher_v3_domain_proto_init() { + if File_xds_type_matcher_v3_domain_proto != nil { + return + } + file_xds_type_matcher_v3_matcher_proto_init() + if !protoimpl.UnsafeEnabled { + file_xds_type_matcher_v3_domain_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerNameMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_domain_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerNameMatcher_DomainMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_xds_type_matcher_v3_domain_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_xds_type_matcher_v3_domain_proto_goTypes, + DependencyIndexes: file_xds_type_matcher_v3_domain_proto_depIdxs, + MessageInfos: file_xds_type_matcher_v3_domain_proto_msgTypes, + }.Build() + File_xds_type_matcher_v3_domain_proto = out.File + file_xds_type_matcher_v3_domain_proto_rawDesc = nil + file_xds_type_matcher_v3_domain_proto_goTypes = nil + file_xds_type_matcher_v3_domain_proto_depIdxs = nil +} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.validate.go new file mode 100644 index 0000000000000..de964c6345d12 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.validate.go @@ -0,0 +1,201 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: xds/type/matcher/v3/domain.proto + +package v3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} +) + +// Validate checks the field values on ServerNameMatcher with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *ServerNameMatcher) Validate() error { + if m == nil { + return nil + } + + for idx, item := range m.GetDomainMatchers() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ServerNameMatcherValidationError{ + field: fmt.Sprintf("DomainMatchers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// ServerNameMatcherValidationError is the validation error returned by +// ServerNameMatcher.Validate if the designated constraints aren't met. +type ServerNameMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ServerNameMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ServerNameMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ServerNameMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ServerNameMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ServerNameMatcherValidationError) ErrorName() string { + return "ServerNameMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e ServerNameMatcherValidationError) 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 %sServerNameMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ServerNameMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ServerNameMatcherValidationError{} + +// Validate checks the field values on ServerNameMatcher_DomainMatcher with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *ServerNameMatcher_DomainMatcher) Validate() error { + if m == nil { + return nil + } + + if len(m.GetDomains()) < 1 { + return ServerNameMatcher_DomainMatcherValidationError{ + field: "Domains", + reason: "value must contain at least 1 item(s)", + } + } + + if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ServerNameMatcher_DomainMatcherValidationError{ + field: "OnMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// ServerNameMatcher_DomainMatcherValidationError is the validation error +// returned by ServerNameMatcher_DomainMatcher.Validate if the designated +// constraints aren't met. +type ServerNameMatcher_DomainMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ServerNameMatcher_DomainMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ServerNameMatcher_DomainMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ServerNameMatcher_DomainMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ServerNameMatcher_DomainMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ServerNameMatcher_DomainMatcherValidationError) ErrorName() string { + return "ServerNameMatcher_DomainMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e ServerNameMatcher_DomainMatcherValidationError) 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 %sServerNameMatcher_DomainMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ServerNameMatcher_DomainMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ServerNameMatcher_DomainMatcherValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.go new file mode 100644 index 0000000000000..c2b50933e2ebb --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.go @@ -0,0 +1,148 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.18.0 +// source: xds/type/matcher/v3/http_inputs.proto + +package v3 + +import ( + _ "github.com/cncf/xds/go/xds/annotations/v3" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type HttpAttributesCelMatchInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *HttpAttributesCelMatchInput) Reset() { + *x = HttpAttributesCelMatchInput{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_http_inputs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpAttributesCelMatchInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpAttributesCelMatchInput) ProtoMessage() {} + +func (x *HttpAttributesCelMatchInput) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_http_inputs_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpAttributesCelMatchInput.ProtoReflect.Descriptor instead. +func (*HttpAttributesCelMatchInput) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_http_inputs_proto_rawDescGZIP(), []int{0} +} + +var File_xds_type_matcher_v3_http_inputs_proto protoreflect.FileDescriptor + +var file_xds_type_matcher_v3_http_inputs_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, + 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1d, 0x0a, + 0x1b, 0x48, 0x74, 0x74, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x43, + 0x65, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x42, 0x67, 0x0a, 0x1e, + 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0f, + 0x48, 0x74, 0x74, 0x70, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, + 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0xd2, 0xc6, 0xa4, + 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_xds_type_matcher_v3_http_inputs_proto_rawDescOnce sync.Once + file_xds_type_matcher_v3_http_inputs_proto_rawDescData = file_xds_type_matcher_v3_http_inputs_proto_rawDesc +) + +func file_xds_type_matcher_v3_http_inputs_proto_rawDescGZIP() []byte { + file_xds_type_matcher_v3_http_inputs_proto_rawDescOnce.Do(func() { + file_xds_type_matcher_v3_http_inputs_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_http_inputs_proto_rawDescData) + }) + return file_xds_type_matcher_v3_http_inputs_proto_rawDescData +} + +var file_xds_type_matcher_v3_http_inputs_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_xds_type_matcher_v3_http_inputs_proto_goTypes = []interface{}{ + (*HttpAttributesCelMatchInput)(nil), // 0: xds.type.matcher.v3.HttpAttributesCelMatchInput +} +var file_xds_type_matcher_v3_http_inputs_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_xds_type_matcher_v3_http_inputs_proto_init() } +func file_xds_type_matcher_v3_http_inputs_proto_init() { + if File_xds_type_matcher_v3_http_inputs_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_xds_type_matcher_v3_http_inputs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpAttributesCelMatchInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_xds_type_matcher_v3_http_inputs_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_xds_type_matcher_v3_http_inputs_proto_goTypes, + DependencyIndexes: file_xds_type_matcher_v3_http_inputs_proto_depIdxs, + MessageInfos: file_xds_type_matcher_v3_http_inputs_proto_msgTypes, + }.Build() + File_xds_type_matcher_v3_http_inputs_proto = out.File + file_xds_type_matcher_v3_http_inputs_proto_rawDesc = nil + file_xds_type_matcher_v3_http_inputs_proto_goTypes = nil + file_xds_type_matcher_v3_http_inputs_proto_depIdxs = nil +} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.validate.go new file mode 100644 index 0000000000000..1760d8f9d7b02 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.validate.go @@ -0,0 +1,102 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: xds/type/matcher/v3/http_inputs.proto + +package v3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} +) + +// Validate checks the field values on HttpAttributesCelMatchInput with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *HttpAttributesCelMatchInput) Validate() error { + if m == nil { + return nil + } + + return nil +} + +// HttpAttributesCelMatchInputValidationError is the validation error returned +// by HttpAttributesCelMatchInput.Validate if the designated constraints +// aren't met. +type HttpAttributesCelMatchInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpAttributesCelMatchInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpAttributesCelMatchInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpAttributesCelMatchInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpAttributesCelMatchInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpAttributesCelMatchInputValidationError) ErrorName() string { + return "HttpAttributesCelMatchInputValidationError" +} + +// Error satisfies the builtin error interface +func (e HttpAttributesCelMatchInputValidationError) 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 %sHttpAttributesCelMatchInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpAttributesCelMatchInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpAttributesCelMatchInputValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.go new file mode 100644 index 0000000000000..1a38ba2b427c2 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.go @@ -0,0 +1,261 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.18.0 +// source: xds/type/matcher/v3/ip.proto + +package v3 + +import ( + _ "github.com/cncf/xds/go/xds/annotations/v3" + v3 "github.com/cncf/xds/go/xds/core/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type IPMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RangeMatchers []*IPMatcher_IPRangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"` +} + +func (x *IPMatcher) Reset() { + *x = IPMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IPMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IPMatcher) ProtoMessage() {} + +func (x *IPMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IPMatcher.ProtoReflect.Descriptor instead. +func (*IPMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_ip_proto_rawDescGZIP(), []int{0} +} + +func (x *IPMatcher) GetRangeMatchers() []*IPMatcher_IPRangeMatcher { + if x != nil { + return x.RangeMatchers + } + return nil +} + +type IPMatcher_IPRangeMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ranges []*v3.CidrRange `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"` + OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` + Exclusive bool `protobuf:"varint,3,opt,name=exclusive,proto3" json:"exclusive,omitempty"` +} + +func (x *IPMatcher_IPRangeMatcher) Reset() { + *x = IPMatcher_IPRangeMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IPMatcher_IPRangeMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IPMatcher_IPRangeMatcher) ProtoMessage() {} + +func (x *IPMatcher_IPRangeMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IPMatcher_IPRangeMatcher.ProtoReflect.Descriptor instead. +func (*IPMatcher_IPRangeMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_ip_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *IPMatcher_IPRangeMatcher) GetRanges() []*v3.CidrRange { + if x != nil { + return x.Ranges + } + return nil +} + +func (x *IPMatcher_IPRangeMatcher) GetOnMatch() *Matcher_OnMatch { + if x != nil { + return x.OnMatch + } + return nil +} + +func (x *IPMatcher_IPRangeMatcher) GetExclusive() bool { + if x != nil { + return x.Exclusive + } + return false +} + +var File_xds_type_matcher_v3_ip_proto protoreflect.FileDescriptor + +var file_xds_type_matcher_v3_ip_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, + 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, + 0x33, 0x2f, 0x63, 0x69, 0x64, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x78, 0x64, + 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, + 0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 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, 0x8d, 0x02, 0x0a, 0x09, 0x49, 0x50, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x54, 0x0a, 0x0e, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, + 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x49, + 0x50, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d, 0x72, + 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0xa9, 0x01, 0x0a, + 0x0e, 0x49, 0x50, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, + 0x38, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, + 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, + 0x01, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x6e, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x64, + 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, + 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, + 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x42, 0x66, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x49, 0x50, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, + 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_xds_type_matcher_v3_ip_proto_rawDescOnce sync.Once + file_xds_type_matcher_v3_ip_proto_rawDescData = file_xds_type_matcher_v3_ip_proto_rawDesc +) + +func file_xds_type_matcher_v3_ip_proto_rawDescGZIP() []byte { + file_xds_type_matcher_v3_ip_proto_rawDescOnce.Do(func() { + file_xds_type_matcher_v3_ip_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_ip_proto_rawDescData) + }) + return file_xds_type_matcher_v3_ip_proto_rawDescData +} + +var file_xds_type_matcher_v3_ip_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_xds_type_matcher_v3_ip_proto_goTypes = []interface{}{ + (*IPMatcher)(nil), // 0: xds.type.matcher.v3.IPMatcher + (*IPMatcher_IPRangeMatcher)(nil), // 1: xds.type.matcher.v3.IPMatcher.IPRangeMatcher + (*v3.CidrRange)(nil), // 2: xds.core.v3.CidrRange + (*Matcher_OnMatch)(nil), // 3: xds.type.matcher.v3.Matcher.OnMatch +} +var file_xds_type_matcher_v3_ip_proto_depIdxs = []int32{ + 1, // 0: xds.type.matcher.v3.IPMatcher.range_matchers:type_name -> xds.type.matcher.v3.IPMatcher.IPRangeMatcher + 2, // 1: xds.type.matcher.v3.IPMatcher.IPRangeMatcher.ranges:type_name -> xds.core.v3.CidrRange + 3, // 2: xds.type.matcher.v3.IPMatcher.IPRangeMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_xds_type_matcher_v3_ip_proto_init() } +func file_xds_type_matcher_v3_ip_proto_init() { + if File_xds_type_matcher_v3_ip_proto != nil { + return + } + file_xds_type_matcher_v3_matcher_proto_init() + if !protoimpl.UnsafeEnabled { + file_xds_type_matcher_v3_ip_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IPMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_ip_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IPMatcher_IPRangeMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_xds_type_matcher_v3_ip_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_xds_type_matcher_v3_ip_proto_goTypes, + DependencyIndexes: file_xds_type_matcher_v3_ip_proto_depIdxs, + MessageInfos: file_xds_type_matcher_v3_ip_proto_msgTypes, + }.Build() + File_xds_type_matcher_v3_ip_proto = out.File + file_xds_type_matcher_v3_ip_proto_rawDesc = nil + file_xds_type_matcher_v3_ip_proto_goTypes = nil + file_xds_type_matcher_v3_ip_proto_depIdxs = nil +} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.validate.go new file mode 100644 index 0000000000000..44c437274442b --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.validate.go @@ -0,0 +1,214 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: xds/type/matcher/v3/ip.proto + +package v3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} +) + +// Validate checks the field values on IPMatcher with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *IPMatcher) Validate() error { + if m == nil { + return nil + } + + for idx, item := range m.GetRangeMatchers() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return IPMatcherValidationError{ + field: fmt.Sprintf("RangeMatchers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// IPMatcherValidationError is the validation error returned by +// IPMatcher.Validate if the designated constraints aren't met. +type IPMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e IPMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e IPMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e IPMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e IPMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e IPMatcherValidationError) ErrorName() string { return "IPMatcherValidationError" } + +// Error satisfies the builtin error interface +func (e IPMatcherValidationError) 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 %sIPMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = IPMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = IPMatcherValidationError{} + +// Validate checks the field values on IPMatcher_IPRangeMatcher with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *IPMatcher_IPRangeMatcher) Validate() error { + if m == nil { + return nil + } + + if len(m.GetRanges()) < 1 { + return IPMatcher_IPRangeMatcherValidationError{ + field: "Ranges", + reason: "value must contain at least 1 item(s)", + } + } + + for idx, item := range m.GetRanges() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return IPMatcher_IPRangeMatcherValidationError{ + field: fmt.Sprintf("Ranges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return IPMatcher_IPRangeMatcherValidationError{ + field: "OnMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Exclusive + + return nil +} + +// IPMatcher_IPRangeMatcherValidationError is the validation error returned by +// IPMatcher_IPRangeMatcher.Validate if the designated constraints aren't met. +type IPMatcher_IPRangeMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e IPMatcher_IPRangeMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e IPMatcher_IPRangeMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e IPMatcher_IPRangeMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e IPMatcher_IPRangeMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e IPMatcher_IPRangeMatcherValidationError) ErrorName() string { + return "IPMatcher_IPRangeMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e IPMatcher_IPRangeMatcherValidationError) 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 %sIPMatcher_IPRangeMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = IPMatcher_IPRangeMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = IPMatcher_IPRangeMatcherValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.go new file mode 100644 index 0000000000000..f7e053348cf3f --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.go @@ -0,0 +1,544 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.18.0 +// source: xds/type/matcher/v3/range.proto + +package v3 + +import ( + v3 "github.com/cncf/xds/go/xds/type/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Int64RangeMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RangeMatchers []*Int64RangeMatcher_RangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"` +} + +func (x *Int64RangeMatcher) Reset() { + *x = Int64RangeMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Int64RangeMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Int64RangeMatcher) ProtoMessage() {} + +func (x *Int64RangeMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Int64RangeMatcher.ProtoReflect.Descriptor instead. +func (*Int64RangeMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{0} +} + +func (x *Int64RangeMatcher) GetRangeMatchers() []*Int64RangeMatcher_RangeMatcher { + if x != nil { + return x.RangeMatchers + } + return nil +} + +type Int32RangeMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RangeMatchers []*Int32RangeMatcher_RangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"` +} + +func (x *Int32RangeMatcher) Reset() { + *x = Int32RangeMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Int32RangeMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Int32RangeMatcher) ProtoMessage() {} + +func (x *Int32RangeMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Int32RangeMatcher.ProtoReflect.Descriptor instead. +func (*Int32RangeMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{1} +} + +func (x *Int32RangeMatcher) GetRangeMatchers() []*Int32RangeMatcher_RangeMatcher { + if x != nil { + return x.RangeMatchers + } + return nil +} + +type DoubleRangeMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RangeMatchers []*DoubleRangeMatcher_RangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"` +} + +func (x *DoubleRangeMatcher) Reset() { + *x = DoubleRangeMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DoubleRangeMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DoubleRangeMatcher) ProtoMessage() {} + +func (x *DoubleRangeMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DoubleRangeMatcher.ProtoReflect.Descriptor instead. +func (*DoubleRangeMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{2} +} + +func (x *DoubleRangeMatcher) GetRangeMatchers() []*DoubleRangeMatcher_RangeMatcher { + if x != nil { + return x.RangeMatchers + } + return nil +} + +type Int64RangeMatcher_RangeMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ranges []*v3.Int64Range `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"` + OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` +} + +func (x *Int64RangeMatcher_RangeMatcher) Reset() { + *x = Int64RangeMatcher_RangeMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Int64RangeMatcher_RangeMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Int64RangeMatcher_RangeMatcher) ProtoMessage() {} + +func (x *Int64RangeMatcher_RangeMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Int64RangeMatcher_RangeMatcher.ProtoReflect.Descriptor instead. +func (*Int64RangeMatcher_RangeMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Int64RangeMatcher_RangeMatcher) GetRanges() []*v3.Int64Range { + if x != nil { + return x.Ranges + } + return nil +} + +func (x *Int64RangeMatcher_RangeMatcher) GetOnMatch() *Matcher_OnMatch { + if x != nil { + return x.OnMatch + } + return nil +} + +type Int32RangeMatcher_RangeMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ranges []*v3.Int32Range `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"` + OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` +} + +func (x *Int32RangeMatcher_RangeMatcher) Reset() { + *x = Int32RangeMatcher_RangeMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Int32RangeMatcher_RangeMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Int32RangeMatcher_RangeMatcher) ProtoMessage() {} + +func (x *Int32RangeMatcher_RangeMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Int32RangeMatcher_RangeMatcher.ProtoReflect.Descriptor instead. +func (*Int32RangeMatcher_RangeMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *Int32RangeMatcher_RangeMatcher) GetRanges() []*v3.Int32Range { + if x != nil { + return x.Ranges + } + return nil +} + +func (x *Int32RangeMatcher_RangeMatcher) GetOnMatch() *Matcher_OnMatch { + if x != nil { + return x.OnMatch + } + return nil +} + +type DoubleRangeMatcher_RangeMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ranges []*v3.DoubleRange `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"` + OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"` +} + +func (x *DoubleRangeMatcher_RangeMatcher) Reset() { + *x = DoubleRangeMatcher_RangeMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DoubleRangeMatcher_RangeMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DoubleRangeMatcher_RangeMatcher) ProtoMessage() {} + +func (x *DoubleRangeMatcher_RangeMatcher) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_matcher_v3_range_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DoubleRangeMatcher_RangeMatcher.ProtoReflect.Descriptor instead. +func (*DoubleRangeMatcher_RangeMatcher) Descriptor() ([]byte, []int) { + return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *DoubleRangeMatcher_RangeMatcher) GetRanges() []*v3.DoubleRange { + if x != nil { + return x.Ranges + } + return nil +} + +func (x *DoubleRangeMatcher_RangeMatcher) GetOnMatch() *Matcher_OnMatch { + if x != nil { + return x.OnMatch + } + return nil +} + +var File_xds_type_matcher_v3_range_proto protoreflect.FileDescriptor + +var file_xds_type_matcher_v3_range_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x17, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 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, 0xfc, 0x01, 0x0a, 0x11, + 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x12, 0x5a, 0x0a, 0x0e, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x78, 0x64, 0x73, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, + 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d, + 0x72, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0x8a, 0x01, + 0x0a, 0x0c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x39, + 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, + 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, + 0x01, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x6e, 0x5f, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x64, + 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xfc, 0x01, 0x0a, 0x11, 0x49, + 0x6e, 0x74, 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x12, 0x5a, 0x0a, 0x0e, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x49, + 0x6e, 0x74, 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d, 0x72, + 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0x8a, 0x01, 0x0a, + 0x0c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x39, 0x0a, + 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x33, + 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, + 0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x6e, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x64, 0x73, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, + 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xff, 0x01, 0x0a, 0x12, 0x44, 0x6f, + 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x12, 0x5b, 0x0a, 0x0e, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x44, + 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d, + 0x72, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0x8b, 0x01, + 0x0a, 0x0c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x3a, + 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6f, 0x75, + 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, + 0x08, 0x01, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x6e, + 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, + 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x5a, 0x0a, 0x1e, 0x63, + 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, + 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_xds_type_matcher_v3_range_proto_rawDescOnce sync.Once + file_xds_type_matcher_v3_range_proto_rawDescData = file_xds_type_matcher_v3_range_proto_rawDesc +) + +func file_xds_type_matcher_v3_range_proto_rawDescGZIP() []byte { + file_xds_type_matcher_v3_range_proto_rawDescOnce.Do(func() { + file_xds_type_matcher_v3_range_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_range_proto_rawDescData) + }) + return file_xds_type_matcher_v3_range_proto_rawDescData +} + +var file_xds_type_matcher_v3_range_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_xds_type_matcher_v3_range_proto_goTypes = []interface{}{ + (*Int64RangeMatcher)(nil), // 0: xds.type.matcher.v3.Int64RangeMatcher + (*Int32RangeMatcher)(nil), // 1: xds.type.matcher.v3.Int32RangeMatcher + (*DoubleRangeMatcher)(nil), // 2: xds.type.matcher.v3.DoubleRangeMatcher + (*Int64RangeMatcher_RangeMatcher)(nil), // 3: xds.type.matcher.v3.Int64RangeMatcher.RangeMatcher + (*Int32RangeMatcher_RangeMatcher)(nil), // 4: xds.type.matcher.v3.Int32RangeMatcher.RangeMatcher + (*DoubleRangeMatcher_RangeMatcher)(nil), // 5: xds.type.matcher.v3.DoubleRangeMatcher.RangeMatcher + (*v3.Int64Range)(nil), // 6: xds.type.v3.Int64Range + (*Matcher_OnMatch)(nil), // 7: xds.type.matcher.v3.Matcher.OnMatch + (*v3.Int32Range)(nil), // 8: xds.type.v3.Int32Range + (*v3.DoubleRange)(nil), // 9: xds.type.v3.DoubleRange +} +var file_xds_type_matcher_v3_range_proto_depIdxs = []int32{ + 3, // 0: xds.type.matcher.v3.Int64RangeMatcher.range_matchers:type_name -> xds.type.matcher.v3.Int64RangeMatcher.RangeMatcher + 4, // 1: xds.type.matcher.v3.Int32RangeMatcher.range_matchers:type_name -> xds.type.matcher.v3.Int32RangeMatcher.RangeMatcher + 5, // 2: xds.type.matcher.v3.DoubleRangeMatcher.range_matchers:type_name -> xds.type.matcher.v3.DoubleRangeMatcher.RangeMatcher + 6, // 3: xds.type.matcher.v3.Int64RangeMatcher.RangeMatcher.ranges:type_name -> xds.type.v3.Int64Range + 7, // 4: xds.type.matcher.v3.Int64RangeMatcher.RangeMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch + 8, // 5: xds.type.matcher.v3.Int32RangeMatcher.RangeMatcher.ranges:type_name -> xds.type.v3.Int32Range + 7, // 6: xds.type.matcher.v3.Int32RangeMatcher.RangeMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch + 9, // 7: xds.type.matcher.v3.DoubleRangeMatcher.RangeMatcher.ranges:type_name -> xds.type.v3.DoubleRange + 7, // 8: xds.type.matcher.v3.DoubleRangeMatcher.RangeMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_xds_type_matcher_v3_range_proto_init() } +func file_xds_type_matcher_v3_range_proto_init() { + if File_xds_type_matcher_v3_range_proto != nil { + return + } + file_xds_type_matcher_v3_matcher_proto_init() + if !protoimpl.UnsafeEnabled { + file_xds_type_matcher_v3_range_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Int64RangeMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_range_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Int32RangeMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_range_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DoubleRangeMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_range_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Int64RangeMatcher_RangeMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_range_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Int32RangeMatcher_RangeMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_matcher_v3_range_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DoubleRangeMatcher_RangeMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_xds_type_matcher_v3_range_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_xds_type_matcher_v3_range_proto_goTypes, + DependencyIndexes: file_xds_type_matcher_v3_range_proto_depIdxs, + MessageInfos: file_xds_type_matcher_v3_range_proto_msgTypes, + }.Build() + File_xds_type_matcher_v3_range_proto = out.File + file_xds_type_matcher_v3_range_proto_rawDesc = nil + file_xds_type_matcher_v3_range_proto_goTypes = nil + file_xds_type_matcher_v3_range_proto_depIdxs = nil +} diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.validate.go new file mode 100644 index 0000000000000..00b7a03e8b51e --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.validate.go @@ -0,0 +1,580 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: xds/type/matcher/v3/range.proto + +package v3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} +) + +// Validate checks the field values on Int64RangeMatcher with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *Int64RangeMatcher) Validate() error { + if m == nil { + return nil + } + + for idx, item := range m.GetRangeMatchers() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Int64RangeMatcherValidationError{ + field: fmt.Sprintf("RangeMatchers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// Int64RangeMatcherValidationError is the validation error returned by +// Int64RangeMatcher.Validate if the designated constraints aren't met. +type Int64RangeMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Int64RangeMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Int64RangeMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Int64RangeMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Int64RangeMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Int64RangeMatcherValidationError) ErrorName() string { + return "Int64RangeMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e Int64RangeMatcherValidationError) 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 %sInt64RangeMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Int64RangeMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Int64RangeMatcherValidationError{} + +// Validate checks the field values on Int32RangeMatcher with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *Int32RangeMatcher) Validate() error { + if m == nil { + return nil + } + + for idx, item := range m.GetRangeMatchers() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Int32RangeMatcherValidationError{ + field: fmt.Sprintf("RangeMatchers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// Int32RangeMatcherValidationError is the validation error returned by +// Int32RangeMatcher.Validate if the designated constraints aren't met. +type Int32RangeMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Int32RangeMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Int32RangeMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Int32RangeMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Int32RangeMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Int32RangeMatcherValidationError) ErrorName() string { + return "Int32RangeMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e Int32RangeMatcherValidationError) 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 %sInt32RangeMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Int32RangeMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Int32RangeMatcherValidationError{} + +// Validate checks the field values on DoubleRangeMatcher with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *DoubleRangeMatcher) Validate() error { + if m == nil { + return nil + } + + for idx, item := range m.GetRangeMatchers() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DoubleRangeMatcherValidationError{ + field: fmt.Sprintf("RangeMatchers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// DoubleRangeMatcherValidationError is the validation error returned by +// DoubleRangeMatcher.Validate if the designated constraints aren't met. +type DoubleRangeMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DoubleRangeMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DoubleRangeMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DoubleRangeMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DoubleRangeMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DoubleRangeMatcherValidationError) ErrorName() string { + return "DoubleRangeMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e DoubleRangeMatcherValidationError) 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 %sDoubleRangeMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DoubleRangeMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DoubleRangeMatcherValidationError{} + +// Validate checks the field values on Int64RangeMatcher_RangeMatcher with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *Int64RangeMatcher_RangeMatcher) Validate() error { + if m == nil { + return nil + } + + if len(m.GetRanges()) < 1 { + return Int64RangeMatcher_RangeMatcherValidationError{ + field: "Ranges", + reason: "value must contain at least 1 item(s)", + } + } + + for idx, item := range m.GetRanges() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Int64RangeMatcher_RangeMatcherValidationError{ + field: fmt.Sprintf("Ranges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Int64RangeMatcher_RangeMatcherValidationError{ + field: "OnMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// Int64RangeMatcher_RangeMatcherValidationError is the validation error +// returned by Int64RangeMatcher_RangeMatcher.Validate if the designated +// constraints aren't met. +type Int64RangeMatcher_RangeMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Int64RangeMatcher_RangeMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Int64RangeMatcher_RangeMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Int64RangeMatcher_RangeMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Int64RangeMatcher_RangeMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Int64RangeMatcher_RangeMatcherValidationError) ErrorName() string { + return "Int64RangeMatcher_RangeMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e Int64RangeMatcher_RangeMatcherValidationError) 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 %sInt64RangeMatcher_RangeMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Int64RangeMatcher_RangeMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Int64RangeMatcher_RangeMatcherValidationError{} + +// Validate checks the field values on Int32RangeMatcher_RangeMatcher with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *Int32RangeMatcher_RangeMatcher) Validate() error { + if m == nil { + return nil + } + + if len(m.GetRanges()) < 1 { + return Int32RangeMatcher_RangeMatcherValidationError{ + field: "Ranges", + reason: "value must contain at least 1 item(s)", + } + } + + for idx, item := range m.GetRanges() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Int32RangeMatcher_RangeMatcherValidationError{ + field: fmt.Sprintf("Ranges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Int32RangeMatcher_RangeMatcherValidationError{ + field: "OnMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// Int32RangeMatcher_RangeMatcherValidationError is the validation error +// returned by Int32RangeMatcher_RangeMatcher.Validate if the designated +// constraints aren't met. +type Int32RangeMatcher_RangeMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Int32RangeMatcher_RangeMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Int32RangeMatcher_RangeMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Int32RangeMatcher_RangeMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Int32RangeMatcher_RangeMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Int32RangeMatcher_RangeMatcherValidationError) ErrorName() string { + return "Int32RangeMatcher_RangeMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e Int32RangeMatcher_RangeMatcherValidationError) 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 %sInt32RangeMatcher_RangeMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Int32RangeMatcher_RangeMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Int32RangeMatcher_RangeMatcherValidationError{} + +// Validate checks the field values on DoubleRangeMatcher_RangeMatcher with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *DoubleRangeMatcher_RangeMatcher) Validate() error { + if m == nil { + return nil + } + + if len(m.GetRanges()) < 1 { + return DoubleRangeMatcher_RangeMatcherValidationError{ + field: "Ranges", + reason: "value must contain at least 1 item(s)", + } + } + + for idx, item := range m.GetRanges() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DoubleRangeMatcher_RangeMatcherValidationError{ + field: fmt.Sprintf("Ranges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DoubleRangeMatcher_RangeMatcherValidationError{ + field: "OnMatch", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// DoubleRangeMatcher_RangeMatcherValidationError is the validation error +// returned by DoubleRangeMatcher_RangeMatcher.Validate if the designated +// constraints aren't met. +type DoubleRangeMatcher_RangeMatcherValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DoubleRangeMatcher_RangeMatcherValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DoubleRangeMatcher_RangeMatcherValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DoubleRangeMatcher_RangeMatcherValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DoubleRangeMatcher_RangeMatcherValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DoubleRangeMatcher_RangeMatcherValidationError) ErrorName() string { + return "DoubleRangeMatcher_RangeMatcherValidationError" +} + +// Error satisfies the builtin error interface +func (e DoubleRangeMatcher_RangeMatcherValidationError) 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 %sDoubleRangeMatcher_RangeMatcher.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DoubleRangeMatcher_RangeMatcherValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DoubleRangeMatcher_RangeMatcherValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.go b/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.go new file mode 100644 index 0000000000000..0fd975a2e5691 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.go @@ -0,0 +1,298 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.18.0 +// source: xds/type/v3/cel.proto + +package v3 + +import ( + _ "github.com/cncf/xds/go/xds/annotations/v3" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + proto "github.com/golang/protobuf/proto" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type CelExpression struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to ExprSpecifier: + // *CelExpression_ParsedExpr + // *CelExpression_CheckedExpr + ExprSpecifier isCelExpression_ExprSpecifier `protobuf_oneof:"expr_specifier"` +} + +func (x *CelExpression) Reset() { + *x = CelExpression{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_v3_cel_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CelExpression) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CelExpression) ProtoMessage() {} + +func (x *CelExpression) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_v3_cel_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CelExpression.ProtoReflect.Descriptor instead. +func (*CelExpression) Descriptor() ([]byte, []int) { + return file_xds_type_v3_cel_proto_rawDescGZIP(), []int{0} +} + +func (m *CelExpression) GetExprSpecifier() isCelExpression_ExprSpecifier { + if m != nil { + return m.ExprSpecifier + } + return nil +} + +func (x *CelExpression) GetParsedExpr() *v1alpha1.ParsedExpr { + if x, ok := x.GetExprSpecifier().(*CelExpression_ParsedExpr); ok { + return x.ParsedExpr + } + return nil +} + +func (x *CelExpression) GetCheckedExpr() *v1alpha1.CheckedExpr { + if x, ok := x.GetExprSpecifier().(*CelExpression_CheckedExpr); ok { + return x.CheckedExpr + } + return nil +} + +type isCelExpression_ExprSpecifier interface { + isCelExpression_ExprSpecifier() +} + +type CelExpression_ParsedExpr struct { + ParsedExpr *v1alpha1.ParsedExpr `protobuf:"bytes,1,opt,name=parsed_expr,json=parsedExpr,proto3,oneof"` +} + +type CelExpression_CheckedExpr struct { + CheckedExpr *v1alpha1.CheckedExpr `protobuf:"bytes,2,opt,name=checked_expr,json=checkedExpr,proto3,oneof"` +} + +func (*CelExpression_ParsedExpr) isCelExpression_ExprSpecifier() {} + +func (*CelExpression_CheckedExpr) isCelExpression_ExprSpecifier() {} + +type CelExtractString struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ExprExtract *CelExpression `protobuf:"bytes,1,opt,name=expr_extract,json=exprExtract,proto3" json:"expr_extract,omitempty"` + DefaultValue *wrappers.StringValue `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` +} + +func (x *CelExtractString) Reset() { + *x = CelExtractString{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_v3_cel_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CelExtractString) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CelExtractString) ProtoMessage() {} + +func (x *CelExtractString) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_v3_cel_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CelExtractString.ProtoReflect.Descriptor instead. +func (*CelExtractString) Descriptor() ([]byte, []int) { + return file_xds_type_v3_cel_proto_rawDescGZIP(), []int{1} +} + +func (x *CelExtractString) GetExprExtract() *CelExpression { + if x != nil { + return x.ExprExtract + } + return nil +} + +func (x *CelExtractString) GetDefaultValue() *wrappers.StringValue { + if x != nil { + return x.DefaultValue + } + return nil +} + +var File_xds_type_v3_cel_proto protoreflect.FileDescriptor + +var file_xds_type_v3_cel_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x65, + 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x26, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0xbb, 0x01, + 0x0a, 0x0d, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x47, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61, + 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x12, 0x4a, 0x0a, 0x0c, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, + 0x64, 0x45, 0x78, 0x70, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, + 0x45, 0x78, 0x70, 0x72, 0x42, 0x15, 0x0a, 0x0e, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x9e, 0x01, 0x0a, 0x10, + 0x43, 0x65, 0x6c, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x12, 0x47, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x65, 0x78, + 0x70, 0x72, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x41, 0x0a, 0x0d, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x50, 0x0a, 0x16, + 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x43, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_xds_type_v3_cel_proto_rawDescOnce sync.Once + file_xds_type_v3_cel_proto_rawDescData = file_xds_type_v3_cel_proto_rawDesc +) + +func file_xds_type_v3_cel_proto_rawDescGZIP() []byte { + file_xds_type_v3_cel_proto_rawDescOnce.Do(func() { + file_xds_type_v3_cel_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_v3_cel_proto_rawDescData) + }) + return file_xds_type_v3_cel_proto_rawDescData +} + +var file_xds_type_v3_cel_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_xds_type_v3_cel_proto_goTypes = []interface{}{ + (*CelExpression)(nil), // 0: xds.type.v3.CelExpression + (*CelExtractString)(nil), // 1: xds.type.v3.CelExtractString + (*v1alpha1.ParsedExpr)(nil), // 2: google.api.expr.v1alpha1.ParsedExpr + (*v1alpha1.CheckedExpr)(nil), // 3: google.api.expr.v1alpha1.CheckedExpr + (*wrappers.StringValue)(nil), // 4: google.protobuf.StringValue +} +var file_xds_type_v3_cel_proto_depIdxs = []int32{ + 2, // 0: xds.type.v3.CelExpression.parsed_expr:type_name -> google.api.expr.v1alpha1.ParsedExpr + 3, // 1: xds.type.v3.CelExpression.checked_expr:type_name -> google.api.expr.v1alpha1.CheckedExpr + 0, // 2: xds.type.v3.CelExtractString.expr_extract:type_name -> xds.type.v3.CelExpression + 4, // 3: xds.type.v3.CelExtractString.default_value:type_name -> google.protobuf.StringValue + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_xds_type_v3_cel_proto_init() } +func file_xds_type_v3_cel_proto_init() { + if File_xds_type_v3_cel_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_xds_type_v3_cel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CelExpression); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_v3_cel_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CelExtractString); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_xds_type_v3_cel_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*CelExpression_ParsedExpr)(nil), + (*CelExpression_CheckedExpr)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_xds_type_v3_cel_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_xds_type_v3_cel_proto_goTypes, + DependencyIndexes: file_xds_type_v3_cel_proto_depIdxs, + MessageInfos: file_xds_type_v3_cel_proto_msgTypes, + }.Build() + File_xds_type_v3_cel_proto = out.File + file_xds_type_v3_cel_proto_rawDesc = nil + file_xds_type_v3_cel_proto_goTypes = nil + file_xds_type_v3_cel_proto_depIdxs = nil +} diff --git a/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.validate.go new file mode 100644 index 0000000000000..c28fb4eda3094 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.validate.go @@ -0,0 +1,225 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: xds/type/v3/cel.proto + +package v3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} +) + +// Validate checks the field values on CelExpression with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *CelExpression) Validate() error { + if m == nil { + return nil + } + + switch m.ExprSpecifier.(type) { + + case *CelExpression_ParsedExpr: + + if v, ok := interface{}(m.GetParsedExpr()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CelExpressionValidationError{ + field: "ParsedExpr", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *CelExpression_CheckedExpr: + + if v, ok := interface{}(m.GetCheckedExpr()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CelExpressionValidationError{ + field: "CheckedExpr", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + return CelExpressionValidationError{ + field: "ExprSpecifier", + reason: "value is required", + } + + } + + return nil +} + +// CelExpressionValidationError is the validation error returned by +// CelExpression.Validate if the designated constraints aren't met. +type CelExpressionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CelExpressionValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CelExpressionValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CelExpressionValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CelExpressionValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CelExpressionValidationError) ErrorName() string { return "CelExpressionValidationError" } + +// Error satisfies the builtin error interface +func (e CelExpressionValidationError) 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 %sCelExpression.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CelExpressionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CelExpressionValidationError{} + +// Validate checks the field values on CelExtractString with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *CelExtractString) Validate() error { + if m == nil { + return nil + } + + if m.GetExprExtract() == nil { + return CelExtractStringValidationError{ + field: "ExprExtract", + reason: "value is required", + } + } + + if v, ok := interface{}(m.GetExprExtract()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CelExtractStringValidationError{ + field: "ExprExtract", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetDefaultValue()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CelExtractStringValidationError{ + field: "DefaultValue", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// CelExtractStringValidationError is the validation error returned by +// CelExtractString.Validate if the designated constraints aren't met. +type CelExtractStringValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CelExtractStringValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CelExtractStringValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CelExtractStringValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CelExtractStringValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CelExtractStringValidationError) ErrorName() string { return "CelExtractStringValidationError" } + +// Error satisfies the builtin error interface +func (e CelExtractStringValidationError) 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 %sCelExtractString.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CelExtractStringValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CelExtractStringValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.go b/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.go new file mode 100644 index 0000000000000..883cd43bd347a --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.go @@ -0,0 +1,303 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.18.0 +// source: xds/type/v3/range.proto + +package v3 + +import ( + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Int64Range struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` + End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` +} + +func (x *Int64Range) Reset() { + *x = Int64Range{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_v3_range_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Int64Range) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Int64Range) ProtoMessage() {} + +func (x *Int64Range) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_v3_range_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Int64Range.ProtoReflect.Descriptor instead. +func (*Int64Range) Descriptor() ([]byte, []int) { + return file_xds_type_v3_range_proto_rawDescGZIP(), []int{0} +} + +func (x *Int64Range) GetStart() int64 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *Int64Range) GetEnd() int64 { + if x != nil { + return x.End + } + return 0 +} + +type Int32Range struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Start int32 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` + End int32 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` +} + +func (x *Int32Range) Reset() { + *x = Int32Range{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_v3_range_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Int32Range) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Int32Range) ProtoMessage() {} + +func (x *Int32Range) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_v3_range_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Int32Range.ProtoReflect.Descriptor instead. +func (*Int32Range) Descriptor() ([]byte, []int) { + return file_xds_type_v3_range_proto_rawDescGZIP(), []int{1} +} + +func (x *Int32Range) GetStart() int32 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *Int32Range) GetEnd() int32 { + if x != nil { + return x.End + } + return 0 +} + +type DoubleRange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Start float64 `protobuf:"fixed64,1,opt,name=start,proto3" json:"start,omitempty"` + End float64 `protobuf:"fixed64,2,opt,name=end,proto3" json:"end,omitempty"` +} + +func (x *DoubleRange) Reset() { + *x = DoubleRange{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_v3_range_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DoubleRange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DoubleRange) ProtoMessage() {} + +func (x *DoubleRange) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_v3_range_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DoubleRange.ProtoReflect.Descriptor instead. +func (*DoubleRange) Descriptor() ([]byte, []int) { + return file_xds_type_v3_range_proto_rawDescGZIP(), []int{2} +} + +func (x *DoubleRange) GetStart() float64 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *DoubleRange) GetEnd() float64 { + if x != nil { + return x.End + } + return 0 +} + +var File_xds_type_v3_range_proto protoreflect.FileDescriptor + +var file_xds_type_v3_range_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, + 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x22, 0x34, 0x0a, 0x0a, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x34, 0x0a, 0x0a, + 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, + 0x6e, 0x64, 0x22, 0x35, 0x0a, 0x0b, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x42, 0x4a, 0x0a, 0x16, 0x63, 0x6f, 0x6d, + 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, + 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_xds_type_v3_range_proto_rawDescOnce sync.Once + file_xds_type_v3_range_proto_rawDescData = file_xds_type_v3_range_proto_rawDesc +) + +func file_xds_type_v3_range_proto_rawDescGZIP() []byte { + file_xds_type_v3_range_proto_rawDescOnce.Do(func() { + file_xds_type_v3_range_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_v3_range_proto_rawDescData) + }) + return file_xds_type_v3_range_proto_rawDescData +} + +var file_xds_type_v3_range_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_xds_type_v3_range_proto_goTypes = []interface{}{ + (*Int64Range)(nil), // 0: xds.type.v3.Int64Range + (*Int32Range)(nil), // 1: xds.type.v3.Int32Range + (*DoubleRange)(nil), // 2: xds.type.v3.DoubleRange +} +var file_xds_type_v3_range_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_xds_type_v3_range_proto_init() } +func file_xds_type_v3_range_proto_init() { + if File_xds_type_v3_range_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_xds_type_v3_range_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Int64Range); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_v3_range_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Int32Range); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xds_type_v3_range_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DoubleRange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_xds_type_v3_range_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_xds_type_v3_range_proto_goTypes, + DependencyIndexes: file_xds_type_v3_range_proto_depIdxs, + MessageInfos: file_xds_type_v3_range_proto_msgTypes, + }.Build() + File_xds_type_v3_range_proto = out.File + file_xds_type_v3_range_proto_rawDesc = nil + file_xds_type_v3_range_proto_goTypes = nil + file_xds_type_v3_range_proto_depIdxs = nil +} diff --git a/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.validate.go new file mode 100644 index 0000000000000..7fd141a48372d --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.validate.go @@ -0,0 +1,239 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: xds/type/v3/range.proto + +package v3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} +) + +// Validate checks the field values on Int64Range with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Int64Range) Validate() error { + if m == nil { + return nil + } + + // no validation rules for Start + + // no validation rules for End + + return nil +} + +// Int64RangeValidationError is the validation error returned by +// Int64Range.Validate if the designated constraints aren't met. +type Int64RangeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Int64RangeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Int64RangeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Int64RangeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Int64RangeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Int64RangeValidationError) ErrorName() string { return "Int64RangeValidationError" } + +// Error satisfies the builtin error interface +func (e Int64RangeValidationError) 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 %sInt64Range.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Int64RangeValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Int64RangeValidationError{} + +// Validate checks the field values on Int32Range with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Int32Range) Validate() error { + if m == nil { + return nil + } + + // no validation rules for Start + + // no validation rules for End + + return nil +} + +// Int32RangeValidationError is the validation error returned by +// Int32Range.Validate if the designated constraints aren't met. +type Int32RangeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Int32RangeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Int32RangeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Int32RangeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Int32RangeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Int32RangeValidationError) ErrorName() string { return "Int32RangeValidationError" } + +// Error satisfies the builtin error interface +func (e Int32RangeValidationError) 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 %sInt32Range.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Int32RangeValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Int32RangeValidationError{} + +// Validate checks the field values on DoubleRange with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *DoubleRange) Validate() error { + if m == nil { + return nil + } + + // no validation rules for Start + + // no validation rules for End + + return nil +} + +// DoubleRangeValidationError is the validation error returned by +// DoubleRange.Validate if the designated constraints aren't met. +type DoubleRangeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DoubleRangeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DoubleRangeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DoubleRangeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DoubleRangeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DoubleRangeValidationError) ErrorName() string { return "DoubleRangeValidationError" } + +// Error satisfies the builtin error interface +func (e DoubleRangeValidationError) 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 %sDoubleRange.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DoubleRangeValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DoubleRangeValidationError{} diff --git a/vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.go b/vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.go new file mode 100644 index 0000000000000..47c671498c901 --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.go @@ -0,0 +1,168 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.18.0 +// source: xds/type/v3/typed_struct.proto + +package v3 + +import ( + proto "github.com/golang/protobuf/proto" + _struct "github.com/golang/protobuf/ptypes/struct" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type TypedStruct struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` + Value *_struct.Struct `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *TypedStruct) Reset() { + *x = TypedStruct{} + if protoimpl.UnsafeEnabled { + mi := &file_xds_type_v3_typed_struct_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TypedStruct) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TypedStruct) ProtoMessage() {} + +func (x *TypedStruct) ProtoReflect() protoreflect.Message { + mi := &file_xds_type_v3_typed_struct_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TypedStruct.ProtoReflect.Descriptor instead. +func (*TypedStruct) Descriptor() ([]byte, []int) { + return file_xds_type_v3_typed_struct_proto_rawDescGZIP(), []int{0} +} + +func (x *TypedStruct) GetTypeUrl() string { + if x != nil { + return x.TypeUrl + } + return "" +} + +func (x *TypedStruct) GetValue() *_struct.Struct { + if x != nil { + return x.Value + } + return nil +} + +var File_xds_type_v3_typed_struct_proto protoreflect.FileDescriptor + +var file_xds_type_v3_typed_struct_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1c, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x0b, 0x54, + 0x79, 0x70, 0x65, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, + 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, + 0x70, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x42, 0x50, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x10, + 0x54, 0x79, 0x70, 0x65, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_xds_type_v3_typed_struct_proto_rawDescOnce sync.Once + file_xds_type_v3_typed_struct_proto_rawDescData = file_xds_type_v3_typed_struct_proto_rawDesc +) + +func file_xds_type_v3_typed_struct_proto_rawDescGZIP() []byte { + file_xds_type_v3_typed_struct_proto_rawDescOnce.Do(func() { + file_xds_type_v3_typed_struct_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_v3_typed_struct_proto_rawDescData) + }) + return file_xds_type_v3_typed_struct_proto_rawDescData +} + +var file_xds_type_v3_typed_struct_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_xds_type_v3_typed_struct_proto_goTypes = []interface{}{ + (*TypedStruct)(nil), // 0: xds.type.v3.TypedStruct + (*_struct.Struct)(nil), // 1: google.protobuf.Struct +} +var file_xds_type_v3_typed_struct_proto_depIdxs = []int32{ + 1, // 0: xds.type.v3.TypedStruct.value:type_name -> google.protobuf.Struct + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_xds_type_v3_typed_struct_proto_init() } +func file_xds_type_v3_typed_struct_proto_init() { + if File_xds_type_v3_typed_struct_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_xds_type_v3_typed_struct_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TypedStruct); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_xds_type_v3_typed_struct_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_xds_type_v3_typed_struct_proto_goTypes, + DependencyIndexes: file_xds_type_v3_typed_struct_proto_depIdxs, + MessageInfos: file_xds_type_v3_typed_struct_proto_msgTypes, + }.Build() + File_xds_type_v3_typed_struct_proto = out.File + file_xds_type_v3_typed_struct_proto_rawDesc = nil + file_xds_type_v3_typed_struct_proto_goTypes = nil + file_xds_type_v3_typed_struct_proto_depIdxs = nil +} diff --git a/vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.validate.go new file mode 100644 index 0000000000000..b4af2aa9f333b --- /dev/null +++ b/vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.validate.go @@ -0,0 +1,111 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: xds/type/v3/typed_struct.proto + +package v3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} +) + +// Validate checks the field values on TypedStruct with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *TypedStruct) Validate() error { + if m == nil { + return nil + } + + // no validation rules for TypeUrl + + if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TypedStructValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// TypedStructValidationError is the validation error returned by +// TypedStruct.Validate if the designated constraints aren't met. +type TypedStructValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TypedStructValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TypedStructValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TypedStructValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TypedStructValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TypedStructValidationError) ErrorName() string { return "TypedStructValidationError" } + +// Error satisfies the builtin error interface +func (e TypedStructValidationError) 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 %sTypedStruct.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TypedStructValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TypedStructValidationError{} diff --git a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/BUILD b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/BUILD index 5040d640f1a65..a9d38c51b9fd5 100644 --- a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/BUILD +++ b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/BUILD @@ -53,9 +53,14 @@ java_proto_library( deps = [":validate_proto"], ) +filegroup( + name = "validate_src", + srcs = ["validate.proto"], +) + alias( name = "go_default_library", - actual = ":validate_go", + actual = ":validate", deprecation = "Use :validate instead of :go_default_library. Details about the new naming convention: https://github.com/bazelbuild/bazel-gazelle/pull/863", visibility = ["//visibility:public"], ) diff --git a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.h b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.h index 15e2c4bff6c11..d6cf6c9d90351 100644 --- a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.h +++ b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.h @@ -5,8 +5,8 @@ #include #include #include -#include #include +#include #include #if !defined(_WIN32) @@ -27,7 +27,7 @@ #endif -#include "google/protobuf/stubs/strutil.h" // for UTF8Len +#include "google/protobuf/message.h" namespace pgv { using std::string; @@ -42,67 +42,78 @@ class UnimplementedException : public std::runtime_error { using ValidationMsg = std::string; class BaseValidator { +public: + /** + * Validate/check a generic message object with a registered validator for the concrete message + * type. + * @param m supplies the message to check. + * @param err supplies the place to return error information. + * @return true if the validation passes OR there is no registered validator for the concrete + * message type. false is returned if validation explicitly fails. + */ + static bool AbstractCheckMessage(const google::protobuf::Message& m, ValidationMsg* err) { + // Polymorphic lookup is used to see if there is a matching concrete validator. If so, call it. + // Otherwise return success. + auto it = abstractValidators().find(std::type_index(typeid(m))); + if (it == abstractValidators().end()) { + return true; + } + return it->second(m, err); + } + protected: - static std::unordered_map& validators() { - static auto* validator_map = new std::unordered_map(); + // Used to implement AbstractCheckMessage() above. Every message that is linked into the binary + // will register itself by type_index, allowing for polymorphic lookup later. + static std::unordered_map>& + abstractValidators() { + static auto* validator_map = new std::unordered_map< + std::type_index, std::function>(); return *validator_map; } }; -template -class Validator : public BaseValidator { +template class Validator : public BaseValidator { public: - Validator(std::function check) : check_(check) - { - validators()[std::type_index(typeid(T))] = this; - } - - static bool CheckMessage(const T& m, ValidationMsg* err) - { - auto val = static_cast*>(validators()[std::type_index(typeid(T))]); - if (val) { - return val->check_(m, err); - } - return true; + Validator(std::function check) : check_(check) { + abstractValidators()[std::type_index(typeid(T))] = [this](const google::protobuf::Message& m, + ValidationMsg* err) -> bool { + return check_(dynamic_cast(m), err); + }; } private: std::function check_; }; -static inline std::string String(const ValidationMsg& msg) -{ - return std::string(msg); -} +static inline std::string String(const ValidationMsg& msg) { return std::string(msg); } -static inline bool IsPrefix(const string& maybe_prefix, const string& search_in) -{ +static inline bool IsPrefix(const string& maybe_prefix, const string& search_in) { return search_in.compare(0, maybe_prefix.size(), maybe_prefix) == 0; } -static inline bool IsSuffix(const string& maybe_suffix, const string& search_in) -{ - return maybe_suffix.size() <= search_in.size() && search_in.compare(search_in.size() - maybe_suffix.size(), maybe_suffix.size(), maybe_suffix) == 0; +static inline bool IsSuffix(const string& maybe_suffix, const string& search_in) { + return maybe_suffix.size() <= search_in.size() && + search_in.compare(search_in.size() - maybe_suffix.size(), maybe_suffix.size(), + maybe_suffix) == 0; } -static inline bool Contains(const string& search_in, const string& to_find) -{ +static inline bool Contains(const string& search_in, const string& to_find) { return search_in.find(to_find) != string::npos; } -static inline bool NotContains(const string& search_in, const string& to_find) -{ +static inline bool NotContains(const string& search_in, const string& to_find) { return !Contains(search_in, to_find); } static inline bool IsIpv4(const string& to_validate) { - struct sockaddr_in sa; - return !(inet_pton(AF_INET, to_validate.c_str(), &sa.sin_addr) < 1); + struct sockaddr_in sa; + return !(inet_pton(AF_INET, to_validate.c_str(), &sa.sin_addr) < 1); } static inline bool IsIpv6(const string& to_validate) { struct sockaddr_in6 sa_six; - return !(inet_pton(AF_INET6, to_validate.c_str(), &sa_six.sin6_addr) < 1); + return !(inet_pton(AF_INET6, to_validate.c_str(), &sa_six.sin6_addr) < 1); } static inline bool IsIp(const string& to_validate) { @@ -118,7 +129,7 @@ static inline bool IsHostname(const string& to_validate) { const auto iter_end = std::sregex_token_iterator(); auto iter = std::sregex_token_iterator(to_validate.begin(), to_validate.end(), dot_regex, -1); for (; iter != iter_end; ++iter) { - const std::string &part = *iter; + const std::string& part = *iter; if (part.empty() || part.length() > 63) { return false; } @@ -128,8 +139,9 @@ static inline bool IsHostname(const string& to_validate) { if (part.at(part.length() - 1) == '-') { return false; } - for (const auto &character : part) { - if ((character < 'A' || character > 'Z') && (character < 'a' || character > 'z') && (character < '0' || character > '9') && character != '-') { + for (const auto& character : part) { + if ((character < 'A' || character > 'Z') && (character < 'a' || character > 'z') && + (character < '0' || character > '9') && character != '-') { return false; } } @@ -138,13 +150,25 @@ static inline bool IsHostname(const string& to_validate) { return true; } -static inline size_t Utf8Len(const string& narrow_string) { - const char *str_char = narrow_string.c_str(); +namespace { + +inline int OneCharLen(const char* src) { + return "\1\1\1\1\1\1\1\1\1\1\1\1\2\2\3\4"[(*src & 0xFF) >> 4]; +} + +inline int UTF8FirstLetterNumBytes(const char *utf8_str, int str_len) { + if (str_len == 0) + return 0; + return OneCharLen(utf8_str); +} + +inline size_t Utf8Len(const string& narrow_string) { + const char* str_char = narrow_string.c_str(); ptrdiff_t byte_len = narrow_string.length(); size_t unicode_len = 0; int char_len = 1; while (byte_len > 0 && char_len > 0) { - char_len = google::protobuf::UTF8FirstLetterNumBytes(str_char, byte_len); + char_len = UTF8FirstLetterNumBytes(str_char, byte_len); str_char += char_len; byte_len -= char_len; ++unicode_len; @@ -152,6 +176,8 @@ static inline size_t Utf8Len(const string& narrow_string) { return unicode_len; } +} // namespace + } // namespace pgv #endif // _VALIDATE_H diff --git a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go index 61e19b95d7e7d..a31b2e1a3f718 100644 --- a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go +++ b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 -// protoc v3.17.3 +// protoc-gen-go v1.30.0 +// protoc v4.22.2 // source: validate/validate.proto package validate @@ -94,6 +94,7 @@ type FieldRules struct { Message *MessageRules `protobuf:"bytes,17,opt,name=message" json:"message,omitempty"` // Types that are assignable to Type: + // // *FieldRules_Float // *FieldRules_Double // *FieldRules_Int32 @@ -1966,7 +1967,6 @@ type StringRules struct { // characters may differ from the number of bytes in the string. MaxLen *uint64 `protobuf:"varint,3,opt,name=max_len,json=maxLen" json:"max_len,omitempty"` // LenBytes specifies that this field must be the specified number of bytes - // at a minimum LenBytes *uint64 `protobuf:"varint,20,opt,name=len_bytes,json=lenBytes" json:"len_bytes,omitempty"` // MinBytes specifies that this field must be the specified number of bytes // at a minimum @@ -2000,6 +2000,7 @@ type StringRules struct { // patterns // // Types that are assignable to WellKnown: + // // *StringRules_Email // *StringRules_Hostname // *StringRules_Ip @@ -2371,6 +2372,7 @@ type BytesRules struct { // patterns // // Types that are assignable to WellKnown: + // // *BytesRules_Ip // *BytesRules_Ipv4 // *BytesRules_Ipv6 diff --git a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.proto b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.proto index 4195ecf9c740d..705d382aac412 100644 --- a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.proto +++ b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.proto @@ -524,7 +524,6 @@ message StringRules { optional uint64 max_len = 3; // LenBytes specifies that this field must be the specified number of bytes - // at a minimum optional uint64 len_bytes = 20; // MinBytes specifies that this field must be the specified number of bytes diff --git a/vendor/github.com/golang/protobuf/jsonpb/decode.go b/vendor/github.com/golang/protobuf/jsonpb/decode.go index 60e82caa9a2d3..6c16c255ffba3 100644 --- a/vendor/github.com/golang/protobuf/jsonpb/decode.go +++ b/vendor/github.com/golang/protobuf/jsonpb/decode.go @@ -386,8 +386,14 @@ func (u *Unmarshaler) unmarshalMessage(m protoreflect.Message, in []byte) error } func isSingularWellKnownValue(fd protoreflect.FieldDescriptor) bool { + if fd.Cardinality() == protoreflect.Repeated { + return false + } if md := fd.Message(); md != nil { - return md.FullName() == "google.protobuf.Value" && fd.Cardinality() != protoreflect.Repeated + return md.FullName() == "google.protobuf.Value" + } + if ed := fd.Enum(); ed != nil { + return ed.FullName() == "google.protobuf.NullValue" } return false } diff --git a/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go b/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go new file mode 100644 index 0000000000000..8d82abe21333d --- /dev/null +++ b/vendor/github.com/golang/protobuf/ptypes/struct/struct.pb.go @@ -0,0 +1,78 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: github.com/golang/protobuf/ptypes/struct/struct.proto + +package structpb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" +) + +// Symbols defined in public import of google/protobuf/struct.proto. + +type NullValue = structpb.NullValue + +const NullValue_NULL_VALUE = structpb.NullValue_NULL_VALUE + +var NullValue_name = structpb.NullValue_name +var NullValue_value = structpb.NullValue_value + +type Struct = structpb.Struct +type Value = structpb.Value +type Value_NullValue = structpb.Value_NullValue +type Value_NumberValue = structpb.Value_NumberValue +type Value_StringValue = structpb.Value_StringValue +type Value_BoolValue = structpb.Value_BoolValue +type Value_StructValue = structpb.Value_StructValue +type Value_ListValue = structpb.Value_ListValue +type ListValue = structpb.ListValue + +var File_github_com_golang_protobuf_ptypes_struct_struct_proto protoreflect.FileDescriptor + +var file_github_com_golang_protobuf_ptypes_struct_struct_proto_rawDesc = []byte{ + 0x0a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c, + 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x70, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x3b, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x70, 0x62, 0x50, 0x00, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var file_github_com_golang_protobuf_ptypes_struct_struct_proto_goTypes = []interface{}{} +var file_github_com_golang_protobuf_ptypes_struct_struct_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_github_com_golang_protobuf_ptypes_struct_struct_proto_init() } +func file_github_com_golang_protobuf_ptypes_struct_struct_proto_init() { + if File_github_com_golang_protobuf_ptypes_struct_struct_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_github_com_golang_protobuf_ptypes_struct_struct_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_github_com_golang_protobuf_ptypes_struct_struct_proto_goTypes, + DependencyIndexes: file_github_com_golang_protobuf_ptypes_struct_struct_proto_depIdxs, + }.Build() + File_github_com_golang_protobuf_ptypes_struct_struct_proto = out.File + file_github_com_golang_protobuf_ptypes_struct_struct_proto_rawDesc = nil + file_github_com_golang_protobuf_ptypes_struct_struct_proto_goTypes = nil + file_github_com_golang_protobuf_ptypes_struct_struct_proto_depIdxs = nil +} diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_arm64.go b/vendor/golang.org/x/crypto/chacha20/chacha_arm64.go index 94c71ac1ac863..5dfacbb983954 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_arm64.go +++ b/vendor/golang.org/x/crypto/chacha20/chacha_arm64.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build go1.11 && gc && !purego -// +build go1.11,gc,!purego +//go:build gc && !purego +// +build gc,!purego package chacha20 diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_arm64.s b/vendor/golang.org/x/crypto/chacha20/chacha_arm64.s index 63cae9e6f0b1b..f1f66230d1c23 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_arm64.s +++ b/vendor/golang.org/x/crypto/chacha20/chacha_arm64.s @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build go1.11 && gc && !purego -// +build go1.11,gc,!purego +//go:build gc && !purego +// +build gc,!purego #include "textflag.h" diff --git a/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go b/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go index 025b49897e32b..02ff3d05e9aec 100644 --- a/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go +++ b/vendor/golang.org/x/crypto/chacha20/chacha_noasm.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build (!arm64 && !s390x && !ppc64le) || (arm64 && !go1.11) || !gc || purego -// +build !arm64,!s390x,!ppc64le arm64,!go1.11 !gc purego +//go:build (!arm64 && !s390x && !ppc64le) || !gc || purego +// +build !arm64,!s390x,!ppc64le !gc purego package chacha20 diff --git a/vendor/golang.org/x/crypto/curve25519/curve25519.go b/vendor/golang.org/x/crypto/curve25519/curve25519.go index bc62161d6e425..00f963ea20a35 100644 --- a/vendor/golang.org/x/crypto/curve25519/curve25519.go +++ b/vendor/golang.org/x/crypto/curve25519/curve25519.go @@ -5,71 +5,18 @@ // Package curve25519 provides an implementation of the X25519 function, which // performs scalar multiplication on the elliptic curve known as Curve25519. // See RFC 7748. +// +// Starting in Go 1.20, this package is a wrapper for the X25519 implementation +// in the crypto/ecdh package. package curve25519 // import "golang.org/x/crypto/curve25519" -import ( - "crypto/subtle" - "errors" - "strconv" - - "golang.org/x/crypto/curve25519/internal/field" -) - // ScalarMult sets dst to the product scalar * point. // // Deprecated: when provided a low-order point, ScalarMult will set dst to all // zeroes, irrespective of the scalar. Instead, use the X25519 function, which // will return an error. func ScalarMult(dst, scalar, point *[32]byte) { - var e [32]byte - - copy(e[:], scalar[:]) - e[0] &= 248 - e[31] &= 127 - e[31] |= 64 - - var x1, x2, z2, x3, z3, tmp0, tmp1 field.Element - x1.SetBytes(point[:]) - x2.One() - x3.Set(&x1) - z3.One() - - swap := 0 - for pos := 254; pos >= 0; pos-- { - b := e[pos/8] >> uint(pos&7) - b &= 1 - swap ^= int(b) - x2.Swap(&x3, swap) - z2.Swap(&z3, swap) - swap = int(b) - - tmp0.Subtract(&x3, &z3) - tmp1.Subtract(&x2, &z2) - x2.Add(&x2, &z2) - z2.Add(&x3, &z3) - z3.Multiply(&tmp0, &x2) - z2.Multiply(&z2, &tmp1) - tmp0.Square(&tmp1) - tmp1.Square(&x2) - x3.Add(&z3, &z2) - z2.Subtract(&z3, &z2) - x2.Multiply(&tmp1, &tmp0) - tmp1.Subtract(&tmp1, &tmp0) - z2.Square(&z2) - - z3.Mult32(&tmp1, 121666) - x3.Square(&x3) - tmp0.Add(&tmp0, &z3) - z3.Multiply(&x1, &z2) - z2.Multiply(&tmp1, &tmp0) - } - - x2.Swap(&x3, swap) - z2.Swap(&z3, swap) - - z2.Invert(&z2) - x2.Multiply(&x2, &z2) - copy(dst[:], x2.Bytes()) + scalarMult(dst, scalar, point) } // ScalarBaseMult sets dst to the product scalar * base where base is the @@ -78,7 +25,7 @@ func ScalarMult(dst, scalar, point *[32]byte) { // It is recommended to use the X25519 function with Basepoint instead, as // copying into fixed size arrays can lead to unexpected bugs. func ScalarBaseMult(dst, scalar *[32]byte) { - ScalarMult(dst, scalar, &basePoint) + scalarBaseMult(dst, scalar) } const ( @@ -91,21 +38,10 @@ const ( // Basepoint is the canonical Curve25519 generator. var Basepoint []byte -var basePoint = [32]byte{9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} +var basePoint = [32]byte{9} func init() { Basepoint = basePoint[:] } -func checkBasepoint() { - if subtle.ConstantTimeCompare(Basepoint, []byte{ - 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }) != 1 { - panic("curve25519: global Basepoint value was modified") - } -} - // X25519 returns the result of the scalar multiplication (scalar * point), // according to RFC 7748, Section 5. scalar, point and the return value are // slices of 32 bytes. @@ -121,26 +57,3 @@ func X25519(scalar, point []byte) ([]byte, error) { var dst [32]byte return x25519(&dst, scalar, point) } - -func x25519(dst *[32]byte, scalar, point []byte) ([]byte, error) { - var in [32]byte - if l := len(scalar); l != 32 { - return nil, errors.New("bad scalar length: " + strconv.Itoa(l) + ", expected 32") - } - if l := len(point); l != 32 { - return nil, errors.New("bad point length: " + strconv.Itoa(l) + ", expected 32") - } - copy(in[:], scalar) - if &point[0] == &Basepoint[0] { - checkBasepoint() - ScalarBaseMult(dst, &in) - } else { - var base, zero [32]byte - copy(base[:], point) - ScalarMult(dst, &in, &base) - if subtle.ConstantTimeCompare(dst[:], zero[:]) == 1 { - return nil, errors.New("bad input point: low order point") - } - } - return dst[:], nil -} diff --git a/vendor/golang.org/x/crypto/curve25519/curve25519_compat.go b/vendor/golang.org/x/crypto/curve25519/curve25519_compat.go new file mode 100644 index 0000000000000..ba647e8d77d98 --- /dev/null +++ b/vendor/golang.org/x/crypto/curve25519/curve25519_compat.go @@ -0,0 +1,105 @@ +// 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 !go1.20 + +package curve25519 + +import ( + "crypto/subtle" + "errors" + "strconv" + + "golang.org/x/crypto/curve25519/internal/field" +) + +func scalarMult(dst, scalar, point *[32]byte) { + var e [32]byte + + copy(e[:], scalar[:]) + e[0] &= 248 + e[31] &= 127 + e[31] |= 64 + + var x1, x2, z2, x3, z3, tmp0, tmp1 field.Element + x1.SetBytes(point[:]) + x2.One() + x3.Set(&x1) + z3.One() + + swap := 0 + for pos := 254; pos >= 0; pos-- { + b := e[pos/8] >> uint(pos&7) + b &= 1 + swap ^= int(b) + x2.Swap(&x3, swap) + z2.Swap(&z3, swap) + swap = int(b) + + tmp0.Subtract(&x3, &z3) + tmp1.Subtract(&x2, &z2) + x2.Add(&x2, &z2) + z2.Add(&x3, &z3) + z3.Multiply(&tmp0, &x2) + z2.Multiply(&z2, &tmp1) + tmp0.Square(&tmp1) + tmp1.Square(&x2) + x3.Add(&z3, &z2) + z2.Subtract(&z3, &z2) + x2.Multiply(&tmp1, &tmp0) + tmp1.Subtract(&tmp1, &tmp0) + z2.Square(&z2) + + z3.Mult32(&tmp1, 121666) + x3.Square(&x3) + tmp0.Add(&tmp0, &z3) + z3.Multiply(&x1, &z2) + z2.Multiply(&tmp1, &tmp0) + } + + x2.Swap(&x3, swap) + z2.Swap(&z3, swap) + + z2.Invert(&z2) + x2.Multiply(&x2, &z2) + copy(dst[:], x2.Bytes()) +} + +func scalarBaseMult(dst, scalar *[32]byte) { + checkBasepoint() + scalarMult(dst, scalar, &basePoint) +} + +func x25519(dst *[32]byte, scalar, point []byte) ([]byte, error) { + var in [32]byte + if l := len(scalar); l != 32 { + return nil, errors.New("bad scalar length: " + strconv.Itoa(l) + ", expected 32") + } + if l := len(point); l != 32 { + return nil, errors.New("bad point length: " + strconv.Itoa(l) + ", expected 32") + } + copy(in[:], scalar) + if &point[0] == &Basepoint[0] { + scalarBaseMult(dst, &in) + } else { + var base, zero [32]byte + copy(base[:], point) + scalarMult(dst, &in, &base) + if subtle.ConstantTimeCompare(dst[:], zero[:]) == 1 { + return nil, errors.New("bad input point: low order point") + } + } + return dst[:], nil +} + +func checkBasepoint() { + if subtle.ConstantTimeCompare(Basepoint, []byte{ + 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }) != 1 { + panic("curve25519: global Basepoint value was modified") + } +} diff --git a/vendor/golang.org/x/crypto/curve25519/curve25519_go120.go b/vendor/golang.org/x/crypto/curve25519/curve25519_go120.go new file mode 100644 index 0000000000000..627df497270f9 --- /dev/null +++ b/vendor/golang.org/x/crypto/curve25519/curve25519_go120.go @@ -0,0 +1,46 @@ +// Copyright 2022 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 go1.20 + +package curve25519 + +import "crypto/ecdh" + +func x25519(dst *[32]byte, scalar, point []byte) ([]byte, error) { + curve := ecdh.X25519() + pub, err := curve.NewPublicKey(point) + if err != nil { + return nil, err + } + priv, err := curve.NewPrivateKey(scalar) + if err != nil { + return nil, err + } + out, err := priv.ECDH(pub) + if err != nil { + return nil, err + } + copy(dst[:], out) + return dst[:], nil +} + +func scalarMult(dst, scalar, point *[32]byte) { + if _, err := x25519(dst, scalar[:], point[:]); err != nil { + // The only error condition for x25519 when the inputs are 32 bytes long + // is if the output would have been the all-zero value. + for i := range dst { + dst[i] = 0 + } + } +} + +func scalarBaseMult(dst, scalar *[32]byte) { + curve := ecdh.X25519() + priv, err := curve.NewPrivateKey(scalar[:]) + if err != nil { + panic("curve25519: internal error: scalarBaseMult was not 32 bytes") + } + copy(dst[:], priv.PublicKey().Bytes()) +} diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go index 7b5b78cbd6d7b..2671217da597c 100644 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go +++ b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go @@ -245,7 +245,7 @@ func feSquareGeneric(v, a *Element) { v.carryPropagate() } -// carryPropagate brings the limbs below 52 bits by applying the reduction +// carryPropagateGeneric brings the limbs below 52 bits by applying the reduction // identity (a * 2²⁵⁵ + b = a * 19 + b) to the l4 carry. TODO inline func (v *Element) carryPropagateGeneric() *Element { c0 := v.l0 >> 51 diff --git a/vendor/golang.org/x/crypto/ed25519/ed25519.go b/vendor/golang.org/x/crypto/ed25519/ed25519.go deleted file mode 100644 index a7828345fcc43..0000000000000 --- a/vendor/golang.org/x/crypto/ed25519/ed25519.go +++ /dev/null @@ -1,71 +0,0 @@ -// 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 ed25519 implements the Ed25519 signature algorithm. See -// https://ed25519.cr.yp.to/. -// -// These functions are also compatible with the “Ed25519” function defined in -// RFC 8032. However, unlike RFC 8032's formulation, this package's private key -// representation includes a public key suffix to make multiple signing -// operations with the same key more efficient. This package refers to the RFC -// 8032 private key as the “seed”. -// -// Beginning with Go 1.13, the functionality of this package was moved to the -// standard library as crypto/ed25519. This package only acts as a compatibility -// wrapper. -package ed25519 - -import ( - "crypto/ed25519" - "io" -) - -const ( - // PublicKeySize is the size, in bytes, of public keys as used in this package. - PublicKeySize = 32 - // PrivateKeySize is the size, in bytes, of private keys as used in this package. - PrivateKeySize = 64 - // SignatureSize is the size, in bytes, of signatures generated and verified by this package. - SignatureSize = 64 - // SeedSize is the size, in bytes, of private key seeds. These are the private key representations used by RFC 8032. - SeedSize = 32 -) - -// PublicKey is the type of Ed25519 public keys. -// -// This type is an alias for crypto/ed25519's PublicKey type. -// See the crypto/ed25519 package for the methods on this type. -type PublicKey = ed25519.PublicKey - -// PrivateKey is the type of Ed25519 private keys. It implements crypto.Signer. -// -// This type is an alias for crypto/ed25519's PrivateKey type. -// See the crypto/ed25519 package for the methods on this type. -type PrivateKey = ed25519.PrivateKey - -// GenerateKey generates a public/private key pair using entropy from rand. -// If rand is nil, crypto/rand.Reader will be used. -func GenerateKey(rand io.Reader) (PublicKey, PrivateKey, error) { - return ed25519.GenerateKey(rand) -} - -// NewKeyFromSeed calculates a private key from a seed. It will panic if -// len(seed) is not SeedSize. This function is provided for interoperability -// with RFC 8032. RFC 8032's private keys correspond to seeds in this -// package. -func NewKeyFromSeed(seed []byte) PrivateKey { - return ed25519.NewKeyFromSeed(seed) -} - -// Sign signs the message with privateKey and returns a signature. It will -// panic if len(privateKey) is not PrivateKeySize. -func Sign(privateKey PrivateKey, message []byte) []byte { - return ed25519.Sign(privateKey, message) -} - -// Verify reports whether sig is a valid signature of message by publicKey. It -// will panic if len(publicKey) is not PublicKeySize. -func Verify(publicKey PublicKey, message, sig []byte) bool { - return ed25519.Verify(publicKey, message, sig) -} diff --git a/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2.go b/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2.go index 7499e3fb69d2d..05de9cc2cdcc5 100644 --- a/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2.go +++ b/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2.go @@ -14,6 +14,7 @@ package rc2 import ( "crypto/cipher" "encoding/binary" + "math/bits" ) // The rc2 block size in bytes @@ -80,10 +81,6 @@ func expandKey(key []byte, t1 int) [64]uint16 { return k } -func rotl16(x uint16, b uint) uint16 { - return (x >> (16 - b)) | (x << b) -} - func (c *rc2Cipher) Encrypt(dst, src []byte) { r0 := binary.LittleEndian.Uint16(src[0:]) @@ -96,22 +93,22 @@ func (c *rc2Cipher) Encrypt(dst, src []byte) { for j <= 16 { // mix r0 r0 = r0 + c.k[j] + (r3 & r2) + ((^r3) & r1) - r0 = rotl16(r0, 1) + r0 = bits.RotateLeft16(r0, 1) j++ // mix r1 r1 = r1 + c.k[j] + (r0 & r3) + ((^r0) & r2) - r1 = rotl16(r1, 2) + r1 = bits.RotateLeft16(r1, 2) j++ // mix r2 r2 = r2 + c.k[j] + (r1 & r0) + ((^r1) & r3) - r2 = rotl16(r2, 3) + r2 = bits.RotateLeft16(r2, 3) j++ // mix r3 r3 = r3 + c.k[j] + (r2 & r1) + ((^r2) & r0) - r3 = rotl16(r3, 5) + r3 = bits.RotateLeft16(r3, 5) j++ } @@ -124,22 +121,22 @@ func (c *rc2Cipher) Encrypt(dst, src []byte) { for j <= 40 { // mix r0 r0 = r0 + c.k[j] + (r3 & r2) + ((^r3) & r1) - r0 = rotl16(r0, 1) + r0 = bits.RotateLeft16(r0, 1) j++ // mix r1 r1 = r1 + c.k[j] + (r0 & r3) + ((^r0) & r2) - r1 = rotl16(r1, 2) + r1 = bits.RotateLeft16(r1, 2) j++ // mix r2 r2 = r2 + c.k[j] + (r1 & r0) + ((^r1) & r3) - r2 = rotl16(r2, 3) + r2 = bits.RotateLeft16(r2, 3) j++ // mix r3 r3 = r3 + c.k[j] + (r2 & r1) + ((^r2) & r0) - r3 = rotl16(r3, 5) + r3 = bits.RotateLeft16(r3, 5) j++ } @@ -152,22 +149,22 @@ func (c *rc2Cipher) Encrypt(dst, src []byte) { for j <= 60 { // mix r0 r0 = r0 + c.k[j] + (r3 & r2) + ((^r3) & r1) - r0 = rotl16(r0, 1) + r0 = bits.RotateLeft16(r0, 1) j++ // mix r1 r1 = r1 + c.k[j] + (r0 & r3) + ((^r0) & r2) - r1 = rotl16(r1, 2) + r1 = bits.RotateLeft16(r1, 2) j++ // mix r2 r2 = r2 + c.k[j] + (r1 & r0) + ((^r1) & r3) - r2 = rotl16(r2, 3) + r2 = bits.RotateLeft16(r2, 3) j++ // mix r3 r3 = r3 + c.k[j] + (r2 & r1) + ((^r2) & r0) - r3 = rotl16(r3, 5) + r3 = bits.RotateLeft16(r3, 5) j++ } @@ -188,22 +185,22 @@ func (c *rc2Cipher) Decrypt(dst, src []byte) { for j >= 44 { // unmix r3 - r3 = rotl16(r3, 16-5) + r3 = bits.RotateLeft16(r3, 16-5) r3 = r3 - c.k[j] - (r2 & r1) - ((^r2) & r0) j-- // unmix r2 - r2 = rotl16(r2, 16-3) + r2 = bits.RotateLeft16(r2, 16-3) r2 = r2 - c.k[j] - (r1 & r0) - ((^r1) & r3) j-- // unmix r1 - r1 = rotl16(r1, 16-2) + r1 = bits.RotateLeft16(r1, 16-2) r1 = r1 - c.k[j] - (r0 & r3) - ((^r0) & r2) j-- // unmix r0 - r0 = rotl16(r0, 16-1) + r0 = bits.RotateLeft16(r0, 16-1) r0 = r0 - c.k[j] - (r3 & r2) - ((^r3) & r1) j-- } @@ -215,22 +212,22 @@ func (c *rc2Cipher) Decrypt(dst, src []byte) { for j >= 20 { // unmix r3 - r3 = rotl16(r3, 16-5) + r3 = bits.RotateLeft16(r3, 16-5) r3 = r3 - c.k[j] - (r2 & r1) - ((^r2) & r0) j-- // unmix r2 - r2 = rotl16(r2, 16-3) + r2 = bits.RotateLeft16(r2, 16-3) r2 = r2 - c.k[j] - (r1 & r0) - ((^r1) & r3) j-- // unmix r1 - r1 = rotl16(r1, 16-2) + r1 = bits.RotateLeft16(r1, 16-2) r1 = r1 - c.k[j] - (r0 & r3) - ((^r0) & r2) j-- // unmix r0 - r0 = rotl16(r0, 16-1) + r0 = bits.RotateLeft16(r0, 16-1) r0 = r0 - c.k[j] - (r3 & r2) - ((^r3) & r1) j-- @@ -243,22 +240,22 @@ func (c *rc2Cipher) Decrypt(dst, src []byte) { for j >= 0 { // unmix r3 - r3 = rotl16(r3, 16-5) + r3 = bits.RotateLeft16(r3, 16-5) r3 = r3 - c.k[j] - (r2 & r1) - ((^r2) & r0) j-- // unmix r2 - r2 = rotl16(r2, 16-3) + r2 = bits.RotateLeft16(r2, 16-3) r2 = r2 - c.k[j] - (r1 & r0) - ((^r1) & r3) j-- // unmix r1 - r1 = rotl16(r1, 16-2) + r1 = bits.RotateLeft16(r1, 16-2) r1 = r1 - c.k[j] - (r0 & r3) - ((^r0) & r2) j-- // unmix r0 - r0 = rotl16(r0, 16-1) + r0 = bits.RotateLeft16(r0, 16-1) r0 = r0 - c.k[j] - (r3 & r2) - ((^r3) & r1) j-- diff --git a/vendor/golang.org/x/crypto/ssh/agent/client.go b/vendor/golang.org/x/crypto/ssh/agent/client.go index c3e112a939612..9f09aae7ddde8 100644 --- a/vendor/golang.org/x/crypto/ssh/agent/client.go +++ b/vendor/golang.org/x/crypto/ssh/agent/client.go @@ -16,6 +16,7 @@ import ( "bytes" "crypto/dsa" "crypto/ecdsa" + "crypto/ed25519" "crypto/elliptic" "crypto/rsa" "encoding/base64" @@ -26,7 +27,6 @@ import ( "math/big" "sync" - "golang.org/x/crypto/ed25519" "golang.org/x/crypto/ssh" ) diff --git a/vendor/golang.org/x/crypto/ssh/agent/server.go b/vendor/golang.org/x/crypto/ssh/agent/server.go index 6e7a1e02f27bc..dd2e0a3e71393 100644 --- a/vendor/golang.org/x/crypto/ssh/agent/server.go +++ b/vendor/golang.org/x/crypto/ssh/agent/server.go @@ -7,6 +7,7 @@ package agent import ( "crypto/dsa" "crypto/ecdsa" + "crypto/ed25519" "crypto/elliptic" "crypto/rsa" "encoding/binary" @@ -16,11 +17,10 @@ import ( "log" "math/big" - "golang.org/x/crypto/ed25519" "golang.org/x/crypto/ssh" ) -// Server wraps an Agent and uses it to implement the agent side of +// server wraps an Agent and uses it to implement the agent side of // the SSH-agent, wire protocol. type server struct { agent Agent diff --git a/vendor/golang.org/x/crypto/ssh/certs.go b/vendor/golang.org/x/crypto/ssh/certs.go index fc04d03e19879..27d0e14aa99c7 100644 --- a/vendor/golang.org/x/crypto/ssh/certs.go +++ b/vendor/golang.org/x/crypto/ssh/certs.go @@ -16,8 +16,9 @@ import ( // Certificate algorithm names from [PROTOCOL.certkeys]. These values can appear // in Certificate.Type, PublicKey.Type, and ClientConfig.HostKeyAlgorithms. -// Unlike key algorithm names, these are not passed to AlgorithmSigner and don't -// appear in the Signature.Format field. +// Unlike key algorithm names, these are not passed to AlgorithmSigner nor +// returned by MultiAlgorithmSigner and don't appear in the Signature.Format +// field. const ( CertAlgoRSAv01 = "ssh-rsa-cert-v01@openssh.com" CertAlgoDSAv01 = "ssh-dss-cert-v01@openssh.com" @@ -255,10 +256,17 @@ func NewCertSigner(cert *Certificate, signer Signer) (Signer, error) { return nil, errors.New("ssh: signer and cert have different public key") } - if algorithmSigner, ok := signer.(AlgorithmSigner); ok { + switch s := signer.(type) { + case MultiAlgorithmSigner: + return &multiAlgorithmSigner{ + AlgorithmSigner: &algorithmOpenSSHCertSigner{ + &openSSHCertSigner{cert, signer}, s}, + supportedAlgorithms: s.Algorithms(), + }, nil + case AlgorithmSigner: return &algorithmOpenSSHCertSigner{ - &openSSHCertSigner{cert, signer}, algorithmSigner}, nil - } else { + &openSSHCertSigner{cert, signer}, s}, nil + default: return &openSSHCertSigner{cert, signer}, nil } } @@ -432,7 +440,9 @@ func (c *CertChecker) CheckCert(principal string, cert *Certificate) error { } // SignCert signs the certificate with an authority, setting the Nonce, -// SignatureKey, and Signature fields. +// SignatureKey, and Signature fields. If the authority implements the +// MultiAlgorithmSigner interface the first algorithm in the list is used. This +// is useful if you want to sign with a specific algorithm. func (c *Certificate) SignCert(rand io.Reader, authority Signer) error { c.Nonce = make([]byte, 32) if _, err := io.ReadFull(rand, c.Nonce); err != nil { @@ -440,8 +450,20 @@ func (c *Certificate) SignCert(rand io.Reader, authority Signer) error { } c.SignatureKey = authority.PublicKey() - // Default to KeyAlgoRSASHA512 for ssh-rsa signers. - if v, ok := authority.(AlgorithmSigner); ok && v.PublicKey().Type() == KeyAlgoRSA { + if v, ok := authority.(MultiAlgorithmSigner); ok { + if len(v.Algorithms()) == 0 { + return errors.New("the provided authority has no signature algorithm") + } + // Use the first algorithm in the list. + sig, err := v.SignWithAlgorithm(rand, c.bytesForSigning(), v.Algorithms()[0]) + if err != nil { + return err + } + c.Signature = sig + return nil + } else if v, ok := authority.(AlgorithmSigner); ok && v.PublicKey().Type() == KeyAlgoRSA { + // Default to KeyAlgoRSASHA512 for ssh-rsa signers. + // TODO: consider using KeyAlgoRSASHA256 as default. sig, err := v.SignWithAlgorithm(rand, c.bytesForSigning(), KeyAlgoRSASHA512) if err != nil { return err diff --git a/vendor/golang.org/x/crypto/ssh/cipher.go b/vendor/golang.org/x/crypto/ssh/cipher.go index 87f48552ce032..741e984f33cb7 100644 --- a/vendor/golang.org/x/crypto/ssh/cipher.go +++ b/vendor/golang.org/x/crypto/ssh/cipher.go @@ -114,7 +114,8 @@ var cipherModes = map[string]*cipherMode{ "arcfour": {16, 0, streamCipherMode(0, newRC4)}, // AEAD ciphers - gcmCipherID: {16, 12, newGCMCipher}, + gcm128CipherID: {16, 12, newGCMCipher}, + gcm256CipherID: {32, 12, newGCMCipher}, chacha20Poly1305ID: {64, 0, newChaCha20Cipher}, // CBC mode is insecure and so is not included in the default config. diff --git a/vendor/golang.org/x/crypto/ssh/client_auth.go b/vendor/golang.org/x/crypto/ssh/client_auth.go index 409b5ea1d49db..5c3bc25723352 100644 --- a/vendor/golang.org/x/crypto/ssh/client_auth.go +++ b/vendor/golang.org/x/crypto/ssh/client_auth.go @@ -71,7 +71,9 @@ func (c *connection) clientAuthenticate(config *ClientConfig) error { for auth := AuthMethod(new(noneAuth)); auth != nil; { ok, methods, err := auth.auth(sessionID, config.User, c.transport, config.Rand, extensions) if err != nil { - return err + // We return the error later if there is no other method left to + // try. + ok = authFailure } if ok == authSuccess { // success @@ -101,6 +103,12 @@ func (c *connection) clientAuthenticate(config *ClientConfig) error { } } } + + if auth == nil && err != nil { + // We have an error and there are no other authentication methods to + // try, so we return it. + return err + } } return fmt.Errorf("ssh: unable to authenticate, attempted methods %v, no supported methods remain", tried) } @@ -217,21 +225,45 @@ func (cb publicKeyCallback) method() string { return "publickey" } -func pickSignatureAlgorithm(signer Signer, extensions map[string][]byte) (as AlgorithmSigner, algo string) { +func pickSignatureAlgorithm(signer Signer, extensions map[string][]byte) (MultiAlgorithmSigner, string, error) { + var as MultiAlgorithmSigner keyFormat := signer.PublicKey().Type() - // Like in sendKexInit, if the public key implements AlgorithmSigner we - // assume it supports all algorithms, otherwise only the key format one. - as, ok := signer.(AlgorithmSigner) - if !ok { - return algorithmSignerWrapper{signer}, keyFormat + // If the signer implements MultiAlgorithmSigner we use the algorithms it + // support, if it implements AlgorithmSigner we assume it supports all + // algorithms, otherwise only the key format one. + switch s := signer.(type) { + case MultiAlgorithmSigner: + as = s + case AlgorithmSigner: + as = &multiAlgorithmSigner{ + AlgorithmSigner: s, + supportedAlgorithms: algorithmsForKeyFormat(underlyingAlgo(keyFormat)), + } + default: + as = &multiAlgorithmSigner{ + AlgorithmSigner: algorithmSignerWrapper{signer}, + supportedAlgorithms: []string{underlyingAlgo(keyFormat)}, + } + } + + getFallbackAlgo := func() (string, error) { + // Fallback to use if there is no "server-sig-algs" extension or a + // common algorithm cannot be found. We use the public key format if the + // MultiAlgorithmSigner supports it, otherwise we return an error. + if !contains(as.Algorithms(), underlyingAlgo(keyFormat)) { + return "", fmt.Errorf("ssh: no common public key signature algorithm, server only supports %q for key type %q, signer only supports %v", + underlyingAlgo(keyFormat), keyFormat, as.Algorithms()) + } + return keyFormat, nil } extPayload, ok := extensions["server-sig-algs"] if !ok { - // If there is no "server-sig-algs" extension, fall back to the key - // format algorithm. - return as, keyFormat + // If there is no "server-sig-algs" extension use the fallback + // algorithm. + algo, err := getFallbackAlgo() + return as, algo, err } // The server-sig-algs extension only carries underlying signature @@ -245,15 +277,22 @@ func pickSignatureAlgorithm(signer Signer, extensions map[string][]byte) (as Alg } } - keyAlgos := algorithmsForKeyFormat(keyFormat) + // Filter algorithms based on those supported by MultiAlgorithmSigner. + var keyAlgos []string + for _, algo := range algorithmsForKeyFormat(keyFormat) { + if contains(as.Algorithms(), underlyingAlgo(algo)) { + keyAlgos = append(keyAlgos, algo) + } + } + algo, err := findCommon("public key signature algorithm", keyAlgos, serverAlgos) if err != nil { - // If there is no overlap, try the key anyway with the key format - // algorithm, to support servers that fail to list all supported - // algorithms. - return as, keyFormat + // If there is no overlap, return the fallback algorithm to support + // servers that fail to list all supported algorithms. + algo, err := getFallbackAlgo() + return as, algo, err } - return as, algo + return as, algo, nil } func (cb publicKeyCallback) auth(session []byte, user string, c packetConn, rand io.Reader, extensions map[string][]byte) (authResult, []string, error) { @@ -267,10 +306,17 @@ func (cb publicKeyCallback) auth(session []byte, user string, c packetConn, rand return authFailure, nil, err } var methods []string + var errSigAlgo error for _, signer := range signers { pub := signer.PublicKey() - as, algo := pickSignatureAlgorithm(signer, extensions) - + as, algo, err := pickSignatureAlgorithm(signer, extensions) + if err != nil && errSigAlgo == nil { + // If we cannot negotiate a signature algorithm store the first + // error so we can return it to provide a more meaningful message if + // no other signers work. + errSigAlgo = err + continue + } ok, err := validateKey(pub, algo, user, c) if err != nil { return authFailure, nil, err @@ -317,22 +363,12 @@ func (cb publicKeyCallback) auth(session []byte, user string, c packetConn, rand // contain the "publickey" method, do not attempt to authenticate with any // other keys. According to RFC 4252 Section 7, the latter can occur when // additional authentication methods are required. - if success == authSuccess || !containsMethod(methods, cb.method()) { + if success == authSuccess || !contains(methods, cb.method()) { return success, methods, err } } - return authFailure, methods, nil -} - -func containsMethod(methods []string, method string) bool { - for _, m := range methods { - if m == method { - return true - } - } - - return false + return authFailure, methods, errSigAlgo } // validateKey validates the key provided is acceptable to the server. diff --git a/vendor/golang.org/x/crypto/ssh/common.go b/vendor/golang.org/x/crypto/ssh/common.go index 7a5ff2d2eb72c..b419c761edbc1 100644 --- a/vendor/golang.org/x/crypto/ssh/common.go +++ b/vendor/golang.org/x/crypto/ssh/common.go @@ -10,6 +10,7 @@ import ( "fmt" "io" "math" + "strings" "sync" _ "crypto/sha1" @@ -27,7 +28,7 @@ const ( // supportedCiphers lists ciphers we support but might not recommend. var supportedCiphers = []string{ "aes128-ctr", "aes192-ctr", "aes256-ctr", - "aes128-gcm@openssh.com", + "aes128-gcm@openssh.com", gcm256CipherID, chacha20Poly1305ID, "arcfour256", "arcfour128", "arcfour", aes128cbcID, @@ -36,7 +37,7 @@ var supportedCiphers = []string{ // preferredCiphers specifies the default preference for ciphers. var preferredCiphers = []string{ - "aes128-gcm@openssh.com", + "aes128-gcm@openssh.com", gcm256CipherID, chacha20Poly1305ID, "aes128-ctr", "aes192-ctr", "aes256-ctr", } @@ -48,7 +49,8 @@ var supportedKexAlgos = []string{ // P384 and P521 are not constant-time yet, but since we don't // reuse ephemeral keys, using them for ECDH should be OK. kexAlgoECDH256, kexAlgoECDH384, kexAlgoECDH521, - kexAlgoDH14SHA256, kexAlgoDH14SHA1, kexAlgoDH1SHA1, + kexAlgoDH14SHA256, kexAlgoDH16SHA512, kexAlgoDH14SHA1, + kexAlgoDH1SHA1, } // serverForbiddenKexAlgos contains key exchange algorithms, that are forbidden @@ -58,8 +60,9 @@ var serverForbiddenKexAlgos = map[string]struct{}{ kexAlgoDHGEXSHA256: {}, // server half implementation is only minimal to satisfy the automated tests } -// preferredKexAlgos specifies the default preference for key-exchange algorithms -// in preference order. +// preferredKexAlgos specifies the default preference for key-exchange +// algorithms in preference order. The diffie-hellman-group16-sha512 algorithm +// is disabled by default because it is a bit slower than the others. var preferredKexAlgos = []string{ kexAlgoCurve25519SHA256, kexAlgoCurve25519SHA256LibSSH, kexAlgoECDH256, kexAlgoECDH384, kexAlgoECDH521, @@ -69,12 +72,12 @@ var preferredKexAlgos = []string{ // supportedHostKeyAlgos specifies the supported host-key algorithms (i.e. methods // of authenticating servers) in preference order. var supportedHostKeyAlgos = []string{ - CertAlgoRSASHA512v01, CertAlgoRSASHA256v01, + CertAlgoRSASHA256v01, CertAlgoRSASHA512v01, CertAlgoRSAv01, CertAlgoDSAv01, CertAlgoECDSA256v01, CertAlgoECDSA384v01, CertAlgoECDSA521v01, CertAlgoED25519v01, KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521, - KeyAlgoRSASHA512, KeyAlgoRSASHA256, + KeyAlgoRSASHA256, KeyAlgoRSASHA512, KeyAlgoRSA, KeyAlgoDSA, KeyAlgoED25519, @@ -84,7 +87,7 @@ var supportedHostKeyAlgos = []string{ // This is based on RFC 4253, section 6.4, but with hmac-md5 variants removed // because they have reached the end of their useful life. var supportedMACs = []string{ - "hmac-sha2-256-etm@openssh.com", "hmac-sha2-256", "hmac-sha1", "hmac-sha1-96", + "hmac-sha2-256-etm@openssh.com", "hmac-sha2-512-etm@openssh.com", "hmac-sha2-256", "hmac-sha2-512", "hmac-sha1", "hmac-sha1-96", } var supportedCompressions = []string{compressionNone} @@ -118,6 +121,27 @@ func algorithmsForKeyFormat(keyFormat string) []string { } } +// isRSA returns whether algo is a supported RSA algorithm, including certificate +// algorithms. +func isRSA(algo string) bool { + algos := algorithmsForKeyFormat(KeyAlgoRSA) + return contains(algos, underlyingAlgo(algo)) +} + +// supportedPubKeyAuthAlgos specifies the supported client public key +// authentication algorithms. Note that this doesn't include certificate types +// since those use the underlying algorithm. This list is sent to the client if +// it supports the server-sig-algs extension. Order is irrelevant. +var supportedPubKeyAuthAlgos = []string{ + KeyAlgoED25519, + KeyAlgoSKED25519, KeyAlgoSKECDSA256, + KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521, + KeyAlgoRSASHA256, KeyAlgoRSASHA512, KeyAlgoRSA, + KeyAlgoDSA, +} + +var supportedPubKeyAuthAlgosList = strings.Join(supportedPubKeyAuthAlgos, ",") + // unexpectedMessageError results when the SSH message that we received didn't // match what we wanted. func unexpectedMessageError(expected, got uint8) error { @@ -153,7 +177,7 @@ func (a *directionAlgorithms) rekeyBytes() int64 { // 2^(BLOCKSIZE/4) blocks. For all AES flavors BLOCKSIZE is // 128. switch a.Cipher { - case "aes128-ctr", "aes192-ctr", "aes256-ctr", gcmCipherID, aes128cbcID: + case "aes128-ctr", "aes192-ctr", "aes256-ctr", gcm128CipherID, gcm256CipherID, aes128cbcID: return 16 * (1 << 32) } @@ -163,7 +187,8 @@ func (a *directionAlgorithms) rekeyBytes() int64 { } var aeadCiphers = map[string]bool{ - gcmCipherID: true, + gcm128CipherID: true, + gcm256CipherID: true, chacha20Poly1305ID: true, } @@ -246,16 +271,16 @@ type Config struct { // unspecified, a size suitable for the chosen cipher is used. RekeyThreshold uint64 - // The allowed key exchanges algorithms. If unspecified then a - // default set of algorithms is used. + // The allowed key exchanges algorithms. If unspecified then a default set + // of algorithms is used. Unsupported values are silently ignored. KeyExchanges []string - // The allowed cipher algorithms. If unspecified then a sensible - // default is used. + // The allowed cipher algorithms. If unspecified then a sensible default is + // used. Unsupported values are silently ignored. Ciphers []string - // The allowed MAC algorithms. If unspecified then a sensible default - // is used. + // The allowed MAC algorithms. If unspecified then a sensible default is + // used. Unsupported values are silently ignored. MACs []string } @@ -272,7 +297,7 @@ func (c *Config) SetDefaults() { var ciphers []string for _, c := range c.Ciphers { if cipherModes[c] != nil { - // reject the cipher if we have no cipherModes definition + // Ignore the cipher if we have no cipherModes definition. ciphers = append(ciphers, c) } } @@ -281,10 +306,26 @@ func (c *Config) SetDefaults() { if c.KeyExchanges == nil { c.KeyExchanges = preferredKexAlgos } + var kexs []string + for _, k := range c.KeyExchanges { + if kexAlgoMap[k] != nil { + // Ignore the KEX if we have no kexAlgoMap definition. + kexs = append(kexs, k) + } + } + c.KeyExchanges = kexs if c.MACs == nil { c.MACs = supportedMACs } + var macs []string + for _, m := range c.MACs { + if macModes[m] != nil { + // Ignore the MAC if we have no macModes definition. + macs = append(macs, m) + } + } + c.MACs = macs if c.RekeyThreshold == 0 { // cipher specific default diff --git a/vendor/golang.org/x/crypto/ssh/connection.go b/vendor/golang.org/x/crypto/ssh/connection.go index 35661a52be302..8f345ee924e43 100644 --- a/vendor/golang.org/x/crypto/ssh/connection.go +++ b/vendor/golang.org/x/crypto/ssh/connection.go @@ -97,7 +97,7 @@ func (c *connection) Close() error { return c.sshConn.conn.Close() } -// sshconn provides net.Conn metadata, but disallows direct reads and +// sshConn provides net.Conn metadata, but disallows direct reads and // writes. type sshConn struct { conn net.Conn diff --git a/vendor/golang.org/x/crypto/ssh/doc.go b/vendor/golang.org/x/crypto/ssh/doc.go index f6bff60dc741a..edbe63340d3d9 100644 --- a/vendor/golang.org/x/crypto/ssh/doc.go +++ b/vendor/golang.org/x/crypto/ssh/doc.go @@ -13,6 +13,7 @@ others. References: + [PROTOCOL]: https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL?rev=HEAD [PROTOCOL.certkeys]: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.certkeys?rev=HEAD [SSH-PARAMETERS]: http://www.iana.org/assignments/ssh-parameters/ssh-parameters.xml#ssh-parameters-1 diff --git a/vendor/golang.org/x/crypto/ssh/handshake.go b/vendor/golang.org/x/crypto/ssh/handshake.go index 653dc4d2cfbe3..70a7369ff913f 100644 --- a/vendor/golang.org/x/crypto/ssh/handshake.go +++ b/vendor/golang.org/x/crypto/ssh/handshake.go @@ -58,11 +58,13 @@ type handshakeTransport struct { incoming chan []byte readError error - mu sync.Mutex - writeError error - sentInitPacket []byte - sentInitMsg *kexInitMsg - pendingPackets [][]byte // Used when a key exchange is in progress. + mu sync.Mutex + writeError error + sentInitPacket []byte + sentInitMsg *kexInitMsg + pendingPackets [][]byte // Used when a key exchange is in progress. + writePacketsLeft uint32 + writeBytesLeft int64 // If the read loop wants to schedule a kex, it pings this // channel, and the write loop will send out a kex @@ -71,7 +73,8 @@ type handshakeTransport struct { // If the other side requests or confirms a kex, its kexInit // packet is sent here for the write loop to find it. - startKex chan *pendingKex + startKex chan *pendingKex + kexLoopDone chan struct{} // closed (with writeError non-nil) when kexLoop exits // data for host key checking hostKeyCallback HostKeyCallback @@ -86,12 +89,10 @@ type handshakeTransport struct { // Algorithms agreed in the last key exchange. algorithms *algorithms + // Counters exclusively owned by readLoop. readPacketsLeft uint32 readBytesLeft int64 - writePacketsLeft uint32 - writeBytesLeft int64 - // The session ID or nil if first kex did not complete yet. sessionID []byte } @@ -108,7 +109,8 @@ func newHandshakeTransport(conn keyingTransport, config *Config, clientVersion, clientVersion: clientVersion, incoming: make(chan []byte, chanSize), requestKex: make(chan struct{}, 1), - startKex: make(chan *pendingKex, 1), + startKex: make(chan *pendingKex), + kexLoopDone: make(chan struct{}), config: config, } @@ -340,16 +342,17 @@ write: t.mu.Unlock() } + // Unblock reader. + t.conn.Close() + // drain startKex channel. We don't service t.requestKex // because nobody does blocking sends there. - go func() { - for init := range t.startKex { - init.done <- t.writeError - } - }() + for request := range t.startKex { + request.done <- t.getWriteError() + } - // Unblock reader. - t.conn.Close() + // Mark that the loop is done so that Close can return. + close(t.kexLoopDone) } // The protocol uses uint32 for packet counters, so we can't let them @@ -458,19 +461,24 @@ func (t *handshakeTransport) sendKexInit() error { isServer := len(t.hostKeys) > 0 if isServer { for _, k := range t.hostKeys { - // If k is an AlgorithmSigner, presume it supports all signature algorithms - // associated with the key format. (Ideally AlgorithmSigner would have a - // method to advertise supported algorithms, but it doesn't. This means that - // adding support for a new algorithm is a breaking change, as we will - // immediately negotiate it even if existing implementations don't support - // it. If that ever happens, we'll have to figure something out.) - // If k is not an AlgorithmSigner, we can only assume it only supports the - // algorithms that matches the key format. (This means that Sign can't pick - // a different default.) + // If k is a MultiAlgorithmSigner, we restrict the signature + // algorithms. If k is a AlgorithmSigner, presume it supports all + // signature algorithms associated with the key format. If k is not + // an AlgorithmSigner, we can only assume it only supports the + // algorithms that matches the key format. (This means that Sign + // can't pick a different default). keyFormat := k.PublicKey().Type() - if _, ok := k.(AlgorithmSigner); ok { + + switch s := k.(type) { + case MultiAlgorithmSigner: + for _, algo := range algorithmsForKeyFormat(keyFormat) { + if contains(s.Algorithms(), underlyingAlgo(algo)) { + msg.ServerHostKeyAlgos = append(msg.ServerHostKeyAlgos, algo) + } + } + case AlgorithmSigner: msg.ServerHostKeyAlgos = append(msg.ServerHostKeyAlgos, algorithmsForKeyFormat(keyFormat)...) - } else { + default: msg.ServerHostKeyAlgos = append(msg.ServerHostKeyAlgos, keyFormat) } } @@ -545,7 +553,16 @@ func (t *handshakeTransport) writePacket(p []byte) error { } func (t *handshakeTransport) Close() error { - return t.conn.Close() + // Close the connection. This should cause the readLoop goroutine to wake up + // and close t.startKex, which will shut down kexLoop if running. + err := t.conn.Close() + + // Wait for the kexLoop goroutine to complete. + // At that point we know that the readLoop goroutine is complete too, + // because kexLoop itself waits for readLoop to close the startKex channel. + <-t.kexLoopDone + + return err } func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error { @@ -615,7 +632,8 @@ func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error { return err } - if t.sessionID == nil { + firstKeyExchange := t.sessionID == nil + if firstKeyExchange { t.sessionID = result.H } result.SessionID = t.sessionID @@ -626,6 +644,28 @@ func (t *handshakeTransport) enterKeyExchange(otherInitPacket []byte) error { if err = t.conn.writePacket([]byte{msgNewKeys}); err != nil { return err } + + // On the server side, after the first SSH_MSG_NEWKEYS, send a SSH_MSG_EXT_INFO + // message with the server-sig-algs extension if the client supports it. See + // RFC 8308, Sections 2.4 and 3.1, and [PROTOCOL], Section 1.9. + if !isClient && firstKeyExchange && contains(clientInit.KexAlgos, "ext-info-c") { + extInfo := &extInfoMsg{ + NumExtensions: 2, + Payload: make([]byte, 0, 4+15+4+len(supportedPubKeyAuthAlgosList)+4+16+4+1), + } + extInfo.Payload = appendInt(extInfo.Payload, len("server-sig-algs")) + extInfo.Payload = append(extInfo.Payload, "server-sig-algs"...) + extInfo.Payload = appendInt(extInfo.Payload, len(supportedPubKeyAuthAlgosList)) + extInfo.Payload = append(extInfo.Payload, supportedPubKeyAuthAlgosList...) + extInfo.Payload = appendInt(extInfo.Payload, len("ping@openssh.com")) + extInfo.Payload = append(extInfo.Payload, "ping@openssh.com"...) + extInfo.Payload = appendInt(extInfo.Payload, 1) + extInfo.Payload = append(extInfo.Payload, "0"...) + if err := t.conn.writePacket(Marshal(extInfo)); err != nil { + return err + } + } + if packet, err := t.conn.readPacket(); err != nil { return err } else if packet[0] != msgNewKeys { @@ -654,9 +694,16 @@ func (a algorithmSignerWrapper) SignWithAlgorithm(rand io.Reader, data []byte, a func pickHostKey(hostKeys []Signer, algo string) AlgorithmSigner { for _, k := range hostKeys { + if s, ok := k.(MultiAlgorithmSigner); ok { + if !contains(s.Algorithms(), underlyingAlgo(algo)) { + continue + } + } + if algo == k.PublicKey().Type() { return algorithmSignerWrapper{k} } + k, ok := k.(AlgorithmSigner) if !ok { continue diff --git a/vendor/golang.org/x/crypto/ssh/kex.go b/vendor/golang.org/x/crypto/ssh/kex.go index 927a90cd46f86..8a05f79902c09 100644 --- a/vendor/golang.org/x/crypto/ssh/kex.go +++ b/vendor/golang.org/x/crypto/ssh/kex.go @@ -23,6 +23,7 @@ const ( kexAlgoDH1SHA1 = "diffie-hellman-group1-sha1" kexAlgoDH14SHA1 = "diffie-hellman-group14-sha1" kexAlgoDH14SHA256 = "diffie-hellman-group14-sha256" + kexAlgoDH16SHA512 = "diffie-hellman-group16-sha512" kexAlgoECDH256 = "ecdh-sha2-nistp256" kexAlgoECDH384 = "ecdh-sha2-nistp384" kexAlgoECDH521 = "ecdh-sha2-nistp521" @@ -430,6 +431,17 @@ func init() { hashFunc: crypto.SHA256, } + // This is the group called diffie-hellman-group16-sha512 in RFC + // 8268 and Oakley Group 16 in RFC 3526. + p, _ = new(big.Int).SetString("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A92108011A723C12A787E6D788719A10BDBA5B2699C327186AF4E23C1A946834B6150BDA2583E9CA2AD44CE8DBBBC2DB04DE8EF92E8EFC141FBECAA6287C59474E6BC05D99B2964FA090C3A2233BA186515BE7ED1F612970CEE2D7AFB81BDD762170481CD0069127D5B05AA993B4EA988D8FDDC186FFB7DC90A6C08F4DF435C934063199FFFFFFFFFFFFFFFF", 16) + + kexAlgoMap[kexAlgoDH16SHA512] = &dhGroup{ + g: new(big.Int).SetInt64(2), + p: p, + pMinus1: new(big.Int).Sub(p, bigOne), + hashFunc: crypto.SHA512, + } + kexAlgoMap[kexAlgoECDH521] = &ecdh{elliptic.P521()} kexAlgoMap[kexAlgoECDH384] = &ecdh{elliptic.P384()} kexAlgoMap[kexAlgoECDH256] = &ecdh{elliptic.P256()} diff --git a/vendor/golang.org/x/crypto/ssh/keys.go b/vendor/golang.org/x/crypto/ssh/keys.go index 7296980413520..ef1bad731ba53 100644 --- a/vendor/golang.org/x/crypto/ssh/keys.go +++ b/vendor/golang.org/x/crypto/ssh/keys.go @@ -11,13 +11,16 @@ import ( "crypto/cipher" "crypto/dsa" "crypto/ecdsa" + "crypto/ed25519" "crypto/elliptic" "crypto/md5" + "crypto/rand" "crypto/rsa" "crypto/sha256" "crypto/x509" "encoding/asn1" "encoding/base64" + "encoding/binary" "encoding/hex" "encoding/pem" "errors" @@ -26,7 +29,6 @@ import ( "math/big" "strings" - "golang.org/x/crypto/ed25519" "golang.org/x/crypto/ssh/internal/bcrypt_pbkdf" ) @@ -295,6 +297,18 @@ func MarshalAuthorizedKey(key PublicKey) []byte { return b.Bytes() } +// MarshalPrivateKey returns a PEM block with the private key serialized in the +// OpenSSH format. +func MarshalPrivateKey(key crypto.PrivateKey, comment string) (*pem.Block, error) { + return marshalOpenSSHPrivateKey(key, comment, unencryptedOpenSSHMarshaler) +} + +// MarshalPrivateKeyWithPassphrase returns a PEM block holding the encrypted +// private key serialized in the OpenSSH format. +func MarshalPrivateKeyWithPassphrase(key crypto.PrivateKey, comment string, passphrase []byte) (*pem.Block, error) { + return marshalOpenSSHPrivateKey(key, comment, passphraseProtectedOpenSSHMarshaler(passphrase)) +} + // PublicKey represents a public key using an unspecified algorithm. // // Some PublicKeys provided by this package also implement CryptoPublicKey. @@ -321,7 +335,7 @@ type CryptoPublicKey interface { // A Signer can create signatures that verify against a public key. // -// Some Signers provided by this package also implement AlgorithmSigner. +// Some Signers provided by this package also implement MultiAlgorithmSigner. type Signer interface { // PublicKey returns the associated PublicKey. PublicKey() PublicKey @@ -336,9 +350,9 @@ type Signer interface { // An AlgorithmSigner is a Signer that also supports specifying an algorithm to // use for signing. // -// An AlgorithmSigner can't advertise the algorithms it supports, so it should -// be prepared to be invoked with every algorithm supported by the public key -// format. +// An AlgorithmSigner can't advertise the algorithms it supports, unless it also +// implements MultiAlgorithmSigner, so it should be prepared to be invoked with +// every algorithm supported by the public key format. type AlgorithmSigner interface { Signer @@ -349,6 +363,75 @@ type AlgorithmSigner interface { SignWithAlgorithm(rand io.Reader, data []byte, algorithm string) (*Signature, error) } +// MultiAlgorithmSigner is an AlgorithmSigner that also reports the algorithms +// supported by that signer. +type MultiAlgorithmSigner interface { + AlgorithmSigner + + // Algorithms returns the available algorithms in preference order. The list + // must not be empty, and it must not include certificate types. + Algorithms() []string +} + +// NewSignerWithAlgorithms returns a signer restricted to the specified +// algorithms. The algorithms must be set in preference order. The list must not +// be empty, and it must not include certificate types. An error is returned if +// the specified algorithms are incompatible with the public key type. +func NewSignerWithAlgorithms(signer AlgorithmSigner, algorithms []string) (MultiAlgorithmSigner, error) { + if len(algorithms) == 0 { + return nil, errors.New("ssh: please specify at least one valid signing algorithm") + } + var signerAlgos []string + supportedAlgos := algorithmsForKeyFormat(underlyingAlgo(signer.PublicKey().Type())) + if s, ok := signer.(*multiAlgorithmSigner); ok { + signerAlgos = s.Algorithms() + } else { + signerAlgos = supportedAlgos + } + + for _, algo := range algorithms { + if !contains(supportedAlgos, algo) { + return nil, fmt.Errorf("ssh: algorithm %q is not supported for key type %q", + algo, signer.PublicKey().Type()) + } + if !contains(signerAlgos, algo) { + return nil, fmt.Errorf("ssh: algorithm %q is restricted for the provided signer", algo) + } + } + return &multiAlgorithmSigner{ + AlgorithmSigner: signer, + supportedAlgorithms: algorithms, + }, nil +} + +type multiAlgorithmSigner struct { + AlgorithmSigner + supportedAlgorithms []string +} + +func (s *multiAlgorithmSigner) Algorithms() []string { + return s.supportedAlgorithms +} + +func (s *multiAlgorithmSigner) isAlgorithmSupported(algorithm string) bool { + if algorithm == "" { + algorithm = underlyingAlgo(s.PublicKey().Type()) + } + for _, algo := range s.supportedAlgorithms { + if algorithm == algo { + return true + } + } + return false +} + +func (s *multiAlgorithmSigner) SignWithAlgorithm(rand io.Reader, data []byte, algorithm string) (*Signature, error) { + if !s.isAlgorithmSupported(algorithm) { + return nil, fmt.Errorf("ssh: algorithm %q is not supported: %v", algorithm, s.supportedAlgorithms) + } + return s.AlgorithmSigner.SignWithAlgorithm(rand, data, algorithm) +} + type rsaPublicKey rsa.PublicKey func (r *rsaPublicKey) Type() string { @@ -512,6 +595,10 @@ func (k *dsaPrivateKey) Sign(rand io.Reader, data []byte) (*Signature, error) { return k.SignWithAlgorithm(rand, data, k.PublicKey().Type()) } +func (k *dsaPrivateKey) Algorithms() []string { + return []string{k.PublicKey().Type()} +} + func (k *dsaPrivateKey) SignWithAlgorithm(rand io.Reader, data []byte, algorithm string) (*Signature, error) { if algorithm != "" && algorithm != k.PublicKey().Type() { return nil, fmt.Errorf("ssh: unsupported signature algorithm %s", algorithm) @@ -961,13 +1048,16 @@ func (s *wrappedSigner) Sign(rand io.Reader, data []byte) (*Signature, error) { return s.SignWithAlgorithm(rand, data, s.pubKey.Type()) } +func (s *wrappedSigner) Algorithms() []string { + return algorithmsForKeyFormat(s.pubKey.Type()) +} + func (s *wrappedSigner) SignWithAlgorithm(rand io.Reader, data []byte, algorithm string) (*Signature, error) { if algorithm == "" { algorithm = s.pubKey.Type() } - supportedAlgos := algorithmsForKeyFormat(s.pubKey.Type()) - if !contains(supportedAlgos, algorithm) { + if !contains(s.Algorithms(), algorithm) { return nil, fmt.Errorf("ssh: unsupported signature algorithm %q for key format %q", algorithm, s.pubKey.Type()) } @@ -1087,9 +1177,9 @@ func (*PassphraseMissingError) Error() string { return "ssh: this private key is passphrase protected" } -// ParseRawPrivateKey returns a private key from a PEM encoded private key. It -// supports RSA (PKCS#1), PKCS#8, DSA (OpenSSL), and ECDSA private keys. If the -// private key is encrypted, it will return a PassphraseMissingError. +// ParseRawPrivateKey returns a private key from a PEM encoded private key. It supports +// RSA, DSA, ECDSA, and Ed25519 private keys in PKCS#1, PKCS#8, OpenSSL, and OpenSSH +// formats. If the private key is encrypted, it will return a PassphraseMissingError. func ParseRawPrivateKey(pemBytes []byte) (interface{}, error) { block, _ := pem.Decode(pemBytes) if block == nil { @@ -1241,28 +1331,106 @@ func passphraseProtectedOpenSSHKey(passphrase []byte) openSSHDecryptFunc { } } +func unencryptedOpenSSHMarshaler(privKeyBlock []byte) ([]byte, string, string, string, error) { + key := generateOpenSSHPadding(privKeyBlock, 8) + return key, "none", "none", "", nil +} + +func passphraseProtectedOpenSSHMarshaler(passphrase []byte) openSSHEncryptFunc { + return func(privKeyBlock []byte) ([]byte, string, string, string, error) { + salt := make([]byte, 16) + if _, err := rand.Read(salt); err != nil { + return nil, "", "", "", err + } + + opts := struct { + Salt []byte + Rounds uint32 + }{salt, 16} + + // Derive key to encrypt the private key block. + k, err := bcrypt_pbkdf.Key(passphrase, salt, int(opts.Rounds), 32+aes.BlockSize) + if err != nil { + return nil, "", "", "", err + } + + // Add padding matching the block size of AES. + keyBlock := generateOpenSSHPadding(privKeyBlock, aes.BlockSize) + + // Encrypt the private key using the derived secret. + + dst := make([]byte, len(keyBlock)) + key, iv := k[:32], k[32:] + block, err := aes.NewCipher(key) + if err != nil { + return nil, "", "", "", err + } + + stream := cipher.NewCTR(block, iv) + stream.XORKeyStream(dst, keyBlock) + + return dst, "aes256-ctr", "bcrypt", string(Marshal(opts)), nil + } +} + +const privateKeyAuthMagic = "openssh-key-v1\x00" + type openSSHDecryptFunc func(CipherName, KdfName, KdfOpts string, PrivKeyBlock []byte) ([]byte, error) +type openSSHEncryptFunc func(PrivKeyBlock []byte) (ProtectedKeyBlock []byte, cipherName, kdfName, kdfOptions string, err error) + +type openSSHEncryptedPrivateKey struct { + CipherName string + KdfName string + KdfOpts string + NumKeys uint32 + PubKey []byte + PrivKeyBlock []byte +} + +type openSSHPrivateKey struct { + Check1 uint32 + Check2 uint32 + Keytype string + Rest []byte `ssh:"rest"` +} + +type openSSHRSAPrivateKey struct { + N *big.Int + E *big.Int + D *big.Int + Iqmp *big.Int + P *big.Int + Q *big.Int + Comment string + Pad []byte `ssh:"rest"` +} + +type openSSHEd25519PrivateKey struct { + Pub []byte + Priv []byte + Comment string + Pad []byte `ssh:"rest"` +} + +type openSSHECDSAPrivateKey struct { + Curve string + Pub []byte + D *big.Int + Comment string + Pad []byte `ssh:"rest"` +} // parseOpenSSHPrivateKey parses an OpenSSH private key, using the decrypt // function to unwrap the encrypted portion. unencryptedOpenSSHKey can be used // as the decrypt function to parse an unencrypted private key. See // https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.key. func parseOpenSSHPrivateKey(key []byte, decrypt openSSHDecryptFunc) (crypto.PrivateKey, error) { - const magic = "openssh-key-v1\x00" - if len(key) < len(magic) || string(key[:len(magic)]) != magic { + if len(key) < len(privateKeyAuthMagic) || string(key[:len(privateKeyAuthMagic)]) != privateKeyAuthMagic { return nil, errors.New("ssh: invalid openssh private key format") } - remaining := key[len(magic):] - - var w struct { - CipherName string - KdfName string - KdfOpts string - NumKeys uint32 - PubKey []byte - PrivKeyBlock []byte - } + remaining := key[len(privateKeyAuthMagic):] + var w openSSHEncryptedPrivateKey if err := Unmarshal(remaining, &w); err != nil { return nil, err } @@ -1284,13 +1452,7 @@ func parseOpenSSHPrivateKey(key []byte, decrypt openSSHDecryptFunc) (crypto.Priv return nil, err } - pk1 := struct { - Check1 uint32 - Check2 uint32 - Keytype string - Rest []byte `ssh:"rest"` - }{} - + var pk1 openSSHPrivateKey if err := Unmarshal(privKeyBlock, &pk1); err != nil || pk1.Check1 != pk1.Check2 { if w.CipherName != "none" { return nil, x509.IncorrectPasswordError @@ -1300,18 +1462,7 @@ func parseOpenSSHPrivateKey(key []byte, decrypt openSSHDecryptFunc) (crypto.Priv switch pk1.Keytype { case KeyAlgoRSA: - // https://github.com/openssh/openssh-portable/blob/master/sshkey.c#L2760-L2773 - key := struct { - N *big.Int - E *big.Int - D *big.Int - Iqmp *big.Int - P *big.Int - Q *big.Int - Comment string - Pad []byte `ssh:"rest"` - }{} - + var key openSSHRSAPrivateKey if err := Unmarshal(pk1.Rest, &key); err != nil { return nil, err } @@ -1337,13 +1488,7 @@ func parseOpenSSHPrivateKey(key []byte, decrypt openSSHDecryptFunc) (crypto.Priv return pk, nil case KeyAlgoED25519: - key := struct { - Pub []byte - Priv []byte - Comment string - Pad []byte `ssh:"rest"` - }{} - + var key openSSHEd25519PrivateKey if err := Unmarshal(pk1.Rest, &key); err != nil { return nil, err } @@ -1360,14 +1505,7 @@ func parseOpenSSHPrivateKey(key []byte, decrypt openSSHDecryptFunc) (crypto.Priv copy(pk, key.Priv) return &pk, nil case KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521: - key := struct { - Curve string - Pub []byte - D *big.Int - Comment string - Pad []byte `ssh:"rest"` - }{} - + var key openSSHECDSAPrivateKey if err := Unmarshal(pk1.Rest, &key); err != nil { return nil, err } @@ -1415,6 +1553,131 @@ func parseOpenSSHPrivateKey(key []byte, decrypt openSSHDecryptFunc) (crypto.Priv } } +func marshalOpenSSHPrivateKey(key crypto.PrivateKey, comment string, encrypt openSSHEncryptFunc) (*pem.Block, error) { + var w openSSHEncryptedPrivateKey + var pk1 openSSHPrivateKey + + // Random check bytes. + var check uint32 + if err := binary.Read(rand.Reader, binary.BigEndian, &check); err != nil { + return nil, err + } + + pk1.Check1 = check + pk1.Check2 = check + w.NumKeys = 1 + + // Use a []byte directly on ed25519 keys. + if k, ok := key.(*ed25519.PrivateKey); ok { + key = *k + } + + switch k := key.(type) { + case *rsa.PrivateKey: + E := new(big.Int).SetInt64(int64(k.PublicKey.E)) + // Marshal public key: + // E and N are in reversed order in the public and private key. + pubKey := struct { + KeyType string + E *big.Int + N *big.Int + }{ + KeyAlgoRSA, + E, k.PublicKey.N, + } + w.PubKey = Marshal(pubKey) + + // Marshal private key. + key := openSSHRSAPrivateKey{ + N: k.PublicKey.N, + E: E, + D: k.D, + Iqmp: k.Precomputed.Qinv, + P: k.Primes[0], + Q: k.Primes[1], + Comment: comment, + } + pk1.Keytype = KeyAlgoRSA + pk1.Rest = Marshal(key) + case ed25519.PrivateKey: + pub := make([]byte, ed25519.PublicKeySize) + priv := make([]byte, ed25519.PrivateKeySize) + copy(pub, k[32:]) + copy(priv, k) + + // Marshal public key. + pubKey := struct { + KeyType string + Pub []byte + }{ + KeyAlgoED25519, pub, + } + w.PubKey = Marshal(pubKey) + + // Marshal private key. + key := openSSHEd25519PrivateKey{ + Pub: pub, + Priv: priv, + Comment: comment, + } + pk1.Keytype = KeyAlgoED25519 + pk1.Rest = Marshal(key) + case *ecdsa.PrivateKey: + var curve, keyType string + switch name := k.Curve.Params().Name; name { + case "P-256": + curve = "nistp256" + keyType = KeyAlgoECDSA256 + case "P-384": + curve = "nistp384" + keyType = KeyAlgoECDSA384 + case "P-521": + curve = "nistp521" + keyType = KeyAlgoECDSA521 + default: + return nil, errors.New("ssh: unhandled elliptic curve " + name) + } + + pub := elliptic.Marshal(k.Curve, k.PublicKey.X, k.PublicKey.Y) + + // Marshal public key. + pubKey := struct { + KeyType string + Curve string + Pub []byte + }{ + keyType, curve, pub, + } + w.PubKey = Marshal(pubKey) + + // Marshal private key. + key := openSSHECDSAPrivateKey{ + Curve: curve, + Pub: pub, + D: k.D, + Comment: comment, + } + pk1.Keytype = keyType + pk1.Rest = Marshal(key) + default: + return nil, fmt.Errorf("ssh: unsupported key type %T", k) + } + + var err error + // Add padding and encrypt the key if necessary. + w.PrivKeyBlock, w.CipherName, w.KdfName, w.KdfOpts, err = encrypt(Marshal(pk1)) + if err != nil { + return nil, err + } + + b := Marshal(w) + block := &pem.Block{ + Type: "OPENSSH PRIVATE KEY", + Bytes: append([]byte(privateKeyAuthMagic), b...), + } + return block, nil +} + func checkOpenSSHKeyPadding(pad []byte) error { for i, b := range pad { if int(b) != i+1 { @@ -1424,6 +1687,13 @@ func checkOpenSSHKeyPadding(pad []byte) error { return nil } +func generateOpenSSHPadding(block []byte, blockSize int) []byte { + for i, l := 0, len(block); (l+i)%blockSize != 0; i++ { + block = append(block, byte(i+1)) + } + return block +} + // FingerprintLegacyMD5 returns the user presentation of the key's // fingerprint as described by RFC 4716 section 4. func FingerprintLegacyMD5(pubKey PublicKey) string { diff --git a/vendor/golang.org/x/crypto/ssh/mac.go b/vendor/golang.org/x/crypto/ssh/mac.go index c07a06285e666..06a1b27507ee3 100644 --- a/vendor/golang.org/x/crypto/ssh/mac.go +++ b/vendor/golang.org/x/crypto/ssh/mac.go @@ -10,6 +10,7 @@ import ( "crypto/hmac" "crypto/sha1" "crypto/sha256" + "crypto/sha512" "hash" ) @@ -46,9 +47,15 @@ func (t truncatingMAC) Size() int { func (t truncatingMAC) BlockSize() int { return t.hmac.BlockSize() } var macModes = map[string]*macMode{ + "hmac-sha2-512-etm@openssh.com": {64, true, func(key []byte) hash.Hash { + return hmac.New(sha512.New, key) + }}, "hmac-sha2-256-etm@openssh.com": {32, true, func(key []byte) hash.Hash { return hmac.New(sha256.New, key) }}, + "hmac-sha2-512": {64, false, func(key []byte) hash.Hash { + return hmac.New(sha512.New, key) + }}, "hmac-sha2-256": {32, false, func(key []byte) hash.Hash { return hmac.New(sha256.New, key) }}, diff --git a/vendor/golang.org/x/crypto/ssh/messages.go b/vendor/golang.org/x/crypto/ssh/messages.go index 19bc67c464229..b55f860564fe3 100644 --- a/vendor/golang.org/x/crypto/ssh/messages.go +++ b/vendor/golang.org/x/crypto/ssh/messages.go @@ -68,7 +68,7 @@ type kexInitMsg struct { // See RFC 4253, section 8. -// Diffie-Helman +// Diffie-Hellman const msgKexDHInit = 30 type kexDHInitMsg struct { @@ -349,6 +349,20 @@ type userAuthGSSAPIError struct { LanguageTag string } +// Transport layer OpenSSH extension. See [PROTOCOL], section 1.9 +const msgPing = 192 + +type pingMsg struct { + Data string `sshtype:"192"` +} + +// Transport layer OpenSSH extension. See [PROTOCOL], section 1.9 +const msgPong = 193 + +type pongMsg struct { + Data string `sshtype:"193"` +} + // typeTags returns the possible type bytes for the given reflect.Type, which // should be a struct. The possible values are separated by a '|' character. func typeTags(structType reflect.Type) (tags []byte) { diff --git a/vendor/golang.org/x/crypto/ssh/mux.go b/vendor/golang.org/x/crypto/ssh/mux.go index 9654c01869ad1..d2d24c635d32a 100644 --- a/vendor/golang.org/x/crypto/ssh/mux.go +++ b/vendor/golang.org/x/crypto/ssh/mux.go @@ -231,6 +231,12 @@ func (m *mux) onePacket() error { return m.handleChannelOpen(packet) case msgGlobalRequest, msgRequestSuccess, msgRequestFailure: return m.handleGlobalPacket(packet) + case msgPing: + var msg pingMsg + if err := Unmarshal(packet, &msg); err != nil { + return fmt.Errorf("failed to unmarshal ping@openssh.com message: %w", err) + } + return m.sendMessage(pongMsg(msg)) } // assume a channel packet. diff --git a/vendor/golang.org/x/crypto/ssh/server.go b/vendor/golang.org/x/crypto/ssh/server.go index 2260b20afc17e..727c71b9c7d90 100644 --- a/vendor/golang.org/x/crypto/ssh/server.go +++ b/vendor/golang.org/x/crypto/ssh/server.go @@ -291,15 +291,6 @@ func (s *connection) serverHandshake(config *ServerConfig) (*Permissions, error) return perms, err } -func isAcceptableAlgo(algo string) bool { - switch algo { - case KeyAlgoRSA, KeyAlgoRSASHA256, KeyAlgoRSASHA512, KeyAlgoDSA, KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521, KeyAlgoSKECDSA256, KeyAlgoED25519, KeyAlgoSKED25519, - CertAlgoRSAv01, CertAlgoDSAv01, CertAlgoECDSA256v01, CertAlgoECDSA384v01, CertAlgoECDSA521v01, CertAlgoSKECDSA256v01, CertAlgoED25519v01, CertAlgoSKED25519v01: - return true - } - return false -} - func checkSourceAddress(addr net.Addr, sourceAddrs string) error { if addr == nil { return errors.New("ssh: no address known for client, but source-address match required") @@ -379,6 +370,25 @@ func gssExchangeToken(gssapiConfig *GSSAPIWithMICConfig, firstToken []byte, s *c return authErr, perms, nil } +// isAlgoCompatible checks if the signature format is compatible with the +// selected algorithm taking into account edge cases that occur with old +// clients. +func isAlgoCompatible(algo, sigFormat string) bool { + // Compatibility for old clients. + // + // For certificate authentication with OpenSSH 7.2-7.7 signature format can + // be rsa-sha2-256 or rsa-sha2-512 for the algorithm + // ssh-rsa-cert-v01@openssh.com. + // + // With gpg-agent < 2.2.6 the algorithm can be rsa-sha2-256 or rsa-sha2-512 + // for signature format ssh-rsa. + if isRSA(algo) && isRSA(sigFormat) { + return true + } + // Standard case: the underlying algorithm must match the signature format. + return underlyingAlgo(algo) == sigFormat +} + // ServerAuthError represents server authentication errors and is // sometimes returned by NewServerConn. It appends any authentication // errors that may occur, and is returned if all of the authentication @@ -514,7 +524,7 @@ userAuthLoop: return nil, parseError(msgUserAuthRequest) } algo := string(algoBytes) - if !isAcceptableAlgo(algo) { + if !contains(supportedPubKeyAuthAlgos, underlyingAlgo(algo)) { authErr = fmt.Errorf("ssh: algorithm %q not accepted", algo) break } @@ -566,17 +576,26 @@ userAuthLoop: if !ok || len(payload) > 0 { return nil, parseError(msgUserAuthRequest) } - + // Ensure the declared public key algo is compatible with the + // decoded one. This check will ensure we don't accept e.g. + // ssh-rsa-cert-v01@openssh.com algorithm with ssh-rsa public + // key type. The algorithm and public key type must be + // consistent: both must be certificate algorithms, or neither. + if !contains(algorithmsForKeyFormat(pubKey.Type()), algo) { + authErr = fmt.Errorf("ssh: public key type %q not compatible with selected algorithm %q", + pubKey.Type(), algo) + break + } // Ensure the public key algo and signature algo // are supported. Compare the private key // algorithm name that corresponds to algo with // sig.Format. This is usually the same, but // for certs, the names differ. - if !isAcceptableAlgo(sig.Format) { + if !contains(supportedPubKeyAuthAlgos, sig.Format) { authErr = fmt.Errorf("ssh: algorithm %q not accepted", sig.Format) break } - if underlyingAlgo(algo) != sig.Format { + if !isAlgoCompatible(algo, sig.Format) { authErr = fmt.Errorf("ssh: signature %q not compatible with selected algorithm %q", sig.Format, algo) break } diff --git a/vendor/golang.org/x/crypto/ssh/transport.go b/vendor/golang.org/x/crypto/ssh/transport.go index acf5a21bbb0e8..da015801ea5bf 100644 --- a/vendor/golang.org/x/crypto/ssh/transport.go +++ b/vendor/golang.org/x/crypto/ssh/transport.go @@ -17,7 +17,8 @@ import ( const debugTransport = false const ( - gcmCipherID = "aes128-gcm@openssh.com" + gcm128CipherID = "aes128-gcm@openssh.com" + gcm256CipherID = "aes256-gcm@openssh.com" aes128cbcID = "aes128-cbc" tripledescbcID = "3des-cbc" ) diff --git a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go b/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go deleted file mode 100644 index 37dc0cfdb5b0d..0000000000000 --- a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2016 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 ctxhttp provides helper functions for performing context-aware HTTP requests. -package ctxhttp // import "golang.org/x/net/context/ctxhttp" - -import ( - "context" - "io" - "net/http" - "net/url" - "strings" -) - -// Do sends an HTTP request with the provided http.Client and returns -// an HTTP response. -// -// If the client is nil, http.DefaultClient is used. -// -// The provided ctx must be non-nil. If it is canceled or times out, -// ctx.Err() will be returned. -func Do(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) { - if client == nil { - client = http.DefaultClient - } - resp, err := client.Do(req.WithContext(ctx)) - // If we got an error, and the context has been canceled, - // the context's error is probably more useful. - if err != nil { - select { - case <-ctx.Done(): - err = ctx.Err() - default: - } - } - return resp, err -} - -// Get issues a GET request via the Do function. -func Get(ctx context.Context, client *http.Client, url string) (*http.Response, error) { - req, err := http.NewRequest("GET", url, nil) - if err != nil { - return nil, err - } - return Do(ctx, client, req) -} - -// Head issues a HEAD request via the Do function. -func Head(ctx context.Context, client *http.Client, url string) (*http.Response, error) { - req, err := http.NewRequest("HEAD", url, nil) - if err != nil { - return nil, err - } - return Do(ctx, client, req) -} - -// Post issues a POST request via the Do function. -func Post(ctx context.Context, client *http.Client, url string, bodyType string, body io.Reader) (*http.Response, error) { - req, err := http.NewRequest("POST", url, body) - if err != nil { - return nil, err - } - req.Header.Set("Content-Type", bodyType) - return Do(ctx, client, req) -} - -// PostForm issues a POST request via the Do function. -func PostForm(ctx context.Context, client *http.Client, url string, data url.Values) (*http.Response, error) { - return Post(ctx, client, url, "application/x-www-form-urlencoded", strings.NewReader(data.Encode())) -} diff --git a/vendor/golang.org/x/net/html/doc.go b/vendor/golang.org/x/net/html/doc.go index 822ed42a04c1c..2466ae3d9a5d8 100644 --- a/vendor/golang.org/x/net/html/doc.go +++ b/vendor/golang.org/x/net/html/doc.go @@ -92,6 +92,27 @@ example, to process each anchor node in depth-first order: The relevant specifications include: https://html.spec.whatwg.org/multipage/syntax.html and https://html.spec.whatwg.org/multipage/syntax.html#tokenization + +# Security Considerations + +Care should be taken when parsing and interpreting HTML, whether full documents +or fragments, within the framework of the HTML specification, especially with +regard to untrusted inputs. + +This package provides both a tokenizer and a parser, which implement the +tokenization, and tokenization and tree construction stages of the WHATWG HTML +parsing specification respectively. While the tokenizer parses and normalizes +individual HTML tokens, only the parser constructs the DOM tree from the +tokenized HTML, as described in the tree construction stage of the +specification, dynamically modifying or extending the docuemnt's DOM tree. + +If your use case requires semantically well-formed HTML documents, as defined by +the WHATWG specification, the parser should be used rather than the tokenizer. + +In security contexts, if trust decisions are being made using the tokenized or +parsed content, the input must be re-serialized (for instance by using Render or +Token.String) in order for those trust decisions to hold, as the process of +tokenization or parsing may alter the content. */ package html // import "golang.org/x/net/html" diff --git a/vendor/golang.org/x/net/html/escape.go b/vendor/golang.org/x/net/html/escape.go index d8561396200ea..04c6bec210737 100644 --- a/vendor/golang.org/x/net/html/escape.go +++ b/vendor/golang.org/x/net/html/escape.go @@ -193,6 +193,87 @@ func lower(b []byte) []byte { return b } +// escapeComment is like func escape but escapes its input bytes less often. +// Per https://github.com/golang/go/issues/58246 some HTML comments are (1) +// meaningful and (2) contain angle brackets that we'd like to avoid escaping +// unless we have to. +// +// "We have to" includes the '&' byte, since that introduces other escapes. +// +// It also includes those bytes (not including EOF) that would otherwise end +// the comment. Per the summary table at the bottom of comment_test.go, this is +// the '>' byte that, per above, we'd like to avoid escaping unless we have to. +// +// Studying the summary table (and T actions in its '>' column) closely, we +// only need to escape in states 43, 44, 49, 51 and 52. State 43 is at the +// start of the comment data. State 52 is after a '!'. The other three states +// are after a '-'. +// +// Our algorithm is thus to escape every '&' and to escape '>' if and only if: +// - The '>' is after a '!' or '-' (in the unescaped data) or +// - The '>' is at the start of the comment data (after the opening ""); err != nil { @@ -194,9 +194,8 @@ func render1(w writer, n *Node) error { } } - // Render any child nodes. - switch n.Data { - case "iframe", "noembed", "noframes", "noscript", "plaintext", "script", "style", "xmp": + // Render any child nodes + if childTextNodesAreLiteral(n) { for c := n.FirstChild; c != nil; c = c.NextSibling { if c.Type == TextNode { if _, err := w.WriteString(c.Data); err != nil { @@ -213,7 +212,7 @@ func render1(w writer, n *Node) error { // last element in the file, with no closing tag. return plaintextAbort } - default: + } else { for c := n.FirstChild; c != nil; c = c.NextSibling { if err := render1(w, c); err != nil { return err @@ -231,6 +230,27 @@ func render1(w writer, n *Node) error { return w.WriteByte('>') } +func childTextNodesAreLiteral(n *Node) bool { + // Per WHATWG HTML 13.3, if the parent of the current node is a style, + // script, xmp, iframe, noembed, noframes, or plaintext element, and the + // current node is a text node, append the value of the node's data + // literally. The specification is not explicit about it, but we only + // enforce this if we are in the HTML namespace (i.e. when the namespace is + // ""). + // NOTE: we also always include noscript elements, although the + // specification states that they should only be rendered as such if + // scripting is enabled for the node (which is not something we track). + if n.Namespace != "" { + return false + } + switch n.Data { + case "iframe", "noembed", "noframes", "noscript", "plaintext", "script", "style", "xmp": + return true + default: + return false + } +} + // writeQuoted writes s to w surrounded by quotes. Normally it will use double // quotes, but if s contains a double quote, it will use single quotes. // It is used for writing the identifiers in a doctype declaration. diff --git a/vendor/golang.org/x/net/html/token.go b/vendor/golang.org/x/net/html/token.go index 50f7c6aac8dea..de67f938a14b4 100644 --- a/vendor/golang.org/x/net/html/token.go +++ b/vendor/golang.org/x/net/html/token.go @@ -110,7 +110,7 @@ func (t Token) String() string { case SelfClosingTagToken: return "<" + t.tagString() + "/>" case CommentToken: - return "" + return "" case DoctypeToken: return "" } @@ -598,10 +598,10 @@ scriptDataDoubleEscapeEnd: // readComment reads the next comment token starting with " balancer) calls are guaranteed to execute in a + // mutually exclusive manner as they are scheduled in the serializer. Fields + // accessed *only* in these serializer callbacks, can therefore be accessed + // without a mutex. balancer *gracefulswitch.Balancer curBalancerName string - updateCh *buffer.Unbounded // Updates written on this channel are processed by watcher(). - resultCh *buffer.Unbounded // Results of calls to UpdateClientConnState() are pushed here. - closed *grpcsync.Event // Indicates if close has been called. - done *grpcsync.Event // Indicates if close has completed its work. + // mu guards access to the below fields. Access to the serializer and its + // cancel function needs to be mutex protected because they are overwritten + // when the wrapper exits idle mode. + mu sync.Mutex + serializer *grpcsync.CallbackSerializer // To serialize all outoing calls. + serializerCancel context.CancelFunc // To close the seralizer at close/enterIdle time. + mode ccbMode // Tracks the current mode of the wrapper. } // newCCBalancerWrapper creates a new balancer wrapper. The underlying balancer // is not created until the switchTo() method is invoked. func newCCBalancerWrapper(cc *ClientConn, bopts balancer.BuildOptions) *ccBalancerWrapper { + ctx, cancel := context.WithCancel(context.Background()) ccb := &ccBalancerWrapper{ - cc: cc, - updateCh: buffer.NewUnbounded(), - resultCh: buffer.NewUnbounded(), - closed: grpcsync.NewEvent(), - done: grpcsync.NewEvent(), + cc: cc, + opts: bopts, + serializer: grpcsync.NewCallbackSerializer(ctx), + serializerCancel: cancel, } - go ccb.watcher() ccb.balancer = gracefulswitch.NewBalancer(ccb, bopts) return ccb } -// The following xxxUpdate structs wrap the arguments received as part of the -// corresponding update. The watcher goroutine uses the 'type' of the update to -// invoke the appropriate handler routine to handle the update. - -type ccStateUpdate struct { - ccs *balancer.ClientConnState -} - -type scStateUpdate struct { - sc balancer.SubConn - state connectivity.State - err error -} - -type exitIdleUpdate struct{} - -type resolverErrorUpdate struct { - err error -} - -type switchToUpdate struct { - name string -} - -type subConnUpdate struct { - acbw *acBalancerWrapper -} - -// watcher is a long-running goroutine which reads updates from a channel and -// invokes corresponding methods on the underlying balancer. It ensures that -// these methods are invoked in a synchronous fashion. It also ensures that -// these methods are invoked in the order in which the updates were received. -func (ccb *ccBalancerWrapper) watcher() { - for { - select { - case u := <-ccb.updateCh.Get(): - ccb.updateCh.Load() - if ccb.closed.HasFired() { - break - } - switch update := u.(type) { - case *ccStateUpdate: - ccb.handleClientConnStateChange(update.ccs) - case *scStateUpdate: - ccb.handleSubConnStateChange(update) - case *exitIdleUpdate: - ccb.handleExitIdle() - case *resolverErrorUpdate: - ccb.handleResolverError(update.err) - case *switchToUpdate: - ccb.handleSwitchTo(update.name) - case *subConnUpdate: - ccb.handleRemoveSubConn(update.acbw) - default: - logger.Errorf("ccBalancerWrapper.watcher: unknown update %+v, type %T", update, update) - } - case <-ccb.closed.Done(): - } - - if ccb.closed.HasFired() { - ccb.handleClose() - return - } - } -} - // updateClientConnState is invoked by grpc to push a ClientConnState update to // the underlying balancer. -// -// Unlike other methods invoked by grpc to push updates to the underlying -// balancer, this method cannot simply push the update onto the update channel -// and return. It needs to return the error returned by the underlying balancer -// back to grpc which propagates that to the resolver. func (ccb *ccBalancerWrapper) updateClientConnState(ccs *balancer.ClientConnState) error { - ccb.updateCh.Put(&ccStateUpdate{ccs: ccs}) - - var res interface{} - select { - case res = <-ccb.resultCh.Get(): - ccb.resultCh.Load() - case <-ccb.closed.Done(): - // Return early if the balancer wrapper is closed while we are waiting for - // the underlying balancer to process a ClientConnState update. - return nil - } - // If the returned error is nil, attempting to type assert to error leads to - // panic. So, this needs to handled separately. - if res == nil { - return nil - } - return res.(error) -} - -// handleClientConnStateChange handles a ClientConnState update from the update -// channel and invokes the appropriate method on the underlying balancer. -// -// If the addresses specified in the update contain addresses of type "grpclb" -// and the selected LB policy is not "grpclb", these addresses will be filtered -// out and ccs will be modified with the updated address list. -func (ccb *ccBalancerWrapper) handleClientConnStateChange(ccs *balancer.ClientConnState) { - if ccb.curBalancerName != grpclbName { - // Filter any grpclb addresses since we don't have the grpclb balancer. - var addrs []resolver.Address - for _, addr := range ccs.ResolverState.Addresses { - if addr.Type == resolver.GRPCLB { - continue + ccb.mu.Lock() + errCh := make(chan error, 1) + // Here and everywhere else where Schedule() is called, it is done with the + // lock held. But the lock guards only the scheduling part. The actual + // callback is called asynchronously without the lock being held. + ok := ccb.serializer.Schedule(func(_ context.Context) { + // If the addresses specified in the update contain addresses of type + // "grpclb" and the selected LB policy is not "grpclb", these addresses + // will be filtered out and ccs will be modified with the updated + // address list. + if ccb.curBalancerName != grpclbName { + var addrs []resolver.Address + for _, addr := range ccs.ResolverState.Addresses { + if addr.Type == resolver.GRPCLB { + continue + } + addrs = append(addrs, addr) } - addrs = append(addrs, addr) + ccs.ResolverState.Addresses = addrs } - ccs.ResolverState.Addresses = addrs + errCh <- ccb.balancer.UpdateClientConnState(*ccs) + }) + if !ok { + // If we are unable to schedule a function with the serializer, it + // indicates that it has been closed. A serializer is only closed when + // the wrapper is closed or is in idle. + ccb.mu.Unlock() + return fmt.Errorf("grpc: cannot send state update to a closed or idle balancer") } - ccb.resultCh.Put(ccb.balancer.UpdateClientConnState(*ccs)) + ccb.mu.Unlock() + + // We get here only if the above call to Schedule succeeds, in which case it + // is guaranteed that the scheduled function will run. Therefore it is safe + // to block on this channel. + err := <-errCh + if logger.V(2) && err != nil { + logger.Infof("error from balancer.UpdateClientConnState: %v", err) + } + return err } // updateSubConnState is invoked by grpc to push a subConn state update to the // underlying balancer. func (ccb *ccBalancerWrapper) updateSubConnState(sc balancer.SubConn, s connectivity.State, err error) { - // When updating addresses for a SubConn, if the address in use is not in - // the new addresses, the old ac will be tearDown() and a new ac will be - // created. tearDown() generates a state change with Shutdown state, we - // don't want the balancer to receive this state change. So before - // tearDown() on the old ac, ac.acbw (acWrapper) will be set to nil, and - // this function will be called with (nil, Shutdown). We don't need to call - // balancer method in this case. - if sc == nil { - return - } - ccb.updateCh.Put(&scStateUpdate{ - sc: sc, - state: s, - err: err, + ccb.mu.Lock() + ccb.serializer.Schedule(func(_ context.Context) { + ccb.balancer.UpdateSubConnState(sc, balancer.SubConnState{ConnectivityState: s, ConnectionError: err}) }) -} - -// handleSubConnStateChange handles a SubConnState update from the update -// channel and invokes the appropriate method on the underlying balancer. -func (ccb *ccBalancerWrapper) handleSubConnStateChange(update *scStateUpdate) { - ccb.balancer.UpdateSubConnState(update.sc, balancer.SubConnState{ConnectivityState: update.state, ConnectionError: update.err}) -} - -func (ccb *ccBalancerWrapper) exitIdle() { - ccb.updateCh.Put(&exitIdleUpdate{}) -} - -func (ccb *ccBalancerWrapper) handleExitIdle() { - if ccb.cc.GetState() != connectivity.Idle { - return - } - ccb.balancer.ExitIdle() + ccb.mu.Unlock() } func (ccb *ccBalancerWrapper) resolverError(err error) { - ccb.updateCh.Put(&resolverErrorUpdate{err: err}) -} - -func (ccb *ccBalancerWrapper) handleResolverError(err error) { - ccb.balancer.ResolverError(err) + ccb.mu.Lock() + ccb.serializer.Schedule(func(_ context.Context) { + ccb.balancer.ResolverError(err) + }) + ccb.mu.Unlock() } // switchTo is invoked by grpc to instruct the balancer wrapper to switch to the @@ -245,24 +163,27 @@ func (ccb *ccBalancerWrapper) handleResolverError(err error) { // the ccBalancerWrapper keeps track of the current LB policy name, and skips // the graceful balancer switching process if the name does not change. func (ccb *ccBalancerWrapper) switchTo(name string) { - ccb.updateCh.Put(&switchToUpdate{name: name}) + ccb.mu.Lock() + ccb.serializer.Schedule(func(_ context.Context) { + // TODO: Other languages use case-sensitive balancer registries. We should + // switch as well. See: https://github.com/grpc/grpc-go/issues/5288. + if strings.EqualFold(ccb.curBalancerName, name) { + return + } + ccb.buildLoadBalancingPolicy(name) + }) + ccb.mu.Unlock() } -// handleSwitchTo handles a balancer switch update from the update channel. It -// calls the SwitchTo() method on the gracefulswitch.Balancer with a -// balancer.Builder corresponding to name. If no balancer.Builder is registered -// for the given name, it uses the default LB policy which is "pick_first". -func (ccb *ccBalancerWrapper) handleSwitchTo(name string) { - // TODO: Other languages use case-insensitive balancer registries. We should - // switch as well. See: https://github.com/grpc/grpc-go/issues/5288. - if strings.EqualFold(ccb.curBalancerName, name) { - return - } - - // TODO: Ensure that name is a registered LB policy when we get here. - // We currently only validate the `loadBalancingConfig` field. We need to do - // the same for the `loadBalancingPolicy` field and reject the service config - // if the specified policy is not registered. +// buildLoadBalancingPolicy performs the following: +// - retrieve a balancer builder for the given name. Use the default LB +// policy, pick_first, if no LB policy with name is found in the registry. +// - instruct the gracefulswitch balancer to switch to the above builder. This +// will actually build the new balancer. +// - update the `curBalancerName` field +// +// Must be called from a serializer callback. +func (ccb *ccBalancerWrapper) buildLoadBalancingPolicy(name string) { builder := balancer.Get(name) if builder == nil { channelz.Warningf(logger, ccb.cc.channelzID, "Channel switches to new LB policy %q, since the specified LB policy %q was not registered", PickFirstBalancerName, name) @@ -278,26 +199,114 @@ func (ccb *ccBalancerWrapper) handleSwitchTo(name string) { ccb.curBalancerName = builder.Name() } -// handleRemoveSucConn handles a request from the underlying balancer to remove -// a subConn. -// -// See comments in RemoveSubConn() for more details. -func (ccb *ccBalancerWrapper) handleRemoveSubConn(acbw *acBalancerWrapper) { - ccb.cc.removeAddrConn(acbw.getAddrConn(), errConnDrain) +func (ccb *ccBalancerWrapper) close() { + channelz.Info(logger, ccb.cc.channelzID, "ccBalancerWrapper: closing") + ccb.closeBalancer(ccbModeClosed) } -func (ccb *ccBalancerWrapper) close() { - ccb.closed.Fire() - <-ccb.done.Done() +// enterIdleMode is invoked by grpc when the channel enters idle mode upon +// expiry of idle_timeout. This call blocks until the balancer is closed. +func (ccb *ccBalancerWrapper) enterIdleMode() { + channelz.Info(logger, ccb.cc.channelzID, "ccBalancerWrapper: entering idle mode") + ccb.closeBalancer(ccbModeIdle) } -func (ccb *ccBalancerWrapper) handleClose() { - ccb.balancer.Close() - ccb.done.Fire() +// closeBalancer is invoked when the channel is being closed or when it enters +// idle mode upon expiry of idle_timeout. +func (ccb *ccBalancerWrapper) closeBalancer(m ccbMode) { + ccb.mu.Lock() + if ccb.mode == ccbModeClosed || ccb.mode == ccbModeIdle { + ccb.mu.Unlock() + return + } + + ccb.mode = m + done := ccb.serializer.Done + b := ccb.balancer + ok := ccb.serializer.Schedule(func(_ context.Context) { + // Close the serializer to ensure that no more calls from gRPC are sent + // to the balancer. + ccb.serializerCancel() + // Empty the current balancer name because we don't have a balancer + // anymore and also so that we act on the next call to switchTo by + // creating a new balancer specified by the new resolver. + ccb.curBalancerName = "" + }) + if !ok { + ccb.mu.Unlock() + return + } + ccb.mu.Unlock() + + // Give enqueued callbacks a chance to finish. + <-done + // Spawn a goroutine to close the balancer (since it may block trying to + // cleanup all allocated resources) and return early. + go b.Close() +} + +// exitIdleMode is invoked by grpc when the channel exits idle mode either +// because of an RPC or because of an invocation of the Connect() API. This +// recreates the balancer that was closed previously when entering idle mode. +// +// If the channel is not in idle mode, we know for a fact that we are here as a +// result of the user calling the Connect() method on the ClientConn. In this +// case, we can simply forward the call to the underlying balancer, instructing +// it to reconnect to the backends. +func (ccb *ccBalancerWrapper) exitIdleMode() { + ccb.mu.Lock() + if ccb.mode == ccbModeClosed { + // Request to exit idle is a no-op when wrapper is already closed. + ccb.mu.Unlock() + return + } + + if ccb.mode == ccbModeIdle { + // Recreate the serializer which was closed when we entered idle. + ctx, cancel := context.WithCancel(context.Background()) + ccb.serializer = grpcsync.NewCallbackSerializer(ctx) + ccb.serializerCancel = cancel + } + + // The ClientConn guarantees that mutual exclusion between close() and + // exitIdleMode(), and since we just created a new serializer, we can be + // sure that the below function will be scheduled. + done := make(chan struct{}) + ccb.serializer.Schedule(func(_ context.Context) { + defer close(done) + + ccb.mu.Lock() + defer ccb.mu.Unlock() + + if ccb.mode != ccbModeIdle { + ccb.balancer.ExitIdle() + return + } + + // Gracefulswitch balancer does not support a switchTo operation after + // being closed. Hence we need to create a new one here. + ccb.balancer = gracefulswitch.NewBalancer(ccb, ccb.opts) + ccb.mode = ccbModeActive + channelz.Info(logger, ccb.cc.channelzID, "ccBalancerWrapper: exiting idle mode") + + }) + ccb.mu.Unlock() + + <-done +} + +func (ccb *ccBalancerWrapper) isIdleOrClosed() bool { + ccb.mu.Lock() + defer ccb.mu.Unlock() + return ccb.mode == ccbModeIdle || ccb.mode == ccbModeClosed } func (ccb *ccBalancerWrapper) NewSubConn(addrs []resolver.Address, opts balancer.NewSubConnOptions) (balancer.SubConn, error) { - if len(addrs) <= 0 { + if ccb.isIdleOrClosed() { + return nil, fmt.Errorf("grpc: cannot create SubConn when balancer is closed or idle") + } + + if len(addrs) == 0 { return nil, fmt.Errorf("grpc: cannot create SubConn with empty address list") } ac, err := ccb.cc.newAddrConn(addrs, opts) @@ -305,32 +314,36 @@ func (ccb *ccBalancerWrapper) NewSubConn(addrs []resolver.Address, opts balancer channelz.Warningf(logger, ccb.cc.channelzID, "acBalancerWrapper: NewSubConn: failed to newAddrConn: %v", err) return nil, err } - acbw := &acBalancerWrapper{ac: ac} - acbw.ac.mu.Lock() + acbw := &acBalancerWrapper{ac: ac, producers: make(map[balancer.ProducerBuilder]*refCountedProducer)} ac.acbw = acbw - acbw.ac.mu.Unlock() return acbw, nil } func (ccb *ccBalancerWrapper) RemoveSubConn(sc balancer.SubConn) { - // Before we switched the ccBalancerWrapper to use gracefulswitch.Balancer, it - // was required to handle the RemoveSubConn() method asynchronously by pushing - // the update onto the update channel. This was done to avoid a deadlock as - // switchBalancer() was holding cc.mu when calling Close() on the old - // balancer, which would in turn call RemoveSubConn(). - // - // With the use of gracefulswitch.Balancer in ccBalancerWrapper, handling this - // asynchronously is probably not required anymore since the switchTo() method - // handles the balancer switch by pushing the update onto the channel. - // TODO(easwars): Handle this inline. + if ccb.isIdleOrClosed() { + // It it safe to ignore this call when the balancer is closed or in idle + // because the ClientConn takes care of closing the connections. + // + // Not returning early from here when the balancer is closed or in idle + // leads to a deadlock though, because of the following sequence of + // calls when holding cc.mu: + // cc.exitIdleMode --> ccb.enterIdleMode --> gsw.Close --> + // ccb.RemoveAddrConn --> cc.removeAddrConn + return + } + acbw, ok := sc.(*acBalancerWrapper) if !ok { return } - ccb.updateCh.Put(&subConnUpdate{acbw: acbw}) + ccb.cc.removeAddrConn(acbw.ac, errConnDrain) } func (ccb *ccBalancerWrapper) UpdateAddresses(sc balancer.SubConn, addrs []resolver.Address) { + if ccb.isIdleOrClosed() { + return + } + acbw, ok := sc.(*acBalancerWrapper) if !ok { return @@ -339,6 +352,10 @@ func (ccb *ccBalancerWrapper) UpdateAddresses(sc balancer.SubConn, addrs []resol } func (ccb *ccBalancerWrapper) UpdateState(s balancer.State) { + if ccb.isIdleOrClosed() { + return + } + // Update picker before updating state. Even though the ordering here does // not matter, it can lead to multiple calls of Pick in the common start-up // case where we wait for ready and then perform an RPC. If the picker is @@ -349,6 +366,10 @@ func (ccb *ccBalancerWrapper) UpdateState(s balancer.State) { } func (ccb *ccBalancerWrapper) ResolveNow(o resolver.ResolveNowOptions) { + if ccb.isIdleOrClosed() { + return + } + ccb.cc.resolveNow(o) } @@ -359,58 +380,80 @@ func (ccb *ccBalancerWrapper) Target() string { // acBalancerWrapper is a wrapper on top of ac for balancers. // It implements balancer.SubConn interface. type acBalancerWrapper struct { - mu sync.Mutex - ac *addrConn + ac *addrConn // read-only + + mu sync.Mutex + producers map[balancer.ProducerBuilder]*refCountedProducer +} + +func (acbw *acBalancerWrapper) String() string { + return fmt.Sprintf("SubConn(id:%d)", acbw.ac.channelzID.Int()) } func (acbw *acBalancerWrapper) UpdateAddresses(addrs []resolver.Address) { - acbw.mu.Lock() - defer acbw.mu.Unlock() - if len(addrs) <= 0 { - acbw.ac.cc.removeAddrConn(acbw.ac, errConnDrain) - return + acbw.ac.updateAddrs(addrs) +} + +func (acbw *acBalancerWrapper) Connect() { + go acbw.ac.connect() +} + +// NewStream begins a streaming RPC on the addrConn. If the addrConn is not +// ready, blocks until it is or ctx expires. Returns an error when the context +// expires or the addrConn is shut down. +func (acbw *acBalancerWrapper) NewStream(ctx context.Context, desc *StreamDesc, method string, opts ...CallOption) (ClientStream, error) { + transport, err := acbw.ac.getTransport(ctx) + if err != nil { + return nil, err } - if !acbw.ac.tryUpdateAddrs(addrs) { - cc := acbw.ac.cc - opts := acbw.ac.scopts - acbw.ac.mu.Lock() - // Set old ac.acbw to nil so the Shutdown state update will be ignored - // by balancer. - // - // TODO(bar) the state transition could be wrong when tearDown() old ac - // and creating new ac, fix the transition. - acbw.ac.acbw = nil - acbw.ac.mu.Unlock() - acState := acbw.ac.getState() - acbw.ac.cc.removeAddrConn(acbw.ac, errConnDrain) - - if acState == connectivity.Shutdown { - return - } + return newNonRetryClientStream(ctx, desc, method, transport, acbw.ac, opts...) +} - newAC, err := cc.newAddrConn(addrs, opts) - if err != nil { - channelz.Warningf(logger, acbw.ac.channelzID, "acBalancerWrapper: UpdateAddresses: failed to newAddrConn: %v", err) - return - } - acbw.ac = newAC - newAC.mu.Lock() - newAC.acbw = acbw - newAC.mu.Unlock() - if acState != connectivity.Idle { - go newAC.connect() - } +// Invoke performs a unary RPC. If the addrConn is not ready, returns +// errSubConnNotReady. +func (acbw *acBalancerWrapper) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...CallOption) error { + cs, err := acbw.NewStream(ctx, unaryStreamDesc, method, opts...) + if err != nil { + return err + } + if err := cs.SendMsg(args); err != nil { + return err } + return cs.RecvMsg(reply) } -func (acbw *acBalancerWrapper) Connect() { - acbw.mu.Lock() - defer acbw.mu.Unlock() - go acbw.ac.connect() +type refCountedProducer struct { + producer balancer.Producer + refs int // number of current refs to the producer + close func() // underlying producer's close function } -func (acbw *acBalancerWrapper) getAddrConn() *addrConn { +func (acbw *acBalancerWrapper) GetOrBuildProducer(pb balancer.ProducerBuilder) (balancer.Producer, func()) { acbw.mu.Lock() defer acbw.mu.Unlock() - return acbw.ac + + // Look up existing producer from this builder. + pData := acbw.producers[pb] + if pData == nil { + // Not found; create a new one and add it to the producers map. + p, close := pb.Build(acbw) + pData = &refCountedProducer{producer: p, close: close} + acbw.producers[pb] = pData + } + // Account for this new reference. + pData.refs++ + + // Return a cleanup function wrapped in a OnceFunc to remove this reference + // and delete the refCountedProducer from the map if the total reference + // count goes to zero. + unref := func() { + acbw.mu.Lock() + pData.refs-- + if pData.refs == 0 { + defer pData.close() // Run outside the acbw mutex + delete(acbw.producers, pb) + } + acbw.mu.Unlock() + } + return pData.producer, grpcsync.OnceFunc(unref) } diff --git a/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go b/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go index ed75290cdf347..ec2c2fa14dd3a 100644 --- a/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go +++ b/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go @@ -18,14 +18,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.30.0 +// protoc v4.22.0 // source: grpc/binlog/v1/binarylog.proto package grpc_binarylog_v1 import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" @@ -41,10 +40,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // Enumerates the type of event // Note the terminology is different from the RPC semantics // definition, but the same meaning is expressed here. @@ -261,6 +256,7 @@ type GrpcLogEntry struct { // according to the type of the log entry. // // Types that are assignable to Payload: + // // *GrpcLogEntry_ClientHeader // *GrpcLogEntry_ServerHeader // *GrpcLogEntry_Message @@ -694,12 +690,12 @@ func (x *Message) GetData() []byte { // Header keys added by gRPC are omitted. To be more specific, // implementations will not log the following entries, and this is // not to be treated as a truncation: -// - entries handled by grpc that are not user visible, such as those -// that begin with 'grpc-' (with exception of grpc-trace-bin) -// or keys like 'lb-token' -// - transport specific entries, including but not limited to: -// ':path', ':authority', 'content-encoding', 'user-agent', 'te', etc -// - entries added for call credentials +// - entries handled by grpc that are not user visible, such as those +// that begin with 'grpc-' (with exception of grpc-trace-bin) +// or keys like 'lb-token' +// - transport specific entries, including but not limited to: +// ':path', ':authority', 'content-encoding', 'user-agent', 'te', etc +// - entries added for call credentials // // Implementations must always log grpc-trace-bin if it is present. // Practically speaking it will only be visible on server side because diff --git a/vendor/google.golang.org/grpc/call.go b/vendor/google.golang.org/grpc/call.go index 9e20e4d385f9d..e6a1dc5d75ed8 100644 --- a/vendor/google.golang.org/grpc/call.go +++ b/vendor/google.golang.org/grpc/call.go @@ -27,6 +27,11 @@ import ( // // All errors returned by Invoke are compatible with the status package. func (cc *ClientConn) Invoke(ctx context.Context, method string, args, reply interface{}, opts ...CallOption) error { + if err := cc.idlenessMgr.onCallBegin(); err != nil { + return err + } + defer cc.idlenessMgr.onCallEnd() + // allow interceptor to see all applicable call options, which means those // configured as defaults from dial option as well as per-call options opts = combine(cc.dopts.callOptions, opts) diff --git a/vendor/google.golang.org/grpc/channelz/channelz.go b/vendor/google.golang.org/grpc/channelz/channelz.go index a220c47c59a50..32b7fa5794e18 100644 --- a/vendor/google.golang.org/grpc/channelz/channelz.go +++ b/vendor/google.golang.org/grpc/channelz/channelz.go @@ -23,7 +23,7 @@ // https://github.com/grpc/proposal/blob/master/A14-channelz.md, is provided by // the `internal/channelz` package. // -// Experimental +// # Experimental // // Notice: All APIs in this package are experimental and may be removed in a // later release. diff --git a/vendor/google.golang.org/grpc/clientconn.go b/vendor/google.golang.org/grpc/clientconn.go index de6d41c238414..95a7459b02f65 100644 --- a/vendor/google.golang.org/grpc/clientconn.go +++ b/vendor/google.golang.org/grpc/clientconn.go @@ -24,7 +24,6 @@ import ( "fmt" "math" "net/url" - "reflect" "strings" "sync" "sync/atomic" @@ -69,6 +68,9 @@ var ( errConnDrain = errors.New("grpc: the connection is drained") // errConnClosing indicates that the connection is closing. errConnClosing = errors.New("grpc: the connection is closing") + // errConnIdling indicates the the connection is being closed as the channel + // is moving to an idle mode due to inactivity. + errConnIdling = errors.New("grpc: the connection is closing due to channel idleness") // invalidDefaultServiceConfigErrPrefix is used to prefix the json parsing error for the default // service config. invalidDefaultServiceConfigErrPrefix = "grpc: the provided default service config is invalid" @@ -134,17 +136,43 @@ func (dcs *defaultConfigSelector) SelectConfig(rpcInfo iresolver.RPCInfo) (*ires // e.g. to use dns resolver, a "dns:///" prefix should be applied to the target. func DialContext(ctx context.Context, target string, opts ...DialOption) (conn *ClientConn, err error) { cc := &ClientConn{ - target: target, - csMgr: &connectivityStateManager{}, - conns: make(map[*addrConn]struct{}), - dopts: defaultDialOptions(), - blockingpicker: newPickerWrapper(), - czData: new(channelzData), - firstResolveEvent: grpcsync.NewEvent(), - } + target: target, + csMgr: &connectivityStateManager{}, + conns: make(map[*addrConn]struct{}), + dopts: defaultDialOptions(), + czData: new(channelzData), + } + + // We start the channel off in idle mode, but kick it out of idle at the end + // of this method, instead of waiting for the first RPC. Other gRPC + // implementations do wait for the first RPC to kick the channel out of + // idle. But doing so would be a major behavior change for our users who are + // used to seeing the channel active after Dial. + // + // Taking this approach of kicking it out of idle at the end of this method + // allows us to share the code between channel creation and exiting idle + // mode. This will also make it easy for us to switch to starting the + // channel off in idle, if at all we ever get to do that. + cc.idlenessState = ccIdlenessStateIdle + cc.retryThrottler.Store((*retryThrottler)(nil)) cc.safeConfigSelector.UpdateConfigSelector(&defaultConfigSelector{nil}) cc.ctx, cc.cancel = context.WithCancel(context.Background()) + cc.exitIdleCond = sync.NewCond(&cc.mu) + + disableGlobalOpts := false + for _, opt := range opts { + if _, ok := opt.(*disableGlobalDialOptions); ok { + disableGlobalOpts = true + break + } + } + + if !disableGlobalOpts { + for _, opt := range globalDialOptions { + opt.apply(&cc.dopts) + } + } for _, opt := range opts { opt.apply(&cc.dopts) @@ -159,40 +187,11 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn * } }() - pid := cc.dopts.channelzParentID - cc.channelzID = channelz.RegisterChannel(&channelzChannel{cc}, pid, target) - ted := &channelz.TraceEventDesc{ - Desc: "Channel created", - Severity: channelz.CtInfo, - } - if cc.dopts.channelzParentID != nil { - ted.Parent = &channelz.TraceEventDesc{ - Desc: fmt.Sprintf("Nested Channel(id:%d) created", cc.channelzID.Int()), - Severity: channelz.CtInfo, - } - } - channelz.AddTraceEvent(logger, cc.channelzID, 1, ted) - cc.csMgr.channelzID = cc.channelzID + // Register ClientConn with channelz. + cc.channelzRegistration(target) - if cc.dopts.copts.TransportCredentials == nil && cc.dopts.copts.CredsBundle == nil { - return nil, errNoTransportSecurity - } - if cc.dopts.copts.TransportCredentials != nil && cc.dopts.copts.CredsBundle != nil { - return nil, errTransportCredsAndBundle - } - if cc.dopts.copts.CredsBundle != nil && cc.dopts.copts.CredsBundle.TransportCredentials() == nil { - return nil, errNoTransportCredsInBundle - } - transportCreds := cc.dopts.copts.TransportCredentials - if transportCreds == nil { - transportCreds = cc.dopts.copts.CredsBundle.TransportCredentials() - } - if transportCreds.Info().SecurityProtocol == "insecure" { - for _, cd := range cc.dopts.copts.PerRPCCredentials { - if cd.RequireTransportSecurity() { - return nil, errTransportCredentialsMissing - } - } + if err := cc.validateTransportCredentials(); err != nil { + return nil, err } if cc.dopts.defaultServiceConfigRawJSON != nil { @@ -230,35 +229,19 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn * } }() - scSet := false - if cc.dopts.scChan != nil { - // Try to get an initial service config. - select { - case sc, ok := <-cc.dopts.scChan: - if ok { - cc.sc = &sc - cc.safeConfigSelector.UpdateConfigSelector(&defaultConfigSelector{&sc}) - scSet = true - } - default: - } - } if cc.dopts.bs == nil { cc.dopts.bs = backoff.DefaultExponential } // Determine the resolver to use. - resolverBuilder, err := cc.parseTargetAndFindResolver() - if err != nil { + if err := cc.parseTargetAndFindResolver(); err != nil { return nil, err } - cc.authority, err = determineAuthority(cc.parsedTarget.Endpoint, cc.target, cc.dopts) - if err != nil { + if err = cc.determineAuthority(); err != nil { return nil, err } - channelz.Infof(logger, cc.channelzID, "Channel authority set to %q", cc.authority) - if cc.dopts.scChan != nil && !scSet { + if cc.dopts.scChan != nil { // Blocking wait for the initial service config. select { case sc, ok := <-cc.dopts.scChan: @@ -274,57 +257,224 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn * go cc.scWatcher() } + // This creates the name resolver, load balancer, blocking picker etc. + if err := cc.exitIdleMode(); err != nil { + return nil, err + } + + // Configure idleness support with configured idle timeout or default idle + // timeout duration. Idleness can be explicitly disabled by the user, by + // setting the dial option to 0. + cc.idlenessMgr = newIdlenessManager(cc, cc.dopts.idleTimeout) + + // Return early for non-blocking dials. + if !cc.dopts.block { + return cc, nil + } + + // A blocking dial blocks until the clientConn is ready. + for { + s := cc.GetState() + if s == connectivity.Idle { + cc.Connect() + } + if s == connectivity.Ready { + return cc, nil + } else if cc.dopts.copts.FailOnNonTempDialError && s == connectivity.TransientFailure { + if err = cc.connectionError(); err != nil { + terr, ok := err.(interface { + Temporary() bool + }) + if ok && !terr.Temporary() { + return nil, err + } + } + } + if !cc.WaitForStateChange(ctx, s) { + // ctx got timeout or canceled. + if err = cc.connectionError(); err != nil && cc.dopts.returnLastError { + return nil, err + } + return nil, ctx.Err() + } + } +} + +// addTraceEvent is a helper method to add a trace event on the channel. If the +// channel is a nested one, the same event is also added on the parent channel. +func (cc *ClientConn) addTraceEvent(msg string) { + ted := &channelz.TraceEventDesc{ + Desc: fmt.Sprintf("Channel %s", msg), + Severity: channelz.CtInfo, + } + if cc.dopts.channelzParentID != nil { + ted.Parent = &channelz.TraceEventDesc{ + Desc: fmt.Sprintf("Nested channel(id:%d) %s", cc.channelzID.Int(), msg), + Severity: channelz.CtInfo, + } + } + channelz.AddTraceEvent(logger, cc.channelzID, 0, ted) +} + +// exitIdleMode moves the channel out of idle mode by recreating the name +// resolver and load balancer. +func (cc *ClientConn) exitIdleMode() error { + cc.mu.Lock() + if cc.conns == nil { + cc.mu.Unlock() + return errConnClosing + } + if cc.idlenessState != ccIdlenessStateIdle { + cc.mu.Unlock() + logger.Info("ClientConn asked to exit idle mode when not in idle mode") + return nil + } + + defer func() { + // When Close() and exitIdleMode() race against each other, one of the + // following two can happen: + // - Close() wins the race and runs first. exitIdleMode() runs after, and + // sees that the ClientConn is already closed and hence returns early. + // - exitIdleMode() wins the race and runs first and recreates the balancer + // and releases the lock before recreating the resolver. If Close() runs + // in this window, it will wait for exitIdleMode to complete. + // + // We achieve this synchronization using the below condition variable. + cc.mu.Lock() + cc.idlenessState = ccIdlenessStateActive + cc.exitIdleCond.Signal() + cc.mu.Unlock() + }() + + cc.idlenessState = ccIdlenessStateExitingIdle + exitedIdle := false + if cc.blockingpicker == nil { + cc.blockingpicker = newPickerWrapper() + } else { + cc.blockingpicker.exitIdleMode() + exitedIdle = true + } + var credsClone credentials.TransportCredentials if creds := cc.dopts.copts.TransportCredentials; creds != nil { credsClone = creds.Clone() } - cc.balancerWrapper = newCCBalancerWrapper(cc, balancer.BuildOptions{ - DialCreds: credsClone, - CredsBundle: cc.dopts.copts.CredsBundle, - Dialer: cc.dopts.copts.Dialer, - Authority: cc.authority, - CustomUserAgent: cc.dopts.copts.UserAgent, - ChannelzParentID: cc.channelzID, - Target: cc.parsedTarget, - }) + if cc.balancerWrapper == nil { + cc.balancerWrapper = newCCBalancerWrapper(cc, balancer.BuildOptions{ + DialCreds: credsClone, + CredsBundle: cc.dopts.copts.CredsBundle, + Dialer: cc.dopts.copts.Dialer, + Authority: cc.authority, + CustomUserAgent: cc.dopts.copts.UserAgent, + ChannelzParentID: cc.channelzID, + Target: cc.parsedTarget, + }) + } else { + cc.balancerWrapper.exitIdleMode() + } + cc.firstResolveEvent = grpcsync.NewEvent() + cc.mu.Unlock() - // Build the resolver. - rWrapper, err := newCCResolverWrapper(cc, resolverBuilder) - if err != nil { - return nil, fmt.Errorf("failed to build resolver: %v", err) + // This needs to be called without cc.mu because this builds a new resolver + // which might update state or report error inline which needs to be handled + // by cc.updateResolverState() which also grabs cc.mu. + if err := cc.initResolverWrapper(credsClone); err != nil { + return err + } + + if exitedIdle { + cc.addTraceEvent("exiting idle mode") } + return nil +} + +// enterIdleMode puts the channel in idle mode, and as part of it shuts down the +// name resolver, load balancer and any subchannels. +func (cc *ClientConn) enterIdleMode() error { cc.mu.Lock() - cc.resolverWrapper = rWrapper + if cc.conns == nil { + cc.mu.Unlock() + return ErrClientConnClosing + } + if cc.idlenessState != ccIdlenessStateActive { + logger.Error("ClientConn asked to enter idle mode when not active") + return nil + } + + // cc.conns == nil is a proxy for the ClientConn being closed. So, instead + // of setting it to nil here, we recreate the map. This also means that we + // don't have to do this when exiting idle mode. + conns := cc.conns + cc.conns = make(map[*addrConn]struct{}) + + // TODO: Currently, we close the resolver wrapper upon entering idle mode + // and create a new one upon exiting idle mode. This means that the + // `cc.resolverWrapper` field would be overwritten everytime we exit idle + // mode. While this means that we need to hold `cc.mu` when accessing + // `cc.resolverWrapper`, it makes the code simpler in the wrapper. We should + // try to do the same for the balancer and picker wrappers too. + cc.resolverWrapper.close() + cc.blockingpicker.enterIdleMode() + cc.balancerWrapper.enterIdleMode() + cc.csMgr.updateState(connectivity.Idle) + cc.idlenessState = ccIdlenessStateIdle cc.mu.Unlock() - // A blocking dial blocks until the clientConn is ready. - if cc.dopts.block { - for { - cc.Connect() - s := cc.GetState() - if s == connectivity.Ready { - break - } else if cc.dopts.copts.FailOnNonTempDialError && s == connectivity.TransientFailure { - if err = cc.connectionError(); err != nil { - terr, ok := err.(interface { - Temporary() bool - }) - if ok && !terr.Temporary() { - return nil, err - } - } - } - if !cc.WaitForStateChange(ctx, s) { - // ctx got timeout or canceled. - if err = cc.connectionError(); err != nil && cc.dopts.returnLastError { - return nil, err - } - return nil, ctx.Err() + go func() { + cc.addTraceEvent("entering idle mode") + for ac := range conns { + ac.tearDown(errConnIdling) + } + }() + return nil +} + +// validateTransportCredentials performs a series of checks on the configured +// transport credentials. It returns a non-nil error if any of these conditions +// are met: +// - no transport creds and no creds bundle is configured +// - both transport creds and creds bundle are configured +// - creds bundle is configured, but it lacks a transport credentials +// - insecure transport creds configured alongside call creds that require +// transport level security +// +// If none of the above conditions are met, the configured credentials are +// deemed valid and a nil error is returned. +func (cc *ClientConn) validateTransportCredentials() error { + if cc.dopts.copts.TransportCredentials == nil && cc.dopts.copts.CredsBundle == nil { + return errNoTransportSecurity + } + if cc.dopts.copts.TransportCredentials != nil && cc.dopts.copts.CredsBundle != nil { + return errTransportCredsAndBundle + } + if cc.dopts.copts.CredsBundle != nil && cc.dopts.copts.CredsBundle.TransportCredentials() == nil { + return errNoTransportCredsInBundle + } + transportCreds := cc.dopts.copts.TransportCredentials + if transportCreds == nil { + transportCreds = cc.dopts.copts.CredsBundle.TransportCredentials() + } + if transportCreds.Info().SecurityProtocol == "insecure" { + for _, cd := range cc.dopts.copts.PerRPCCredentials { + if cd.RequireTransportSecurity() { + return errTransportCredentialsMissing } } } + return nil +} - return cc, nil +// channelzRegistration registers the newly created ClientConn with channelz and +// stores the returned identifier in `cc.channelzID` and `cc.csMgr.channelzID`. +// A channelz trace event is emitted for ClientConn creation. If the newly +// created ClientConn is a nested one, i.e a valid parent ClientConn ID is +// specified via a dial option, the trace event is also added to the parent. +// +// Doesn't grab cc.mu as this method is expected to be called only at Dial time. +func (cc *ClientConn) channelzRegistration(target string) { + cc.channelzID = channelz.RegisterChannel(&channelzChannel{cc}, cc.dopts.channelzParentID, target) + cc.addTraceEvent("created") + cc.csMgr.channelzID = cc.channelzID } // chainUnaryClientInterceptors chains all unary client interceptors into one. @@ -470,7 +620,9 @@ type ClientConn struct { authority string // See determineAuthority(). dopts dialOptions // Default and user specified dial options. channelzID *channelz.Identifier // Channelz identifier for the channel. + resolverBuilder resolver.Builder // See parseTargetAndFindResolver(). balancerWrapper *ccBalancerWrapper // Uses gracefulswitch.balancer underneath. + idlenessMgr idlenessManager // The following provide their own synchronization, and therefore don't // require cc.mu to be held to access them. @@ -491,15 +643,35 @@ type ClientConn struct { sc *ServiceConfig // Latest service config received from the resolver. conns map[*addrConn]struct{} // Set to nil on close. mkp keepalive.ClientParameters // May be updated upon receipt of a GoAway. + idlenessState ccIdlenessState // Tracks idleness state of the channel. + exitIdleCond *sync.Cond // Signalled when channel exits idle. lceMu sync.Mutex // protects lastConnectionError lastConnectionError error } +// ccIdlenessState tracks the idleness state of the channel. +// +// Channels start off in `active` and move to `idle` after a period of +// inactivity. When moving back to `active` upon an incoming RPC, they +// transition through `exiting_idle`. This state is useful for synchronization +// with Close(). +// +// This state tracking is mostly for self-protection. The idlenessManager is +// expected to keep track of the state as well, and is expected not to call into +// the ClientConn unnecessarily. +type ccIdlenessState int8 + +const ( + ccIdlenessStateActive ccIdlenessState = iota + ccIdlenessStateIdle + ccIdlenessStateExitingIdle +) + // WaitForStateChange waits until the connectivity.State of ClientConn changes from sourceState or // ctx expires. A true value is returned in former case and false in latter. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -518,7 +690,7 @@ func (cc *ClientConn) WaitForStateChange(ctx context.Context, sourceState connec // GetState returns the connectivity.State of ClientConn. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a later // release. @@ -530,12 +702,15 @@ func (cc *ClientConn) GetState() connectivity.State { // the channel is idle. Does not wait for the connection attempts to begin // before returning. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a later // release. func (cc *ClientConn) Connect() { - cc.balancerWrapper.exitIdle() + cc.exitIdleMode() + // If the ClientConn was not in idle mode, we need to call ExitIdle on the + // LB policy so that connections can be created. + cc.balancerWrapper.exitIdleMode() } func (cc *ClientConn) scWatcher() { @@ -704,12 +879,13 @@ func (cc *ClientConn) newAddrConn(addrs []resolver.Address, opts balancer.NewSub dopts: cc.dopts, czData: new(channelzData), resetBackoff: make(chan struct{}), + stateChan: make(chan struct{}), } ac.ctx, ac.cancel = context.WithCancel(cc.ctx) // Track ac in cc. This needs to be done before any getTransport(...) is called. cc.mu.Lock() + defer cc.mu.Unlock() if cc.conns == nil { - cc.mu.Unlock() return nil, ErrClientConnClosing } @@ -728,7 +904,6 @@ func (cc *ClientConn) newAddrConn(addrs []resolver.Address, opts balancer.NewSub }) cc.conns[ac] = struct{}{} - cc.mu.Unlock() return ac, nil } @@ -758,7 +933,7 @@ func (cc *ClientConn) channelzMetric() *channelz.ChannelInternalMetric { // Target returns the target string of the ClientConn. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -785,16 +960,19 @@ func (cc *ClientConn) incrCallsFailed() { func (ac *addrConn) connect() error { ac.mu.Lock() if ac.state == connectivity.Shutdown { + if logger.V(2) { + logger.Infof("connect called on shutdown addrConn; ignoring.") + } ac.mu.Unlock() return errConnClosing } if ac.state != connectivity.Idle { + if logger.V(2) { + logger.Infof("connect called on addrConn in non-idle state (%v); ignoring.", ac.state) + } ac.mu.Unlock() return nil } - // Update connectivity state within the lock to prevent subsequent or - // concurrent calls from resetting the transport more than once. - ac.updateConnectivityState(connectivity.Connecting, nil) ac.mu.Unlock() ac.resetTransport() @@ -813,58 +991,62 @@ func equalAddresses(a, b []resolver.Address) bool { return true } -// tryUpdateAddrs tries to update ac.addrs with the new addresses list. -// -// If ac is TransientFailure, it updates ac.addrs and returns true. The updated -// addresses will be picked up by retry in the next iteration after backoff. -// -// If ac is Shutdown or Idle, it updates ac.addrs and returns true. -// -// If the addresses is the same as the old list, it does nothing and returns -// true. -// -// If ac is Connecting, it returns false. The caller should tear down the ac and -// create a new one. Note that the backoff will be reset when this happens. -// -// If ac is Ready, it checks whether current connected address of ac is in the -// new addrs list. -// - If true, it updates ac.addrs and returns true. The ac will keep using -// the existing connection. -// - If false, it does nothing and returns false. -func (ac *addrConn) tryUpdateAddrs(addrs []resolver.Address) bool { +// updateAddrs updates ac.addrs with the new addresses list and handles active +// connections or connection attempts. +func (ac *addrConn) updateAddrs(addrs []resolver.Address) { ac.mu.Lock() - defer ac.mu.Unlock() - channelz.Infof(logger, ac.channelzID, "addrConn: tryUpdateAddrs curAddr: %v, addrs: %v", ac.curAddr, addrs) + channelz.Infof(logger, ac.channelzID, "addrConn: updateAddrs curAddr: %v, addrs: %v", ac.curAddr, addrs) + + if equalAddresses(ac.addrs, addrs) { + ac.mu.Unlock() + return + } + + ac.addrs = addrs + if ac.state == connectivity.Shutdown || ac.state == connectivity.TransientFailure || ac.state == connectivity.Idle { - ac.addrs = addrs - return true + // We were not connecting, so do nothing but update the addresses. + ac.mu.Unlock() + return } - if equalAddresses(ac.addrs, addrs) { - return true + if ac.state == connectivity.Ready { + // Try to find the connected address. + for _, a := range addrs { + a.ServerName = ac.cc.getServerName(a) + if a.Equal(ac.curAddr) { + // We are connected to a valid address, so do nothing but + // update the addresses. + ac.mu.Unlock() + return + } + } } - if ac.state == connectivity.Connecting { - return false - } + // We are either connected to the wrong address or currently connecting. + // Stop the current iteration and restart. - // ac.state is Ready, try to find the connected address. - var curAddrFound bool - for _, a := range addrs { - a.ServerName = ac.cc.getServerName(a) - if reflect.DeepEqual(ac.curAddr, a) { - curAddrFound = true - break - } + ac.cancel() + ac.ctx, ac.cancel = context.WithCancel(ac.cc.ctx) + + // We have to defer here because GracefulClose => Close => onClose, which + // requires locking ac.mu. + if ac.transport != nil { + defer ac.transport.GracefulClose() + ac.transport = nil } - channelz.Infof(logger, ac.channelzID, "addrConn: tryUpdateAddrs curAddrFound: %v", curAddrFound) - if curAddrFound { - ac.addrs = addrs + + if len(addrs) == 0 { + ac.updateConnectivityState(connectivity.Idle, nil) } - return curAddrFound + ac.mu.Unlock() + + // Since we were connecting/connected, we should start a new connection + // attempt. + go ac.resetTransport() } // getServerName determines the serverName to be used in the connection @@ -925,7 +1107,7 @@ func (cc *ClientConn) healthCheckConfig() *healthCheckConfig { return cc.sc.healthCheckConfig } -func (cc *ClientConn) getTransport(ctx context.Context, failfast bool, method string) (transport.ClientTransport, func(balancer.DoneInfo), error) { +func (cc *ClientConn) getTransport(ctx context.Context, failfast bool, method string) (transport.ClientTransport, balancer.PickResult, error) { return cc.blockingpicker.pick(ctx, failfast, balancer.PickInfo{ Ctx: ctx, FullMethodName: method, @@ -995,7 +1177,7 @@ func (cc *ClientConn) resolveNow(o resolver.ResolveNowOptions) { // However, if a previously unavailable network becomes available, this may be // used to trigger an immediate reconnect. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -1017,39 +1199,40 @@ func (cc *ClientConn) Close() error { cc.mu.Unlock() return ErrClientConnClosing } + + for cc.idlenessState == ccIdlenessStateExitingIdle { + cc.exitIdleCond.Wait() + } + conns := cc.conns cc.conns = nil cc.csMgr.updateState(connectivity.Shutdown) + pWrapper := cc.blockingpicker rWrapper := cc.resolverWrapper - cc.resolverWrapper = nil bWrapper := cc.balancerWrapper + idlenessMgr := cc.idlenessMgr cc.mu.Unlock() // The order of closing matters here since the balancer wrapper assumes the // picker is closed before it is closed. - cc.blockingpicker.close() + if pWrapper != nil { + pWrapper.close() + } if bWrapper != nil { bWrapper.close() } if rWrapper != nil { rWrapper.close() } + if idlenessMgr != nil { + idlenessMgr.close() + } for ac := range conns { ac.tearDown(ErrClientConnClosing) } - ted := &channelz.TraceEventDesc{ - Desc: "Channel deleted", - Severity: channelz.CtInfo, - } - if cc.dopts.channelzParentID != nil { - ted.Parent = &channelz.TraceEventDesc{ - Desc: fmt.Sprintf("Nested channel(id:%d) deleted", cc.channelzID.Int()), - Severity: channelz.CtInfo, - } - } - channelz.AddTraceEvent(logger, cc.channelzID, 0, ted) + cc.addTraceEvent("deleted") // TraceEvent needs to be called before RemoveEntry, as TraceEvent may add // trace reference to the entity being deleted, and thus prevent it from being // deleted right away. @@ -1079,7 +1262,8 @@ type addrConn struct { addrs []resolver.Address // All addresses that the resolver resolved to. // Use updateConnectivityState for updating addrConn's connectivity state. - state connectivity.State + state connectivity.State + stateChan chan struct{} // closed and recreated on every state change. backoffIdx int // Needs to be stateful for resetConnectBackoff. resetBackoff chan struct{} @@ -1093,8 +1277,15 @@ func (ac *addrConn) updateConnectivityState(s connectivity.State, lastErr error) if ac.state == s { return } + // When changing states, reset the state change channel. + close(ac.stateChan) + ac.stateChan = make(chan struct{}) ac.state = s - channelz.Infof(logger, ac.channelzID, "Subchannel Connectivity change to %v", s) + if lastErr == nil { + channelz.Infof(logger, ac.channelzID, "Subchannel Connectivity change to %v", s) + } else { + channelz.Infof(logger, ac.channelzID, "Subchannel Connectivity change to %v, last error: %s", s, lastErr) + } ac.cc.handleSubConnStateChange(ac.acbw, s, lastErr) } @@ -1114,7 +1305,8 @@ func (ac *addrConn) adjustParams(r transport.GoAwayReason) { func (ac *addrConn) resetTransport() { ac.mu.Lock() - if ac.state == connectivity.Shutdown { + acCtx := ac.ctx + if acCtx.Err() != nil { ac.mu.Unlock() return } @@ -1142,15 +1334,14 @@ func (ac *addrConn) resetTransport() { ac.updateConnectivityState(connectivity.Connecting, nil) ac.mu.Unlock() - if err := ac.tryAllAddrs(addrs, connectDeadline); err != nil { + if err := ac.tryAllAddrs(acCtx, addrs, connectDeadline); err != nil { ac.cc.resolveNow(resolver.ResolveNowOptions{}) // After exhausting all addresses, the addrConn enters // TRANSIENT_FAILURE. - ac.mu.Lock() - if ac.state == connectivity.Shutdown { - ac.mu.Unlock() + if acCtx.Err() != nil { return } + ac.mu.Lock() ac.updateConnectivityState(connectivity.TransientFailure, err) // Backoff. @@ -1165,13 +1356,13 @@ func (ac *addrConn) resetTransport() { ac.mu.Unlock() case <-b: timer.Stop() - case <-ac.ctx.Done(): + case <-acCtx.Done(): timer.Stop() return } ac.mu.Lock() - if ac.state != connectivity.Shutdown { + if acCtx.Err() == nil { ac.updateConnectivityState(connectivity.Idle, err) } ac.mu.Unlock() @@ -1186,14 +1377,13 @@ func (ac *addrConn) resetTransport() { // tryAllAddrs tries to creates a connection to the addresses, and stop when at // the first successful one. It returns an error if no address was successfully // connected, or updates ac appropriately with the new transport. -func (ac *addrConn) tryAllAddrs(addrs []resolver.Address, connectDeadline time.Time) error { +func (ac *addrConn) tryAllAddrs(ctx context.Context, addrs []resolver.Address, connectDeadline time.Time) error { var firstConnErr error for _, addr := range addrs { - ac.mu.Lock() - if ac.state == connectivity.Shutdown { - ac.mu.Unlock() + if ctx.Err() != nil { return errConnClosing } + ac.mu.Lock() ac.cc.mu.RLock() ac.dopts.copts.KeepaliveParams = ac.cc.mkp @@ -1207,7 +1397,7 @@ func (ac *addrConn) tryAllAddrs(addrs []resolver.Address, connectDeadline time.T channelz.Infof(logger, ac.channelzID, "Subchannel picks a new address %q to connect", addr.Addr) - err := ac.createTransport(addr, copts, connectDeadline) + err := ac.createTransport(ctx, addr, copts, connectDeadline) if err == nil { return nil } @@ -1224,112 +1414,84 @@ func (ac *addrConn) tryAllAddrs(addrs []resolver.Address, connectDeadline time.T // createTransport creates a connection to addr. It returns an error if the // address was not successfully connected, or updates ac appropriately with the // new transport. -func (ac *addrConn) createTransport(addr resolver.Address, copts transport.ConnectOptions, connectDeadline time.Time) error { - // TODO: Delete prefaceReceived and move the logic to wait for it into the - // transport. - prefaceReceived := grpcsync.NewEvent() - connClosed := grpcsync.NewEvent() - +func (ac *addrConn) createTransport(ctx context.Context, addr resolver.Address, copts transport.ConnectOptions, connectDeadline time.Time) error { addr.ServerName = ac.cc.getServerName(addr) - hctx, hcancel := context.WithCancel(ac.ctx) - hcStarted := false // protected by ac.mu + hctx, hcancel := context.WithCancel(ctx) - onClose := func() { + onClose := func(r transport.GoAwayReason) { ac.mu.Lock() defer ac.mu.Unlock() - defer connClosed.Fire() - defer hcancel() - if !hcStarted || hctx.Err() != nil { - // We didn't start the health check or set the state to READY, so - // no need to do anything else here. - // - // OR, we have already cancelled the health check context, meaning - // we have already called onClose once for this transport. In this - // case it would be dangerous to clear the transport and update the - // state, since there may be a new transport in this addrConn. + // adjust params based on GoAwayReason + ac.adjustParams(r) + if ctx.Err() != nil { + // Already shut down or connection attempt canceled. tearDown() or + // updateAddrs() already cleared the transport and canceled hctx + // via ac.ctx, and we expected this connection to be closed, so do + // nothing here. + return + } + hcancel() + if ac.transport == nil { + // We're still connecting to this address, which could error. Do + // not update the connectivity state or resolve; these will happen + // at the end of the tryAllAddrs connection loop in the event of an + // error. return } ac.transport = nil - // Refresh the name resolver + // Refresh the name resolver on any connection loss. ac.cc.resolveNow(resolver.ResolveNowOptions{}) - if ac.state != connectivity.Shutdown { - ac.updateConnectivityState(connectivity.Idle, nil) - } + // Always go idle and wait for the LB policy to initiate a new + // connection attempt. + ac.updateConnectivityState(connectivity.Idle, nil) } - onGoAway := func(r transport.GoAwayReason) { - ac.mu.Lock() - ac.adjustParams(r) - ac.mu.Unlock() - onClose() - } - - connectCtx, cancel := context.WithDeadline(ac.ctx, connectDeadline) + connectCtx, cancel := context.WithDeadline(ctx, connectDeadline) defer cancel() copts.ChannelzParentID = ac.channelzID - newTr, err := transport.NewClientTransport(connectCtx, ac.cc.ctx, addr, copts, func() { prefaceReceived.Fire() }, onGoAway, onClose) + newTr, err := transport.NewClientTransport(connectCtx, ac.cc.ctx, addr, copts, onClose) if err != nil { + if logger.V(2) { + logger.Infof("Creating new client transport to %q: %v", addr, err) + } // newTr is either nil, or closed. hcancel() channelz.Warningf(logger, ac.channelzID, "grpc: addrConn.createTransport failed to connect to %s. Err: %v", addr, err) return err } - select { - case <-connectCtx.Done(): - // We didn't get the preface in time. + ac.mu.Lock() + defer ac.mu.Unlock() + if ctx.Err() != nil { + // This can happen if the subConn was removed while in `Connecting` + // state. tearDown() would have set the state to `Shutdown`, but + // would not have closed the transport since ac.transport would not + // have been set at that point. + // + // We run this in a goroutine because newTr.Close() calls onClose() + // inline, which requires locking ac.mu. + // // The error we pass to Close() is immaterial since there are no open // streams at this point, so no trailers with error details will be sent // out. We just need to pass a non-nil error. - newTr.Close(transport.ErrConnClosing) - if connectCtx.Err() == context.DeadlineExceeded { - err := errors.New("failed to receive server preface within timeout") - channelz.Warningf(logger, ac.channelzID, "grpc: addrConn.createTransport failed to connect to %s: %v", addr, err) - return err - } + // + // This can also happen when updateAddrs is called during a connection + // attempt. + go newTr.Close(transport.ErrConnClosing) return nil - case <-prefaceReceived.Done(): - // We got the preface - huzzah! things are good. - ac.mu.Lock() - defer ac.mu.Unlock() - if connClosed.HasFired() { - // onClose called first; go idle but do nothing else. - if ac.state != connectivity.Shutdown { - ac.updateConnectivityState(connectivity.Idle, nil) - } - return nil - } - if ac.state == connectivity.Shutdown { - // This can happen if the subConn was removed while in `Connecting` - // state. tearDown() would have set the state to `Shutdown`, but - // would not have closed the transport since ac.transport would not - // been set at that point. - // - // We run this in a goroutine because newTr.Close() calls onClose() - // inline, which requires locking ac.mu. - // - // The error we pass to Close() is immaterial since there are no open - // streams at this point, so no trailers with error details will be sent - // out. We just need to pass a non-nil error. - go newTr.Close(transport.ErrConnClosing) - return nil - } - ac.curAddr = addr - ac.transport = newTr - hcStarted = true - ac.startHealthCheck(hctx) // Will set state to READY if appropriate. + } + if hctx.Err() != nil { + // onClose was already called for this connection, but the connection + // was successfully established first. Consider it a success and set + // the new state to Idle. + ac.updateConnectivityState(connectivity.Idle, nil) return nil - case <-connClosed.Done(): - // The transport has already closed. If we received the preface, too, - // this is not an error. - select { - case <-prefaceReceived.Done(): - return nil - default: - return errors.New("connection closed before server preface received") - } } + ac.curAddr = addr + ac.transport = newTr + ac.startHealthCheck(hctx) // Will set state to READY if appropriate. + return nil } // startHealthCheck starts the health checking stream (RPC) to watch the health @@ -1399,7 +1561,7 @@ func (ac *addrConn) startHealthCheck(ctx context.Context) { if status.Code(err) == codes.Unimplemented { channelz.Error(logger, ac.channelzID, "Subchannel health check is unimplemented at server side, thus health check is disabled") } else { - channelz.Errorf(logger, ac.channelzID, "HealthCheckFunc exits with unexpected error %v", err) + channelz.Errorf(logger, ac.channelzID, "Health checking failed: %v", err) } } }() @@ -1423,6 +1585,29 @@ func (ac *addrConn) getReadyTransport() transport.ClientTransport { return nil } +// getTransport waits until the addrconn is ready and returns the transport. +// If the context expires first, returns an appropriate status. If the +// addrConn is stopped first, returns an Unavailable status error. +func (ac *addrConn) getTransport(ctx context.Context) (transport.ClientTransport, error) { + for ctx.Err() == nil { + ac.mu.Lock() + t, state, sc := ac.transport, ac.state, ac.stateChan + ac.mu.Unlock() + if state == connectivity.Ready { + return t, nil + } + if state == connectivity.Shutdown { + return nil, status.Errorf(codes.Unavailable, "SubConn shutting down") + } + + select { + case <-ctx.Done(): + case <-sc: + } + } + return nil, status.FromContextError(ctx.Err()).Err() +} + // tearDown starts to tear down the addrConn. // // Note that tearDown doesn't remove ac from ac.cc.conns, so the addrConn struct @@ -1550,6 +1735,9 @@ func (c *channelzChannel) ChannelzMetric() *channelz.ChannelInternalMetric { // referenced by users. var ErrClientConnTimeout = errors.New("grpc: timed out when dialing") +// getResolver finds the scheme in the cc's resolvers or the global registry. +// scheme should always be lowercase (typically by virtue of url.Parse() +// performing proper RFC3986 behavior). func (cc *ClientConn) getResolver(scheme string) resolver.Builder { for _, rb := range cc.dopts.resolvers { if scheme == rb.Scheme() { @@ -1571,7 +1759,14 @@ func (cc *ClientConn) connectionError() error { return cc.lastConnectionError } -func (cc *ClientConn) parseTargetAndFindResolver() (resolver.Builder, error) { +// parseTargetAndFindResolver parses the user's dial target and stores the +// parsed target in `cc.parsedTarget`. +// +// The resolver to use is determined based on the scheme in the parsed target +// and the same is stored in `cc.resolverBuilder`. +// +// Doesn't grab cc.mu as this method is expected to be called only at Dial time. +func (cc *ClientConn) parseTargetAndFindResolver() error { channelz.Infof(logger, cc.channelzID, "original dial target is: %q", cc.target) var rb resolver.Builder @@ -1580,10 +1775,11 @@ func (cc *ClientConn) parseTargetAndFindResolver() (resolver.Builder, error) { channelz.Infof(logger, cc.channelzID, "dial target %q parse failed: %v", cc.target, err) } else { channelz.Infof(logger, cc.channelzID, "parsed dial target is: %+v", parsedTarget) - rb = cc.getResolver(parsedTarget.Scheme) + rb = cc.getResolver(parsedTarget.URL.Scheme) if rb != nil { cc.parsedTarget = parsedTarget - return rb, nil + cc.resolverBuilder = rb + return nil } } @@ -1598,42 +1794,30 @@ func (cc *ClientConn) parseTargetAndFindResolver() (resolver.Builder, error) { parsedTarget, err = parseTarget(canonicalTarget) if err != nil { channelz.Infof(logger, cc.channelzID, "dial target %q parse failed: %v", canonicalTarget, err) - return nil, err + return err } channelz.Infof(logger, cc.channelzID, "parsed dial target is: %+v", parsedTarget) - rb = cc.getResolver(parsedTarget.Scheme) + rb = cc.getResolver(parsedTarget.URL.Scheme) if rb == nil { - return nil, fmt.Errorf("could not get resolver for default scheme: %q", parsedTarget.Scheme) + return fmt.Errorf("could not get resolver for default scheme: %q", parsedTarget.URL.Scheme) } cc.parsedTarget = parsedTarget - return rb, nil + cc.resolverBuilder = rb + return nil } // parseTarget uses RFC 3986 semantics to parse the given target into a -// resolver.Target struct containing scheme, authority and endpoint. Query +// resolver.Target struct containing scheme, authority and url. Query // params are stripped from the endpoint. func parseTarget(target string) (resolver.Target, error) { u, err := url.Parse(target) if err != nil { return resolver.Target{}, err } - // For targets of the form "[scheme]://[authority]/endpoint, the endpoint - // value returned from url.Parse() contains a leading "/". Although this is - // in accordance with RFC 3986, we do not want to break existing resolver - // implementations which expect the endpoint without the leading "/". So, we - // end up stripping the leading "/" here. But this will result in an - // incorrect parsing for something like "unix:///path/to/socket". Since we - // own the "unix" resolver, we can workaround in the unix resolver by using - // the `URL` field instead of the `Endpoint` field. - endpoint := u.Path - if endpoint == "" { - endpoint = u.Opaque - } - endpoint = strings.TrimPrefix(endpoint, "/") + return resolver.Target{ Scheme: u.Scheme, Authority: u.Host, - Endpoint: endpoint, URL: *u, }, nil } @@ -1642,7 +1826,15 @@ func parseTarget(target string) (resolver.Target, error) { // - user specified authority override using `WithAuthority` dial option // - creds' notion of server name for the authentication handshake // - endpoint from dial target of the form "scheme://[authority]/endpoint" -func determineAuthority(endpoint, target string, dopts dialOptions) (string, error) { +// +// Stores the determined authority in `cc.authority`. +// +// Returns a non-nil error if the authority returned by the transport +// credentials do not match the authority configured through the dial option. +// +// Doesn't grab cc.mu as this method is expected to be called only at Dial time. +func (cc *ClientConn) determineAuthority() error { + dopts := cc.dopts // Historically, we had two options for users to specify the serverName or // authority for a channel. One was through the transport credentials // (either in its constructor, or through the OverrideServerName() method). @@ -1659,25 +1851,58 @@ func determineAuthority(endpoint, target string, dopts dialOptions) (string, err } authorityFromDialOption := dopts.authority if (authorityFromCreds != "" && authorityFromDialOption != "") && authorityFromCreds != authorityFromDialOption { - return "", fmt.Errorf("ClientConn's authority from transport creds %q and dial option %q don't match", authorityFromCreds, authorityFromDialOption) + return fmt.Errorf("ClientConn's authority from transport creds %q and dial option %q don't match", authorityFromCreds, authorityFromDialOption) } + endpoint := cc.parsedTarget.Endpoint() + target := cc.target switch { case authorityFromDialOption != "": - return authorityFromDialOption, nil + cc.authority = authorityFromDialOption case authorityFromCreds != "": - return authorityFromCreds, nil + cc.authority = authorityFromCreds case strings.HasPrefix(target, "unix:") || strings.HasPrefix(target, "unix-abstract:"): // TODO: remove when the unix resolver implements optional interface to // return channel authority. - return "localhost", nil + cc.authority = "localhost" case strings.HasPrefix(endpoint, ":"): - return "localhost" + endpoint, nil + cc.authority = "localhost" + endpoint default: // TODO: Define an optional interface on the resolver builder to return // the channel authority given the user's dial target. For resolvers // which don't implement this interface, we will use the endpoint from // "scheme://authority/endpoint" as the default authority. - return endpoint, nil + cc.authority = endpoint } + channelz.Infof(logger, cc.channelzID, "Channel authority set to %q", cc.authority) + return nil +} + +// initResolverWrapper creates a ccResolverWrapper, which builds the name +// resolver. This method grabs the lock to assign the newly built resolver +// wrapper to the cc.resolverWrapper field. +func (cc *ClientConn) initResolverWrapper(creds credentials.TransportCredentials) error { + rw, err := newCCResolverWrapper(cc, ccResolverWrapperOpts{ + target: cc.parsedTarget, + builder: cc.resolverBuilder, + bOpts: resolver.BuildOptions{ + DisableServiceConfig: cc.dopts.disableServiceConfig, + DialCreds: creds, + CredsBundle: cc.dopts.copts.CredsBundle, + Dialer: cc.dopts.copts.Dialer, + }, + channelzID: cc.channelzID, + }) + if err != nil { + return fmt.Errorf("failed to build resolver: %v", err) + } + // Resolver implementations may report state update or error inline when + // built (or right after), and this is handled in cc.updateResolverState. + // Also, an error from the resolver might lead to a re-resolution request + // from the balancer, which is handled in resolveNow() where + // `cc.resolverWrapper` is accessed. Hence, we need to hold the lock here. + cc.mu.Lock() + cc.resolverWrapper = rw + cc.mu.Unlock() + return nil } diff --git a/vendor/google.golang.org/grpc/codes/code_string.go b/vendor/google.golang.org/grpc/codes/code_string.go index 0b206a57822af..934fac2b090ae 100644 --- a/vendor/google.golang.org/grpc/codes/code_string.go +++ b/vendor/google.golang.org/grpc/codes/code_string.go @@ -18,7 +18,15 @@ package codes -import "strconv" +import ( + "strconv" + + "google.golang.org/grpc/internal" +) + +func init() { + internal.CanonicalString = canonicalString +} func (c Code) String() string { switch c { @@ -60,3 +68,44 @@ func (c Code) String() string { return "Code(" + strconv.FormatInt(int64(c), 10) + ")" } } + +func canonicalString(c Code) string { + switch c { + case OK: + return "OK" + case Canceled: + return "CANCELLED" + case Unknown: + return "UNKNOWN" + case InvalidArgument: + return "INVALID_ARGUMENT" + case DeadlineExceeded: + return "DEADLINE_EXCEEDED" + case NotFound: + return "NOT_FOUND" + case AlreadyExists: + return "ALREADY_EXISTS" + case PermissionDenied: + return "PERMISSION_DENIED" + case ResourceExhausted: + return "RESOURCE_EXHAUSTED" + case FailedPrecondition: + return "FAILED_PRECONDITION" + case Aborted: + return "ABORTED" + case OutOfRange: + return "OUT_OF_RANGE" + case Unimplemented: + return "UNIMPLEMENTED" + case Internal: + return "INTERNAL" + case Unavailable: + return "UNAVAILABLE" + case DataLoss: + return "DATA_LOSS" + case Unauthenticated: + return "UNAUTHENTICATED" + default: + return "CODE(" + strconv.FormatInt(int64(c), 10) + ")" + } +} diff --git a/vendor/google.golang.org/grpc/credentials/credentials.go b/vendor/google.golang.org/grpc/credentials/credentials.go index 96ff1877e7549..5feac3aa0e415 100644 --- a/vendor/google.golang.org/grpc/credentials/credentials.go +++ b/vendor/google.golang.org/grpc/credentials/credentials.go @@ -36,16 +36,16 @@ import ( // PerRPCCredentials defines the common interface for the credentials which need to // attach security information to every RPC (e.g., oauth2). type PerRPCCredentials interface { - // GetRequestMetadata gets the current request metadata, refreshing - // tokens if required. This should be called by the transport layer on - // each request, and the data should be populated in headers or other - // context. If a status code is returned, it will be used as the status - // for the RPC. uri is the URI of the entry point for the request. - // When supported by the underlying implementation, ctx can be used for - // timeout and cancellation. Additionally, RequestInfo data will be - // available via ctx to this call. - // TODO(zhaoq): Define the set of the qualified keys instead of leaving - // it as an arbitrary string. + // GetRequestMetadata gets the current request metadata, refreshing tokens + // if required. This should be called by the transport layer on each + // request, and the data should be populated in headers or other + // context. If a status code is returned, it will be used as the status for + // the RPC (restricted to an allowable set of codes as defined by gRFC + // A54). uri is the URI of the entry point for the request. When supported + // by the underlying implementation, ctx can be used for timeout and + // cancellation. Additionally, RequestInfo data will be available via ctx + // to this call. TODO(zhaoq): Define the set of the qualified keys instead + // of leaving it as an arbitrary string. GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) // RequireTransportSecurity indicates whether the credentials requires // transport security. diff --git a/vendor/google.golang.org/grpc/credentials/tls.go b/vendor/google.golang.org/grpc/credentials/tls.go index 784822d0560ad..877b7cd21af72 100644 --- a/vendor/google.golang.org/grpc/credentials/tls.go +++ b/vendor/google.golang.org/grpc/credentials/tls.go @@ -23,9 +23,9 @@ import ( "crypto/tls" "crypto/x509" "fmt" - "io/ioutil" "net" "net/url" + "os" credinternal "google.golang.org/grpc/internal/credentials" ) @@ -166,7 +166,7 @@ func NewClientTLSFromCert(cp *x509.CertPool, serverNameOverride string) Transpor // it will override the virtual host name of authority (e.g. :authority header // field) in requests. func NewClientTLSFromFile(certFile, serverNameOverride string) (TransportCredentials, error) { - b, err := ioutil.ReadFile(certFile) + b, err := os.ReadFile(certFile) if err != nil { return nil, err } @@ -195,7 +195,7 @@ func NewServerTLSFromFile(certFile, keyFile string) (TransportCredentials, error // TLSChannelzSecurityValue defines the struct that TLS protocol should return // from GetSecurityValue(), containing security info like cipher and certificate used. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/dialoptions.go b/vendor/google.golang.org/grpc/dialoptions.go index f2f605a17c47a..15a3d5102a9a2 100644 --- a/vendor/google.golang.org/grpc/dialoptions.go +++ b/vendor/google.golang.org/grpc/dialoptions.go @@ -29,12 +29,25 @@ import ( "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/internal" internalbackoff "google.golang.org/grpc/internal/backoff" + "google.golang.org/grpc/internal/binarylog" "google.golang.org/grpc/internal/transport" "google.golang.org/grpc/keepalive" "google.golang.org/grpc/resolver" "google.golang.org/grpc/stats" ) +func init() { + internal.AddGlobalDialOptions = func(opt ...DialOption) { + globalDialOptions = append(globalDialOptions, opt...) + } + internal.ClearGlobalDialOptions = func() { + globalDialOptions = nil + } + internal.WithBinaryLogger = withBinaryLogger + internal.JoinDialOptions = newJoinDialOption + internal.DisableGlobalDialOptions = newDisableGlobalDialOptions +} + // dialOptions configure a Dial call. dialOptions are set by the DialOption // values passed to Dial. type dialOptions struct { @@ -52,6 +65,7 @@ type dialOptions struct { timeout time.Duration scChan <-chan ServiceConfig authority string + binaryLogger binarylog.Logger copts transport.ConnectOptions callOptions []CallOption channelzParentID *channelz.Identifier @@ -63,6 +77,7 @@ type dialOptions struct { defaultServiceConfig *ServiceConfig // defaultServiceConfig is parsed from defaultServiceConfigRawJSON. defaultServiceConfigRawJSON *string resolvers []resolver.Builder + idleTimeout time.Duration } // DialOption configures how we set up the connection. @@ -70,10 +85,12 @@ type DialOption interface { apply(*dialOptions) } +var globalDialOptions []DialOption + // EmptyDialOption does not alter the dial configuration. It can be embedded in // another structure to build custom dial options. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -81,6 +98,16 @@ type EmptyDialOption struct{} func (EmptyDialOption) apply(*dialOptions) {} +type disableGlobalDialOptions struct{} + +func (disableGlobalDialOptions) apply(*dialOptions) {} + +// newDisableGlobalDialOptions returns a DialOption that prevents the ClientConn +// from applying the global DialOptions (set via AddGlobalDialOptions). +func newDisableGlobalDialOptions() DialOption { + return &disableGlobalDialOptions{} +} + // funcDialOption wraps a function that modifies dialOptions into an // implementation of the DialOption interface. type funcDialOption struct { @@ -97,13 +124,28 @@ func newFuncDialOption(f func(*dialOptions)) *funcDialOption { } } +type joinDialOption struct { + opts []DialOption +} + +func (jdo *joinDialOption) apply(do *dialOptions) { + for _, opt := range jdo.opts { + opt.apply(do) + } +} + +func newJoinDialOption(opts ...DialOption) DialOption { + return &joinDialOption{opts: opts} +} + // WithWriteBufferSize determines how much data can be batched before doing a // write on the wire. The corresponding memory allocation for this buffer will // be twice the size to keep syscalls low. The default value for this buffer is // 32KB. // -// Zero will disable the write buffer such that each write will be on underlying -// connection. Note: A Send call may not directly translate to a write. +// Zero or negative values will disable the write buffer such that each write +// will be on underlying connection. Note: A Send call may not directly +// translate to a write. func WithWriteBufferSize(s int) DialOption { return newFuncDialOption(func(o *dialOptions) { o.copts.WriteBufferSize = s @@ -113,8 +155,9 @@ func WithWriteBufferSize(s int) DialOption { // WithReadBufferSize lets you set the size of read buffer, this determines how // much data can be read at most for each read syscall. // -// The default value for this buffer is 32KB. Zero will disable read buffer for -// a connection so data framer can access the underlying conn directly. +// The default value for this buffer is 32KB. Zero or negative values will +// disable read buffer for a connection so data framer can access the +// underlying conn directly. func WithReadBufferSize(s int) DialOption { return newFuncDialOption(func(o *dialOptions) { o.copts.ReadBufferSize = s @@ -253,6 +296,9 @@ func withBackoff(bs internalbackoff.Strategy) DialOption { // WithBlock returns a DialOption which makes callers of Dial block until the // underlying connection is up. Without this, Dial returns immediately and // connecting the server happens in background. +// +// Use of this feature is not recommended. For more information, please see: +// https://github.com/grpc/grpc-go/blob/master/Documentation/anti-patterns.md func WithBlock() DialOption { return newFuncDialOption(func(o *dialOptions) { o.block = true @@ -264,7 +310,10 @@ func WithBlock() DialOption { // the context.DeadlineExceeded error. // Implies WithBlock() // -// Experimental +// Use of this feature is not recommended. For more information, please see: +// https://github.com/grpc/grpc-go/blob/master/Documentation/anti-patterns.md +// +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -293,7 +342,7 @@ func WithInsecure() DialOption { // WithNoProxy returns a DialOption which disables the use of proxies for this // ClientConn. This is ignored if WithDialer or WithContextDialer are used. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -324,7 +373,7 @@ func WithPerRPCCredentials(creds credentials.PerRPCCredentials) DialOption { // the ClientConn.WithCreds. This should not be used together with // WithTransportCredentials. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -380,7 +429,21 @@ func WithDialer(f func(string, time.Duration) (net.Conn, error)) DialOption { // all the RPCs and underlying network connections in this ClientConn. func WithStatsHandler(h stats.Handler) DialOption { return newFuncDialOption(func(o *dialOptions) { - o.copts.StatsHandler = h + if h == nil { + logger.Error("ignoring nil parameter in grpc.WithStatsHandler ClientOption") + // Do not allow a nil stats handler, which would otherwise cause + // panics. + return + } + o.copts.StatsHandlers = append(o.copts.StatsHandlers, h) + }) +} + +// withBinaryLogger returns a DialOption that specifies the binary logger for +// this ClientConn. +func withBinaryLogger(bl binarylog.Logger) DialOption { + return newFuncDialOption(func(o *dialOptions) { + o.binaryLogger = bl }) } @@ -392,7 +455,10 @@ func WithStatsHandler(h stats.Handler) DialOption { // FailOnNonTempDialError only affects the initial dial, and does not do // anything useful unless you are also using WithBlock(). // -// Experimental +// Use of this feature is not recommended. For more information, please see: +// https://github.com/grpc/grpc-go/blob/master/Documentation/anti-patterns.md +// +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -472,7 +538,7 @@ func WithAuthority(a string) DialOption { // current ClientConn's parent. This function is used in nested channel creation // (e.g. grpclb dial). // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -517,9 +583,6 @@ func WithDefaultServiceConfig(s string) DialOption { // service config enables them. This does not impact transparent retries, which // will happen automatically if no data is written to the wire or if the RPC is // unprocessed by the remote server. -// -// Retry support is currently enabled by default, but may be disabled by -// setting the environment variable "GRPC_GO_RETRY" to "off". func WithDisableRetry() DialOption { return newFuncDialOption(func(o *dialOptions) { o.disableRetry = true @@ -537,7 +600,7 @@ func WithMaxHeaderListSize(s uint32) DialOption { // WithDisableHealthCheck disables the LB channel health checking for all // SubConns of this ClientConn. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -584,7 +647,7 @@ func withMinConnectDeadline(f func() time.Duration) DialOption { // resolver.Register. They will be matched against the scheme used for the // current Dial only, and will take precedence over the global registry. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -593,3 +656,23 @@ func WithResolvers(rs ...resolver.Builder) DialOption { o.resolvers = append(o.resolvers, rs...) }) } + +// WithIdleTimeout returns a DialOption that configures an idle timeout for the +// channel. If the channel is idle for the configured timeout, i.e there are no +// ongoing RPCs and no new RPCs are initiated, the channel will enter idle mode +// and as a result the name resolver and load balancer will be shut down. The +// channel will exit idle mode when the Connect() method is called or when an +// RPC is initiated. +// +// By default this feature is disabled, which can also be explicitly configured +// by passing zero to this function. +// +// # Experimental +// +// Notice: This API is EXPERIMENTAL and may be changed or removed in a +// later release. +func WithIdleTimeout(d time.Duration) DialOption { + return newFuncDialOption(func(o *dialOptions) { + o.idleTimeout = d + }) +} diff --git a/vendor/google.golang.org/grpc/encoding/encoding.go b/vendor/google.golang.org/grpc/encoding/encoding.go index 18e530fc90242..07a5861352a6f 100644 --- a/vendor/google.golang.org/grpc/encoding/encoding.go +++ b/vendor/google.golang.org/grpc/encoding/encoding.go @@ -19,7 +19,7 @@ // Package encoding defines the interface for the compressor and codec, and // functions to register and retrieve compressors and codecs. // -// Experimental +// # Experimental // // Notice: This package is EXPERIMENTAL and may be changed or removed in a // later release. @@ -28,6 +28,8 @@ package encoding import ( "io" "strings" + + "google.golang.org/grpc/internal/grpcutil" ) // Identity specifies the optional encoding for uncompressed streams. @@ -73,6 +75,9 @@ var registeredCompressor = make(map[string]Compressor) // registered with the same name, the one registered last will take effect. func RegisterCompressor(c Compressor) { registeredCompressor[c.Name()] = c + if !grpcutil.IsCompressorNameRegistered(c.Name()) { + grpcutil.RegisteredCompressorNames = append(grpcutil.RegisteredCompressorNames, c.Name()) + } } // GetCompressor returns Compressor for the given compressor name. diff --git a/vendor/google.golang.org/grpc/grpclog/loggerv2.go b/vendor/google.golang.org/grpc/grpclog/loggerv2.go index 7c1f664090344..5de66e40d365b 100644 --- a/vendor/google.golang.org/grpc/grpclog/loggerv2.go +++ b/vendor/google.golang.org/grpc/grpclog/loggerv2.go @@ -22,7 +22,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "log" "os" "strconv" @@ -140,9 +139,9 @@ func newLoggerV2WithConfig(infoW, warningW, errorW io.Writer, c loggerV2Config) // newLoggerV2 creates a loggerV2 to be used as default logger. // All logs are written to stderr. func newLoggerV2() LoggerV2 { - errorW := ioutil.Discard - warningW := ioutil.Discard - infoW := ioutil.Discard + errorW := io.Discard + warningW := io.Discard + infoW := io.Discard logLevel := os.Getenv("GRPC_GO_LOG_SEVERITY_LEVEL") switch logLevel { @@ -242,7 +241,7 @@ func (g *loggerT) V(l int) bool { // DepthLoggerV2, the below functions will be called with the appropriate stack // depth set for trivial functions the logger may ignore. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go b/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go index a66024d23e301..142d35f753e9f 100644 --- a/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go +++ b/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go @@ -17,14 +17,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 +// protoc-gen-go v1.30.0 +// protoc v4.22.0 // source: grpc/health/v1/health.proto package grpc_health_v1 import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -38,10 +37,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - type HealthCheckResponse_ServingStatus int32 const ( diff --git a/vendor/google.golang.org/grpc/health/grpc_health_v1/health_grpc.pb.go b/vendor/google.golang.org/grpc/health/grpc_health_v1/health_grpc.pb.go index 69f525d1baebf..a01a1b4d54bd5 100644 --- a/vendor/google.golang.org/grpc/health/grpc_health_v1/health_grpc.pb.go +++ b/vendor/google.golang.org/grpc/health/grpc_health_v1/health_grpc.pb.go @@ -1,7 +1,24 @@ +// Copyright 2015 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// The canonical version of this proto can be found at +// https://github.com/grpc/grpc-proto/blob/master/grpc/health/v1/health.proto + // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.14.0 +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.22.0 // source: grpc/health/v1/health.proto package grpc_health_v1 @@ -18,6 +35,11 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + Health_Check_FullMethodName = "/grpc.health.v1.Health/Check" + Health_Watch_FullMethodName = "/grpc.health.v1.Health/Watch" +) + // HealthClient is the client API for Health service. // // 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. @@ -53,7 +75,7 @@ func NewHealthClient(cc grpc.ClientConnInterface) HealthClient { func (c *healthClient) Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) { out := new(HealthCheckResponse) - err := c.cc.Invoke(ctx, "/grpc.health.v1.Health/Check", in, out, opts...) + err := c.cc.Invoke(ctx, Health_Check_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -61,7 +83,7 @@ func (c *healthClient) Check(ctx context.Context, in *HealthCheckRequest, opts . } func (c *healthClient) Watch(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (Health_WatchClient, error) { - stream, err := c.cc.NewStream(ctx, &Health_ServiceDesc.Streams[0], "/grpc.health.v1.Health/Watch", opts...) + stream, err := c.cc.NewStream(ctx, &Health_ServiceDesc.Streams[0], Health_Watch_FullMethodName, opts...) if err != nil { return nil, err } @@ -149,7 +171,7 @@ func _Health_Check_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/grpc.health.v1.Health/Check", + FullMethod: Health_Check_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HealthServer).Check(ctx, req.(*HealthCheckRequest)) diff --git a/vendor/google.golang.org/grpc/idle.go b/vendor/google.golang.org/grpc/idle.go new file mode 100644 index 0000000000000..dc3dc72f6b09d --- /dev/null +++ b/vendor/google.golang.org/grpc/idle.go @@ -0,0 +1,287 @@ +/* + * + * Copyright 2023 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpc + +import ( + "fmt" + "math" + "sync" + "sync/atomic" + "time" +) + +// For overriding in unit tests. +var timeAfterFunc = func(d time.Duration, f func()) *time.Timer { + return time.AfterFunc(d, f) +} + +// idlenessEnforcer is the functionality provided by grpc.ClientConn to enter +// and exit from idle mode. +type idlenessEnforcer interface { + exitIdleMode() error + enterIdleMode() error +} + +// idlenessManager defines the functionality required to track RPC activity on a +// channel. +type idlenessManager interface { + onCallBegin() error + onCallEnd() + close() +} + +type noopIdlenessManager struct{} + +func (noopIdlenessManager) onCallBegin() error { return nil } +func (noopIdlenessManager) onCallEnd() {} +func (noopIdlenessManager) close() {} + +// idlenessManagerImpl implements the idlenessManager interface. It uses atomic +// operations to synchronize access to shared state and a mutex to guarantee +// mutual exclusion in a critical section. +type idlenessManagerImpl struct { + // State accessed atomically. + lastCallEndTime int64 // Unix timestamp in nanos; time when the most recent RPC completed. + activeCallsCount int32 // Count of active RPCs; -math.MaxInt32 means channel is idle or is trying to get there. + activeSinceLastTimerCheck int32 // Boolean; True if there was an RPC since the last timer callback. + closed int32 // Boolean; True when the manager is closed. + + // Can be accessed without atomics or mutex since these are set at creation + // time and read-only after that. + enforcer idlenessEnforcer // Functionality provided by grpc.ClientConn. + timeout int64 // Idle timeout duration nanos stored as an int64. + + // idleMu is used to guarantee mutual exclusion in two scenarios: + // - Opposing intentions: + // - a: Idle timeout has fired and handleIdleTimeout() is trying to put + // the channel in idle mode because the channel has been inactive. + // - b: At the same time an RPC is made on the channel, and onCallBegin() + // is trying to prevent the channel from going idle. + // - Competing intentions: + // - The channel is in idle mode and there are multiple RPCs starting at + // the same time, all trying to move the channel out of idle. Only one + // of them should succeed in doing so, while the other RPCs should + // piggyback on the first one and be successfully handled. + idleMu sync.RWMutex + actuallyIdle bool + timer *time.Timer +} + +// newIdlenessManager creates a new idleness manager implementation for the +// given idle timeout. +func newIdlenessManager(enforcer idlenessEnforcer, idleTimeout time.Duration) idlenessManager { + if idleTimeout == 0 { + return noopIdlenessManager{} + } + + i := &idlenessManagerImpl{ + enforcer: enforcer, + timeout: int64(idleTimeout), + } + i.timer = timeAfterFunc(idleTimeout, i.handleIdleTimeout) + return i +} + +// resetIdleTimer resets the idle timer to the given duration. This method +// should only be called from the timer callback. +func (i *idlenessManagerImpl) resetIdleTimer(d time.Duration) { + i.idleMu.Lock() + defer i.idleMu.Unlock() + + if i.timer == nil { + // Only close sets timer to nil. We are done. + return + } + + // It is safe to ignore the return value from Reset() because this method is + // only ever called from the timer callback, which means the timer has + // already fired. + i.timer.Reset(d) +} + +// handleIdleTimeout is the timer callback that is invoked upon expiry of the +// configured idle timeout. The channel is considered inactive if there are no +// ongoing calls and no RPC activity since the last time the timer fired. +func (i *idlenessManagerImpl) handleIdleTimeout() { + if i.isClosed() { + return + } + + if atomic.LoadInt32(&i.activeCallsCount) > 0 { + i.resetIdleTimer(time.Duration(i.timeout)) + return + } + + // There has been activity on the channel since we last got here. Reset the + // timer and return. + if atomic.LoadInt32(&i.activeSinceLastTimerCheck) == 1 { + // Set the timer to fire after a duration of idle timeout, calculated + // from the time the most recent RPC completed. + atomic.StoreInt32(&i.activeSinceLastTimerCheck, 0) + i.resetIdleTimer(time.Duration(atomic.LoadInt64(&i.lastCallEndTime) + i.timeout - time.Now().UnixNano())) + return + } + + // This CAS operation is extremely likely to succeed given that there has + // been no activity since the last time we were here. Setting the + // activeCallsCount to -math.MaxInt32 indicates to onCallBegin() that the + // channel is either in idle mode or is trying to get there. + if !atomic.CompareAndSwapInt32(&i.activeCallsCount, 0, -math.MaxInt32) { + // This CAS operation can fail if an RPC started after we checked for + // activity at the top of this method, or one was ongoing from before + // the last time we were here. In both case, reset the timer and return. + i.resetIdleTimer(time.Duration(i.timeout)) + return + } + + // Now that we've set the active calls count to -math.MaxInt32, it's time to + // actually move to idle mode. + if i.tryEnterIdleMode() { + // Successfully entered idle mode. No timer needed until we exit idle. + return + } + + // Failed to enter idle mode due to a concurrent RPC that kept the channel + // active, or because of an error from the channel. Undo the attempt to + // enter idle, and reset the timer to try again later. + atomic.AddInt32(&i.activeCallsCount, math.MaxInt32) + i.resetIdleTimer(time.Duration(i.timeout)) +} + +// tryEnterIdleMode instructs the channel to enter idle mode. But before +// that, it performs a last minute check to ensure that no new RPC has come in, +// making the channel active. +// +// Return value indicates whether or not the channel moved to idle mode. +// +// Holds idleMu which ensures mutual exclusion with exitIdleMode. +func (i *idlenessManagerImpl) tryEnterIdleMode() bool { + i.idleMu.Lock() + defer i.idleMu.Unlock() + + if atomic.LoadInt32(&i.activeCallsCount) != -math.MaxInt32 { + // We raced and lost to a new RPC. Very rare, but stop entering idle. + return false + } + if atomic.LoadInt32(&i.activeSinceLastTimerCheck) == 1 { + // An very short RPC could have come in (and also finished) after we + // checked for calls count and activity in handleIdleTimeout(), but + // before the CAS operation. So, we need to check for activity again. + return false + } + + // No new RPCs have come in since we last set the active calls count value + // -math.MaxInt32 in the timer callback. And since we have the lock, it is + // safe to enter idle mode now. + if err := i.enforcer.enterIdleMode(); err != nil { + logger.Errorf("Failed to enter idle mode: %v", err) + return false + } + + // Successfully entered idle mode. + i.actuallyIdle = true + return true +} + +// onCallBegin is invoked at the start of every RPC. +func (i *idlenessManagerImpl) onCallBegin() error { + if i.isClosed() { + return nil + } + + if atomic.AddInt32(&i.activeCallsCount, 1) > 0 { + // Channel is not idle now. Set the activity bit and allow the call. + atomic.StoreInt32(&i.activeSinceLastTimerCheck, 1) + return nil + } + + // Channel is either in idle mode or is in the process of moving to idle + // mode. Attempt to exit idle mode to allow this RPC. + if err := i.exitIdleMode(); err != nil { + // Undo the increment to calls count, and return an error causing the + // RPC to fail. + atomic.AddInt32(&i.activeCallsCount, -1) + return err + } + + atomic.StoreInt32(&i.activeSinceLastTimerCheck, 1) + return nil +} + +// exitIdleMode instructs the channel to exit idle mode. +// +// Holds idleMu which ensures mutual exclusion with tryEnterIdleMode. +func (i *idlenessManagerImpl) exitIdleMode() error { + i.idleMu.Lock() + defer i.idleMu.Unlock() + + if !i.actuallyIdle { + // This can happen in two scenarios: + // - handleIdleTimeout() set the calls count to -math.MaxInt32 and called + // tryEnterIdleMode(). But before the latter could grab the lock, an RPC + // came in and onCallBegin() noticed that the calls count is negative. + // - Channel is in idle mode, and multiple new RPCs come in at the same + // time, all of them notice a negative calls count in onCallBegin and get + // here. The first one to get the lock would got the channel to exit idle. + // + // Either way, nothing to do here. + return nil + } + + if err := i.enforcer.exitIdleMode(); err != nil { + return fmt.Errorf("channel failed to exit idle mode: %v", err) + } + + // Undo the idle entry process. This also respects any new RPC attempts. + atomic.AddInt32(&i.activeCallsCount, math.MaxInt32) + i.actuallyIdle = false + + // Start a new timer to fire after the configured idle timeout. + i.timer = timeAfterFunc(time.Duration(i.timeout), i.handleIdleTimeout) + return nil +} + +// onCallEnd is invoked at the end of every RPC. +func (i *idlenessManagerImpl) onCallEnd() { + if i.isClosed() { + return + } + + // Record the time at which the most recent call finished. + atomic.StoreInt64(&i.lastCallEndTime, time.Now().UnixNano()) + + // Decrement the active calls count. This count can temporarily go negative + // when the timer callback is in the process of moving the channel to idle + // mode, but one or more RPCs come in and complete before the timer callback + // can get done with the process of moving to idle mode. + atomic.AddInt32(&i.activeCallsCount, -1) +} + +func (i *idlenessManagerImpl) isClosed() bool { + return atomic.LoadInt32(&i.closed) == 1 +} + +func (i *idlenessManagerImpl) close() { + atomic.StoreInt32(&i.closed, 1) + + i.idleMu.Lock() + i.timer.Stop() + i.timer = nil + i.idleMu.Unlock() +} diff --git a/vendor/google.golang.org/grpc/internal/balancer/gracefulswitch/gracefulswitch.go b/vendor/google.golang.org/grpc/internal/balancer/gracefulswitch/gracefulswitch.go index 7ba8f4d18319c..08666f62a7cbf 100644 --- a/vendor/google.golang.org/grpc/internal/balancer/gracefulswitch/gracefulswitch.go +++ b/vendor/google.golang.org/grpc/internal/balancer/gracefulswitch/gracefulswitch.go @@ -193,6 +193,8 @@ func (gsb *Balancer) ExitIdle() { ei.ExitIdle() return } + gsb.mu.Lock() + defer gsb.mu.Unlock() for sc := range balToUpdate.subconns { sc.Connect() } diff --git a/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go b/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go index 0a25ce43f3f00..755fdebc1b15a 100644 --- a/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go +++ b/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go @@ -28,8 +28,13 @@ import ( "google.golang.org/grpc/internal/grpcutil" ) -// Logger is the global binary logger. It can be used to get binary logger for -// each method. +var grpclogLogger = grpclog.Component("binarylog") + +// Logger specifies MethodLoggers for method names with a Log call that +// takes a context. +// +// This is used in the 1.0 release of gcp/observability, and thus must not be +// deleted or changed. type Logger interface { GetMethodLogger(methodName string) MethodLogger } @@ -37,30 +42,28 @@ type Logger interface { // binLogger is the global binary logger for the binary. One of this should be // built at init time from the configuration (environment variable or flags). // -// It is used to get a methodLogger for each individual method. +// It is used to get a MethodLogger for each individual method. var binLogger Logger -var grpclogLogger = grpclog.Component("binarylog") - -// SetLogger sets the binarg logger. +// SetLogger sets the binary logger. // // Only call this at init time. func SetLogger(l Logger) { binLogger = l } -// GetLogger gets the binarg logger. +// GetLogger gets the binary logger. // // Only call this at init time. func GetLogger() Logger { return binLogger } -// GetMethodLogger returns the methodLogger for the given methodName. +// GetMethodLogger returns the MethodLogger for the given methodName. // // methodName should be in the format of "/service/method". // -// Each methodLogger returned by this method is a new instance. This is to +// Each MethodLogger returned by this method is a new instance. This is to // generate sequence id within the call. func GetMethodLogger(methodName string) MethodLogger { if binLogger == nil { @@ -117,7 +120,7 @@ func (l *logger) setDefaultMethodLogger(ml *MethodLoggerConfig) error { // Set method logger for "service/*". // -// New methodLogger with same service overrides the old one. +// New MethodLogger with same service overrides the old one. func (l *logger) setServiceMethodLogger(service string, ml *MethodLoggerConfig) error { if _, ok := l.config.Services[service]; ok { return fmt.Errorf("conflicting service rules for service %v found", service) @@ -131,7 +134,7 @@ func (l *logger) setServiceMethodLogger(service string, ml *MethodLoggerConfig) // Set method logger for "service/method". // -// New methodLogger with same method overrides the old one. +// New MethodLogger with same method overrides the old one. func (l *logger) setMethodMethodLogger(method string, ml *MethodLoggerConfig) error { if _, ok := l.config.Blacklist[method]; ok { return fmt.Errorf("conflicting blacklist rules for method %v found", method) @@ -161,11 +164,11 @@ func (l *logger) setBlacklist(method string) error { return nil } -// getMethodLogger returns the methodLogger for the given methodName. +// getMethodLogger returns the MethodLogger for the given methodName. // // methodName should be in the format of "/service/method". // -// Each methodLogger returned by this method is a new instance. This is to +// Each MethodLogger returned by this method is a new instance. This is to // generate sequence id within the call. func (l *logger) GetMethodLogger(methodName string) MethodLogger { s, m, err := grpcutil.ParseMethod(methodName) @@ -174,16 +177,16 @@ func (l *logger) GetMethodLogger(methodName string) MethodLogger { return nil } if ml, ok := l.config.Methods[s+"/"+m]; ok { - return newMethodLogger(ml.Header, ml.Message) + return NewTruncatingMethodLogger(ml.Header, ml.Message) } if _, ok := l.config.Blacklist[s+"/"+m]; ok { return nil } if ml, ok := l.config.Services[s]; ok { - return newMethodLogger(ml.Header, ml.Message) + return NewTruncatingMethodLogger(ml.Header, ml.Message) } if l.config.All == nil { return nil } - return newMethodLogger(l.config.All.Header, l.config.All.Message) + return NewTruncatingMethodLogger(l.config.All.Header, l.config.All.Message) } diff --git a/vendor/google.golang.org/grpc/internal/binarylog/env_config.go b/vendor/google.golang.org/grpc/internal/binarylog/env_config.go index ab589a76bf960..f9e80e27ab688 100644 --- a/vendor/google.golang.org/grpc/internal/binarylog/env_config.go +++ b/vendor/google.golang.org/grpc/internal/binarylog/env_config.go @@ -30,15 +30,15 @@ import ( // to build a new logger and assign it to binarylog.Logger. // // Example filter config strings: -// - "" Nothing will be logged -// - "*" All headers and messages will be fully logged. -// - "*{h}" Only headers will be logged. -// - "*{m:256}" Only the first 256 bytes of each message will be logged. -// - "Foo/*" Logs every method in service Foo -// - "Foo/*,-Foo/Bar" Logs every method in service Foo except method /Foo/Bar -// - "Foo/*,Foo/Bar{m:256}" Logs the first 256 bytes of each message in method -// /Foo/Bar, logs all headers and messages in every other method in service -// Foo. +// - "" Nothing will be logged +// - "*" All headers and messages will be fully logged. +// - "*{h}" Only headers will be logged. +// - "*{m:256}" Only the first 256 bytes of each message will be logged. +// - "Foo/*" Logs every method in service Foo +// - "Foo/*,-Foo/Bar" Logs every method in service Foo except method /Foo/Bar +// - "Foo/*,Foo/Bar{m:256}" Logs the first 256 bytes of each message in method +// /Foo/Bar, logs all headers and messages in every other method in service +// Foo. // // If two configs exist for one certain method or service, the one specified // later overrides the previous config. @@ -57,7 +57,7 @@ func NewLoggerFromConfigString(s string) Logger { return l } -// fillMethodLoggerWithConfigString parses config, creates methodLogger and adds +// fillMethodLoggerWithConfigString parses config, creates TruncatingMethodLogger and adds // it to the right map in the logger. func (l *logger) fillMethodLoggerWithConfigString(config string) error { // "" is invalid. diff --git a/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go b/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go index 24df0a1a0c4e5..6c3f632215fd3 100644 --- a/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go +++ b/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go @@ -19,6 +19,7 @@ package binarylog import ( + "context" "net" "strings" "sync/atomic" @@ -26,7 +27,7 @@ import ( "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes" - pb "google.golang.org/grpc/binarylog/grpc_binarylog_v1" + binlogpb "google.golang.org/grpc/binarylog/grpc_binarylog_v1" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -48,11 +49,16 @@ func (g *callIDGenerator) reset() { var idGen callIDGenerator // MethodLogger is the sub-logger for each method. +// +// This is used in the 1.0 release of gcp/observability, and thus must not be +// deleted or changed. type MethodLogger interface { - Log(LogEntryConfig) + Log(context.Context, LogEntryConfig) } -type methodLogger struct { +// TruncatingMethodLogger is a method logger that truncates headers and messages +// based on configured fields. +type TruncatingMethodLogger struct { headerMaxLen, messageMaxLen uint64 callID uint64 @@ -61,8 +67,12 @@ type methodLogger struct { sink Sink // TODO(blog): make this plugable. } -func newMethodLogger(h, m uint64) *methodLogger { - return &methodLogger{ +// NewTruncatingMethodLogger returns a new truncating method logger. +// +// This is used in the 1.0 release of gcp/observability, and thus must not be +// deleted or changed. +func NewTruncatingMethodLogger(h, m uint64) *TruncatingMethodLogger { + return &TruncatingMethodLogger{ headerMaxLen: h, messageMaxLen: m, @@ -75,8 +85,8 @@ func newMethodLogger(h, m uint64) *methodLogger { // Build is an internal only method for building the proto message out of the // input event. It's made public to enable other library to reuse as much logic -// in methodLogger as possible. -func (ml *methodLogger) Build(c LogEntryConfig) *pb.GrpcLogEntry { +// in TruncatingMethodLogger as possible. +func (ml *TruncatingMethodLogger) Build(c LogEntryConfig) *binlogpb.GrpcLogEntry { m := c.toProto() timestamp, _ := ptypes.TimestampProto(time.Now()) m.Timestamp = timestamp @@ -84,22 +94,22 @@ func (ml *methodLogger) Build(c LogEntryConfig) *pb.GrpcLogEntry { m.SequenceIdWithinCall = ml.idWithinCallGen.next() switch pay := m.Payload.(type) { - case *pb.GrpcLogEntry_ClientHeader: + case *binlogpb.GrpcLogEntry_ClientHeader: m.PayloadTruncated = ml.truncateMetadata(pay.ClientHeader.GetMetadata()) - case *pb.GrpcLogEntry_ServerHeader: + case *binlogpb.GrpcLogEntry_ServerHeader: m.PayloadTruncated = ml.truncateMetadata(pay.ServerHeader.GetMetadata()) - case *pb.GrpcLogEntry_Message: + case *binlogpb.GrpcLogEntry_Message: m.PayloadTruncated = ml.truncateMessage(pay.Message) } return m } // Log creates a proto binary log entry, and logs it to the sink. -func (ml *methodLogger) Log(c LogEntryConfig) { +func (ml *TruncatingMethodLogger) Log(ctx context.Context, c LogEntryConfig) { ml.sink.Write(ml.Build(c)) } -func (ml *methodLogger) truncateMetadata(mdPb *pb.Metadata) (truncated bool) { +func (ml *TruncatingMethodLogger) truncateMetadata(mdPb *binlogpb.Metadata) (truncated bool) { if ml.headerMaxLen == maxUInt { return false } @@ -118,7 +128,7 @@ func (ml *methodLogger) truncateMetadata(mdPb *pb.Metadata) (truncated bool) { // but not counted towards the size limit. continue } - currentEntryLen := uint64(len(entry.Value)) + currentEntryLen := uint64(len(entry.GetKey())) + uint64(len(entry.GetValue())) if currentEntryLen > bytesLimit { break } @@ -129,7 +139,7 @@ func (ml *methodLogger) truncateMetadata(mdPb *pb.Metadata) (truncated bool) { return truncated } -func (ml *methodLogger) truncateMessage(msgPb *pb.Message) (truncated bool) { +func (ml *TruncatingMethodLogger) truncateMessage(msgPb *binlogpb.Message) (truncated bool) { if ml.messageMaxLen == maxUInt { return false } @@ -141,8 +151,11 @@ func (ml *methodLogger) truncateMessage(msgPb *pb.Message) (truncated bool) { } // LogEntryConfig represents the configuration for binary log entry. +// +// This is used in the 1.0 release of gcp/observability, and thus must not be +// deleted or changed. type LogEntryConfig interface { - toProto() *pb.GrpcLogEntry + toProto() *binlogpb.GrpcLogEntry } // ClientHeader configs the binary log entry to be a ClientHeader entry. @@ -156,10 +169,10 @@ type ClientHeader struct { PeerAddr net.Addr } -func (c *ClientHeader) toProto() *pb.GrpcLogEntry { +func (c *ClientHeader) toProto() *binlogpb.GrpcLogEntry { // This function doesn't need to set all the fields (e.g. seq ID). The Log // function will set the fields when necessary. - clientHeader := &pb.ClientHeader{ + clientHeader := &binlogpb.ClientHeader{ Metadata: mdToMetadataProto(c.Header), MethodName: c.MethodName, Authority: c.Authority, @@ -167,16 +180,16 @@ func (c *ClientHeader) toProto() *pb.GrpcLogEntry { if c.Timeout > 0 { clientHeader.Timeout = ptypes.DurationProto(c.Timeout) } - ret := &pb.GrpcLogEntry{ - Type: pb.GrpcLogEntry_EVENT_TYPE_CLIENT_HEADER, - Payload: &pb.GrpcLogEntry_ClientHeader{ + ret := &binlogpb.GrpcLogEntry{ + Type: binlogpb.GrpcLogEntry_EVENT_TYPE_CLIENT_HEADER, + Payload: &binlogpb.GrpcLogEntry_ClientHeader{ ClientHeader: clientHeader, }, } if c.OnClientSide { - ret.Logger = pb.GrpcLogEntry_LOGGER_CLIENT + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT } else { - ret.Logger = pb.GrpcLogEntry_LOGGER_SERVER + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER } if c.PeerAddr != nil { ret.Peer = addrToProto(c.PeerAddr) @@ -192,19 +205,19 @@ type ServerHeader struct { PeerAddr net.Addr } -func (c *ServerHeader) toProto() *pb.GrpcLogEntry { - ret := &pb.GrpcLogEntry{ - Type: pb.GrpcLogEntry_EVENT_TYPE_SERVER_HEADER, - Payload: &pb.GrpcLogEntry_ServerHeader{ - ServerHeader: &pb.ServerHeader{ +func (c *ServerHeader) toProto() *binlogpb.GrpcLogEntry { + ret := &binlogpb.GrpcLogEntry{ + Type: binlogpb.GrpcLogEntry_EVENT_TYPE_SERVER_HEADER, + Payload: &binlogpb.GrpcLogEntry_ServerHeader{ + ServerHeader: &binlogpb.ServerHeader{ Metadata: mdToMetadataProto(c.Header), }, }, } if c.OnClientSide { - ret.Logger = pb.GrpcLogEntry_LOGGER_CLIENT + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT } else { - ret.Logger = pb.GrpcLogEntry_LOGGER_SERVER + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER } if c.PeerAddr != nil { ret.Peer = addrToProto(c.PeerAddr) @@ -220,7 +233,7 @@ type ClientMessage struct { Message interface{} } -func (c *ClientMessage) toProto() *pb.GrpcLogEntry { +func (c *ClientMessage) toProto() *binlogpb.GrpcLogEntry { var ( data []byte err error @@ -235,19 +248,19 @@ func (c *ClientMessage) toProto() *pb.GrpcLogEntry { } else { grpclogLogger.Infof("binarylogging: message to log is neither proto.message nor []byte") } - ret := &pb.GrpcLogEntry{ - Type: pb.GrpcLogEntry_EVENT_TYPE_CLIENT_MESSAGE, - Payload: &pb.GrpcLogEntry_Message{ - Message: &pb.Message{ + ret := &binlogpb.GrpcLogEntry{ + Type: binlogpb.GrpcLogEntry_EVENT_TYPE_CLIENT_MESSAGE, + Payload: &binlogpb.GrpcLogEntry_Message{ + Message: &binlogpb.Message{ Length: uint32(len(data)), Data: data, }, }, } if c.OnClientSide { - ret.Logger = pb.GrpcLogEntry_LOGGER_CLIENT + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT } else { - ret.Logger = pb.GrpcLogEntry_LOGGER_SERVER + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER } return ret } @@ -260,7 +273,7 @@ type ServerMessage struct { Message interface{} } -func (c *ServerMessage) toProto() *pb.GrpcLogEntry { +func (c *ServerMessage) toProto() *binlogpb.GrpcLogEntry { var ( data []byte err error @@ -275,19 +288,19 @@ func (c *ServerMessage) toProto() *pb.GrpcLogEntry { } else { grpclogLogger.Infof("binarylogging: message to log is neither proto.message nor []byte") } - ret := &pb.GrpcLogEntry{ - Type: pb.GrpcLogEntry_EVENT_TYPE_SERVER_MESSAGE, - Payload: &pb.GrpcLogEntry_Message{ - Message: &pb.Message{ + ret := &binlogpb.GrpcLogEntry{ + Type: binlogpb.GrpcLogEntry_EVENT_TYPE_SERVER_MESSAGE, + Payload: &binlogpb.GrpcLogEntry_Message{ + Message: &binlogpb.Message{ Length: uint32(len(data)), Data: data, }, }, } if c.OnClientSide { - ret.Logger = pb.GrpcLogEntry_LOGGER_CLIENT + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT } else { - ret.Logger = pb.GrpcLogEntry_LOGGER_SERVER + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER } return ret } @@ -297,15 +310,15 @@ type ClientHalfClose struct { OnClientSide bool } -func (c *ClientHalfClose) toProto() *pb.GrpcLogEntry { - ret := &pb.GrpcLogEntry{ - Type: pb.GrpcLogEntry_EVENT_TYPE_CLIENT_HALF_CLOSE, +func (c *ClientHalfClose) toProto() *binlogpb.GrpcLogEntry { + ret := &binlogpb.GrpcLogEntry{ + Type: binlogpb.GrpcLogEntry_EVENT_TYPE_CLIENT_HALF_CLOSE, Payload: nil, // No payload here. } if c.OnClientSide { - ret.Logger = pb.GrpcLogEntry_LOGGER_CLIENT + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT } else { - ret.Logger = pb.GrpcLogEntry_LOGGER_SERVER + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER } return ret } @@ -321,7 +334,7 @@ type ServerTrailer struct { PeerAddr net.Addr } -func (c *ServerTrailer) toProto() *pb.GrpcLogEntry { +func (c *ServerTrailer) toProto() *binlogpb.GrpcLogEntry { st, ok := status.FromError(c.Err) if !ok { grpclogLogger.Info("binarylogging: error in trailer is not a status error") @@ -337,10 +350,10 @@ func (c *ServerTrailer) toProto() *pb.GrpcLogEntry { grpclogLogger.Infof("binarylogging: failed to marshal status proto: %v", err) } } - ret := &pb.GrpcLogEntry{ - Type: pb.GrpcLogEntry_EVENT_TYPE_SERVER_TRAILER, - Payload: &pb.GrpcLogEntry_Trailer{ - Trailer: &pb.Trailer{ + ret := &binlogpb.GrpcLogEntry{ + Type: binlogpb.GrpcLogEntry_EVENT_TYPE_SERVER_TRAILER, + Payload: &binlogpb.GrpcLogEntry_Trailer{ + Trailer: &binlogpb.Trailer{ Metadata: mdToMetadataProto(c.Trailer), StatusCode: uint32(st.Code()), StatusMessage: st.Message(), @@ -349,9 +362,9 @@ func (c *ServerTrailer) toProto() *pb.GrpcLogEntry { }, } if c.OnClientSide { - ret.Logger = pb.GrpcLogEntry_LOGGER_CLIENT + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT } else { - ret.Logger = pb.GrpcLogEntry_LOGGER_SERVER + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER } if c.PeerAddr != nil { ret.Peer = addrToProto(c.PeerAddr) @@ -364,15 +377,15 @@ type Cancel struct { OnClientSide bool } -func (c *Cancel) toProto() *pb.GrpcLogEntry { - ret := &pb.GrpcLogEntry{ - Type: pb.GrpcLogEntry_EVENT_TYPE_CANCEL, +func (c *Cancel) toProto() *binlogpb.GrpcLogEntry { + ret := &binlogpb.GrpcLogEntry{ + Type: binlogpb.GrpcLogEntry_EVENT_TYPE_CANCEL, Payload: nil, } if c.OnClientSide { - ret.Logger = pb.GrpcLogEntry_LOGGER_CLIENT + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT } else { - ret.Logger = pb.GrpcLogEntry_LOGGER_SERVER + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER } return ret } @@ -389,15 +402,15 @@ func metadataKeyOmit(key string) bool { return strings.HasPrefix(key, "grpc-") } -func mdToMetadataProto(md metadata.MD) *pb.Metadata { - ret := &pb.Metadata{} +func mdToMetadataProto(md metadata.MD) *binlogpb.Metadata { + ret := &binlogpb.Metadata{} for k, vv := range md { if metadataKeyOmit(k) { continue } for _, v := range vv { ret.Entry = append(ret.Entry, - &pb.MetadataEntry{ + &binlogpb.MetadataEntry{ Key: k, Value: []byte(v), }, @@ -407,26 +420,26 @@ func mdToMetadataProto(md metadata.MD) *pb.Metadata { return ret } -func addrToProto(addr net.Addr) *pb.Address { - ret := &pb.Address{} +func addrToProto(addr net.Addr) *binlogpb.Address { + ret := &binlogpb.Address{} switch a := addr.(type) { case *net.TCPAddr: if a.IP.To4() != nil { - ret.Type = pb.Address_TYPE_IPV4 + ret.Type = binlogpb.Address_TYPE_IPV4 } else if a.IP.To16() != nil { - ret.Type = pb.Address_TYPE_IPV6 + ret.Type = binlogpb.Address_TYPE_IPV6 } else { - ret.Type = pb.Address_TYPE_UNKNOWN + ret.Type = binlogpb.Address_TYPE_UNKNOWN // Do not set address and port fields. break } ret.Address = a.IP.String() ret.IpPort = uint32(a.Port) case *net.UnixAddr: - ret.Type = pb.Address_TYPE_UNIX + ret.Type = binlogpb.Address_TYPE_UNIX ret.Address = a.String() default: - ret.Type = pb.Address_TYPE_UNKNOWN + ret.Type = binlogpb.Address_TYPE_UNKNOWN } return ret } diff --git a/vendor/google.golang.org/grpc/internal/binarylog/sink.go b/vendor/google.golang.org/grpc/internal/binarylog/sink.go index c2fdd58b31982..264de387c2a5e 100644 --- a/vendor/google.golang.org/grpc/internal/binarylog/sink.go +++ b/vendor/google.golang.org/grpc/internal/binarylog/sink.go @@ -26,7 +26,7 @@ import ( "time" "github.com/golang/protobuf/proto" - pb "google.golang.org/grpc/binarylog/grpc_binarylog_v1" + binlogpb "google.golang.org/grpc/binarylog/grpc_binarylog_v1" ) var ( @@ -42,15 +42,15 @@ type Sink interface { // Write will be called to write the log entry into the sink. // // It should be thread-safe so it can be called in parallel. - Write(*pb.GrpcLogEntry) error + Write(*binlogpb.GrpcLogEntry) error // Close will be called when the Sink is replaced by a new Sink. Close() error } type noopSink struct{} -func (ns *noopSink) Write(*pb.GrpcLogEntry) error { return nil } -func (ns *noopSink) Close() error { return nil } +func (ns *noopSink) Write(*binlogpb.GrpcLogEntry) error { return nil } +func (ns *noopSink) Close() error { return nil } // newWriterSink creates a binary log sink with the given writer. // @@ -66,7 +66,7 @@ type writerSink struct { out io.Writer } -func (ws *writerSink) Write(e *pb.GrpcLogEntry) error { +func (ws *writerSink) Write(e *binlogpb.GrpcLogEntry) error { b, err := proto.Marshal(e) if err != nil { grpclogLogger.Errorf("binary logging: failed to marshal proto message: %v", err) @@ -96,7 +96,7 @@ type bufferedSink struct { done chan struct{} } -func (fs *bufferedSink) Write(e *pb.GrpcLogEntry) error { +func (fs *bufferedSink) Write(e *binlogpb.GrpcLogEntry) error { fs.mu.Lock() defer fs.mu.Unlock() if !fs.flusherStarted { diff --git a/vendor/google.golang.org/grpc/internal/buffer/unbounded.go b/vendor/google.golang.org/grpc/internal/buffer/unbounded.go index 9f6a0c1200db2..81c2f5fd761b8 100644 --- a/vendor/google.golang.org/grpc/internal/buffer/unbounded.go +++ b/vendor/google.golang.org/grpc/internal/buffer/unbounded.go @@ -35,6 +35,7 @@ import "sync" // internal/transport/transport.go for an example of this. type Unbounded struct { c chan interface{} + closed bool mu sync.Mutex backlog []interface{} } @@ -47,16 +48,18 @@ func NewUnbounded() *Unbounded { // Put adds t to the unbounded buffer. func (b *Unbounded) Put(t interface{}) { b.mu.Lock() + defer b.mu.Unlock() + if b.closed { + return + } if len(b.backlog) == 0 { select { case b.c <- t: - b.mu.Unlock() return default: } } b.backlog = append(b.backlog, t) - b.mu.Unlock() } // Load sends the earliest buffered data, if any, onto the read channel @@ -64,6 +67,10 @@ func (b *Unbounded) Put(t interface{}) { // value from the read channel. func (b *Unbounded) Load() { b.mu.Lock() + defer b.mu.Unlock() + if b.closed { + return + } if len(b.backlog) > 0 { select { case b.c <- b.backlog[0]: @@ -72,7 +79,6 @@ func (b *Unbounded) Load() { default: } } - b.mu.Unlock() } // Get returns a read channel on which values added to the buffer, via Put(), @@ -80,6 +86,20 @@ func (b *Unbounded) Load() { // // Upon reading a value from this channel, users are expected to call Load() to // send the next buffered value onto the channel if there is any. +// +// If the unbounded buffer is closed, the read channel returned by this method +// is closed. func (b *Unbounded) Get() <-chan interface{} { return b.c } + +// Close closes the unbounded buffer. +func (b *Unbounded) Close() { + b.mu.Lock() + defer b.mu.Unlock() + if b.closed { + return + } + b.closed = true + close(b.c) +} diff --git a/vendor/google.golang.org/grpc/internal/channelz/types.go b/vendor/google.golang.org/grpc/internal/channelz/types.go index ad0ce4dabf06c..7b2f350e2e645 100644 --- a/vendor/google.golang.org/grpc/internal/channelz/types.go +++ b/vendor/google.golang.org/grpc/internal/channelz/types.go @@ -273,10 +273,10 @@ func (c *channel) deleteSelfFromMap() (delete bool) { // deleteSelfIfReady tries to delete the channel itself from the channelz database. // The delete process includes two steps: -// 1. delete the channel from the entry relation tree, i.e. delete the channel reference from its -// parent's child list. -// 2. delete the channel from the map, i.e. delete the channel entirely from channelz. Lookup by id -// will return entry not found error. +// 1. delete the channel from the entry relation tree, i.e. delete the channel reference from its +// parent's child list. +// 2. delete the channel from the map, i.e. delete the channel entirely from channelz. Lookup by id +// will return entry not found error. func (c *channel) deleteSelfIfReady() { if !c.deleteSelfFromTree() { return @@ -381,10 +381,10 @@ func (sc *subChannel) deleteSelfFromMap() (delete bool) { // deleteSelfIfReady tries to delete the subchannel itself from the channelz database. // The delete process includes two steps: -// 1. delete the subchannel from the entry relation tree, i.e. delete the subchannel reference from -// its parent's child list. -// 2. delete the subchannel from the map, i.e. delete the subchannel entirely from channelz. Lookup -// by id will return entry not found error. +// 1. delete the subchannel from the entry relation tree, i.e. delete the subchannel reference from +// its parent's child list. +// 2. delete the subchannel from the map, i.e. delete the subchannel entirely from channelz. Lookup +// by id will return entry not found error. func (sc *subChannel) deleteSelfIfReady() { if !sc.deleteSelfFromTree() { return diff --git a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go index 6f02725431109..80fd5c7d2a4f4 100644 --- a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go +++ b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go @@ -21,15 +21,46 @@ package envconfig import ( "os" + "strconv" "strings" ) -const ( - prefix = "GRPC_GO_" - txtErrIgnoreStr = prefix + "IGNORE_TXT_ERRORS" -) - var ( // TXTErrIgnore is set if TXT errors should be ignored ("GRPC_GO_IGNORE_TXT_ERRORS" is not "false"). - TXTErrIgnore = !strings.EqualFold(os.Getenv(txtErrIgnoreStr), "false") + TXTErrIgnore = boolFromEnv("GRPC_GO_IGNORE_TXT_ERRORS", true) + // AdvertiseCompressors is set if registered compressor should be advertised + // ("GRPC_GO_ADVERTISE_COMPRESSORS" is not "false"). + AdvertiseCompressors = boolFromEnv("GRPC_GO_ADVERTISE_COMPRESSORS", true) + // RingHashCap indicates the maximum ring size which defaults to 4096 + // entries but may be overridden by setting the environment variable + // "GRPC_RING_HASH_CAP". This does not override the default bounds + // checking which NACKs configs specifying ring sizes > 8*1024*1024 (~8M). + RingHashCap = uint64FromEnv("GRPC_RING_HASH_CAP", 4096, 1, 8*1024*1024) + // PickFirstLBConfig is set if we should support configuration of the + // pick_first LB policy, which can be enabled by setting the environment + // variable "GRPC_EXPERIMENTAL_PICKFIRST_LB_CONFIG" to "true". + PickFirstLBConfig = boolFromEnv("GRPC_EXPERIMENTAL_PICKFIRST_LB_CONFIG", false) ) + +func boolFromEnv(envVar string, def bool) bool { + if def { + // The default is true; return true unless the variable is "false". + return !strings.EqualFold(os.Getenv(envVar), "false") + } + // The default is false; return false unless the variable is "true". + return strings.EqualFold(os.Getenv(envVar), "true") +} + +func uint64FromEnv(envVar string, def, min, max uint64) uint64 { + v, err := strconv.ParseUint(os.Getenv(envVar), 10, 64) + if err != nil { + return def + } + if v < min { + return min + } + if v > max { + return max + } + return v +} diff --git a/vendor/google.golang.org/grpc/internal/envconfig/observability.go b/vendor/google.golang.org/grpc/internal/envconfig/observability.go new file mode 100644 index 0000000000000..dd314cfb18f48 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/envconfig/observability.go @@ -0,0 +1,42 @@ +/* + * + * Copyright 2022 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package envconfig + +import "os" + +const ( + envObservabilityConfig = "GRPC_GCP_OBSERVABILITY_CONFIG" + envObservabilityConfigFile = "GRPC_GCP_OBSERVABILITY_CONFIG_FILE" +) + +var ( + // ObservabilityConfig is the json configuration for the gcp/observability + // package specified directly in the envObservabilityConfig env var. + // + // This is used in the 1.0 release of gcp/observability, and thus must not be + // deleted or changed. + ObservabilityConfig = os.Getenv(envObservabilityConfig) + // ObservabilityConfigFile is the json configuration for the + // gcp/observability specified in a file with the location specified in + // envObservabilityConfigFile env var. + // + // This is used in the 1.0 release of gcp/observability, and thus must not be + // deleted or changed. + ObservabilityConfigFile = os.Getenv(envObservabilityConfigFile) +) diff --git a/vendor/google.golang.org/grpc/internal/envconfig/xds.go b/vendor/google.golang.org/grpc/internal/envconfig/xds.go index 7d996e51b5c17..02b4b6a1c1096 100644 --- a/vendor/google.golang.org/grpc/internal/envconfig/xds.go +++ b/vendor/google.golang.org/grpc/internal/envconfig/xds.go @@ -20,7 +20,6 @@ package envconfig import ( "os" - "strings" ) const ( @@ -36,16 +35,6 @@ const ( // // When both bootstrap FileName and FileContent are set, FileName is used. XDSBootstrapFileContentEnv = "GRPC_XDS_BOOTSTRAP_CONFIG" - - ringHashSupportEnv = "GRPC_XDS_EXPERIMENTAL_ENABLE_RING_HASH" - clientSideSecuritySupportEnv = "GRPC_XDS_EXPERIMENTAL_SECURITY_SUPPORT" - aggregateAndDNSSupportEnv = "GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER" - rbacSupportEnv = "GRPC_XDS_EXPERIMENTAL_RBAC" - outlierDetectionSupportEnv = "GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION" - federationEnv = "GRPC_EXPERIMENTAL_XDS_FEDERATION" - rlsInXDSEnv = "GRPC_EXPERIMENTAL_XDS_RLS_LB" - - c2pResolverTestOnlyTrafficDirectorURIEnv = "GRPC_TEST_ONLY_GOOGLE_C2P_RESOLVER_TRAFFIC_DIRECTOR_URI" ) var ( @@ -64,38 +53,43 @@ var ( // XDSRingHash indicates whether ring hash support is enabled, which can be // disabled by setting the environment variable // "GRPC_XDS_EXPERIMENTAL_ENABLE_RING_HASH" to "false". - XDSRingHash = !strings.EqualFold(os.Getenv(ringHashSupportEnv), "false") + XDSRingHash = boolFromEnv("GRPC_XDS_EXPERIMENTAL_ENABLE_RING_HASH", true) // XDSClientSideSecurity is used to control processing of security // configuration on the client-side. // // Note that there is no env var protection for the server-side because we // have a brand new API on the server-side and users explicitly need to use // the new API to get security integration on the server. - XDSClientSideSecurity = !strings.EqualFold(os.Getenv(clientSideSecuritySupportEnv), "false") - // XDSAggregateAndDNS indicates whether processing of aggregated cluster - // and DNS cluster is enabled, which can be enabled by setting the - // environment variable - // "GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER" to - // "true". - XDSAggregateAndDNS = strings.EqualFold(os.Getenv(aggregateAndDNSSupportEnv), "true") + XDSClientSideSecurity = boolFromEnv("GRPC_XDS_EXPERIMENTAL_SECURITY_SUPPORT", true) + // XDSAggregateAndDNS indicates whether processing of aggregated cluster and + // DNS cluster is enabled, which can be disabled by setting the environment + // variable "GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER" + // to "false". + XDSAggregateAndDNS = boolFromEnv("GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER", true) // XDSRBAC indicates whether xDS configured RBAC HTTP Filter is enabled, // which can be disabled by setting the environment variable // "GRPC_XDS_EXPERIMENTAL_RBAC" to "false". - XDSRBAC = !strings.EqualFold(os.Getenv(rbacSupportEnv), "false") + XDSRBAC = boolFromEnv("GRPC_XDS_EXPERIMENTAL_RBAC", true) // XDSOutlierDetection indicates whether outlier detection support is - // enabled, which can be enabled by setting the environment variable - // "GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION" to "true". - XDSOutlierDetection = strings.EqualFold(os.Getenv(outlierDetectionSupportEnv), "true") - // XDSFederation indicates whether federation support is enabled. - XDSFederation = strings.EqualFold(os.Getenv(federationEnv), "true") + // enabled, which can be disabled by setting the environment variable + // "GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION" to "false". + XDSOutlierDetection = boolFromEnv("GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION", true) + // XDSFederation indicates whether federation support is enabled, which can + // be enabled by setting the environment variable + // "GRPC_EXPERIMENTAL_XDS_FEDERATION" to "true". + XDSFederation = boolFromEnv("GRPC_EXPERIMENTAL_XDS_FEDERATION", true) // XDSRLS indicates whether processing of Cluster Specifier plugins and - // support for the RLS CLuster Specifier is enabled, which can be enabled by + // support for the RLS CLuster Specifier is enabled, which can be disabled by // setting the environment variable "GRPC_EXPERIMENTAL_XDS_RLS_LB" to - // "true". - XDSRLS = strings.EqualFold(os.Getenv(rlsInXDSEnv), "true") + // "false". + XDSRLS = boolFromEnv("GRPC_EXPERIMENTAL_XDS_RLS_LB", true) // C2PResolverTestOnlyTrafficDirectorURI is the TD URI for testing. - C2PResolverTestOnlyTrafficDirectorURI = os.Getenv(c2pResolverTestOnlyTrafficDirectorURIEnv) + C2PResolverTestOnlyTrafficDirectorURI = os.Getenv("GRPC_TEST_ONLY_GOOGLE_C2P_RESOLVER_TRAFFIC_DIRECTOR_URI") + // XDSCustomLBPolicy indicates whether Custom LB Policies are enabled, which + // can be disabled by setting the environment variable + // "GRPC_EXPERIMENTAL_XDS_CUSTOM_LB_CONFIG" to "false". + XDSCustomLBPolicy = boolFromEnv("GRPC_EXPERIMENTAL_XDS_CUSTOM_LB_CONFIG", true) ) diff --git a/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go b/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go index 30a3b4258fc00..b68e26a364935 100644 --- a/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go +++ b/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go @@ -110,7 +110,7 @@ type LoggerV2 interface { // This is a copy of the DepthLoggerV2 defined in the external grpclog package. // It is defined here to avoid a circular dependency. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/internal/grpclog/prefixLogger.go b/vendor/google.golang.org/grpc/internal/grpclog/prefixLogger.go index 82af70e96f157..02224b42ca869 100644 --- a/vendor/google.golang.org/grpc/internal/grpclog/prefixLogger.go +++ b/vendor/google.golang.org/grpc/internal/grpclog/prefixLogger.go @@ -63,6 +63,9 @@ func (pl *PrefixLogger) Errorf(format string, args ...interface{}) { // Debugf does info logging at verbose level 2. func (pl *PrefixLogger) Debugf(format string, args ...interface{}) { + // TODO(6044): Refactor interfaces LoggerV2 and DepthLogger, and maybe + // rewrite PrefixLogger a little to ensure that we don't use the global + // `Logger` here, and instead use the `logger` field. if !Logger.V(2) { return } @@ -73,6 +76,15 @@ func (pl *PrefixLogger) Debugf(format string, args ...interface{}) { return } InfoDepth(1, fmt.Sprintf(format, args...)) + +} + +// V reports whether verbosity level l is at least the requested verbose level. +func (pl *PrefixLogger) V(l int) bool { + // TODO(6044): Refactor interfaces LoggerV2 and DepthLogger, and maybe + // rewrite PrefixLogger a little to ensure that we don't use the global + // `Logger` here, and instead use the `logger` field. + return Logger.V(l) } // NewPrefixLogger creates a prefix logger with the given prefix. diff --git a/vendor/google.golang.org/grpc/internal/grpcrand/grpcrand.go b/vendor/google.golang.org/grpc/internal/grpcrand/grpcrand.go index 740f83c2b7663..d08e3e907666b 100644 --- a/vendor/google.golang.org/grpc/internal/grpcrand/grpcrand.go +++ b/vendor/google.golang.org/grpc/internal/grpcrand/grpcrand.go @@ -52,6 +52,13 @@ func Intn(n int) int { return r.Intn(n) } +// Int31n implements rand.Int31n on the grpcrand global source. +func Int31n(n int32) int32 { + mu.Lock() + defer mu.Unlock() + return r.Int31n(n) +} + // Float64 implements rand.Float64 on the grpcrand global source. func Float64() float64 { mu.Lock() @@ -65,3 +72,17 @@ func Uint64() uint64 { defer mu.Unlock() return r.Uint64() } + +// Uint32 implements rand.Uint32 on the grpcrand global source. +func Uint32() uint32 { + mu.Lock() + defer mu.Unlock() + return r.Uint32() +} + +// Shuffle implements rand.Shuffle on the grpcrand global source. +var Shuffle = func(n int, f func(int, int)) { + mu.Lock() + defer mu.Unlock() + r.Shuffle(n, f) +} diff --git a/vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go b/vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go new file mode 100644 index 0000000000000..37b8d4117e778 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go @@ -0,0 +1,119 @@ +/* + * + * Copyright 2022 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpcsync + +import ( + "context" + "sync" + + "google.golang.org/grpc/internal/buffer" +) + +// CallbackSerializer provides a mechanism to schedule callbacks in a +// synchronized manner. It provides a FIFO guarantee on the order of execution +// of scheduled callbacks. New callbacks can be scheduled by invoking the +// Schedule() method. +// +// This type is safe for concurrent access. +type CallbackSerializer struct { + // Done is closed once the serializer is shut down completely, i.e all + // scheduled callbacks are executed and the serializer has deallocated all + // its resources. + Done chan struct{} + + callbacks *buffer.Unbounded + closedMu sync.Mutex + closed bool +} + +// NewCallbackSerializer returns a new CallbackSerializer instance. The provided +// context will be passed to the scheduled callbacks. Users should cancel the +// provided context to shutdown the CallbackSerializer. It is guaranteed that no +// callbacks will be added once this context is canceled, and any pending un-run +// callbacks will be executed before the serializer is shut down. +func NewCallbackSerializer(ctx context.Context) *CallbackSerializer { + t := &CallbackSerializer{ + Done: make(chan struct{}), + callbacks: buffer.NewUnbounded(), + } + go t.run(ctx) + return t +} + +// Schedule adds a callback to be scheduled after existing callbacks are run. +// +// Callbacks are expected to honor the context when performing any blocking +// operations, and should return early when the context is canceled. +// +// Return value indicates if the callback was successfully added to the list of +// callbacks to be executed by the serializer. It is not possible to add +// callbacks once the context passed to NewCallbackSerializer is cancelled. +func (t *CallbackSerializer) Schedule(f func(ctx context.Context)) bool { + t.closedMu.Lock() + defer t.closedMu.Unlock() + + if t.closed { + return false + } + t.callbacks.Put(f) + return true +} + +func (t *CallbackSerializer) run(ctx context.Context) { + var backlog []func(context.Context) + + defer close(t.Done) + for ctx.Err() == nil { + select { + case <-ctx.Done(): + // Do nothing here. Next iteration of the for loop will not happen, + // since ctx.Err() would be non-nil. + case callback, ok := <-t.callbacks.Get(): + if !ok { + return + } + t.callbacks.Load() + callback.(func(ctx context.Context))(ctx) + } + } + + // Fetch pending callbacks if any, and execute them before returning from + // this method and closing t.Done. + t.closedMu.Lock() + t.closed = true + backlog = t.fetchPendingCallbacks() + t.callbacks.Close() + t.closedMu.Unlock() + for _, b := range backlog { + b(ctx) + } +} + +func (t *CallbackSerializer) fetchPendingCallbacks() []func(context.Context) { + var backlog []func(context.Context) + for { + select { + case b := <-t.callbacks.Get(): + backlog = append(backlog, b.(func(context.Context))) + t.callbacks.Load() + default: + return backlog + } + } +} diff --git a/vendor/google.golang.org/grpc/internal/grpcsync/oncefunc.go b/vendor/google.golang.org/grpc/internal/grpcsync/oncefunc.go new file mode 100644 index 0000000000000..6635f7bca96da --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/grpcsync/oncefunc.go @@ -0,0 +1,32 @@ +/* + * + * Copyright 2022 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpcsync + +import ( + "sync" +) + +// OnceFunc returns a function wrapping f which ensures f is only executed +// once even if the returned function is executed multiple times. +func OnceFunc(f func()) func() { + var once sync.Once + return func() { + once.Do(f) + } +} diff --git a/vendor/google.golang.org/grpc/internal/grpcutil/compressor.go b/vendor/google.golang.org/grpc/internal/grpcutil/compressor.go new file mode 100644 index 0000000000000..9f4090967980b --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/grpcutil/compressor.go @@ -0,0 +1,47 @@ +/* + * + * Copyright 2022 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package grpcutil + +import ( + "strings" + + "google.golang.org/grpc/internal/envconfig" +) + +// RegisteredCompressorNames holds names of the registered compressors. +var RegisteredCompressorNames []string + +// IsCompressorNameRegistered returns true when name is available in registry. +func IsCompressorNameRegistered(name string) bool { + for _, compressor := range RegisteredCompressorNames { + if compressor == name { + return true + } + } + return false +} + +// RegisteredCompressors returns a string of registered compressor names +// separated by comma. +func RegisteredCompressors() string { + if !envconfig.AdvertiseCompressors { + return "" + } + return strings.Join(RegisteredCompressorNames, ",") +} diff --git a/vendor/google.golang.org/grpc/internal/grpcutil/method.go b/vendor/google.golang.org/grpc/internal/grpcutil/method.go index 4e7475060c1c7..ec62b4775e5b4 100644 --- a/vendor/google.golang.org/grpc/internal/grpcutil/method.go +++ b/vendor/google.golang.org/grpc/internal/grpcutil/method.go @@ -25,7 +25,6 @@ import ( // ParseMethod splits service and method from the input. It expects format // "/service/method". -// func ParseMethod(methodName string) (service, method string, _ error) { if !strings.HasPrefix(methodName, "/") { return "", "", errors.New("invalid method name: should start with /") @@ -39,6 +38,11 @@ func ParseMethod(methodName string) (service, method string, _ error) { return methodName[:pos], methodName[pos+1:], nil } +// baseContentType is the base content-type for gRPC. This is a valid +// content-type on it's own, but can also include a content-subtype such as +// "proto" as a suffix after "+" or ";". See +// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests +// for more details. const baseContentType = "application/grpc" // ContentSubtype returns the content-subtype for the given content-type. The diff --git a/vendor/google.golang.org/grpc/internal/internal.go b/vendor/google.golang.org/grpc/internal/internal.go index 6d355b0b01344..42ff39c84446b 100644 --- a/vendor/google.golang.org/grpc/internal/internal.go +++ b/vendor/google.golang.org/grpc/internal/internal.go @@ -58,11 +58,112 @@ var ( // gRPC server. An xDS-enabled server needs to know what type of credentials // is configured on the underlying gRPC server. This is set by server.go. GetServerCredentials interface{} // func (*grpc.Server) credentials.TransportCredentials + // CanonicalString returns the canonical string of the code defined here: + // https://github.com/grpc/grpc/blob/master/doc/statuscodes.md. + // + // This is used in the 1.0 release of gcp/observability, and thus must not be + // deleted or changed. + CanonicalString interface{} // func (codes.Code) string // DrainServerTransports initiates a graceful close of existing connections // on a gRPC server accepted on the provided listener address. An // xDS-enabled server invokes this method on a grpc.Server when a particular // listener moves to "not-serving" mode. DrainServerTransports interface{} // func(*grpc.Server, string) + // AddGlobalServerOptions adds an array of ServerOption that will be + // effective globally for newly created servers. The priority will be: 1. + // user-provided; 2. this method; 3. default values. + // + // This is used in the 1.0 release of gcp/observability, and thus must not be + // deleted or changed. + AddGlobalServerOptions interface{} // func(opt ...ServerOption) + // ClearGlobalServerOptions clears the array of extra ServerOption. This + // method is useful in testing and benchmarking. + // + // This is used in the 1.0 release of gcp/observability, and thus must not be + // deleted or changed. + ClearGlobalServerOptions func() + // AddGlobalDialOptions adds an array of DialOption that will be effective + // globally for newly created client channels. The priority will be: 1. + // user-provided; 2. this method; 3. default values. + // + // This is used in the 1.0 release of gcp/observability, and thus must not be + // deleted or changed. + AddGlobalDialOptions interface{} // func(opt ...DialOption) + // DisableGlobalDialOptions returns a DialOption that prevents the + // ClientConn from applying the global DialOptions (set via + // AddGlobalDialOptions). + // + // This is used in the 1.0 release of gcp/observability, and thus must not be + // deleted or changed. + DisableGlobalDialOptions interface{} // func() grpc.DialOption + // ClearGlobalDialOptions clears the array of extra DialOption. This + // method is useful in testing and benchmarking. + // + // This is used in the 1.0 release of gcp/observability, and thus must not be + // deleted or changed. + ClearGlobalDialOptions func() + // JoinDialOptions combines the dial options passed as arguments into a + // single dial option. + JoinDialOptions interface{} // func(...grpc.DialOption) grpc.DialOption + // JoinServerOptions combines the server options passed as arguments into a + // single server option. + JoinServerOptions interface{} // func(...grpc.ServerOption) grpc.ServerOption + + // WithBinaryLogger returns a DialOption that specifies the binary logger + // for a ClientConn. + // + // This is used in the 1.0 release of gcp/observability, and thus must not be + // deleted or changed. + WithBinaryLogger interface{} // func(binarylog.Logger) grpc.DialOption + // BinaryLogger returns a ServerOption that can set the binary logger for a + // server. + // + // This is used in the 1.0 release of gcp/observability, and thus must not be + // deleted or changed. + BinaryLogger interface{} // func(binarylog.Logger) grpc.ServerOption + + // NewXDSResolverWithConfigForTesting creates a new xds resolver builder using + // the provided xds bootstrap config instead of the global configuration from + // the supported environment variables. The resolver.Builder is meant to be + // used in conjunction with the grpc.WithResolvers DialOption. + // + // Testing Only + // + // This function should ONLY be used for testing and may not work with some + // other features, including the CSDS service. + NewXDSResolverWithConfigForTesting interface{} // func([]byte) (resolver.Builder, error) + + // RegisterRLSClusterSpecifierPluginForTesting registers the RLS Cluster + // Specifier Plugin for testing purposes, regardless of the XDSRLS environment + // variable. + // + // TODO: Remove this function once the RLS env var is removed. + RegisterRLSClusterSpecifierPluginForTesting func() + + // UnregisterRLSClusterSpecifierPluginForTesting unregisters the RLS Cluster + // Specifier Plugin for testing purposes. This is needed because there is no way + // to unregister the RLS Cluster Specifier Plugin after registering it solely + // for testing purposes using RegisterRLSClusterSpecifierPluginForTesting(). + // + // TODO: Remove this function once the RLS env var is removed. + UnregisterRLSClusterSpecifierPluginForTesting func() + + // RegisterRBACHTTPFilterForTesting registers the RBAC HTTP Filter for testing + // purposes, regardless of the RBAC environment variable. + // + // TODO: Remove this function once the RBAC env var is removed. + RegisterRBACHTTPFilterForTesting func() + + // UnregisterRBACHTTPFilterForTesting unregisters the RBAC HTTP Filter for + // testing purposes. This is needed because there is no way to unregister the + // HTTP Filter after registering it solely for testing purposes using + // RegisterRBACHTTPFilterForTesting(). + // + // TODO: Remove this function once the RBAC env var is removed. + UnregisterRBACHTTPFilterForTesting func() + + // ORCAAllowAnyMinReportingInterval is for examples/orca use ONLY. + ORCAAllowAnyMinReportingInterval interface{} // func(so *orca.ServiceOptions) ) // HealthChecker defines the signature of the client-side LB channel health checking function. diff --git a/vendor/google.golang.org/grpc/internal/metadata/metadata.go b/vendor/google.golang.org/grpc/internal/metadata/metadata.go index b2980f8ac44ad..c82e608e07734 100644 --- a/vendor/google.golang.org/grpc/internal/metadata/metadata.go +++ b/vendor/google.golang.org/grpc/internal/metadata/metadata.go @@ -76,33 +76,11 @@ func Set(addr resolver.Address, md metadata.MD) resolver.Address { return addr } -// Validate returns an error if the input md contains invalid keys or values. -// -// If the header is not a pseudo-header, the following items are checked: -// - header names must contain one or more characters from this set [0-9 a-z _ - .]. -// - if the header-name ends with a "-bin" suffix, no validation of the header value is performed. -// - otherwise, the header value must contain one or more characters from the set [%x20-%x7E]. +// Validate validates every pair in md with ValidatePair. func Validate(md metadata.MD) error { for k, vals := range md { - // pseudo-header will be ignored - if k[0] == ':' { - continue - } - // check key, for i that saving a conversion if not using for range - for i := 0; i < len(k); i++ { - r := k[i] - if !(r >= 'a' && r <= 'z') && !(r >= '0' && r <= '9') && r != '.' && r != '-' && r != '_' { - return fmt.Errorf("header key %q contains illegal characters not in [0-9a-z-_.]", k) - } - } - if strings.HasSuffix(k, "-bin") { - continue - } - // check value - for _, val := range vals { - if hasNotPrintable(val) { - return fmt.Errorf("header key %q contains value with non-printable ASCII characters", k) - } + if err := ValidatePair(k, vals...); err != nil { + return err } } return nil @@ -118,3 +96,37 @@ func hasNotPrintable(msg string) bool { } return false } + +// ValidatePair validate a key-value pair with the following rules (the pseudo-header will be skipped) : +// +// - key must contain one or more characters. +// - the characters in the key must be contained in [0-9 a-z _ - .]. +// - if the key ends with a "-bin" suffix, no validation of the corresponding value is performed. +// - the characters in the every value must be printable (in [%x20-%x7E]). +func ValidatePair(key string, vals ...string) error { + // key should not be empty + if key == "" { + return fmt.Errorf("there is an empty key in the header") + } + // pseudo-header will be ignored + if key[0] == ':' { + return nil + } + // check key, for i that saving a conversion if not using for range + for i := 0; i < len(key); i++ { + r := key[i] + if !(r >= 'a' && r <= 'z') && !(r >= '0' && r <= '9') && r != '.' && r != '-' && r != '_' { + return fmt.Errorf("header key %q contains illegal characters not in [0-9a-z-_.]", key) + } + } + if strings.HasSuffix(key, "-bin") { + return nil + } + // check value + for _, val := range vals { + if hasNotPrintable(val) { + return fmt.Errorf("header key %q contains value with non-printable ASCII characters", key) + } + } + return nil +} diff --git a/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go b/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go index 75301c514913c..09a667f33cb09 100644 --- a/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go +++ b/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go @@ -116,7 +116,7 @@ type dnsBuilder struct{} // Build creates and starts a DNS resolver that watches the name resolution of the target. func (b *dnsBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error) { - host, port, err := parseTarget(target.Endpoint, defaultPort) + host, port, err := parseTarget(target.Endpoint(), defaultPort) if err != nil { return nil, err } @@ -140,10 +140,10 @@ func (b *dnsBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts disableServiceConfig: opts.DisableServiceConfig, } - if target.Authority == "" { + if target.URL.Host == "" { d.resolver = defaultResolver } else { - d.resolver, err = customAuthorityResolver(target.Authority) + d.resolver, err = customAuthorityResolver(target.URL.Host) if err != nil { return nil, err } diff --git a/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go b/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go index 520d9229e1ed7..afac56572ad55 100644 --- a/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go +++ b/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go @@ -20,13 +20,20 @@ // name without scheme back to gRPC as resolved address. package passthrough -import "google.golang.org/grpc/resolver" +import ( + "errors" + + "google.golang.org/grpc/resolver" +) const scheme = "passthrough" type passthroughBuilder struct{} func (*passthroughBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error) { + if target.Endpoint() == "" && opts.Dialer == nil { + return nil, errors.New("passthrough: received empty target in Build()") + } r := &passthroughResolver{ target: target, cc: cc, @@ -45,7 +52,7 @@ type passthroughResolver struct { } func (r *passthroughResolver) start() { - r.cc.UpdateState(resolver.State{Addresses: []resolver.Address{{Addr: r.target.Endpoint}}}) + r.cc.UpdateState(resolver.State{Addresses: []resolver.Address{{Addr: r.target.Endpoint()}}}) } func (*passthroughResolver) ResolveNow(o resolver.ResolveNowOptions) {} diff --git a/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go b/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go index 20852e59df298..1609116877383 100644 --- a/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go +++ b/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go @@ -34,8 +34,8 @@ type builder struct { } func (b *builder) Build(target resolver.Target, cc resolver.ClientConn, _ resolver.BuildOptions) (resolver.Resolver, error) { - if target.Authority != "" { - return nil, fmt.Errorf("invalid (non-empty) authority: %v", target.Authority) + if target.URL.Host != "" { + return nil, fmt.Errorf("invalid (non-empty) authority: %v", target.URL.Host) } // gRPC was parsing the dial target manually before PR #4817, and we @@ -49,8 +49,9 @@ func (b *builder) Build(target resolver.Target, cc resolver.ClientConn, _ resolv } addr := resolver.Address{Addr: endpoint} if b.scheme == unixAbstractScheme { - // prepend "\x00" to address for unix-abstract - addr.Addr = "\x00" + addr.Addr + // We can not prepend \0 as c++ gRPC does, as in Golang '@' is used to signify we do + // not want trailing \0 in address. + addr.Addr = "@" + addr.Addr } cc.UpdateState(resolver.State{Addresses: []resolver.Address{networktype.Set(addr, "unix")}}) return &nopResolver{}, nil diff --git a/vendor/google.golang.org/grpc/internal/serviceconfig/duration.go b/vendor/google.golang.org/grpc/internal/serviceconfig/duration.go new file mode 100644 index 0000000000000..11d82afcc7ec3 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/serviceconfig/duration.go @@ -0,0 +1,130 @@ +/* + * + * Copyright 2023 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package serviceconfig + +import ( + "encoding/json" + "fmt" + "math" + "strconv" + "strings" + "time" +) + +// Duration defines JSON marshal and unmarshal methods to conform to the +// protobuf JSON spec defined [here]. +// +// [here]: https://protobuf.dev/reference/protobuf/google.protobuf/#duration +type Duration time.Duration + +func (d Duration) String() string { + return fmt.Sprint(time.Duration(d)) +} + +// MarshalJSON converts from d to a JSON string output. +func (d Duration) MarshalJSON() ([]byte, error) { + ns := time.Duration(d).Nanoseconds() + sec := ns / int64(time.Second) + ns = ns % int64(time.Second) + + var sign string + if sec < 0 || ns < 0 { + sign, sec, ns = "-", -1*sec, -1*ns + } + + // Generated output always contains 0, 3, 6, or 9 fractional digits, + // depending on required precision. + str := fmt.Sprintf("%s%d.%09d", sign, sec, ns) + str = strings.TrimSuffix(str, "000") + str = strings.TrimSuffix(str, "000") + str = strings.TrimSuffix(str, ".000") + return []byte(fmt.Sprintf("\"%ss\"", str)), nil +} + +// UnmarshalJSON unmarshals b as a duration JSON string into d. +func (d *Duration) UnmarshalJSON(b []byte) error { + var s string + if err := json.Unmarshal(b, &s); err != nil { + return err + } + if !strings.HasSuffix(s, "s") { + return fmt.Errorf("malformed duration %q: missing seconds unit", s) + } + neg := false + if s[0] == '-' { + neg = true + s = s[1:] + } + ss := strings.SplitN(s[:len(s)-1], ".", 3) + if len(ss) > 2 { + return fmt.Errorf("malformed duration %q: too many decimals", s) + } + // hasDigits is set if either the whole or fractional part of the number is + // present, since both are optional but one is required. + hasDigits := false + var sec, ns int64 + if len(ss[0]) > 0 { + var err error + if sec, err = strconv.ParseInt(ss[0], 10, 64); err != nil { + return fmt.Errorf("malformed duration %q: %v", s, err) + } + // Maximum seconds value per the durationpb spec. + const maxProtoSeconds = 315_576_000_000 + if sec > maxProtoSeconds { + return fmt.Errorf("out of range: %q", s) + } + hasDigits = true + } + if len(ss) == 2 && len(ss[1]) > 0 { + if len(ss[1]) > 9 { + return fmt.Errorf("malformed duration %q: too many digits after decimal", s) + } + var err error + if ns, err = strconv.ParseInt(ss[1], 10, 64); err != nil { + return fmt.Errorf("malformed duration %q: %v", s, err) + } + for i := 9; i > len(ss[1]); i-- { + ns *= 10 + } + hasDigits = true + } + if !hasDigits { + return fmt.Errorf("malformed duration %q: contains no numbers", s) + } + + if neg { + sec *= -1 + ns *= -1 + } + + // Maximum/minimum seconds/nanoseconds representable by Go's time.Duration. + const maxSeconds = math.MaxInt64 / int64(time.Second) + const maxNanosAtMaxSeconds = math.MaxInt64 % int64(time.Second) + const minSeconds = math.MinInt64 / int64(time.Second) + const minNanosAtMinSeconds = math.MinInt64 % int64(time.Second) + + if sec > maxSeconds || (sec == maxSeconds && ns >= maxNanosAtMaxSeconds) { + *d = Duration(math.MaxInt64) + } else if sec < minSeconds || (sec == minSeconds && ns <= minNanosAtMinSeconds) { + *d = Duration(math.MinInt64) + } else { + *d = Duration(sec*int64(time.Second) + ns) + } + return nil +} diff --git a/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go b/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go index badbdbf597f3f..51e733e495a36 100644 --- a/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go +++ b/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go @@ -67,10 +67,10 @@ func (bc *BalancerConfig) MarshalJSON() ([]byte, error) { // ServiceConfig contains a list of loadBalancingConfigs, each with a name and // config. This method iterates through that list in order, and stops at the // first policy that is supported. -// - If the config for the first supported policy is invalid, the whole service -// config is invalid. -// - If the list doesn't contain any supported policy, the whole service config -// is invalid. +// - If the config for the first supported policy is invalid, the whole service +// config is invalid. +// - If the list doesn't contain any supported policy, the whole service config +// is invalid. func (bc *BalancerConfig) UnmarshalJSON(b []byte) error { var ir intermediateBalancerConfig err := json.Unmarshal(b, &ir) diff --git a/vendor/google.golang.org/grpc/internal/status/status.go b/vendor/google.golang.org/grpc/internal/status/status.go index e5c6513edd138..b0ead4f54f82f 100644 --- a/vendor/google.golang.org/grpc/internal/status/status.go +++ b/vendor/google.golang.org/grpc/internal/status/status.go @@ -164,3 +164,13 @@ func (e *Error) Is(target error) bool { } return proto.Equal(e.s.s, tse.s.s) } + +// IsRestrictedControlPlaneCode returns whether the status includes a code +// restricted for control plane usage as defined by gRFC A54. +func IsRestrictedControlPlaneCode(s *Status) bool { + switch s.Code() { + case codes.InvalidArgument, codes.NotFound, codes.AlreadyExists, codes.FailedPrecondition, codes.Aborted, codes.OutOfRange, codes.DataLoss: + return true + } + return false +} diff --git a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go index 244f4b081d527..be5a9c81eb976 100644 --- a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go +++ b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go @@ -22,6 +22,7 @@ import ( "bytes" "errors" "fmt" + "net" "runtime" "strconv" "sync" @@ -29,6 +30,7 @@ import ( "golang.org/x/net/http2" "golang.org/x/net/http2/hpack" + "google.golang.org/grpc/internal/grpclog" "google.golang.org/grpc/internal/grpcutil" "google.golang.org/grpc/status" ) @@ -191,7 +193,7 @@ type goAway struct { code http2.ErrCode debugData []byte headsUp bool - closeConn bool + closeConn error // if set, loopyWriter will exit, resulting in conn closure } func (*goAway) isTransportResponseFrame() bool { return false } @@ -209,6 +211,14 @@ type outFlowControlSizeRequest struct { func (*outFlowControlSizeRequest) isTransportResponseFrame() bool { return false } +// closeConnection is an instruction to tell the loopy writer to flush the +// framer and exit, which will cause the transport's connection to be closed +// (by the client or server). The transport itself will close after the reader +// encounters the EOF caused by the connection closure. +type closeConnection struct{} + +func (closeConnection) isTransportResponseFrame() bool { return false } + type outStreamState int const ( @@ -408,7 +418,7 @@ func (c *controlBuffer) get(block bool) (interface{}, error) { select { case <-c.ch: case <-c.done: - return nil, ErrConnClosing + return nil, errors.New("transport closed by client") } } } @@ -478,12 +488,14 @@ type loopyWriter struct { hEnc *hpack.Encoder // HPACK encoder. bdpEst *bdpEstimator draining bool + conn net.Conn + logger *grpclog.PrefixLogger // Side-specific handlers ssGoAwayHandler func(*goAway) (bool, error) } -func newLoopyWriter(s side, fr *framer, cbuf *controlBuffer, bdpEst *bdpEstimator) *loopyWriter { +func newLoopyWriter(s side, fr *framer, cbuf *controlBuffer, bdpEst *bdpEstimator, conn net.Conn, logger *grpclog.PrefixLogger) *loopyWriter { var buf bytes.Buffer l := &loopyWriter{ side: s, @@ -496,6 +508,8 @@ func newLoopyWriter(s side, fr *framer, cbuf *controlBuffer, bdpEst *bdpEstimato hBuf: &buf, hEnc: hpack.NewEncoder(&buf), bdpEst: bdpEst, + conn: conn, + logger: logger, } return l } @@ -513,23 +527,26 @@ const minBatchSize = 1000 // 2. Stream level flow control quota available. // // In each iteration of run loop, other than processing the incoming control -// frame, loopy calls processData, which processes one node from the activeStreams linked-list. -// This results in writing of HTTP2 frames into an underlying write buffer. -// When there's no more control frames to read from controlBuf, loopy flushes the write buffer. -// As an optimization, to increase the batch size for each flush, loopy yields the processor, once -// if the batch size is too low to give stream goroutines a chance to fill it up. +// frame, loopy calls processData, which processes one node from the +// activeStreams linked-list. This results in writing of HTTP2 frames into an +// underlying write buffer. When there's no more control frames to read from +// controlBuf, loopy flushes the write buffer. As an optimization, to increase +// the batch size for each flush, loopy yields the processor, once if the batch +// size is too low to give stream goroutines a chance to fill it up. +// +// Upon exiting, if the error causing the exit is not an I/O error, run() +// flushes and closes the underlying connection. Otherwise, the connection is +// left open to allow the I/O error to be encountered by the reader instead. func (l *loopyWriter) run() (err error) { defer func() { - if err == ErrConnClosing { - // Don't log ErrConnClosing as error since it happens - // 1. When the connection is closed by some other known issue. - // 2. User closed the connection. - // 3. A graceful close of connection. - if logger.V(logLevel) { - logger.Infof("transport: loopyWriter.run returning. %v", err) - } - err = nil + if l.logger.V(logLevel) { + l.logger.Infof("loopyWriter exiting with error: %v", err) } + if !isIOError(err) { + l.framer.writer.Flush() + l.conn.Close() + } + l.cbuf.finish() }() for { it, err := l.cbuf.get(true) @@ -574,7 +591,6 @@ func (l *loopyWriter) run() (err error) { } l.framer.writer.Flush() break hasdata - } } } @@ -583,11 +599,11 @@ func (l *loopyWriter) outgoingWindowUpdateHandler(w *outgoingWindowUpdate) error return l.framer.fr.WriteWindowUpdate(w.streamID, w.increment) } -func (l *loopyWriter) incomingWindowUpdateHandler(w *incomingWindowUpdate) error { +func (l *loopyWriter) incomingWindowUpdateHandler(w *incomingWindowUpdate) { // Otherwise update the quota. if w.streamID == 0 { l.sendQuota += w.increment - return nil + return } // Find the stream and update it. if str, ok := l.estdStreams[w.streamID]; ok { @@ -595,10 +611,9 @@ func (l *loopyWriter) incomingWindowUpdateHandler(w *incomingWindowUpdate) error if strQuota := int(l.oiws) - str.bytesOutStanding; strQuota > 0 && str.state == waitingOnStreamQuota { str.state = active l.activeStreams.enqueue(str) - return nil + return } } - return nil } func (l *loopyWriter) outgoingSettingsHandler(s *outgoingSettings) error { @@ -606,13 +621,11 @@ func (l *loopyWriter) outgoingSettingsHandler(s *outgoingSettings) error { } func (l *loopyWriter) incomingSettingsHandler(s *incomingSettings) error { - if err := l.applySettings(s.ss); err != nil { - return err - } + l.applySettings(s.ss) return l.framer.fr.WriteSettingsAck() } -func (l *loopyWriter) registerStreamHandler(h *registerStream) error { +func (l *loopyWriter) registerStreamHandler(h *registerStream) { str := &outStream{ id: h.streamID, state: empty, @@ -620,15 +633,14 @@ func (l *loopyWriter) registerStreamHandler(h *registerStream) error { wq: h.wq, } l.estdStreams[h.streamID] = str - return nil } func (l *loopyWriter) headerHandler(h *headerFrame) error { if l.side == serverSide { str, ok := l.estdStreams[h.streamID] if !ok { - if logger.V(logLevel) { - logger.Warningf("transport: loopy doesn't recognize the stream: %d", h.streamID) + if l.logger.V(logLevel) { + l.logger.Infof("Unrecognized streamID %d in loopyWriter", h.streamID) } return nil } @@ -655,19 +667,20 @@ func (l *loopyWriter) headerHandler(h *headerFrame) error { itl: &itemList{}, wq: h.wq, } - str.itl.enqueue(h) - return l.originateStream(str) + return l.originateStream(str, h) } -func (l *loopyWriter) originateStream(str *outStream) error { - hdr := str.itl.dequeue().(*headerFrame) - if err := hdr.initStream(str.id); err != nil { - if err == ErrConnClosing { - return err - } - // Other errors(errStreamDrain) need not close transport. +func (l *loopyWriter) originateStream(str *outStream, hdr *headerFrame) error { + // l.draining is set when handling GoAway. In which case, we want to avoid + // creating new streams. + if l.draining { + // TODO: provide a better error with the reason we are in draining. + hdr.onOrphaned(errStreamDrain) return nil } + if err := hdr.initStream(str.id); err != nil { + return err + } if err := l.writeHeader(str.id, hdr.endStream, hdr.hf, hdr.onWrite); err != nil { return err } @@ -682,8 +695,8 @@ func (l *loopyWriter) writeHeader(streamID uint32, endStream bool, hf []hpack.He l.hBuf.Reset() for _, f := range hf { if err := l.hEnc.WriteField(f); err != nil { - if logger.V(logLevel) { - logger.Warningf("transport: loopyWriter.writeHeader encountered error while encoding headers: %v", err) + if l.logger.V(logLevel) { + l.logger.Warningf("Encountered error while encoding headers: %v", err) } } } @@ -721,10 +734,10 @@ func (l *loopyWriter) writeHeader(streamID uint32, endStream bool, hf []hpack.He return nil } -func (l *loopyWriter) preprocessData(df *dataFrame) error { +func (l *loopyWriter) preprocessData(df *dataFrame) { str, ok := l.estdStreams[df.streamID] if !ok { - return nil + return } // If we got data for a stream it means that // stream was originated and the headers were sent out. @@ -733,7 +746,6 @@ func (l *loopyWriter) preprocessData(df *dataFrame) error { str.state = active l.activeStreams.enqueue(str) } - return nil } func (l *loopyWriter) pingHandler(p *ping) error { @@ -744,9 +756,8 @@ func (l *loopyWriter) pingHandler(p *ping) error { } -func (l *loopyWriter) outFlowControlSizeRequestHandler(o *outFlowControlSizeRequest) error { +func (l *loopyWriter) outFlowControlSizeRequestHandler(o *outFlowControlSizeRequest) { o.resp <- l.sendQuota - return nil } func (l *loopyWriter) cleanupStreamHandler(c *cleanupStream) error { @@ -763,8 +774,9 @@ func (l *loopyWriter) cleanupStreamHandler(c *cleanupStream) error { return err } } - if l.side == clientSide && l.draining && len(l.estdStreams) == 0 { - return ErrConnClosing + if l.draining && len(l.estdStreams) == 0 { + // Flush and close the connection; we are done with it. + return errors.New("finished processing active streams while in draining mode") } return nil } @@ -799,7 +811,8 @@ func (l *loopyWriter) incomingGoAwayHandler(*incomingGoAway) error { if l.side == clientSide { l.draining = true if len(l.estdStreams) == 0 { - return ErrConnClosing + // Flush and close the connection; we are done with it. + return errors.New("received GOAWAY with no active streams") } } return nil @@ -820,7 +833,7 @@ func (l *loopyWriter) goAwayHandler(g *goAway) error { func (l *loopyWriter) handle(i interface{}) error { switch i := i.(type) { case *incomingWindowUpdate: - return l.incomingWindowUpdateHandler(i) + l.incomingWindowUpdateHandler(i) case *outgoingWindowUpdate: return l.outgoingWindowUpdateHandler(i) case *incomingSettings: @@ -830,7 +843,7 @@ func (l *loopyWriter) handle(i interface{}) error { case *headerFrame: return l.headerHandler(i) case *registerStream: - return l.registerStreamHandler(i) + l.registerStreamHandler(i) case *cleanupStream: return l.cleanupStreamHandler(i) case *earlyAbortStream: @@ -838,19 +851,24 @@ func (l *loopyWriter) handle(i interface{}) error { case *incomingGoAway: return l.incomingGoAwayHandler(i) case *dataFrame: - return l.preprocessData(i) + l.preprocessData(i) case *ping: return l.pingHandler(i) case *goAway: return l.goAwayHandler(i) case *outFlowControlSizeRequest: - return l.outFlowControlSizeRequestHandler(i) + l.outFlowControlSizeRequestHandler(i) + case closeConnection: + // Just return a non-I/O error and run() will flush and close the + // connection. + return ErrConnClosing default: return fmt.Errorf("transport: unknown control message type %T", i) } + return nil } -func (l *loopyWriter) applySettings(ss []http2.Setting) error { +func (l *loopyWriter) applySettings(ss []http2.Setting) { for _, s := range ss { switch s.ID { case http2.SettingInitialWindowSize: @@ -869,7 +887,6 @@ func (l *loopyWriter) applySettings(ss []http2.Setting) error { updateHeaderTblSize(l.hEnc, s.Val) } } - return nil } // processData removes the first stream from active streams, writes out at most 16KB @@ -886,9 +903,9 @@ func (l *loopyWriter) processData() (bool, error) { dataItem := str.itl.peek().(*dataFrame) // Peek at the first data item this stream. // A data item is represented by a dataFrame, since it later translates into // multiple HTTP2 data frames. - // Every dataFrame has two buffers; h that keeps grpc-message header and d that is acutal data. + // Every dataFrame has two buffers; h that keeps grpc-message header and d that is actual data. // As an optimization to keep wire traffic low, data from d is copied to h to make as big as the - // maximum possilbe HTTP2 frame size. + // maximum possible HTTP2 frame size. if len(dataItem.h) == 0 && len(dataItem.d) == 0 { // Empty data frame // Client sends out empty data frame with endStream = true @@ -903,7 +920,7 @@ func (l *loopyWriter) processData() (bool, error) { return false, err } if err := l.cleanupStreamHandler(trailer.cleanup); err != nil { - return false, nil + return false, err } } else { l.activeStreams.enqueue(str) diff --git a/vendor/google.golang.org/grpc/internal/transport/defaults.go b/vendor/google.golang.org/grpc/internal/transport/defaults.go index 9fa306b2e07a2..bc8ee07474968 100644 --- a/vendor/google.golang.org/grpc/internal/transport/defaults.go +++ b/vendor/google.golang.org/grpc/internal/transport/defaults.go @@ -47,3 +47,9 @@ const ( defaultClientMaxHeaderListSize = uint32(16 << 20) defaultServerMaxHeaderListSize = uint32(16 << 20) ) + +// MaxStreamID is the upper bound for the stream ID before the current +// transport gracefully closes and new transport is created for subsequent RPCs. +// This is set to 75% of 2^31-1. Streams are identified with an unsigned 31-bit +// integer. It's exported so that tests can override it. +var MaxStreamID = uint32(math.MaxInt32 * 3 / 4) diff --git a/vendor/google.golang.org/grpc/internal/transport/handler_server.go b/vendor/google.golang.org/grpc/internal/transport/handler_server.go index 1c3459c2b4c58..98f80e3fa00aa 100644 --- a/vendor/google.golang.org/grpc/internal/transport/handler_server.go +++ b/vendor/google.golang.org/grpc/internal/transport/handler_server.go @@ -39,6 +39,7 @@ import ( "golang.org/x/net/http2" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" + "google.golang.org/grpc/internal/grpclog" "google.golang.org/grpc/internal/grpcutil" "google.golang.org/grpc/metadata" "google.golang.org/grpc/peer" @@ -46,24 +47,32 @@ import ( "google.golang.org/grpc/status" ) -// NewServerHandlerTransport returns a ServerTransport handling gRPC -// from inside an http.Handler. It requires that the http Server -// supports HTTP/2. -func NewServerHandlerTransport(w http.ResponseWriter, r *http.Request, stats stats.Handler) (ServerTransport, error) { +// NewServerHandlerTransport returns a ServerTransport handling gRPC from +// inside an http.Handler, or writes an HTTP error to w and returns an error. +// It requires that the http Server supports HTTP/2. +func NewServerHandlerTransport(w http.ResponseWriter, r *http.Request, stats []stats.Handler) (ServerTransport, error) { if r.ProtoMajor != 2 { - return nil, errors.New("gRPC requires HTTP/2") + msg := "gRPC requires HTTP/2" + http.Error(w, msg, http.StatusBadRequest) + return nil, errors.New(msg) } if r.Method != "POST" { - return nil, errors.New("invalid gRPC request method") + msg := fmt.Sprintf("invalid gRPC request method %q", r.Method) + http.Error(w, msg, http.StatusBadRequest) + return nil, errors.New(msg) } contentType := r.Header.Get("Content-Type") // TODO: do we assume contentType is lowercase? we did before contentSubtype, validContentType := grpcutil.ContentSubtype(contentType) if !validContentType { - return nil, errors.New("invalid gRPC request content-type") + msg := fmt.Sprintf("invalid gRPC request content-type %q", contentType) + http.Error(w, msg, http.StatusUnsupportedMediaType) + return nil, errors.New(msg) } if _, ok := w.(http.Flusher); !ok { - return nil, errors.New("gRPC requires a ResponseWriter supporting http.Flusher") + msg := "gRPC requires a ResponseWriter supporting http.Flusher" + http.Error(w, msg, http.StatusInternalServerError) + return nil, errors.New(msg) } st := &serverHandlerTransport{ @@ -75,11 +84,14 @@ func NewServerHandlerTransport(w http.ResponseWriter, r *http.Request, stats sta contentSubtype: contentSubtype, stats: stats, } + st.logger = prefixLoggerForServerHandlerTransport(st) if v := r.Header.Get("grpc-timeout"); v != "" { to, err := decodeTimeout(v) if err != nil { - return nil, status.Errorf(codes.Internal, "malformed time-out: %v", err) + msg := fmt.Sprintf("malformed grpc-timeout: %v", err) + http.Error(w, msg, http.StatusBadRequest) + return nil, status.Error(codes.Internal, msg) } st.timeoutSet = true st.timeout = to @@ -97,7 +109,9 @@ func NewServerHandlerTransport(w http.ResponseWriter, r *http.Request, stats sta for _, v := range vv { v, err := decodeMetadataHeader(k, v) if err != nil { - return nil, status.Errorf(codes.Internal, "malformed binary metadata: %v", err) + msg := fmt.Sprintf("malformed binary metadata %q in header %q: %v", v, k, err) + http.Error(w, msg, http.StatusBadRequest) + return nil, status.Error(codes.Internal, msg) } metakv = append(metakv, k, v) } @@ -138,15 +152,19 @@ type serverHandlerTransport struct { // TODO make sure this is consistent across handler_server and http2_server contentSubtype string - stats stats.Handler + stats []stats.Handler + logger *grpclog.PrefixLogger } -func (ht *serverHandlerTransport) Close() { - ht.closeOnce.Do(ht.closeCloseChanOnce) +func (ht *serverHandlerTransport) Close(err error) { + ht.closeOnce.Do(func() { + if ht.logger.V(logLevel) { + ht.logger.Infof("Closing: %v", err) + } + close(ht.closedCh) + }) } -func (ht *serverHandlerTransport) closeCloseChanOnce() { close(ht.closedCh) } - func (ht *serverHandlerTransport) RemoteAddr() net.Addr { return strAddr(ht.req.RemoteAddr) } // strAddr is a net.Addr backed by either a TCP "ip:port" string, or @@ -228,15 +246,15 @@ func (ht *serverHandlerTransport) WriteStatus(s *Stream, st *status.Status) erro }) if err == nil { // transport has not been closed - if ht.stats != nil { - // Note: The trailer fields are compressed with hpack after this call returns. - // No WireLength field is set here. - ht.stats.HandleRPC(s.Context(), &stats.OutTrailer{ + // Note: The trailer fields are compressed with hpack after this call returns. + // No WireLength field is set here. + for _, sh := range ht.stats { + sh.HandleRPC(s.Context(), &stats.OutTrailer{ Trailer: s.trailer.Copy(), }) } } - ht.Close() + ht.Close(errors.New("finished writing status")) return err } @@ -314,10 +332,10 @@ func (ht *serverHandlerTransport) WriteHeader(s *Stream, md metadata.MD) error { }) if err == nil { - if ht.stats != nil { + for _, sh := range ht.stats { // Note: The header fields are compressed with hpack after this call returns. // No WireLength field is set here. - ht.stats.HandleRPC(s.Context(), &stats.OutHeader{ + sh.HandleRPC(s.Context(), &stats.OutHeader{ Header: md.Copy(), Compression: s.sendCompress, }) @@ -346,7 +364,7 @@ func (ht *serverHandlerTransport) HandleStreams(startStream func(*Stream), trace case <-ht.req.Context().Done(): } cancel() - ht.Close() + ht.Close(errors.New("request is done processing")) }() req := ht.req @@ -369,14 +387,14 @@ func (ht *serverHandlerTransport) HandleStreams(startStream func(*Stream), trace } ctx = metadata.NewIncomingContext(ctx, ht.headerMD) s.ctx = peer.NewContext(ctx, pr) - if ht.stats != nil { - s.ctx = ht.stats.TagRPC(s.ctx, &stats.RPCTagInfo{FullMethodName: s.method}) + for _, sh := range ht.stats { + s.ctx = sh.TagRPC(s.ctx, &stats.RPCTagInfo{FullMethodName: s.method}) inHeader := &stats.InHeader{ FullMethod: s.method, RemoteAddr: ht.RemoteAddr(), Compression: s.recvCompress, } - ht.stats.HandleRPC(s.ctx, inHeader) + sh.HandleRPC(s.ctx, inHeader) } s.trReader = &transportReader{ reader: &recvBufferReader{ctx: s.ctx, ctxDone: s.ctx.Done(), recv: s.buf, freeBuffer: func(*bytes.Buffer) {}}, @@ -435,17 +453,17 @@ func (ht *serverHandlerTransport) IncrMsgSent() {} func (ht *serverHandlerTransport) IncrMsgRecv() {} -func (ht *serverHandlerTransport) Drain() { +func (ht *serverHandlerTransport) Drain(debugData string) { panic("Drain() is not implemented") } // mapRecvMsgError returns the non-nil err into the appropriate // error value as expected by callers of *grpc.parser.recvMsg. // In particular, in can only be: -// * io.EOF -// * io.ErrUnexpectedEOF -// * of type transport.ConnectionError -// * an error from the status package +// - io.EOF +// - io.ErrUnexpectedEOF +// - of type transport.ConnectionError +// - an error from the status package func mapRecvMsgError(err error) error { if err == io.EOF || err == io.ErrUnexpectedEOF { return err diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_client.go b/vendor/google.golang.org/grpc/internal/transport/http2_client.go index 24ca59084b434..326bf08480002 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http2_client.go +++ b/vendor/google.golang.org/grpc/internal/transport/http2_client.go @@ -38,8 +38,11 @@ import ( "google.golang.org/grpc/credentials" "google.golang.org/grpc/internal/channelz" icredentials "google.golang.org/grpc/internal/credentials" + "google.golang.org/grpc/internal/grpclog" + "google.golang.org/grpc/internal/grpcsync" "google.golang.org/grpc/internal/grpcutil" imetadata "google.golang.org/grpc/internal/metadata" + istatus "google.golang.org/grpc/internal/status" "google.golang.org/grpc/internal/syscall" "google.golang.org/grpc/internal/transport/networktype" "google.golang.org/grpc/keepalive" @@ -57,11 +60,15 @@ var clientConnectionCounter uint64 // http2Client implements the ClientTransport interface with HTTP2. type http2Client struct { - lastRead int64 // Keep this field 64-bit aligned. Accessed atomically. - ctx context.Context - cancel context.CancelFunc - ctxDone <-chan struct{} // Cache the ctx.Done() chan. - userAgent string + lastRead int64 // Keep this field 64-bit aligned. Accessed atomically. + ctx context.Context + cancel context.CancelFunc + ctxDone <-chan struct{} // Cache the ctx.Done() chan. + userAgent string + // address contains the resolver returned address for this transport. + // If the `ServerName` field is set, it takes precedence over `CallHdr.Host` + // passed to `NewStream`, when determining the :authority header. + address resolver.Address md metadata.MD conn net.Conn // underlying communication channel loopy *loopyWriter @@ -78,6 +85,7 @@ type http2Client struct { framer *framer // controlBuf delivers all the control related tasks (e.g., window // updates, reset streams, and various settings) to the controller. + // Do not access controlBuf with mu held. controlBuf *controlBuffer fc *trInFlow // The scheme used: https if TLS is on, http otherwise. @@ -90,7 +98,7 @@ type http2Client struct { kp keepalive.ClientParameters keepaliveEnabled bool - statsHandler stats.Handler + statsHandlers []stats.Handler initialWindowSize int32 @@ -98,17 +106,15 @@ type http2Client struct { maxSendHeaderListSize *uint32 bdpEst *bdpEstimator - // onPrefaceReceipt is a callback that client transport calls upon - // receiving server preface to signal that a succefull HTTP2 - // connection was established. - onPrefaceReceipt func() maxConcurrentStreams uint32 streamQuota int64 streamsQuotaAvailable chan struct{} waitingStreams uint32 nextID uint32 + registeredCompressors string + // Do not access controlBuf with mu held. mu sync.Mutex // guard the following variables state transportState activeStreams map[uint32]*Stream @@ -135,12 +141,12 @@ type http2Client struct { channelzID *channelz.Identifier czData *channelzData - onGoAway func(GoAwayReason) - onClose func() + onClose func(GoAwayReason) bufferPool *bufferPool connectionID uint64 + logger *grpclog.PrefixLogger } func dial(ctx context.Context, fn func(context.Context, string) (net.Conn, error), addr resolver.Address, useProxy bool, grpcUA string) (net.Conn, error) { @@ -192,7 +198,7 @@ func isTemporary(err error) bool { // newHTTP2Client constructs a connected ClientTransport to addr based on HTTP2 // and starts to receive messages on it. Non-nil error returns if construction // fails. -func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onPrefaceReceipt func(), onGoAway func(GoAwayReason), onClose func()) (_ *http2Client, err error) { +func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onClose func(GoAwayReason)) (_ *http2Client, err error) { scheme := "http" ctx, cancel := context.WithCancel(ctx) defer func() { @@ -212,14 +218,40 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts if opts.FailOnNonTempDialError { return nil, connectionErrorf(isTemporary(err), err, "transport: error while dialing: %v", err) } - return nil, connectionErrorf(true, err, "transport: Error while dialing %v", err) + return nil, connectionErrorf(true, err, "transport: Error while dialing: %v", err) } + // Any further errors will close the underlying connection defer func(conn net.Conn) { if err != nil { conn.Close() } }(conn) + + // The following defer and goroutine monitor the connectCtx for cancelation + // and deadline. On context expiration, the connection is hard closed and + // this function will naturally fail as a result. Otherwise, the defer + // waits for the goroutine to exit to prevent the context from being + // monitored (and to prevent the connection from ever being closed) after + // returning from this function. + ctxMonitorDone := grpcsync.NewEvent() + newClientCtx, newClientDone := context.WithCancel(connectCtx) + defer func() { + newClientDone() // Awaken the goroutine below if connectCtx hasn't expired. + <-ctxMonitorDone.Done() // Wait for the goroutine below to exit. + }() + go func(conn net.Conn) { + defer ctxMonitorDone.Fire() // Signal this goroutine has exited. + <-newClientCtx.Done() // Block until connectCtx expires or the defer above executes. + if err := connectCtx.Err(); err != nil { + // connectCtx expired before exiting the function. Hard close the connection. + if logger.V(logLevel) { + logger.Infof("Aborting due to connect deadline expiring: %v", err) + } + conn.Close() + } + }(conn) + kp := opts.KeepaliveParams // Validate keepalive parameters. if kp.Time == 0 { @@ -251,15 +283,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts } } if transportCreds != nil { - rawConn := conn - // Pull the deadline from the connectCtx, which will be used for - // timeouts in the authentication protocol handshake. Can ignore the - // boolean as the deadline will return the zero value, which will make - // the conn not timeout on I/O operations. - deadline, _ := connectCtx.Deadline() - rawConn.SetDeadline(deadline) - conn, authInfo, err = transportCreds.ClientHandshake(connectCtx, addr.ServerName, rawConn) - rawConn.SetDeadline(time.Time{}) + conn, authInfo, err = transportCreds.ClientHandshake(connectCtx, addr.ServerName, conn) if err != nil { return nil, connectionErrorf(isTemporary(err), err, "transport: authentication handshake failed: %v", err) } @@ -297,6 +321,8 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts ctxDone: ctx.Done(), // Cache Done chan. cancel: cancel, userAgent: opts.UserAgent, + registeredCompressors: grpcutil.RegisteredCompressors(), + address: addr, conn: conn, remoteAddr: conn.RemoteAddr(), localAddr: conn.LocalAddr(), @@ -311,19 +337,20 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts isSecure: isSecure, perRPCCreds: perRPCCreds, kp: kp, - statsHandler: opts.StatsHandler, + statsHandlers: opts.StatsHandlers, initialWindowSize: initialWindowSize, - onPrefaceReceipt: onPrefaceReceipt, nextID: 1, maxConcurrentStreams: defaultMaxStreamsClient, streamQuota: defaultMaxStreamsClient, streamsQuotaAvailable: make(chan struct{}, 1), czData: new(channelzData), - onGoAway: onGoAway, - onClose: onClose, keepaliveEnabled: keepaliveEnabled, bufferPool: newBufferPool(), + onClose: onClose, } + t.logger = prefixLoggerForClientTransport(t) + // Add peer information to the http2client context. + t.ctx = peer.NewContext(t.ctx, t.getPeer()) if md, ok := addr.Metadata.(*metadata.MD); ok { t.md = *md @@ -341,15 +368,15 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts updateFlowControl: t.updateFlowControl, } } - if t.statsHandler != nil { - t.ctx = t.statsHandler.TagConn(t.ctx, &stats.ConnTagInfo{ + for _, sh := range t.statsHandlers { + t.ctx = sh.TagConn(t.ctx, &stats.ConnTagInfo{ RemoteAddr: t.remoteAddr, LocalAddr: t.localAddr, }) connBegin := &stats.ConnBegin{ Client: true, } - t.statsHandler.HandleConn(t.ctx, connBegin) + sh.HandleConn(t.ctx, connBegin) } t.channelzID, err = channelz.RegisterNormalSocket(t, opts.ChannelzParentID, fmt.Sprintf("%s -> %s", t.localAddr, t.remoteAddr)) if err != nil { @@ -359,21 +386,32 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts t.kpDormancyCond = sync.NewCond(&t.mu) go t.keepalive() } - // Start the reader goroutine for incoming message. Each transport has - // a dedicated goroutine which reads HTTP2 frame from network. Then it - // dispatches the frame to the corresponding stream entity. - go t.reader() + + // Start the reader goroutine for incoming messages. Each transport has a + // dedicated goroutine which reads HTTP2 frames from the network. Then it + // dispatches the frame to the corresponding stream entity. When the + // server preface is received, readerErrCh is closed. If an error occurs + // first, an error is pushed to the channel. This must be checked before + // returning from this function. + readerErrCh := make(chan error, 1) + go t.reader(readerErrCh) + defer func() { + if err == nil { + err = <-readerErrCh + } + if err != nil { + t.Close(err) + } + }() // Send connection preface to server. n, err := t.conn.Write(clientPreface) if err != nil { err = connectionErrorf(true, err, "transport: failed to write client preface: %v", err) - t.Close(err) return nil, err } if n != len(clientPreface) { err = connectionErrorf(true, nil, "transport: preface mismatch, wrote %d bytes; want %d", n, len(clientPreface)) - t.Close(err) return nil, err } var ss []http2.Setting @@ -393,14 +431,12 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts err = t.framer.fr.WriteSettings(ss...) if err != nil { err = connectionErrorf(true, err, "transport: failed to write initial settings frame: %v", err) - t.Close(err) return nil, err } // Adjust the connection flow control window if needed. if delta := uint32(icwz - defaultWindowSize); delta > 0 { if err := t.framer.fr.WriteWindowUpdate(0, delta); err != nil { err = connectionErrorf(true, err, "transport: failed to write window update: %v", err) - t.Close(err) return nil, err } } @@ -411,17 +447,8 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts return nil, err } go func() { - t.loopy = newLoopyWriter(clientSide, t.framer, t.controlBuf, t.bdpEst) - err := t.loopy.run() - if err != nil { - if logger.V(logLevel) { - logger.Errorf("transport: loopyWriter.run returning. Err: %v", err) - } - } - // Do not close the transport. Let reader goroutine handle it since - // there might be data in the buffers. - t.conn.Close() - t.controlBuf.finish() + t.loopy = newLoopyWriter(clientSide, t.framer, t.controlBuf, t.bdpEst, t.conn, t.logger) + t.loopy.run() close(t.writerDone) }() return t, nil @@ -467,7 +494,7 @@ func (t *http2Client) newStream(ctx context.Context, callHdr *CallHdr) *Stream { func (t *http2Client) getPeer() *peer.Peer { return &peer.Peer{ Addr: t.remoteAddr, - AuthInfo: t.authInfo, + AuthInfo: t.authInfo, // Can be nil } } @@ -503,9 +530,22 @@ func (t *http2Client) createHeaderFields(ctx context.Context, callHdr *CallHdr) headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-previous-rpc-attempts", Value: strconv.Itoa(callHdr.PreviousAttempts)}) } + registeredCompressors := t.registeredCompressors if callHdr.SendCompress != "" { headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-encoding", Value: callHdr.SendCompress}) - headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-accept-encoding", Value: callHdr.SendCompress}) + // Include the outgoing compressor name when compressor is not registered + // via encoding.RegisterCompressor. This is possible when client uses + // WithCompressor dial option. + if !grpcutil.IsCompressorNameRegistered(callHdr.SendCompress) { + if registeredCompressors != "" { + registeredCompressors += "," + } + registeredCompressors += callHdr.SendCompress + } + } + + if registeredCompressors != "" { + headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-accept-encoding", Value: registeredCompressors}) } if dl, ok := ctx.Deadline(); ok { // Send out timeout regardless its value. The server can detect timeout context by itself. @@ -585,7 +625,11 @@ func (t *http2Client) getTrAuthData(ctx context.Context, audience string) (map[s for _, c := range t.perRPCCreds { data, err := c.GetRequestMetadata(ctx, audience) if err != nil { - if _, ok := status.FromError(err); ok { + if st, ok := status.FromError(err); ok { + // Restrict the code to the list allowed by gRFC A54. + if istatus.IsRestrictedControlPlaneCode(st) { + err = status.Errorf(codes.Internal, "transport: received per-RPC creds error with illegal status: %v", err) + } return nil, err } @@ -614,7 +658,14 @@ func (t *http2Client) getCallAuthData(ctx context.Context, audience string, call } data, err := callCreds.GetRequestMetadata(ctx, audience) if err != nil { - return nil, status.Errorf(codes.Internal, "transport: %v", err) + if st, ok := status.FromError(err); ok { + // Restrict the code to the list allowed by gRFC A54. + if istatus.IsRestrictedControlPlaneCode(st) { + err = status.Errorf(codes.Internal, "transport: received per-RPC creds error with illegal status: %v", err) + } + return nil, err + } + return nil, status.Errorf(codes.Internal, "transport: per-RPC creds failed due to error: %v", err) } callAuthData = make(map[string]string, len(data)) for k, v := range data { @@ -630,13 +681,13 @@ func (t *http2Client) getCallAuthData(ctx context.Context, audience string, call // NewStream errors result in transparent retry, as they mean nothing went onto // the wire. However, there are two notable exceptions: // -// 1. If the stream headers violate the max header list size allowed by the -// server. It's possible this could succeed on another transport, even if -// it's unlikely, but do not transparently retry. -// 2. If the credentials errored when requesting their headers. In this case, -// it's possible a retry can fix the problem, but indefinitely transparently -// retrying is not appropriate as it is likely the credentials, if they can -// eventually succeed, would need I/O to do so. +// 1. If the stream headers violate the max header list size allowed by the +// server. It's possible this could succeed on another transport, even if +// it's unlikely, but do not transparently retry. +// 2. If the credentials errored when requesting their headers. In this case, +// it's possible a retry can fix the problem, but indefinitely transparently +// retrying is not appropriate as it is likely the credentials, if they can +// eventually succeed, would need I/O to do so. type NewStreamError struct { Err error @@ -651,6 +702,18 @@ func (e NewStreamError) Error() string { // streams. All non-nil errors returned will be *NewStreamError. func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, error) { ctx = peer.NewContext(ctx, t.getPeer()) + + // ServerName field of the resolver returned address takes precedence over + // Host field of CallHdr to determine the :authority header. This is because, + // the ServerName field takes precedence for server authentication during + // TLS handshake, and the :authority header should match the value used + // for server authentication. + if t.address.ServerName != "" { + newCallHdr := *callHdr + newCallHdr.Host = t.address.ServerName + callHdr = &newCallHdr + } + headerFields, err := t.createHeaderFields(ctx, callHdr) if err != nil { return nil, &NewStreamError{Err: err, AllowTransparentRetry: false} @@ -675,17 +738,13 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, endStream: false, initStream: func(id uint32) error { t.mu.Lock() - if state := t.state; state != reachable { + // TODO: handle transport closure in loopy instead and remove this + // initStream is never called when transport is draining. + if t.state == closing { t.mu.Unlock() - // Do a quick cleanup. - err := error(errStreamDrain) - if state == closing { - err = ErrConnClosing - } - cleanup(err) - return err + cleanup(ErrConnClosing) + return ErrConnClosing } - t.activeStreams[id] = s if channelz.IsOn() { atomic.AddInt64(&t.czData.streamsStarted, 1) atomic.StoreInt64(&t.czData.lastStreamCreatedTime, time.Now().UnixNano()) @@ -702,6 +761,7 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, } firstTry := true var ch chan struct{} + transportDrainRequired := false checkForStreamQuota := func(it interface{}) bool { if t.streamQuota <= 0 { // Can go negative if server decreases it. if firstTry { @@ -717,8 +777,20 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, h := it.(*headerFrame) h.streamID = t.nextID t.nextID += 2 + + // Drain client transport if nextID > MaxStreamID which signals gRPC that + // the connection is closed and a new one must be created for subsequent RPCs. + transportDrainRequired = t.nextID > MaxStreamID + s.id = h.streamID s.fc = &inFlow{limit: uint32(t.initialWindowSize)} + t.mu.Lock() + if t.state == draining || t.activeStreams == nil { // Can be niled from Close(). + t.mu.Unlock() + return false // Don't create a stream if the transport is already closed. + } + t.activeStreams[s.id] = s + t.mu.Unlock() if t.streamQuota > 0 && t.waitingStreams > 0 { select { case t.streamsQuotaAvailable <- struct{}{}: @@ -744,13 +816,7 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, } for { success, err := t.controlBuf.executeAndPut(func(it interface{}) bool { - if !checkForStreamQuota(it) { - return false - } - if !checkForHeaderListSize(it) { - return false - } - return true + return checkForHeaderListSize(it) && checkForStreamQuota(it) }, hdr) if err != nil { // Connection closed. @@ -773,24 +839,33 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, return nil, &NewStreamError{Err: ErrConnClosing, AllowTransparentRetry: true} } } - if t.statsHandler != nil { + if len(t.statsHandlers) != 0 { header, ok := metadata.FromOutgoingContext(ctx) if ok { header.Set("user-agent", t.userAgent) } else { header = metadata.Pairs("user-agent", t.userAgent) } - // Note: The header fields are compressed with hpack after this call returns. - // No WireLength field is set here. - outHeader := &stats.OutHeader{ - Client: true, - FullMethod: callHdr.Method, - RemoteAddr: t.remoteAddr, - LocalAddr: t.localAddr, - Compression: callHdr.SendCompress, - Header: header, + for _, sh := range t.statsHandlers { + // Note: The header fields are compressed with hpack after this call returns. + // No WireLength field is set here. + // Note: Creating a new stats object to prevent pollution. + outHeader := &stats.OutHeader{ + Client: true, + FullMethod: callHdr.Method, + RemoteAddr: t.remoteAddr, + LocalAddr: t.localAddr, + Compression: callHdr.SendCompress, + Header: header, + } + sh.HandleRPC(s.ctx, outHeader) + } + } + if transportDrainRequired { + if t.logger.V(logLevel) { + t.logger.Infof("Draining transport: t.nextID > MaxStreamID") } - t.statsHandler.HandleRPC(s.ctx, outHeader) + t.GracefulClose() } return s, nil } @@ -873,20 +948,21 @@ func (t *http2Client) closeStream(s *Stream, err error, rst bool, rstCode http2. // Close kicks off the shutdown process of the transport. This should be called // only once on a transport. Once it is called, the transport should not be // accessed any more. -// -// This method blocks until the addrConn that initiated this transport is -// re-connected. This happens because t.onClose() begins reconnect logic at the -// addrConn level and blocks until the addrConn is successfully connected. func (t *http2Client) Close(err error) { t.mu.Lock() - // Make sure we only Close once. + // Make sure we only close once. if t.state == closing { t.mu.Unlock() return } - // Call t.onClose before setting the state to closing to prevent the client - // from attempting to create new streams ASAP. - t.onClose() + if t.logger.V(logLevel) { + t.logger.Infof("Closing: %v", err) + } + // Call t.onClose ASAP to prevent the client from attempting to create new + // streams. + if t.state != draining { + t.onClose(GoAwayInvalid) + } t.state = closing streams := t.activeStreams t.activeStreams = nil @@ -916,11 +992,11 @@ func (t *http2Client) Close(err error) { for _, s := range streams { t.closeStream(s, err, false, http2.ErrCodeNo, st, nil, false) } - if t.statsHandler != nil { + for _, sh := range t.statsHandlers { connEnd := &stats.ConnEnd{ Client: true, } - t.statsHandler.HandleConn(t.ctx, connEnd) + sh.HandleConn(t.ctx, connEnd) } } @@ -936,11 +1012,15 @@ func (t *http2Client) GracefulClose() { t.mu.Unlock() return } + if t.logger.V(logLevel) { + t.logger.Infof("GracefulClose called") + } + t.onClose(GoAwayInvalid) t.state = draining active := len(t.activeStreams) t.mu.Unlock() if active == 0 { - t.Close(ErrConnClosing) + t.Close(connectionErrorf(true, nil, "no active streams left to process while draining")) return } t.controlBuf.put(&incomingGoAway{}) @@ -1000,13 +1080,13 @@ func (t *http2Client) updateWindow(s *Stream, n uint32) { // for the transport and the stream based on the current bdp // estimation. func (t *http2Client) updateFlowControl(n uint32) { - t.mu.Lock() - for _, s := range t.activeStreams { - s.fc.newLimit(n) - } - t.mu.Unlock() updateIWS := func(interface{}) bool { t.initialWindowSize = int32(n) + t.mu.Lock() + for _, s := range t.activeStreams { + s.fc.newLimit(n) + } + t.mu.Unlock() return true } t.controlBuf.executeAndPut(updateIWS, &outgoingWindowUpdate{streamID: 0, increment: t.fc.newLimit(n)}) @@ -1097,8 +1177,8 @@ func (t *http2Client) handleRSTStream(f *http2.RSTStreamFrame) { } statusCode, ok := http2ErrConvTab[f.ErrCode] if !ok { - if logger.V(logLevel) { - logger.Warningf("transport: http2Client.handleRSTStream found no mapped gRPC status for the received http2 error %v", f.ErrCode) + if t.logger.V(logLevel) { + t.logger.Infof("Received a RST_STREAM frame with code %q, but found no mapped gRPC status", f.ErrCode) } statusCode = codes.Unknown } @@ -1180,10 +1260,12 @@ func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) { t.mu.Unlock() return } - if f.ErrCode == http2.ErrCodeEnhanceYourCalm { - if logger.V(logLevel) { - logger.Infof("Client received GoAway with http2.ErrCodeEnhanceYourCalm.") - } + if f.ErrCode == http2.ErrCodeEnhanceYourCalm && string(f.DebugData()) == "too_many_pings" { + // When a client receives a GOAWAY with error code ENHANCE_YOUR_CALM and debug + // data equal to ASCII "too_many_pings", it should log the occurrence at a log level that is + // enabled by default and double the configure KEEPALIVE_TIME used for new connections + // on that channel. + logger.Errorf("Client received GoAway with error code ENHANCE_YOUR_CALM and debug data equal to ASCII \"too_many_pings\".") } id := f.LastStreamID if id > 0 && id%2 == 0 { @@ -1212,12 +1294,14 @@ func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) { default: t.setGoAwayReason(f) close(t.goAway) - t.controlBuf.put(&incomingGoAway{}) + defer t.controlBuf.put(&incomingGoAway{}) // Defer as t.mu is currently held. // Notify the clientconn about the GOAWAY before we set the state to // draining, to allow the client to stop attempting to create streams // before disallowing new streams on this connection. - t.onGoAway(t.goAwayReason) - t.state = draining + if t.state != draining { + t.onClose(t.goAwayReason) + t.state = draining + } } // All streams with IDs greater than the GoAwayId // and smaller than the previous GoAway ID should be killed. @@ -1225,24 +1309,35 @@ func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) { if upperLimit == 0 { // This is the first GoAway Frame. upperLimit = math.MaxUint32 // Kill all streams after the GoAway ID. } + + t.prevGoAwayID = id + if len(t.activeStreams) == 0 { + t.mu.Unlock() + t.Close(connectionErrorf(true, nil, "received goaway and there are no active streams")) + return + } + + streamsToClose := make([]*Stream, 0) for streamID, stream := range t.activeStreams { if streamID > id && streamID <= upperLimit { // The stream was unprocessed by the server. - atomic.StoreUint32(&stream.unprocessed, 1) - t.closeStream(stream, errStreamDrain, false, http2.ErrCodeNo, statusGoAway, nil, false) + if streamID > id && streamID <= upperLimit { + atomic.StoreUint32(&stream.unprocessed, 1) + streamsToClose = append(streamsToClose, stream) + } } } - t.prevGoAwayID = id - active := len(t.activeStreams) t.mu.Unlock() - if active == 0 { - t.Close(connectionErrorf(true, nil, "received goaway and there are no active streams")) + // Called outside t.mu because closeStream can take controlBuf's mu, which + // could induce deadlock and is not allowed. + for _, stream := range streamsToClose { + t.closeStream(stream, errStreamDrain, false, http2.ErrCodeNo, statusGoAway, nil, false) } } // setGoAwayReason sets the value of t.goAwayReason based // on the GoAway frame received. -// It expects a lock on transport's mutext to be held by +// It expects a lock on transport's mutex to be held by // the caller. func (t *http2Client) setGoAwayReason(f *http2.GoAwayFrame) { t.goAwayReason = GoAwayNoReason @@ -1432,7 +1527,7 @@ func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) { close(s.headerChan) } - if t.statsHandler != nil { + for _, sh := range t.statsHandlers { if isHeader { inHeader := &stats.InHeader{ Client: true, @@ -1440,14 +1535,14 @@ func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) { Header: metadata.MD(mdata).Copy(), Compression: s.recvCompress, } - t.statsHandler.HandleRPC(s.ctx, inHeader) + sh.HandleRPC(s.ctx, inHeader) } else { inTrailer := &stats.InTrailer{ Client: true, WireLength: int(frame.Header().Length), Trailer: metadata.MD(mdata).Copy(), } - t.statsHandler.HandleRPC(s.ctx, inTrailer) + sh.HandleRPC(s.ctx, inTrailer) } } @@ -1464,33 +1559,35 @@ func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) { t.closeStream(s, io.EOF, rst, http2.ErrCodeNo, statusGen, mdata, true) } -// reader runs as a separate goroutine in charge of reading data from network -// connection. -// -// TODO(zhaoq): currently one reader per transport. Investigate whether this is -// optimal. -// TODO(zhaoq): Check the validity of the incoming frame sequence. -func (t *http2Client) reader() { - defer close(t.readerDone) - // Check the validity of server preface. +// readServerPreface reads and handles the initial settings frame from the +// server. +func (t *http2Client) readServerPreface() error { frame, err := t.framer.fr.ReadFrame() if err != nil { - err = connectionErrorf(true, err, "error reading server preface: %v", err) - t.Close(err) // this kicks off resetTransport, so must be last before return - return - } - t.conn.SetReadDeadline(time.Time{}) // reset deadline once we get the settings frame (we didn't time out, yay!) - if t.keepaliveEnabled { - atomic.StoreInt64(&t.lastRead, time.Now().UnixNano()) + return connectionErrorf(true, err, "error reading server preface: %v", err) } sf, ok := frame.(*http2.SettingsFrame) if !ok { - // this kicks off resetTransport, so must be last before return - t.Close(connectionErrorf(true, nil, "initial http2 frame from server is not a settings frame: %T", frame)) - return + return connectionErrorf(true, nil, "initial http2 frame from server is not a settings frame: %T", frame) } - t.onPrefaceReceipt() t.handleSettings(sf, true) + return nil +} + +// reader verifies the server preface and reads all subsequent data from +// network connection. If the server preface is not read successfully, an +// error is pushed to errCh; otherwise errCh is closed with no error. +func (t *http2Client) reader(errCh chan<- error) { + defer close(t.readerDone) + + if err := t.readServerPreface(); err != nil { + errCh <- err + return + } + close(errCh) + if t.keepaliveEnabled { + atomic.StoreInt64(&t.lastRead, time.Now().UnixNano()) + } // loop to keep reading incoming messages on this transport. for { @@ -1693,3 +1790,9 @@ func (t *http2Client) getOutFlowWindow() int64 { return -2 } } + +func (t *http2Client) stateForTesting() transportState { + t.mu.Lock() + defer t.mu.Unlock() + return t.state +} diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_server.go b/vendor/google.golang.org/grpc/internal/transport/http2_server.go index 45d7bd145e3e1..ec4eef21342a4 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http2_server.go +++ b/vendor/google.golang.org/grpc/internal/transport/http2_server.go @@ -21,6 +21,7 @@ package transport import ( "bytes" "context" + "errors" "fmt" "io" "math" @@ -34,13 +35,16 @@ import ( "github.com/golang/protobuf/proto" "golang.org/x/net/http2" "golang.org/x/net/http2/hpack" + "google.golang.org/grpc/internal/grpclog" "google.golang.org/grpc/internal/grpcutil" + "google.golang.org/grpc/internal/pretty" "google.golang.org/grpc/internal/syscall" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" "google.golang.org/grpc/internal/channelz" "google.golang.org/grpc/internal/grpcrand" + "google.golang.org/grpc/internal/grpcsync" "google.golang.org/grpc/keepalive" "google.golang.org/grpc/metadata" "google.golang.org/grpc/peer" @@ -82,7 +86,7 @@ type http2Server struct { // updates, reset streams, and various settings) to the controller. controlBuf *controlBuffer fc *trInFlow - stats stats.Handler + stats []stats.Handler // Keepalive and max-age parameters for the server. kp keepalive.ServerParameters // Keepalive enforcement policy. @@ -101,13 +105,13 @@ type http2Server struct { mu sync.Mutex // guard the following - // drainChan is initialized when Drain() is called the first time. - // After which the server writes out the first GoAway(with ID 2^31-1) frame. - // Then an independent goroutine will be launched to later send the second GoAway. - // During this time we don't want to write another first GoAway(with ID 2^31 -1) frame. - // Thus call to Drain() will be a no-op if drainChan is already initialized since draining is - // already underway. - drainChan chan struct{} + // drainEvent is initialized when Drain() is called the first time. After + // which the server writes out the first GoAway(with ID 2^31-1) frame. Then + // an independent goroutine will be launched to later send the second + // GoAway. During this time we don't want to write another first GoAway(with + // ID 2^31 -1) frame. Thus call to Drain() will be a no-op if drainEvent is + // already initialized since draining is already underway. + drainEvent *grpcsync.Event state transportState activeStreams map[uint32]*Stream // idle is the time instant when the connection went idle. @@ -127,6 +131,8 @@ type http2Server struct { // This lock may not be taken if mu is already held. maxStreamMu sync.Mutex maxStreamID uint32 // max stream ID ever seen + + logger *grpclog.PrefixLogger } // NewServerTransport creates a http2 transport with conn and configuration @@ -165,15 +171,10 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport, ID: http2.SettingMaxFrameSize, Val: http2MaxFrameLen, }} - // TODO(zhaoq): Have a better way to signal "no limit" because 0 is - // permitted in the HTTP2 spec. - maxStreams := config.MaxStreams - if maxStreams == 0 { - maxStreams = math.MaxUint32 - } else { + if config.MaxStreams != math.MaxUint32 { isettings = append(isettings, http2.Setting{ ID: http2.SettingMaxConcurrentStreams, - Val: maxStreams, + Val: config.MaxStreams, }) } dynamicWindow := true @@ -252,12 +253,12 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport, framer: framer, readerDone: make(chan struct{}), writerDone: make(chan struct{}), - maxStreams: maxStreams, + maxStreams: config.MaxStreams, inTapHandle: config.InTapHandle, fc: &trInFlow{limit: uint32(icwz)}, state: reachable, activeStreams: make(map[uint32]*Stream), - stats: config.StatsHandler, + stats: config.StatsHandlers, kp: kp, idle: time.Now(), kep: kep, @@ -265,6 +266,10 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport, czData: new(channelzData), bufferPool: newBufferPool(), } + t.logger = prefixLoggerForServerTransport(t) + // Add peer information to the http2server context. + t.ctx = peer.NewContext(t.ctx, t.getPeer()) + t.controlBuf = newControlBuffer(t.done) if dynamicWindow { t.bdpEst = &bdpEstimator{ @@ -272,13 +277,13 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport, updateFlowControl: t.updateFlowControl, } } - if t.stats != nil { - t.ctx = t.stats.TagConn(t.ctx, &stats.ConnTagInfo{ + for _, sh := range t.stats { + t.ctx = sh.TagConn(t.ctx, &stats.ConnTagInfo{ RemoteAddr: t.remoteAddr, LocalAddr: t.localAddr, }) connBegin := &stats.ConnBegin{} - t.stats.HandleConn(t.ctx, connBegin) + sh.HandleConn(t.ctx, connBegin) } t.channelzID, err = channelz.RegisterNormalSocket(t, config.ChannelzParentID, fmt.Sprintf("%s -> %s", t.remoteAddr, t.localAddr)) if err != nil { @@ -290,7 +295,7 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport, defer func() { if err != nil { - t.Close() + t.Close(err) } }() @@ -326,23 +331,18 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport, t.handleSettings(sf) go func() { - t.loopy = newLoopyWriter(serverSide, t.framer, t.controlBuf, t.bdpEst) + t.loopy = newLoopyWriter(serverSide, t.framer, t.controlBuf, t.bdpEst, t.conn, t.logger) t.loopy.ssGoAwayHandler = t.outgoingGoAwayHandler - if err := t.loopy.run(); err != nil { - if logger.V(logLevel) { - logger.Errorf("transport: loopyWriter.run returning. Err: %v", err) - } - } - t.conn.Close() - t.controlBuf.finish() + t.loopy.run() close(t.writerDone) }() go t.keepalive() return t, nil } -// operateHeader takes action on the decoded headers. -func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(*Stream), traceCtx func(context.Context, string) context.Context) (fatal bool) { +// operateHeaders takes action on the decoded headers. Returns an error if fatal +// error encountered and transport needs to close, otherwise returns nil. +func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(*Stream), traceCtx func(context.Context, string) context.Context) error { // Acquire max stream ID lock for entire duration t.maxStreamMu.Lock() defer t.maxStreamMu.Unlock() @@ -358,15 +358,12 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( rstCode: http2.ErrCodeFrameSize, onWrite: func() {}, }) - return false + return nil } if streamID%2 != 1 || streamID <= t.maxStreamID { // illegal gRPC stream id. - if logger.V(logLevel) { - logger.Errorf("transport: http2Server.HandleStreams received an illegal stream id: %v", streamID) - } - return true + return fmt.Errorf("received an illegal stream id: %v. headers frame: %+v", streamID, frame) } t.maxStreamID = streamID @@ -378,13 +375,14 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( fc: &inFlow{limit: uint32(t.initialWindowSize)}, } var ( - // If a gRPC Response-Headers has already been received, then it means - // that the peer is speaking gRPC and we are in gRPC mode. - isGRPC = false - mdata = make(map[string][]string) - httpMethod string - // headerError is set if an error is encountered while parsing the headers - headerError bool + // if false, content-type was missing or invalid + isGRPC = false + contentType = "" + mdata = make(metadata.MD, len(frame.Fields)) + httpMethod string + // these are set if an error is encountered while parsing the headers + protocolError bool + headerError *status.Status timeoutSet bool timeout time.Duration @@ -395,11 +393,23 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( case "content-type": contentSubtype, validContentType := grpcutil.ContentSubtype(hf.Value) if !validContentType { + contentType = hf.Value break } mdata[hf.Name] = append(mdata[hf.Name], hf.Value) s.contentSubtype = contentSubtype isGRPC = true + + case "grpc-accept-encoding": + mdata[hf.Name] = append(mdata[hf.Name], hf.Value) + if hf.Value == "" { + continue + } + compressors := hf.Value + if s.clientAdvertisedCompressors != "" { + compressors = s.clientAdvertisedCompressors + "," + compressors + } + s.clientAdvertisedCompressors = compressors case "grpc-encoding": s.recvCompress = hf.Value case ":method": @@ -410,23 +420,23 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( timeoutSet = true var err error if timeout, err = decodeTimeout(hf.Value); err != nil { - headerError = true + headerError = status.Newf(codes.Internal, "malformed grpc-timeout: %v", err) } // "Transports must consider requests containing the Connection header // as malformed." - A41 case "connection": - if logger.V(logLevel) { - logger.Errorf("transport: http2Server.operateHeaders parsed a :connection header which makes a request malformed as per the HTTP/2 spec") + if t.logger.V(logLevel) { + t.logger.Infof("Received a HEADERS frame with a :connection header which makes the request malformed, as per the HTTP/2 spec") } - headerError = true + protocolError = true default: if isReservedHeader(hf.Name) && !isWhitelistedHeader(hf.Name) { break } v, err := decodeMetadataHeader(hf.Name, hf.Value) if err != nil { - headerError = true - logger.Warningf("Failed to decode metadata header (%q, %q): %v", hf.Name, hf.Value, err) + headerError = status.Newf(codes.Internal, "malformed binary metadata %q in header %q: %v", hf.Value, hf.Name, err) + t.logger.Warningf("Failed to decode metadata header (%q, %q): %v", hf.Name, hf.Value, err) break } mdata[hf.Name] = append(mdata[hf.Name], v) @@ -440,27 +450,47 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( // error, this takes precedence over a client not speaking gRPC. if len(mdata[":authority"]) > 1 || len(mdata["host"]) > 1 { errMsg := fmt.Sprintf("num values of :authority: %v, num values of host: %v, both must only have 1 value as per HTTP/2 spec", len(mdata[":authority"]), len(mdata["host"])) - if logger.V(logLevel) { - logger.Errorf("transport: %v", errMsg) + if t.logger.V(logLevel) { + t.logger.Infof("Aborting the stream early: %v", errMsg) } t.controlBuf.put(&earlyAbortStream{ - httpStatus: 400, + httpStatus: http.StatusBadRequest, streamID: streamID, contentSubtype: s.contentSubtype, status: status.New(codes.Internal, errMsg), rst: !frame.StreamEnded(), }) - return false + return nil } - if !isGRPC || headerError { + if protocolError { t.controlBuf.put(&cleanupStream{ streamID: streamID, rst: true, rstCode: http2.ErrCodeProtocol, onWrite: func() {}, }) - return false + return nil + } + if !isGRPC { + t.controlBuf.put(&earlyAbortStream{ + httpStatus: http.StatusUnsupportedMediaType, + streamID: streamID, + contentSubtype: s.contentSubtype, + status: status.Newf(codes.InvalidArgument, "invalid gRPC request content-type %q", contentType), + rst: !frame.StreamEnded(), + }) + return nil + } + if headerError != nil { + t.controlBuf.put(&earlyAbortStream{ + httpStatus: http.StatusBadRequest, + streamID: streamID, + contentSubtype: s.contentSubtype, + status: headerError, + rst: !frame.StreamEnded(), + }) + return nil } // "If :authority is missing, Host must be renamed to :authority." - A41 @@ -485,14 +515,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( } else { s.ctx, s.cancel = context.WithCancel(t.ctx) } - pr := &peer.Peer{ - Addr: t.remoteAddr, - } - // Attach Auth info if there is any. - if t.authInfo != nil { - pr.AuthInfo = t.authInfo - } - s.ctx = peer.NewContext(s.ctx, pr) + // Attach the received metadata to the context. if len(mdata) > 0 { s.ctx = metadata.NewIncomingContext(s.ctx, mdata) @@ -507,7 +530,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( if t.state != reachable { t.mu.Unlock() s.cancel() - return false + return nil } if uint32(len(t.activeStreams)) >= t.maxStreams { t.mu.Unlock() @@ -518,13 +541,13 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( onWrite: func() {}, }) s.cancel() - return false + return nil } if httpMethod != http.MethodPost { t.mu.Unlock() - errMsg := fmt.Sprintf("http2Server.operateHeaders parsed a :method field: %v which should be POST", httpMethod) - if logger.V(logLevel) { - logger.Infof("transport: %v", errMsg) + errMsg := fmt.Sprintf("Received a HEADERS frame with :method %q which should be POST", httpMethod) + if t.logger.V(logLevel) { + t.logger.Infof("Aborting the stream early: %v", errMsg) } t.controlBuf.put(&earlyAbortStream{ httpStatus: 405, @@ -534,14 +557,14 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( rst: !frame.StreamEnded(), }) s.cancel() - return false + return nil } if t.inTapHandle != nil { var err error if s.ctx, err = t.inTapHandle(s.ctx, &tap.Info{FullMethodName: s.method}); err != nil { t.mu.Unlock() - if logger.V(logLevel) { - logger.Infof("transport: http2Server.operateHeaders got an error from InTapHandle: %v", err) + if t.logger.V(logLevel) { + t.logger.Infof("Aborting the stream early due to InTapHandle failure: %v", err) } stat, ok := status.FromError(err) if !ok { @@ -554,7 +577,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( status: stat, rst: !frame.StreamEnded(), }) - return false + return nil } } t.activeStreams[streamID] = s @@ -570,17 +593,17 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( t.adjustWindow(s, uint32(n)) } s.ctx = traceCtx(s.ctx, s.method) - if t.stats != nil { - s.ctx = t.stats.TagRPC(s.ctx, &stats.RPCTagInfo{FullMethodName: s.method}) + for _, sh := range t.stats { + s.ctx = sh.TagRPC(s.ctx, &stats.RPCTagInfo{FullMethodName: s.method}) inHeader := &stats.InHeader{ FullMethod: s.method, RemoteAddr: t.remoteAddr, LocalAddr: t.localAddr, Compression: s.recvCompress, WireLength: int(frame.Header().Length), - Header: metadata.MD(mdata).Copy(), + Header: mdata.Copy(), } - t.stats.HandleRPC(s.ctx, inHeader) + sh.HandleRPC(s.ctx, inHeader) } s.ctxDone = s.ctx.Done() s.wq = newWriteQuota(defaultWriteQuota, s.ctxDone) @@ -601,7 +624,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( wq: s.wq, }) handle(s) - return false + return nil } // HandleStreams receives incoming streams using the given handler. This is @@ -615,8 +638,8 @@ func (t *http2Server) HandleStreams(handle func(*Stream), traceCtx func(context. atomic.StoreInt64(&t.lastRead, time.Now().UnixNano()) if err != nil { if se, ok := err.(http2.StreamError); ok { - if logger.V(logLevel) { - logger.Warningf("transport: http2Server.HandleStreams encountered http2.StreamError: %v", se) + if t.logger.V(logLevel) { + t.logger.Warningf("Encountered http2.StreamError: %v", se) } t.mu.Lock() s := t.activeStreams[se.StreamID] @@ -634,19 +657,16 @@ func (t *http2Server) HandleStreams(handle func(*Stream), traceCtx func(context. continue } if err == io.EOF || err == io.ErrUnexpectedEOF { - t.Close() + t.Close(err) return } - if logger.V(logLevel) { - logger.Warningf("transport: http2Server.HandleStreams failed to read frame: %v", err) - } - t.Close() + t.Close(err) return } switch frame := frame.(type) { case *http2.MetaHeadersFrame: - if t.operateHeaders(frame, handle, traceCtx) { - t.Close() + if err := t.operateHeaders(frame, handle, traceCtx); err != nil { + t.Close(err) break } case *http2.DataFrame: @@ -662,8 +682,8 @@ func (t *http2Server) HandleStreams(handle func(*Stream), traceCtx func(context. case *http2.GoAwayFrame: // TODO: Handle GoAway from the client appropriately. default: - if logger.V(logLevel) { - logger.Errorf("transport: http2Server.HandleStreams found unhandled frame type %v.", frame) + if t.logger.V(logLevel) { + t.logger.Infof("Received unsupported frame type %T", frame) } } } @@ -847,8 +867,8 @@ const ( func (t *http2Server) handlePing(f *http2.PingFrame) { if f.IsAck() { - if f.Data == goAwayPing.data && t.drainChan != nil { - close(t.drainChan) + if f.Data == goAwayPing.data && t.drainEvent != nil { + t.drainEvent.Fire() return } // Maybe it's a BDP ping. @@ -890,10 +910,7 @@ func (t *http2Server) handlePing(f *http2.PingFrame) { if t.pingStrikes > maxPingStrikes { // Send goaway and close the connection. - if logger.V(logLevel) { - logger.Errorf("transport: Got too many pings from the client, closing the connection.") - } - t.controlBuf.put(&goAway{code: http2.ErrCodeEnhanceYourCalm, debugData: []byte("too_many_pings"), closeConn: true}) + t.controlBuf.put(&goAway{code: http2.ErrCodeEnhanceYourCalm, debugData: []byte("too_many_pings"), closeConn: errors.New("got too many pings from the client")}) } } @@ -925,8 +942,8 @@ func (t *http2Server) checkForHeaderListSize(it interface{}) bool { var sz int64 for _, f := range hdrFrame.hf { if sz += int64(f.Size()); sz > int64(*t.maxSendHeaderListSize) { - if logger.V(logLevel) { - logger.Errorf("header list size to send violates the maximum size (%d bytes) set by client", *t.maxSendHeaderListSize) + if t.logger.V(logLevel) { + t.logger.Infof("Header list size to send violates the maximum size (%d bytes) set by client", *t.maxSendHeaderListSize) } return false } @@ -945,15 +962,16 @@ func (t *http2Server) streamContextErr(s *Stream) error { // WriteHeader sends the header metadata md back to the client. func (t *http2Server) WriteHeader(s *Stream, md metadata.MD) error { - if s.updateHeaderSent() { - return ErrIllegalHeaderWrite - } - + s.hdrMu.Lock() + defer s.hdrMu.Unlock() if s.getState() == streamDone { return t.streamContextErr(s) } - s.hdrMu.Lock() + if s.updateHeaderSent() { + return ErrIllegalHeaderWrite + } + if md.Len() > 0 { if s.header.Len() > 0 { s.header = metadata.Join(s.header, md) @@ -962,10 +980,8 @@ func (t *http2Server) WriteHeader(s *Stream, md metadata.MD) error { } } if err := t.writeHeaderLocked(s); err != nil { - s.hdrMu.Unlock() return status.Convert(err).Err() } - s.hdrMu.Unlock() return nil } @@ -996,14 +1012,14 @@ func (t *http2Server) writeHeaderLocked(s *Stream) error { t.closeStream(s, true, http2.ErrCodeInternal, false) return ErrHeaderListSizeLimitViolation } - if t.stats != nil { + for _, sh := range t.stats { // Note: Headers are compressed with hpack after this call returns. // No WireLength field is set here. outHeader := &stats.OutHeader{ Header: s.header.Copy(), Compression: s.sendCompress, } - t.stats.HandleRPC(s.Context(), outHeader) + sh.HandleRPC(s.Context(), outHeader) } return nil } @@ -1013,17 +1029,19 @@ func (t *http2Server) writeHeaderLocked(s *Stream) error { // TODO(zhaoq): Now it indicates the end of entire stream. Revisit if early // OK is adopted. func (t *http2Server) WriteStatus(s *Stream, st *status.Status) error { + s.hdrMu.Lock() + defer s.hdrMu.Unlock() + if s.getState() == streamDone { return nil } - s.hdrMu.Lock() + // TODO(mmukhi): Benchmark if the performance gets better if count the metadata and other header fields // first and create a slice of that exact size. headerFields := make([]hpack.HeaderField, 0, 2) // grpc-status and grpc-message will be there if none else. if !s.updateHeaderSent() { // No headers have been sent. if len(s.header) > 0 { // Send a separate header frame. if err := t.writeHeaderLocked(s); err != nil { - s.hdrMu.Unlock() return err } } else { // Send a trailer only response. @@ -1038,7 +1056,7 @@ func (t *http2Server) WriteStatus(s *Stream, st *status.Status) error { stBytes, err := proto.Marshal(p) if err != nil { // TODO: return error instead, when callers are able to handle it. - logger.Errorf("transport: failed to marshal rpc status: %v, error: %v", p, err) + t.logger.Errorf("Failed to marshal rpc status: %s, error: %v", pretty.ToJSON(p), err) } else { headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-status-details-bin", Value: encodeBinHeader(stBytes)}) } @@ -1052,7 +1070,7 @@ func (t *http2Server) WriteStatus(s *Stream, st *status.Status) error { endStream: true, onWrite: t.setResetPingStrikes, } - s.hdrMu.Unlock() + success, err := t.controlBuf.execute(t.checkForHeaderListSize, trailingHeader) if !success { if err != nil { @@ -1064,10 +1082,10 @@ func (t *http2Server) WriteStatus(s *Stream, st *status.Status) error { // Send a RST_STREAM after the trailers if the client has not already half-closed. rst := s.getState() == streamActive t.finishStream(s, rst, http2.ErrCodeNo, trailingHeader, true) - if t.stats != nil { + for _, sh := range t.stats { // Note: The trailer fields are compressed with hpack after this call returns. // No WireLength field is set here. - t.stats.HandleRPC(s.Context(), &stats.OutTrailer{ + sh.HandleRPC(s.Context(), &stats.OutTrailer{ Trailer: s.trailer.Copy(), }) } @@ -1143,20 +1161,20 @@ func (t *http2Server) keepalive() { if val <= 0 { // The connection has been idle for a duration of keepalive.MaxConnectionIdle or more. // Gracefully close the connection. - t.Drain() + t.Drain("max_idle") return } idleTimer.Reset(val) case <-ageTimer.C: - t.Drain() + t.Drain("max_age") ageTimer.Reset(t.kp.MaxConnectionAgeGrace) select { case <-ageTimer.C: // Close the connection after grace period. - if logger.V(logLevel) { - logger.Infof("transport: closing server transport due to maximum connection age.") + if t.logger.V(logLevel) { + t.logger.Infof("Closing server transport due to maximum connection age") } - t.Close() + t.controlBuf.put(closeConnection{}) case <-t.done: } return @@ -1172,10 +1190,7 @@ func (t *http2Server) keepalive() { continue } if outstandingPing && kpTimeoutLeft <= 0 { - if logger.V(logLevel) { - logger.Infof("transport: closing server transport due to idleness.") - } - t.Close() + t.Close(fmt.Errorf("keepalive ping not acked within timeout %s", t.kp.Time)) return } if !outstandingPing { @@ -1202,29 +1217,32 @@ func (t *http2Server) keepalive() { // Close starts shutting down the http2Server transport. // TODO(zhaoq): Now the destruction is not blocked on any pending streams. This // could cause some resource issue. Revisit this later. -func (t *http2Server) Close() { +func (t *http2Server) Close(err error) { t.mu.Lock() if t.state == closing { t.mu.Unlock() return } + if t.logger.V(logLevel) { + t.logger.Infof("Closing: %v", err) + } t.state = closing streams := t.activeStreams t.activeStreams = nil t.mu.Unlock() t.controlBuf.finish() close(t.done) - if err := t.conn.Close(); err != nil && logger.V(logLevel) { - logger.Infof("transport: error closing conn during Close: %v", err) + if err := t.conn.Close(); err != nil && t.logger.V(logLevel) { + t.logger.Infof("Error closing underlying net.Conn during Close: %v", err) } channelz.RemoveEntry(t.channelzID) // Cancel all active streams. for _, s := range streams { s.cancel() } - if t.stats != nil { + for _, sh := range t.stats { connEnd := &stats.ConnEnd{} - t.stats.HandleConn(t.ctx, connEnd) + sh.HandleConn(t.ctx, connEnd) } } @@ -1295,14 +1313,14 @@ func (t *http2Server) RemoteAddr() net.Addr { return t.remoteAddr } -func (t *http2Server) Drain() { +func (t *http2Server) Drain(debugData string) { t.mu.Lock() defer t.mu.Unlock() - if t.drainChan != nil { + if t.drainEvent != nil { return } - t.drainChan = make(chan struct{}) - t.controlBuf.put(&goAway{code: http2.ErrCodeNo, debugData: []byte{}, headsUp: true}) + t.drainEvent = grpcsync.NewEvent() + t.controlBuf.put(&goAway{code: http2.ErrCodeNo, debugData: []byte(debugData), headsUp: true}) } var goAwayPing = &ping{data: [8]byte{1, 6, 1, 8, 0, 3, 3, 9}} @@ -1322,19 +1340,17 @@ func (t *http2Server) outgoingGoAwayHandler(g *goAway) (bool, error) { // Stop accepting more streams now. t.state = draining sid := t.maxStreamID + retErr := g.closeConn if len(t.activeStreams) == 0 { - g.closeConn = true + retErr = errors.New("second GOAWAY written and no active streams left to process") } t.mu.Unlock() t.maxStreamMu.Unlock() if err := t.framer.fr.WriteGoAway(sid, g.code, g.debugData); err != nil { return false, err } - if g.closeConn { - // Abruptly close the connection following the GoAway (via - // loopywriter). But flush out what's inside the buffer first. - t.framer.writer.Flush() - return false, fmt.Errorf("transport: Connection closing") + if retErr != nil { + return false, retErr } return true, nil } @@ -1346,7 +1362,7 @@ func (t *http2Server) outgoingGoAwayHandler(g *goAway) (bool, error) { // originated before the GoAway reaches the client. // After getting the ack or timer expiration send out another GoAway this // time with an ID of the max stream server intends to process. - if err := t.framer.fr.WriteGoAway(math.MaxUint32, http2.ErrCodeNo, []byte{}); err != nil { + if err := t.framer.fr.WriteGoAway(math.MaxUint32, http2.ErrCodeNo, g.debugData); err != nil { return false, err } if err := t.framer.fr.WritePing(false, goAwayPing.data); err != nil { @@ -1356,7 +1372,7 @@ func (t *http2Server) outgoingGoAwayHandler(g *goAway) (bool, error) { timer := time.NewTimer(time.Minute) defer timer.Stop() select { - case <-t.drainChan: + case <-t.drainEvent.Done(): case <-timer.C: case <-t.done: return @@ -1415,6 +1431,13 @@ func (t *http2Server) getOutFlowWindow() int64 { } } +func (t *http2Server) getPeer() *peer.Peer { + return &peer.Peer{ + Addr: t.remoteAddr, + AuthInfo: t.authInfo, // Can be nil + } +} + func getJitter(v time.Duration) time.Duration { if v == infinity { return 0 diff --git a/vendor/google.golang.org/grpc/internal/transport/http_util.go b/vendor/google.golang.org/grpc/internal/transport/http_util.go index d8247bcdf6924..19cbb18f5ab44 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http_util.go +++ b/vendor/google.golang.org/grpc/internal/transport/http_util.go @@ -20,8 +20,8 @@ package transport import ( "bufio" - "bytes" "encoding/base64" + "errors" "fmt" "io" "math" @@ -38,21 +38,14 @@ import ( "golang.org/x/net/http2/hpack" spb "google.golang.org/genproto/googleapis/rpc/status" "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" "google.golang.org/grpc/status" ) const ( // http2MaxFrameLen specifies the max length of a HTTP2 frame. http2MaxFrameLen = 16384 // 16KB frame - // http://http2.github.io/http2-spec/#SettingValues + // https://httpwg.org/specs/rfc7540.html#SettingValues http2InitHeaderTableSize = 4096 - // baseContentType is the base content-type for gRPC. This is a valid - // content-type on it's own, but can also include a content-subtype such as - // "proto" as a suffix after "+" or ";". See - // https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests - // for more details. - ) var ( @@ -92,7 +85,6 @@ var ( // 504 Gateway timeout - UNAVAILABLE. http.StatusGatewayTimeout: codes.Unavailable, } - logger = grpclog.Component("transport") ) // isReservedHeader checks whether hdr belongs to HTTP2 headers @@ -257,13 +249,13 @@ func encodeGrpcMessage(msg string) string { } func encodeGrpcMessageUnchecked(msg string) string { - var buf bytes.Buffer + var sb strings.Builder for len(msg) > 0 { r, size := utf8.DecodeRuneInString(msg) for _, b := range []byte(string(r)) { if size > 1 { // If size > 1, r is not ascii. Always do percent encoding. - buf.WriteString(fmt.Sprintf("%%%02X", b)) + fmt.Fprintf(&sb, "%%%02X", b) continue } @@ -272,14 +264,14 @@ func encodeGrpcMessageUnchecked(msg string) string { // // fmt.Sprintf("%%%02X", utf8.RuneError) gives "%FFFD". if b >= spaceByte && b <= tildeByte && b != percentByte { - buf.WriteByte(b) + sb.WriteByte(b) } else { - buf.WriteString(fmt.Sprintf("%%%02X", b)) + fmt.Fprintf(&sb, "%%%02X", b) } } msg = msg[size:] } - return buf.String() + return sb.String() } // decodeGrpcMessage decodes the msg encoded by encodeGrpcMessage. @@ -297,23 +289,23 @@ func decodeGrpcMessage(msg string) string { } func decodeGrpcMessageUnchecked(msg string) string { - var buf bytes.Buffer + var sb strings.Builder lenMsg := len(msg) for i := 0; i < lenMsg; i++ { c := msg[i] if c == percentByte && i+2 < lenMsg { parsed, err := strconv.ParseUint(msg[i+1:i+3], 16, 8) if err != nil { - buf.WriteByte(c) + sb.WriteByte(c) } else { - buf.WriteByte(byte(parsed)) + sb.WriteByte(byte(parsed)) i += 2 } } else { - buf.WriteByte(c) + sb.WriteByte(c) } } - return buf.String() + return sb.String() } type bufWriter struct { @@ -322,8 +314,6 @@ type bufWriter struct { batchSize int conn net.Conn err error - - onFlush func() } func newBufWriter(conn net.Conn, batchSize int) *bufWriter { @@ -339,7 +329,8 @@ func (w *bufWriter) Write(b []byte) (n int, err error) { return 0, w.err } if w.batchSize == 0 { // Buffer has been disabled. - return w.conn.Write(b) + n, err = w.conn.Write(b) + return n, toIOError(err) } for len(b) > 0 { nn := copy(w.buf[w.offset:], b) @@ -360,14 +351,31 @@ func (w *bufWriter) Flush() error { if w.offset == 0 { return nil } - if w.onFlush != nil { - w.onFlush() - } _, w.err = w.conn.Write(w.buf[:w.offset]) + w.err = toIOError(w.err) w.offset = 0 return w.err } +type ioError struct { + error +} + +func (i ioError) Unwrap() error { + return i.error +} + +func isIOError(err error) bool { + return errors.As(err, &ioError{}) +} + +func toIOError(err error) error { + if err == nil { + return nil + } + return ioError{error: err} +} + type framer struct { writer *bufWriter fr *http2.Framer diff --git a/vendor/google.golang.org/grpc/internal/transport/logging.go b/vendor/google.golang.org/grpc/internal/transport/logging.go new file mode 100644 index 0000000000000..42ed2b07af663 --- /dev/null +++ b/vendor/google.golang.org/grpc/internal/transport/logging.go @@ -0,0 +1,40 @@ +/* + * + * Copyright 2023 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package transport + +import ( + "fmt" + + "google.golang.org/grpc/grpclog" + internalgrpclog "google.golang.org/grpc/internal/grpclog" +) + +var logger = grpclog.Component("transport") + +func prefixLoggerForServerTransport(p *http2Server) *internalgrpclog.PrefixLogger { + return internalgrpclog.NewPrefixLogger(logger, fmt.Sprintf("[server-transport %p] ", p)) +} + +func prefixLoggerForServerHandlerTransport(p *serverHandlerTransport) *internalgrpclog.PrefixLogger { + return internalgrpclog.NewPrefixLogger(logger, fmt.Sprintf("[server-handler-transport %p] ", p)) +} + +func prefixLoggerForClientTransport(p *http2Client) *internalgrpclog.PrefixLogger { + return internalgrpclog.NewPrefixLogger(logger, fmt.Sprintf("[client-transport %p] ", p)) +} diff --git a/vendor/google.golang.org/grpc/internal/transport/transport.go b/vendor/google.golang.org/grpc/internal/transport/transport.go index a9ce717f16056..aa1c896595d9a 100644 --- a/vendor/google.golang.org/grpc/internal/transport/transport.go +++ b/vendor/google.golang.org/grpc/internal/transport/transport.go @@ -43,6 +43,10 @@ import ( "google.golang.org/grpc/tap" ) +// ErrNoHeaders is used as a signal that a trailers only response was received, +// and is not a real error. +var ErrNoHeaders = errors.New("stream has no headers") + const logLevel = 2 type bufferPool struct { @@ -253,6 +257,9 @@ type Stream struct { fc *inFlow wq *writeQuota + // Holds compressor names passed in grpc-accept-encoding metadata from the + // client. This is empty for the client side stream. + clientAdvertisedCompressors string // Callback to state application's intentions to read data. This // is used to adjust flow control, if needed. requestRead func(int) @@ -341,8 +348,24 @@ func (s *Stream) RecvCompress() string { } // SetSendCompress sets the compression algorithm to the stream. -func (s *Stream) SetSendCompress(str string) { - s.sendCompress = str +func (s *Stream) SetSendCompress(name string) error { + if s.isHeaderSent() || s.getState() == streamDone { + return errors.New("transport: set send compressor called after headers sent or stream done") + } + + s.sendCompress = name + return nil +} + +// SendCompress returns the send compressor name. +func (s *Stream) SendCompress() string { + return s.sendCompress +} + +// ClientAdvertisedCompressors returns the compressor names advertised by the +// client via grpc-accept-encoding header. +func (s *Stream) ClientAdvertisedCompressors() string { + return s.clientAdvertisedCompressors } // Done returns a channel which is closed when it receives the final status @@ -366,9 +389,15 @@ func (s *Stream) Header() (metadata.MD, error) { return s.header.Copy(), nil } s.waitOnHeader() + if !s.headerValid { return nil, s.status.Err() } + + if s.noHeaders { + return nil, ErrNoHeaders + } + return s.header.Copy(), nil } @@ -523,7 +552,7 @@ type ServerConfig struct { ConnectionTimeout time.Duration Credentials credentials.TransportCredentials InTapHandle tap.ServerInHandle - StatsHandler stats.Handler + StatsHandlers []stats.Handler KeepaliveParams keepalive.ServerParameters KeepalivePolicy keepalive.EnforcementPolicy InitialWindowSize int32 @@ -553,8 +582,8 @@ type ConnectOptions struct { CredsBundle credentials.Bundle // KeepaliveParams stores the keepalive parameters. KeepaliveParams keepalive.ClientParameters - // StatsHandler stores the handler for stats. - StatsHandler stats.Handler + // StatsHandlers stores the handler for stats. + StatsHandlers []stats.Handler // InitialWindowSize sets the initial window size for a stream. InitialWindowSize int32 // InitialConnWindowSize sets the initial window size for a connection. @@ -573,8 +602,8 @@ type ConnectOptions struct { // NewClientTransport establishes the transport with the required ConnectOptions // and returns it to the caller. -func NewClientTransport(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onPrefaceReceipt func(), onGoAway func(GoAwayReason), onClose func()) (ClientTransport, error) { - return newHTTP2Client(connectCtx, ctx, addr, opts, onPrefaceReceipt, onGoAway, onClose) +func NewClientTransport(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onClose func(GoAwayReason)) (ClientTransport, error) { + return newHTTP2Client(connectCtx, ctx, addr, opts, onClose) } // Options provides additional hints and information for message @@ -691,13 +720,13 @@ type ServerTransport interface { // Close tears down the transport. Once it is called, the transport // should not be accessed any more. All the pending streams and their // handlers will be terminated asynchronously. - Close() + Close(err error) // RemoteAddr returns the remote network address. RemoteAddr() net.Addr // Drain notifies the client this ServerTransport stops accepting new RPCs. - Drain() + Drain(debugData string) // IncrMsgSent increments the number of message sent through this transport. IncrMsgSent() diff --git a/vendor/google.golang.org/grpc/metadata/metadata.go b/vendor/google.golang.org/grpc/metadata/metadata.go index 8e0f6abe89d74..a2cdcaf12a87f 100644 --- a/vendor/google.golang.org/grpc/metadata/metadata.go +++ b/vendor/google.golang.org/grpc/metadata/metadata.go @@ -41,16 +41,17 @@ type MD map[string][]string // New creates an MD from a given key-value map. // // Only the following ASCII characters are allowed in keys: -// - digits: 0-9 -// - uppercase letters: A-Z (normalized to lower) -// - lowercase letters: a-z -// - special characters: -_. +// - digits: 0-9 +// - uppercase letters: A-Z (normalized to lower) +// - lowercase letters: a-z +// - special characters: -_. +// // Uppercase letters are automatically converted to lowercase. // // Keys beginning with "grpc-" are reserved for grpc-internal use only and may // result in errors if set in metadata. func New(m map[string]string) MD { - md := MD{} + md := make(MD, len(m)) for k, val := range m { key := strings.ToLower(k) md[key] = append(md[key], val) @@ -62,10 +63,11 @@ func New(m map[string]string) MD { // Pairs panics if len(kv) is odd. // // Only the following ASCII characters are allowed in keys: -// - digits: 0-9 -// - uppercase letters: A-Z (normalized to lower) -// - lowercase letters: a-z -// - special characters: -_. +// - digits: 0-9 +// - uppercase letters: A-Z (normalized to lower) +// - lowercase letters: a-z +// - special characters: -_. +// // Uppercase letters are automatically converted to lowercase. // // Keys beginning with "grpc-" are reserved for grpc-internal use only and may @@ -74,7 +76,7 @@ func Pairs(kv ...string) MD { if len(kv)%2 == 1 { panic(fmt.Sprintf("metadata: Pairs got the odd number of input pairs for metadata: %d", len(kv))) } - md := MD{} + md := make(MD, len(kv)/2) for i := 0; i < len(kv); i += 2 { key := strings.ToLower(kv[i]) md[key] = append(md[key], kv[i+1]) @@ -89,7 +91,11 @@ func (md MD) Len() int { // Copy returns a copy of md. func (md MD) Copy() MD { - return Join(md) + out := make(MD, len(md)) + for k, v := range md { + out[k] = copyOf(v) + } + return out } // Get obtains the values for a given key. @@ -169,8 +175,11 @@ func AppendToOutgoingContext(ctx context.Context, kv ...string) context.Context md, _ := ctx.Value(mdOutgoingKey{}).(rawMD) added := make([][]string, len(md.added)+1) copy(added, md.added) - added[len(added)-1] = make([]string, len(kv)) - copy(added[len(added)-1], kv) + kvCopy := make([]string, 0, len(kv)) + for i := 0; i < len(kv); i += 2 { + kvCopy = append(kvCopy, strings.ToLower(kv[i]), kv[i+1]) + } + added[len(added)-1] = kvCopy return context.WithValue(ctx, mdOutgoingKey{}, rawMD{md: md.md, added: added}) } @@ -182,19 +191,51 @@ func FromIncomingContext(ctx context.Context) (MD, bool) { if !ok { return nil, false } - out := MD{} + out := make(MD, len(md)) for k, v := range md { // We need to manually convert all keys to lower case, because MD is a // map, and there's no guarantee that the MD attached to the context is // created using our helper functions. key := strings.ToLower(k) - s := make([]string, len(v)) - copy(s, v) - out[key] = s + out[key] = copyOf(v) } return out, true } +// ValueFromIncomingContext returns the metadata value corresponding to the metadata +// key from the incoming metadata if it exists. Key must be lower-case. +// +// # Experimental +// +// Notice: This API is EXPERIMENTAL and may be changed or removed in a +// later release. +func ValueFromIncomingContext(ctx context.Context, key string) []string { + md, ok := ctx.Value(mdIncomingKey{}).(MD) + if !ok { + return nil + } + + if v, ok := md[key]; ok { + return copyOf(v) + } + for k, v := range md { + // We need to manually convert all keys to lower case, because MD is a + // map, and there's no guarantee that the MD attached to the context is + // created using our helper functions. + if strings.ToLower(k) == key { + return copyOf(v) + } + } + return nil +} + +// the returned slice must not be modified in place +func copyOf(v []string) []string { + vals := make([]string, len(v)) + copy(vals, v) + return vals +} + // FromOutgoingContextRaw returns the un-merged, intermediary contents of rawMD. // // Remember to perform strings.ToLower on the keys, for both the returned MD (MD @@ -222,15 +263,18 @@ func FromOutgoingContext(ctx context.Context) (MD, bool) { return nil, false } - out := MD{} + mdSize := len(raw.md) + for i := range raw.added { + mdSize += len(raw.added[i]) / 2 + } + + out := make(MD, mdSize) for k, v := range raw.md { // We need to manually convert all keys to lower case, because MD is a // map, and there's no guarantee that the MD attached to the context is // created using our helper functions. key := strings.ToLower(k) - s := make([]string, len(v)) - copy(s, v) - out[key] = s + out[key] = copyOf(v) } for _, added := range raw.added { if len(added)%2 == 1 { diff --git a/vendor/google.golang.org/grpc/picker_wrapper.go b/vendor/google.golang.org/grpc/picker_wrapper.go index 843633c910a11..02f975951242d 100644 --- a/vendor/google.golang.org/grpc/picker_wrapper.go +++ b/vendor/google.golang.org/grpc/picker_wrapper.go @@ -26,6 +26,7 @@ import ( "google.golang.org/grpc/balancer" "google.golang.org/grpc/codes" "google.golang.org/grpc/internal/channelz" + istatus "google.golang.org/grpc/internal/status" "google.golang.org/grpc/internal/transport" "google.golang.org/grpc/status" ) @@ -35,6 +36,7 @@ import ( type pickerWrapper struct { mu sync.Mutex done bool + idle bool blockingCh chan struct{} picker balancer.Picker } @@ -46,7 +48,11 @@ func newPickerWrapper() *pickerWrapper { // updatePicker is called by UpdateBalancerState. It unblocks all blocked pick. func (pw *pickerWrapper) updatePicker(p balancer.Picker) { pw.mu.Lock() - if pw.done { + if pw.done || pw.idle { + // There is a small window where a picker update from the LB policy can + // race with the channel going to idle mode. If the picker is idle here, + // it is because the channel asked it to do so, and therefore it is sage + // to ignore the update from the LB policy. pw.mu.Unlock() return } @@ -57,12 +63,16 @@ func (pw *pickerWrapper) updatePicker(p balancer.Picker) { pw.mu.Unlock() } -func doneChannelzWrapper(acw *acBalancerWrapper, done func(balancer.DoneInfo)) func(balancer.DoneInfo) { - acw.mu.Lock() - ac := acw.ac - acw.mu.Unlock() +// doneChannelzWrapper performs the following: +// - increments the calls started channelz counter +// - wraps the done function in the passed in result to increment the calls +// failed or calls succeeded channelz counter before invoking the actual +// done function. +func doneChannelzWrapper(acbw *acBalancerWrapper, result *balancer.PickResult) { + ac := acbw.ac ac.incrCallsStarted() - return func(b balancer.DoneInfo) { + done := result.Done + result.Done = func(b balancer.DoneInfo) { if b.Err != nil && b.Err != io.EOF { ac.incrCallsFailed() } else { @@ -81,7 +91,7 @@ func doneChannelzWrapper(acw *acBalancerWrapper, done func(balancer.DoneInfo)) f // - the current picker returns other errors and failfast is false. // - the subConn returned by the current picker is not READY // When one of these situations happens, pick blocks until the picker gets updated. -func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer.PickInfo) (transport.ClientTransport, func(balancer.DoneInfo), error) { +func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer.PickInfo) (transport.ClientTransport, balancer.PickResult, error) { var ch chan struct{} var lastPickErr error @@ -89,7 +99,7 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer. pw.mu.Lock() if pw.done { pw.mu.Unlock() - return nil, nil, ErrClientConnClosing + return nil, balancer.PickResult{}, ErrClientConnClosing } if pw.picker == nil { @@ -110,9 +120,9 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer. } switch ctx.Err() { case context.DeadlineExceeded: - return nil, nil, status.Error(codes.DeadlineExceeded, errStr) + return nil, balancer.PickResult{}, status.Error(codes.DeadlineExceeded, errStr) case context.Canceled: - return nil, nil, status.Error(codes.Canceled, errStr) + return nil, balancer.PickResult{}, status.Error(codes.Canceled, errStr) } case <-ch: } @@ -124,14 +134,17 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer. pw.mu.Unlock() pickResult, err := p.Pick(info) - if err != nil { if err == balancer.ErrNoSubConnAvailable { continue } - if _, ok := status.FromError(err); ok { + if st, ok := status.FromError(err); ok { // Status error: end the RPC unconditionally with this status. - return nil, nil, dropError{error: err} + // First restrict the code to the list allowed by gRFC A54. + if istatus.IsRestrictedControlPlaneCode(st) { + err = status.Errorf(codes.Internal, "received picker error with illegal status: %v", err) + } + return nil, balancer.PickResult{}, dropError{error: err} } // For all other errors, wait for ready RPCs should block and other // RPCs should fail with unavailable. @@ -139,19 +152,20 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer. lastPickErr = err continue } - return nil, nil, status.Error(codes.Unavailable, err.Error()) + return nil, balancer.PickResult{}, status.Error(codes.Unavailable, err.Error()) } - acw, ok := pickResult.SubConn.(*acBalancerWrapper) + acbw, ok := pickResult.SubConn.(*acBalancerWrapper) if !ok { logger.Errorf("subconn returned from pick is type %T, not *acBalancerWrapper", pickResult.SubConn) continue } - if t := acw.getAddrConn().getReadyTransport(); t != nil { + if t := acbw.ac.getReadyTransport(); t != nil { if channelz.IsOn() { - return t, doneChannelzWrapper(acw, pickResult.Done), nil + doneChannelzWrapper(acbw, &pickResult) + return t, pickResult, nil } - return t, pickResult.Done, nil + return t, pickResult, nil } if pickResult.Done != nil { // Calling done with nil error, no bytes sent and no bytes received. @@ -176,6 +190,25 @@ func (pw *pickerWrapper) close() { close(pw.blockingCh) } +func (pw *pickerWrapper) enterIdleMode() { + pw.mu.Lock() + defer pw.mu.Unlock() + if pw.done { + return + } + pw.idle = true +} + +func (pw *pickerWrapper) exitIdleMode() { + pw.mu.Lock() + defer pw.mu.Unlock() + if pw.done { + return + } + pw.blockingCh = make(chan struct{}) + pw.idle = false +} + // dropError is a wrapper error that indicates the LB policy wishes to drop the // RPC and not retry it. type dropError struct { diff --git a/vendor/google.golang.org/grpc/pickfirst.go b/vendor/google.golang.org/grpc/pickfirst.go index fb7a99e0a2734..abe266b021d2e 100644 --- a/vendor/google.golang.org/grpc/pickfirst.go +++ b/vendor/google.golang.org/grpc/pickfirst.go @@ -19,11 +19,15 @@ package grpc import ( + "encoding/json" "errors" "fmt" "google.golang.org/grpc/balancer" "google.golang.org/grpc/connectivity" + "google.golang.org/grpc/internal/envconfig" + "google.golang.org/grpc/internal/grpcrand" + "google.golang.org/grpc/serviceconfig" ) // PickFirstBalancerName is the name of the pick_first balancer. @@ -43,15 +47,33 @@ func (*pickfirstBuilder) Name() string { return PickFirstBalancerName } +type pfConfig struct { + serviceconfig.LoadBalancingConfig `json:"-"` + + // If set to true, instructs the LB policy to shuffle the order of the list + // of addresses received from the name resolver before attempting to + // connect to them. + ShuffleAddressList bool `json:"shuffleAddressList"` +} + +func (*pickfirstBuilder) ParseConfig(js json.RawMessage) (serviceconfig.LoadBalancingConfig, error) { + cfg := &pfConfig{} + if err := json.Unmarshal(js, cfg); err != nil { + return nil, fmt.Errorf("pickfirst: unable to unmarshal LB policy config: %s, error: %v", string(js), err) + } + return cfg, nil +} + type pickfirstBalancer struct { state connectivity.State cc balancer.ClientConn subConn balancer.SubConn + cfg *pfConfig } func (b *pickfirstBalancer) ResolverError(err error) { if logger.V(2) { - logger.Infof("pickfirstBalancer: ResolverError called with error %v", err) + logger.Infof("pickfirstBalancer: ResolverError called with error: %v", err) } if b.subConn == nil { b.state = connectivity.TransientFailure @@ -69,7 +91,8 @@ func (b *pickfirstBalancer) ResolverError(err error) { } func (b *pickfirstBalancer) UpdateClientConnState(state balancer.ClientConnState) error { - if len(state.ResolverState.Addresses) == 0 { + addrs := state.ResolverState.Addresses + if len(addrs) == 0 { // The resolver reported an empty address list. Treat it like an error by // calling b.ResolverError. if b.subConn != nil { @@ -82,12 +105,23 @@ func (b *pickfirstBalancer) UpdateClientConnState(state balancer.ClientConnState return balancer.ErrBadResolverState } + if state.BalancerConfig != nil { + cfg, ok := state.BalancerConfig.(*pfConfig) + if !ok { + return fmt.Errorf("pickfirstBalancer: received nil or illegal BalancerConfig (type %T): %v", state.BalancerConfig, state.BalancerConfig) + } + b.cfg = cfg + } + + if envconfig.PickFirstLBConfig && b.cfg != nil && b.cfg.ShuffleAddressList { + grpcrand.Shuffle(len(addrs), func(i, j int) { addrs[i], addrs[j] = addrs[j], addrs[i] }) + } if b.subConn != nil { - b.cc.UpdateAddresses(b.subConn, state.ResolverState.Addresses) + b.cc.UpdateAddresses(b.subConn, addrs) return nil } - subConn, err := b.cc.NewSubConn(state.ResolverState.Addresses, balancer.NewSubConnOptions{}) + subConn, err := b.cc.NewSubConn(addrs, balancer.NewSubConnOptions{}) if err != nil { if logger.V(2) { logger.Errorf("pickfirstBalancer: failed to NewSubConn: %v", err) @@ -102,8 +136,8 @@ func (b *pickfirstBalancer) UpdateClientConnState(state balancer.ClientConnState b.subConn = subConn b.state = connectivity.Idle b.cc.UpdateState(balancer.State{ - ConnectivityState: connectivity.Idle, - Picker: &picker{result: balancer.PickResult{SubConn: b.subConn}}, + ConnectivityState: connectivity.Connecting, + Picker: &picker{err: balancer.ErrNoSubConnAvailable}, }) b.subConn.Connect() return nil @@ -119,7 +153,6 @@ func (b *pickfirstBalancer) UpdateSubConnState(subConn balancer.SubConn, state b } return } - b.state = state.ConnectivityState if state.ConnectivityState == connectivity.Shutdown { b.subConn = nil return @@ -132,11 +165,21 @@ func (b *pickfirstBalancer) UpdateSubConnState(subConn balancer.SubConn, state b Picker: &picker{result: balancer.PickResult{SubConn: subConn}}, }) case connectivity.Connecting: + if b.state == connectivity.TransientFailure { + // We stay in TransientFailure until we are Ready. See A62. + return + } b.cc.UpdateState(balancer.State{ ConnectivityState: state.ConnectivityState, Picker: &picker{err: balancer.ErrNoSubConnAvailable}, }) case connectivity.Idle: + if b.state == connectivity.TransientFailure { + // We stay in TransientFailure until we are Ready. Also kick the + // subConn out of Idle into Connecting. See A62. + b.subConn.Connect() + return + } b.cc.UpdateState(balancer.State{ ConnectivityState: state.ConnectivityState, Picker: &idlePicker{subConn: subConn}, @@ -147,6 +190,7 @@ func (b *pickfirstBalancer) UpdateSubConnState(subConn balancer.SubConn, state b Picker: &picker{err: state.ConnectionError}, }) } + b.state = state.ConnectivityState } func (b *pickfirstBalancer) Close() { diff --git a/vendor/google.golang.org/grpc/preloader.go b/vendor/google.golang.org/grpc/preloader.go index 0a1e975ad9164..cd45547854f07 100644 --- a/vendor/google.golang.org/grpc/preloader.go +++ b/vendor/google.golang.org/grpc/preloader.go @@ -25,7 +25,7 @@ import ( // PreparedMsg is responsible for creating a Marshalled and Compressed object. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection.pb.go b/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection.pb.go index 1f859f764881a..d54c07676d5b5 100644 --- a/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection.pb.go +++ b/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection.pb.go @@ -1,4 +1,4 @@ -// Copyright 2016 gRPC authors. +// Copyright 2016 The gRPC Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,19 +11,20 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - // Service exported by server reflection +// Warning: this entire file is deprecated. Use this instead: +// https://github.com/grpc/grpc-proto/blob/master/grpc/reflection/v1/reflection.proto + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.25.0 -// protoc v3.14.0 -// source: reflection/grpc_reflection_v1alpha/reflection.proto +// protoc-gen-go v1.30.0 +// protoc v4.22.0 +// grpc/reflection/v1alpha/reflection.proto is a deprecated file. package grpc_reflection_v1alpha import ( - proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -37,22 +38,22 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - // The message sent by the client when calling ServerReflectionInfo method. +// +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. type ServerReflectionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` // To use reflection service, the client should set one of the following // fields in message_request. The server distinguishes requests by their // defined field and then handles them using corresponding methods. // // Types that are assignable to MessageRequest: + // // *ServerReflectionRequest_FileByFilename // *ServerReflectionRequest_FileContainingSymbol // *ServerReflectionRequest_FileContainingExtension @@ -64,7 +65,7 @@ type ServerReflectionRequest struct { func (x *ServerReflectionRequest) Reset() { *x = ServerReflectionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[0] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -77,7 +78,7 @@ func (x *ServerReflectionRequest) String() string { func (*ServerReflectionRequest) ProtoMessage() {} func (x *ServerReflectionRequest) ProtoReflect() protoreflect.Message { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[0] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -90,9 +91,10 @@ func (x *ServerReflectionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ServerReflectionRequest.ProtoReflect.Descriptor instead. func (*ServerReflectionRequest) Descriptor() ([]byte, []int) { - return file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{0} + return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{0} } +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. func (x *ServerReflectionRequest) GetHost() string { if x != nil { return x.Host @@ -107,6 +109,7 @@ func (m *ServerReflectionRequest) GetMessageRequest() isServerReflectionRequest_ return nil } +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. func (x *ServerReflectionRequest) GetFileByFilename() string { if x, ok := x.GetMessageRequest().(*ServerReflectionRequest_FileByFilename); ok { return x.FileByFilename @@ -114,6 +117,7 @@ func (x *ServerReflectionRequest) GetFileByFilename() string { return "" } +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. func (x *ServerReflectionRequest) GetFileContainingSymbol() string { if x, ok := x.GetMessageRequest().(*ServerReflectionRequest_FileContainingSymbol); ok { return x.FileContainingSymbol @@ -121,6 +125,7 @@ func (x *ServerReflectionRequest) GetFileContainingSymbol() string { return "" } +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. func (x *ServerReflectionRequest) GetFileContainingExtension() *ExtensionRequest { if x, ok := x.GetMessageRequest().(*ServerReflectionRequest_FileContainingExtension); ok { return x.FileContainingExtension @@ -128,6 +133,7 @@ func (x *ServerReflectionRequest) GetFileContainingExtension() *ExtensionRequest return nil } +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. func (x *ServerReflectionRequest) GetAllExtensionNumbersOfType() string { if x, ok := x.GetMessageRequest().(*ServerReflectionRequest_AllExtensionNumbersOfType); ok { return x.AllExtensionNumbersOfType @@ -135,6 +141,7 @@ func (x *ServerReflectionRequest) GetAllExtensionNumbersOfType() string { return "" } +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. func (x *ServerReflectionRequest) GetListServices() string { if x, ok := x.GetMessageRequest().(*ServerReflectionRequest_ListServices); ok { return x.ListServices @@ -148,6 +155,8 @@ type isServerReflectionRequest_MessageRequest interface { type ServerReflectionRequest_FileByFilename struct { // Find a proto file by the file name. + // + // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. FileByFilename string `protobuf:"bytes,3,opt,name=file_by_filename,json=fileByFilename,proto3,oneof"` } @@ -155,12 +164,16 @@ type ServerReflectionRequest_FileContainingSymbol struct { // Find the proto file that declares the given fully-qualified symbol name. // This field should be a fully-qualified symbol name // (e.g. .[.] or .). + // + // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. FileContainingSymbol string `protobuf:"bytes,4,opt,name=file_containing_symbol,json=fileContainingSymbol,proto3,oneof"` } type ServerReflectionRequest_FileContainingExtension struct { // Find the proto file which defines an extension extending the given // message type with the given field number. + // + // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. FileContainingExtension *ExtensionRequest `protobuf:"bytes,5,opt,name=file_containing_extension,json=fileContainingExtension,proto3,oneof"` } @@ -173,12 +186,16 @@ type ServerReflectionRequest_AllExtensionNumbersOfType struct { // StatusCode::UNIMPLEMENTED if it's not implemented. // This field should be a fully-qualified type name. The format is // . + // + // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. AllExtensionNumbersOfType string `protobuf:"bytes,6,opt,name=all_extension_numbers_of_type,json=allExtensionNumbersOfType,proto3,oneof"` } type ServerReflectionRequest_ListServices struct { // List the full names of registered services. The content will not be // checked. + // + // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. ListServices string `protobuf:"bytes,7,opt,name=list_services,json=listServices,proto3,oneof"` } @@ -195,20 +212,25 @@ func (*ServerReflectionRequest_ListServices) isServerReflectionRequest_MessageRe // The type name and extension number sent by the client when requesting // file_containing_extension. +// +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. type ExtensionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Fully-qualified type name. The format should be . - ContainingType string `protobuf:"bytes,1,opt,name=containing_type,json=containingType,proto3" json:"containing_type,omitempty"` - ExtensionNumber int32 `protobuf:"varint,2,opt,name=extension_number,json=extensionNumber,proto3" json:"extension_number,omitempty"` + // + // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. + ContainingType string `protobuf:"bytes,1,opt,name=containing_type,json=containingType,proto3" json:"containing_type,omitempty"` + // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. + ExtensionNumber int32 `protobuf:"varint,2,opt,name=extension_number,json=extensionNumber,proto3" json:"extension_number,omitempty"` } func (x *ExtensionRequest) Reset() { *x = ExtensionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[1] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -221,7 +243,7 @@ func (x *ExtensionRequest) String() string { func (*ExtensionRequest) ProtoMessage() {} func (x *ExtensionRequest) ProtoReflect() protoreflect.Message { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[1] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -234,9 +256,10 @@ func (x *ExtensionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ExtensionRequest.ProtoReflect.Descriptor instead. func (*ExtensionRequest) Descriptor() ([]byte, []int) { - return file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{1} + return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{1} } +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. func (x *ExtensionRequest) GetContainingType() string { if x != nil { return x.ContainingType @@ -244,6 +267,7 @@ func (x *ExtensionRequest) GetContainingType() string { return "" } +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. func (x *ExtensionRequest) GetExtensionNumber() int32 { if x != nil { return x.ExtensionNumber @@ -252,17 +276,22 @@ func (x *ExtensionRequest) GetExtensionNumber() int32 { } // The message sent by the server to answer ServerReflectionInfo method. +// +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. type ServerReflectionResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ValidHost string `protobuf:"bytes,1,opt,name=valid_host,json=validHost,proto3" json:"valid_host,omitempty"` + // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. + ValidHost string `protobuf:"bytes,1,opt,name=valid_host,json=validHost,proto3" json:"valid_host,omitempty"` + // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. OriginalRequest *ServerReflectionRequest `protobuf:"bytes,2,opt,name=original_request,json=originalRequest,proto3" json:"original_request,omitempty"` - // The server sets one of the following fields according to the - // message_request in the request. + // The server set one of the following fields according to the message_request + // in the request. // // Types that are assignable to MessageResponse: + // // *ServerReflectionResponse_FileDescriptorResponse // *ServerReflectionResponse_AllExtensionNumbersResponse // *ServerReflectionResponse_ListServicesResponse @@ -273,7 +302,7 @@ type ServerReflectionResponse struct { func (x *ServerReflectionResponse) Reset() { *x = ServerReflectionResponse{} if protoimpl.UnsafeEnabled { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[2] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -286,7 +315,7 @@ func (x *ServerReflectionResponse) String() string { func (*ServerReflectionResponse) ProtoMessage() {} func (x *ServerReflectionResponse) ProtoReflect() protoreflect.Message { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[2] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -299,9 +328,10 @@ func (x *ServerReflectionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ServerReflectionResponse.ProtoReflect.Descriptor instead. func (*ServerReflectionResponse) Descriptor() ([]byte, []int) { - return file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{2} + return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{2} } +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. func (x *ServerReflectionResponse) GetValidHost() string { if x != nil { return x.ValidHost @@ -309,6 +339,7 @@ func (x *ServerReflectionResponse) GetValidHost() string { return "" } +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. func (x *ServerReflectionResponse) GetOriginalRequest() *ServerReflectionRequest { if x != nil { return x.OriginalRequest @@ -323,6 +354,7 @@ func (m *ServerReflectionResponse) GetMessageResponse() isServerReflectionRespon return nil } +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. func (x *ServerReflectionResponse) GetFileDescriptorResponse() *FileDescriptorResponse { if x, ok := x.GetMessageResponse().(*ServerReflectionResponse_FileDescriptorResponse); ok { return x.FileDescriptorResponse @@ -330,6 +362,7 @@ func (x *ServerReflectionResponse) GetFileDescriptorResponse() *FileDescriptorRe return nil } +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. func (x *ServerReflectionResponse) GetAllExtensionNumbersResponse() *ExtensionNumberResponse { if x, ok := x.GetMessageResponse().(*ServerReflectionResponse_AllExtensionNumbersResponse); ok { return x.AllExtensionNumbersResponse @@ -337,6 +370,7 @@ func (x *ServerReflectionResponse) GetAllExtensionNumbersResponse() *ExtensionNu return nil } +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. func (x *ServerReflectionResponse) GetListServicesResponse() *ListServiceResponse { if x, ok := x.GetMessageResponse().(*ServerReflectionResponse_ListServicesResponse); ok { return x.ListServicesResponse @@ -344,6 +378,7 @@ func (x *ServerReflectionResponse) GetListServicesResponse() *ListServiceRespons return nil } +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. func (x *ServerReflectionResponse) GetErrorResponse() *ErrorResponse { if x, ok := x.GetMessageResponse().(*ServerReflectionResponse_ErrorResponse); ok { return x.ErrorResponse @@ -357,26 +392,34 @@ type isServerReflectionResponse_MessageResponse interface { type ServerReflectionResponse_FileDescriptorResponse struct { // This message is used to answer file_by_filename, file_containing_symbol, - // file_containing_extension requests with transitive dependencies. - // As the repeated label is not allowed in oneof fields, we use a + // file_containing_extension requests with transitive dependencies. As + // the repeated label is not allowed in oneof fields, we use a // FileDescriptorResponse message to encapsulate the repeated fields. // The reflection service is allowed to avoid sending FileDescriptorProtos // that were previously sent in response to earlier requests in the stream. + // + // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. FileDescriptorResponse *FileDescriptorResponse `protobuf:"bytes,4,opt,name=file_descriptor_response,json=fileDescriptorResponse,proto3,oneof"` } type ServerReflectionResponse_AllExtensionNumbersResponse struct { - // This message is used to answer all_extension_numbers_of_type requests. + // This message is used to answer all_extension_numbers_of_type requst. + // + // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. AllExtensionNumbersResponse *ExtensionNumberResponse `protobuf:"bytes,5,opt,name=all_extension_numbers_response,json=allExtensionNumbersResponse,proto3,oneof"` } type ServerReflectionResponse_ListServicesResponse struct { - // This message is used to answer list_services requests. + // This message is used to answer list_services request. + // + // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. ListServicesResponse *ListServiceResponse `protobuf:"bytes,6,opt,name=list_services_response,json=listServicesResponse,proto3,oneof"` } type ServerReflectionResponse_ErrorResponse struct { // This message is used when an error occurs. + // + // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. ErrorResponse *ErrorResponse `protobuf:"bytes,7,opt,name=error_response,json=errorResponse,proto3,oneof"` } @@ -393,6 +436,8 @@ func (*ServerReflectionResponse_ErrorResponse) isServerReflectionResponse_Messag // Serialized FileDescriptorProto messages sent by the server answering // a file_by_filename, file_containing_symbol, or file_containing_extension // request. +// +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. type FileDescriptorResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -401,13 +446,15 @@ type FileDescriptorResponse struct { // Serialized FileDescriptorProto messages. We avoid taking a dependency on // descriptor.proto, which uses proto2 only features, by making them opaque // bytes instead. + // + // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. FileDescriptorProto [][]byte `protobuf:"bytes,1,rep,name=file_descriptor_proto,json=fileDescriptorProto,proto3" json:"file_descriptor_proto,omitempty"` } func (x *FileDescriptorResponse) Reset() { *x = FileDescriptorResponse{} if protoimpl.UnsafeEnabled { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[3] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -420,7 +467,7 @@ func (x *FileDescriptorResponse) String() string { func (*FileDescriptorResponse) ProtoMessage() {} func (x *FileDescriptorResponse) ProtoReflect() protoreflect.Message { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[3] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -433,9 +480,10 @@ func (x *FileDescriptorResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use FileDescriptorResponse.ProtoReflect.Descriptor instead. func (*FileDescriptorResponse) Descriptor() ([]byte, []int) { - return file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{3} + return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{3} } +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. func (x *FileDescriptorResponse) GetFileDescriptorProto() [][]byte { if x != nil { return x.FileDescriptorProto @@ -445,6 +493,8 @@ func (x *FileDescriptorResponse) GetFileDescriptorProto() [][]byte { // A list of extension numbers sent by the server answering // all_extension_numbers_of_type request. +// +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. type ExtensionNumberResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -452,14 +502,17 @@ type ExtensionNumberResponse struct { // Full name of the base type, including the package name. The format // is . - BaseTypeName string `protobuf:"bytes,1,opt,name=base_type_name,json=baseTypeName,proto3" json:"base_type_name,omitempty"` + // + // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. + BaseTypeName string `protobuf:"bytes,1,opt,name=base_type_name,json=baseTypeName,proto3" json:"base_type_name,omitempty"` + // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. ExtensionNumber []int32 `protobuf:"varint,2,rep,packed,name=extension_number,json=extensionNumber,proto3" json:"extension_number,omitempty"` } func (x *ExtensionNumberResponse) Reset() { *x = ExtensionNumberResponse{} if protoimpl.UnsafeEnabled { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[4] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -472,7 +525,7 @@ func (x *ExtensionNumberResponse) String() string { func (*ExtensionNumberResponse) ProtoMessage() {} func (x *ExtensionNumberResponse) ProtoReflect() protoreflect.Message { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[4] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -485,9 +538,10 @@ func (x *ExtensionNumberResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ExtensionNumberResponse.ProtoReflect.Descriptor instead. func (*ExtensionNumberResponse) Descriptor() ([]byte, []int) { - return file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{4} + return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{4} } +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. func (x *ExtensionNumberResponse) GetBaseTypeName() string { if x != nil { return x.BaseTypeName @@ -495,6 +549,7 @@ func (x *ExtensionNumberResponse) GetBaseTypeName() string { return "" } +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. func (x *ExtensionNumberResponse) GetExtensionNumber() []int32 { if x != nil { return x.ExtensionNumber @@ -503,6 +558,8 @@ func (x *ExtensionNumberResponse) GetExtensionNumber() []int32 { } // A list of ServiceResponse sent by the server answering list_services request. +// +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. type ListServiceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -510,13 +567,15 @@ type ListServiceResponse struct { // The information of each service may be expanded in the future, so we use // ServiceResponse message to encapsulate it. + // + // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. Service []*ServiceResponse `protobuf:"bytes,1,rep,name=service,proto3" json:"service,omitempty"` } func (x *ListServiceResponse) Reset() { *x = ListServiceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[5] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -529,7 +588,7 @@ func (x *ListServiceResponse) String() string { func (*ListServiceResponse) ProtoMessage() {} func (x *ListServiceResponse) ProtoReflect() protoreflect.Message { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[5] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -542,9 +601,10 @@ func (x *ListServiceResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListServiceResponse.ProtoReflect.Descriptor instead. func (*ListServiceResponse) Descriptor() ([]byte, []int) { - return file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{5} + return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{5} } +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. func (x *ListServiceResponse) GetService() []*ServiceResponse { if x != nil { return x.Service @@ -554,6 +614,8 @@ func (x *ListServiceResponse) GetService() []*ServiceResponse { // The information of a single service used by ListServiceResponse to answer // list_services request. +// +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. type ServiceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -561,13 +623,15 @@ type ServiceResponse struct { // Full name of a registered service, including its package name. The format // is . + // + // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } func (x *ServiceResponse) Reset() { *x = ServiceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[6] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -580,7 +644,7 @@ func (x *ServiceResponse) String() string { func (*ServiceResponse) ProtoMessage() {} func (x *ServiceResponse) ProtoReflect() protoreflect.Message { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[6] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -593,9 +657,10 @@ func (x *ServiceResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ServiceResponse.ProtoReflect.Descriptor instead. func (*ServiceResponse) Descriptor() ([]byte, []int) { - return file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{6} + return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{6} } +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. func (x *ServiceResponse) GetName() string { if x != nil { return x.Name @@ -604,20 +669,25 @@ func (x *ServiceResponse) GetName() string { } // The error code and error message sent by the server when an error occurs. +// +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. type ErrorResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // This field uses the error codes defined in grpc::StatusCode. - ErrorCode int32 `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` + // + // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. + ErrorCode int32 `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` + // Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` } func (x *ErrorResponse) Reset() { *x = ErrorResponse{} if protoimpl.UnsafeEnabled { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[7] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -630,7 +700,7 @@ func (x *ErrorResponse) String() string { func (*ErrorResponse) ProtoMessage() {} func (x *ErrorResponse) ProtoReflect() protoreflect.Message { - mi := &file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[7] + mi := &file_grpc_reflection_v1alpha_reflection_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -643,9 +713,10 @@ func (x *ErrorResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ErrorResponse.ProtoReflect.Descriptor instead. func (*ErrorResponse) Descriptor() ([]byte, []int) { - return file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{7} + return file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP(), []int{7} } +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. func (x *ErrorResponse) GetErrorCode() int32 { if x != nil { return x.ErrorCode @@ -653,6 +724,7 @@ func (x *ErrorResponse) GetErrorCode() int32 { return 0 } +// Deprecated: The entire proto file grpc/reflection/v1alpha/reflection.proto is marked as deprecated. func (x *ErrorResponse) GetErrorMessage() string { if x != nil { return x.ErrorMessage @@ -660,136 +732,139 @@ func (x *ErrorResponse) GetErrorMessage() string { return "" } -var File_reflection_grpc_reflection_v1alpha_reflection_proto protoreflect.FileDescriptor - -var file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDesc = []byte{ - 0x0a, 0x33, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70, - 0x63, 0x5f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x22, 0xf8, - 0x02, 0x0a, 0x17, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, - 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x2a, - 0x0a, 0x10, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x79, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x66, 0x69, 0x6c, 0x65, - 0x42, 0x79, 0x46, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x66, 0x69, - 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x79, - 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x14, 0x66, 0x69, - 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6d, 0x62, - 0x6f, 0x6c, 0x12, 0x67, 0x0a, 0x19, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, - 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, - 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x48, 0x00, 0x52, 0x17, 0x66, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, - 0x6e, 0x67, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x1d, 0x61, - 0x6c, 0x6c, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x19, 0x61, 0x6c, 0x6c, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x4f, 0x66, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x25, 0x0a, 0x0d, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x6c, 0x69, 0x73, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x42, 0x11, 0x0a, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x66, 0x0a, 0x10, 0x45, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, - 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, - 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x22, 0xc7, 0x04, 0x0a, 0x18, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, - 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x5b, 0x0a, - 0x10, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, - 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0f, 0x6f, 0x72, 0x69, 0x67, 0x69, - 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x6b, 0x0a, 0x18, 0x66, 0x69, - 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, +var File_grpc_reflection_v1alpha_reflection_proto protoreflect.FileDescriptor + +var file_grpc_reflection_v1alpha_reflection_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x22, 0xf8, 0x02, 0x0a, 0x17, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, + 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, + 0x6f, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x62, 0x79, 0x5f, 0x66, + 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0e, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x46, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x36, 0x0a, 0x16, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, + 0x6e, 0x67, 0x5f, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x14, 0x66, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, + 0x67, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x67, 0x0a, 0x19, 0x66, 0x69, 0x6c, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x17, 0x66, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x42, 0x0a, 0x1d, 0x61, 0x6c, 0x6c, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x19, 0x61, 0x6c, 0x6c, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x4f, 0x66, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0d, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x6c, + 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x42, 0x11, 0x0a, 0x0f, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x66, + 0x0a, 0x10, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xc7, 0x04, 0x0a, 0x18, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x68, 0x6f, 0x73, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x48, 0x6f, + 0x73, 0x74, 0x12, 0x5b, 0x0a, 0x10, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, - 0x16, 0x66, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x77, 0x0a, 0x1e, 0x61, 0x6c, 0x6c, 0x5f, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, - 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x30, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x48, 0x00, 0x52, 0x1b, 0x61, 0x6c, 0x6c, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x64, 0x0a, 0x16, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, - 0x52, 0x14, 0x6c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0f, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x6b, 0x0a, 0x18, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x46, 0x69, 0x6c, 0x65, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x48, 0x00, 0x52, 0x16, 0x66, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x77, 0x0a, 0x1e, + 0x61, 0x6c, 0x6c, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x1b, 0x61, 0x6c, 0x6c, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x16, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x14, 0x6c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0e, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x12, 0x0a, 0x10, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x4c, 0x0a, 0x16, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x66, 0x69, + 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x13, 0x66, 0x69, 0x6c, 0x65, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6a, + 0x0a, 0x17, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x62, 0x61, 0x73, + 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x29, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x59, 0x0a, 0x13, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x42, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x25, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x53, 0x0a, 0x0d, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x32, 0x93, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7f, 0x0a, 0x14, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x12, 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4c, 0x0a, 0x16, 0x46, - 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0c, 0x52, 0x13, 0x66, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6a, 0x0a, 0x17, 0x45, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x61, - 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x05, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x59, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x07, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x22, 0x25, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x53, 0x0a, 0x0d, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x93, 0x01, 0x0a, - 0x10, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x7f, 0x0a, 0x14, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, 0x6c, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x30, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x67, 0x72, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, + 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x42, 0x73, 0x0a, 0x1a, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, 0x6c, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, - 0x30, 0x01, 0x42, 0x3b, 0x5a, 0x39, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, - 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x72, 0x65, 0x66, - 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x72, 0x65, 0x66, - 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x15, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x66, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, + 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xb8, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( - file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescOnce sync.Once - file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescData = file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDesc + file_grpc_reflection_v1alpha_reflection_proto_rawDescOnce sync.Once + file_grpc_reflection_v1alpha_reflection_proto_rawDescData = file_grpc_reflection_v1alpha_reflection_proto_rawDesc ) -func file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP() []byte { - file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescOnce.Do(func() { - file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescData = protoimpl.X.CompressGZIP(file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescData) +func file_grpc_reflection_v1alpha_reflection_proto_rawDescGZIP() []byte { + file_grpc_reflection_v1alpha_reflection_proto_rawDescOnce.Do(func() { + file_grpc_reflection_v1alpha_reflection_proto_rawDescData = protoimpl.X.CompressGZIP(file_grpc_reflection_v1alpha_reflection_proto_rawDescData) }) - return file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDescData + return file_grpc_reflection_v1alpha_reflection_proto_rawDescData } -var file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_reflection_grpc_reflection_v1alpha_reflection_proto_goTypes = []interface{}{ +var file_grpc_reflection_v1alpha_reflection_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_grpc_reflection_v1alpha_reflection_proto_goTypes = []interface{}{ (*ServerReflectionRequest)(nil), // 0: grpc.reflection.v1alpha.ServerReflectionRequest (*ExtensionRequest)(nil), // 1: grpc.reflection.v1alpha.ExtensionRequest (*ServerReflectionResponse)(nil), // 2: grpc.reflection.v1alpha.ServerReflectionResponse @@ -799,7 +874,7 @@ var file_reflection_grpc_reflection_v1alpha_reflection_proto_goTypes = []interfa (*ServiceResponse)(nil), // 6: grpc.reflection.v1alpha.ServiceResponse (*ErrorResponse)(nil), // 7: grpc.reflection.v1alpha.ErrorResponse } -var file_reflection_grpc_reflection_v1alpha_reflection_proto_depIdxs = []int32{ +var file_grpc_reflection_v1alpha_reflection_proto_depIdxs = []int32{ 1, // 0: grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension:type_name -> grpc.reflection.v1alpha.ExtensionRequest 0, // 1: grpc.reflection.v1alpha.ServerReflectionResponse.original_request:type_name -> grpc.reflection.v1alpha.ServerReflectionRequest 3, // 2: grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response:type_name -> grpc.reflection.v1alpha.FileDescriptorResponse @@ -816,13 +891,13 @@ var file_reflection_grpc_reflection_v1alpha_reflection_proto_depIdxs = []int32{ 0, // [0:7] is the sub-list for field type_name } -func init() { file_reflection_grpc_reflection_v1alpha_reflection_proto_init() } -func file_reflection_grpc_reflection_v1alpha_reflection_proto_init() { - if File_reflection_grpc_reflection_v1alpha_reflection_proto != nil { +func init() { file_grpc_reflection_v1alpha_reflection_proto_init() } +func file_grpc_reflection_v1alpha_reflection_proto_init() { + if File_grpc_reflection_v1alpha_reflection_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_grpc_reflection_v1alpha_reflection_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ServerReflectionRequest); i { case 0: return &v.state @@ -834,7 +909,7 @@ func file_reflection_grpc_reflection_v1alpha_reflection_proto_init() { return nil } } - file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_grpc_reflection_v1alpha_reflection_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExtensionRequest); i { case 0: return &v.state @@ -846,7 +921,7 @@ func file_reflection_grpc_reflection_v1alpha_reflection_proto_init() { return nil } } - file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_grpc_reflection_v1alpha_reflection_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ServerReflectionResponse); i { case 0: return &v.state @@ -858,7 +933,7 @@ func file_reflection_grpc_reflection_v1alpha_reflection_proto_init() { return nil } } - file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_grpc_reflection_v1alpha_reflection_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FileDescriptorResponse); i { case 0: return &v.state @@ -870,7 +945,7 @@ func file_reflection_grpc_reflection_v1alpha_reflection_proto_init() { return nil } } - file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_grpc_reflection_v1alpha_reflection_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExtensionNumberResponse); i { case 0: return &v.state @@ -882,7 +957,7 @@ func file_reflection_grpc_reflection_v1alpha_reflection_proto_init() { return nil } } - file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_grpc_reflection_v1alpha_reflection_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListServiceResponse); i { case 0: return &v.state @@ -894,7 +969,7 @@ func file_reflection_grpc_reflection_v1alpha_reflection_proto_init() { return nil } } - file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_grpc_reflection_v1alpha_reflection_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ServiceResponse); i { case 0: return &v.state @@ -906,7 +981,7 @@ func file_reflection_grpc_reflection_v1alpha_reflection_proto_init() { return nil } } - file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_grpc_reflection_v1alpha_reflection_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ErrorResponse); i { case 0: return &v.state @@ -919,14 +994,14 @@ func file_reflection_grpc_reflection_v1alpha_reflection_proto_init() { } } } - file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_grpc_reflection_v1alpha_reflection_proto_msgTypes[0].OneofWrappers = []interface{}{ (*ServerReflectionRequest_FileByFilename)(nil), (*ServerReflectionRequest_FileContainingSymbol)(nil), (*ServerReflectionRequest_FileContainingExtension)(nil), (*ServerReflectionRequest_AllExtensionNumbersOfType)(nil), (*ServerReflectionRequest_ListServices)(nil), } - file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes[2].OneofWrappers = []interface{}{ + file_grpc_reflection_v1alpha_reflection_proto_msgTypes[2].OneofWrappers = []interface{}{ (*ServerReflectionResponse_FileDescriptorResponse)(nil), (*ServerReflectionResponse_AllExtensionNumbersResponse)(nil), (*ServerReflectionResponse_ListServicesResponse)(nil), @@ -936,18 +1011,18 @@ func file_reflection_grpc_reflection_v1alpha_reflection_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDesc, + RawDescriptor: file_grpc_reflection_v1alpha_reflection_proto_rawDesc, NumEnums: 0, NumMessages: 8, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_reflection_grpc_reflection_v1alpha_reflection_proto_goTypes, - DependencyIndexes: file_reflection_grpc_reflection_v1alpha_reflection_proto_depIdxs, - MessageInfos: file_reflection_grpc_reflection_v1alpha_reflection_proto_msgTypes, + GoTypes: file_grpc_reflection_v1alpha_reflection_proto_goTypes, + DependencyIndexes: file_grpc_reflection_v1alpha_reflection_proto_depIdxs, + MessageInfos: file_grpc_reflection_v1alpha_reflection_proto_msgTypes, }.Build() - File_reflection_grpc_reflection_v1alpha_reflection_proto = out.File - file_reflection_grpc_reflection_v1alpha_reflection_proto_rawDesc = nil - file_reflection_grpc_reflection_v1alpha_reflection_proto_goTypes = nil - file_reflection_grpc_reflection_v1alpha_reflection_proto_depIdxs = nil + File_grpc_reflection_v1alpha_reflection_proto = out.File + file_grpc_reflection_v1alpha_reflection_proto_rawDesc = nil + file_grpc_reflection_v1alpha_reflection_proto_goTypes = nil + file_grpc_reflection_v1alpha_reflection_proto_depIdxs = nil } diff --git a/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection.proto b/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection.proto deleted file mode 100644 index ee2b82c0a5b3c..0000000000000 --- a/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection.proto +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright 2016 gRPC authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Service exported by server reflection - -syntax = "proto3"; - -option go_package = "google.golang.org/grpc/reflection/grpc_reflection_v1alpha"; - -package grpc.reflection.v1alpha; - -service ServerReflection { - // The reflection service is structured as a bidirectional stream, ensuring - // all related requests go to a single server. - rpc ServerReflectionInfo(stream ServerReflectionRequest) - returns (stream ServerReflectionResponse); -} - -// The message sent by the client when calling ServerReflectionInfo method. -message ServerReflectionRequest { - string host = 1; - // To use reflection service, the client should set one of the following - // fields in message_request. The server distinguishes requests by their - // defined field and then handles them using corresponding methods. - oneof message_request { - // Find a proto file by the file name. - string file_by_filename = 3; - - // Find the proto file that declares the given fully-qualified symbol name. - // This field should be a fully-qualified symbol name - // (e.g. .[.] or .). - string file_containing_symbol = 4; - - // Find the proto file which defines an extension extending the given - // message type with the given field number. - ExtensionRequest file_containing_extension = 5; - - // Finds the tag numbers used by all known extensions of extendee_type, and - // appends them to ExtensionNumberResponse in an undefined order. - // Its corresponding method is best-effort: it's not guaranteed that the - // reflection service will implement this method, and it's not guaranteed - // that this method will provide all extensions. Returns - // StatusCode::UNIMPLEMENTED if it's not implemented. - // This field should be a fully-qualified type name. The format is - // . - string all_extension_numbers_of_type = 6; - - // List the full names of registered services. The content will not be - // checked. - string list_services = 7; - } -} - -// The type name and extension number sent by the client when requesting -// file_containing_extension. -message ExtensionRequest { - // Fully-qualified type name. The format should be . - string containing_type = 1; - int32 extension_number = 2; -} - -// The message sent by the server to answer ServerReflectionInfo method. -message ServerReflectionResponse { - string valid_host = 1; - ServerReflectionRequest original_request = 2; - // The server sets one of the following fields according to the - // message_request in the request. - oneof message_response { - // This message is used to answer file_by_filename, file_containing_symbol, - // file_containing_extension requests with transitive dependencies. - // As the repeated label is not allowed in oneof fields, we use a - // FileDescriptorResponse message to encapsulate the repeated fields. - // The reflection service is allowed to avoid sending FileDescriptorProtos - // that were previously sent in response to earlier requests in the stream. - FileDescriptorResponse file_descriptor_response = 4; - - // This message is used to answer all_extension_numbers_of_type requests. - ExtensionNumberResponse all_extension_numbers_response = 5; - - // This message is used to answer list_services requests. - ListServiceResponse list_services_response = 6; - - // This message is used when an error occurs. - ErrorResponse error_response = 7; - } -} - -// Serialized FileDescriptorProto messages sent by the server answering -// a file_by_filename, file_containing_symbol, or file_containing_extension -// request. -message FileDescriptorResponse { - // Serialized FileDescriptorProto messages. We avoid taking a dependency on - // descriptor.proto, which uses proto2 only features, by making them opaque - // bytes instead. - repeated bytes file_descriptor_proto = 1; -} - -// A list of extension numbers sent by the server answering -// all_extension_numbers_of_type request. -message ExtensionNumberResponse { - // Full name of the base type, including the package name. The format - // is . - string base_type_name = 1; - repeated int32 extension_number = 2; -} - -// A list of ServiceResponse sent by the server answering list_services request. -message ListServiceResponse { - // The information of each service may be expanded in the future, so we use - // ServiceResponse message to encapsulate it. - repeated ServiceResponse service = 1; -} - -// The information of a single service used by ListServiceResponse to answer -// list_services request. -message ServiceResponse { - // Full name of a registered service, including its package name. The format - // is . - string name = 1; -} - -// The error code and error message sent by the server when an error occurs. -message ErrorResponse { - // This field uses the error codes defined in grpc::StatusCode. - int32 error_code = 1; - string error_message = 2; -} diff --git a/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection_grpc.pb.go b/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection_grpc.pb.go index 4e6a6b1a857b8..367a029be6b36 100644 --- a/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection_grpc.pb.go +++ b/vendor/google.golang.org/grpc/reflection/grpc_reflection_v1alpha/reflection_grpc.pb.go @@ -1,8 +1,26 @@ +// Copyright 2016 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// Service exported by server reflection + +// Warning: this entire file is deprecated. Use this instead: +// https://github.com/grpc/grpc-proto/blob/master/grpc/reflection/v1/reflection.proto + // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.14.0 -// source: reflection/grpc_reflection_v1alpha/reflection.proto +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.22.0 +// grpc/reflection/v1alpha/reflection.proto is a deprecated file. package grpc_reflection_v1alpha @@ -18,6 +36,10 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + ServerReflection_ServerReflectionInfo_FullMethodName = "/grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo" +) + // ServerReflectionClient is the client API for ServerReflection service. // // 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. @@ -36,7 +58,7 @@ func NewServerReflectionClient(cc grpc.ClientConnInterface) ServerReflectionClie } func (c *serverReflectionClient) ServerReflectionInfo(ctx context.Context, opts ...grpc.CallOption) (ServerReflection_ServerReflectionInfoClient, error) { - stream, err := c.cc.NewStream(ctx, &ServerReflection_ServiceDesc.Streams[0], "/grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo", opts...) + stream, err := c.cc.NewStream(ctx, &ServerReflection_ServiceDesc.Streams[0], ServerReflection_ServerReflectionInfo_FullMethodName, opts...) if err != nil { return nil, err } @@ -135,5 +157,5 @@ var ServerReflection_ServiceDesc = grpc.ServiceDesc{ ClientStreams: true, }, }, - Metadata: "reflection/grpc_reflection_v1alpha/reflection.proto", + Metadata: "grpc/reflection/v1alpha/reflection.proto", } diff --git a/vendor/google.golang.org/grpc/reflection/serverreflection.go b/vendor/google.golang.org/grpc/reflection/serverreflection.go index 81344abd77da4..e2f9ebfbbce85 100644 --- a/vendor/google.golang.org/grpc/reflection/serverreflection.go +++ b/vendor/google.golang.org/grpc/reflection/serverreflection.go @@ -23,6 +23,7 @@ The service implemented is defined in: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1alpha/reflection.proto. To register server reflection on a gRPC server: + import "google.golang.org/grpc/reflection" s := grpc.NewServer() @@ -32,7 +33,6 @@ To register server reflection on a gRPC server: reflection.Register(s) s.Serve(lis) - */ package reflection // import "google.golang.org/grpc/reflection" @@ -42,12 +42,14 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" - rpb "google.golang.org/grpc/reflection/grpc_reflection_v1alpha" "google.golang.org/grpc/status" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protodesc" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" + + v1alphagrpc "google.golang.org/grpc/reflection/grpc_reflection_v1alpha" + v1alphapb "google.golang.org/grpc/reflection/grpc_reflection_v1alpha" ) // GRPCServer is the interface provided by a gRPC server. It is implemented by @@ -63,7 +65,7 @@ var _ GRPCServer = (*grpc.Server)(nil) // Register registers the server reflection service on the given gRPC server. func Register(s GRPCServer) { svr := NewServer(ServerOptions{Services: s}) - rpb.RegisterServerReflectionServer(s, svr) + v1alphagrpc.RegisterServerReflectionServer(s, svr) } // ServiceInfoProvider is an interface used to retrieve metadata about the @@ -74,7 +76,7 @@ func Register(s GRPCServer) { // for a custom implementation to return zero values for the // grpc.ServiceInfo values in the map. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -85,7 +87,7 @@ type ServiceInfoProvider interface { // ExtensionResolver is the interface used to query details about extensions. // This interface is satisfied by protoregistry.GlobalTypes. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -96,7 +98,7 @@ type ExtensionResolver interface { // ServerOptions represents the options used to construct a reflection server. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -120,11 +122,11 @@ type ServerOptions struct { // This can be used to customize behavior of the reflection service. Most usages // should prefer to use Register instead. // -// Experimental +// # Experimental // // Notice: This function is EXPERIMENTAL and may be changed or removed in a // later release. -func NewServer(opts ServerOptions) rpb.ServerReflectionServer { +func NewServer(opts ServerOptions) v1alphagrpc.ServerReflectionServer { if opts.DescriptorResolver == nil { opts.DescriptorResolver = protoregistry.GlobalFiles } @@ -139,7 +141,7 @@ func NewServer(opts ServerOptions) rpb.ServerReflectionServer { } type serverReflectionServer struct { - rpb.UnimplementedServerReflectionServer + v1alphagrpc.UnimplementedServerReflectionServer s ServiceInfoProvider descResolver protodesc.Resolver extResolver ExtensionResolver @@ -213,11 +215,11 @@ func (s *serverReflectionServer) allExtensionNumbersForTypeName(name string) ([] } // listServices returns the names of services this server exposes. -func (s *serverReflectionServer) listServices() []*rpb.ServiceResponse { +func (s *serverReflectionServer) listServices() []*v1alphapb.ServiceResponse { serviceInfo := s.s.GetServiceInfo() - resp := make([]*rpb.ServiceResponse, 0, len(serviceInfo)) + resp := make([]*v1alphapb.ServiceResponse, 0, len(serviceInfo)) for svc := range serviceInfo { - resp = append(resp, &rpb.ServiceResponse{Name: svc}) + resp = append(resp, &v1alphapb.ServiceResponse{Name: svc}) } sort.Slice(resp, func(i, j int) bool { return resp[i].Name < resp[j].Name @@ -226,7 +228,7 @@ func (s *serverReflectionServer) listServices() []*rpb.ServiceResponse { } // ServerReflectionInfo is the reflection service handler. -func (s *serverReflectionServer) ServerReflectionInfo(stream rpb.ServerReflection_ServerReflectionInfoServer) error { +func (s *serverReflectionServer) ServerReflectionInfo(stream v1alphagrpc.ServerReflection_ServerReflectionInfoServer) error { sentFileDescriptors := make(map[string]bool) for { in, err := stream.Recv() @@ -237,79 +239,79 @@ func (s *serverReflectionServer) ServerReflectionInfo(stream rpb.ServerReflectio return err } - out := &rpb.ServerReflectionResponse{ + out := &v1alphapb.ServerReflectionResponse{ ValidHost: in.Host, OriginalRequest: in, } switch req := in.MessageRequest.(type) { - case *rpb.ServerReflectionRequest_FileByFilename: + case *v1alphapb.ServerReflectionRequest_FileByFilename: var b [][]byte fd, err := s.descResolver.FindFileByPath(req.FileByFilename) if err == nil { b, err = s.fileDescWithDependencies(fd, sentFileDescriptors) } if err != nil { - out.MessageResponse = &rpb.ServerReflectionResponse_ErrorResponse{ - ErrorResponse: &rpb.ErrorResponse{ + out.MessageResponse = &v1alphapb.ServerReflectionResponse_ErrorResponse{ + ErrorResponse: &v1alphapb.ErrorResponse{ ErrorCode: int32(codes.NotFound), ErrorMessage: err.Error(), }, } } else { - out.MessageResponse = &rpb.ServerReflectionResponse_FileDescriptorResponse{ - FileDescriptorResponse: &rpb.FileDescriptorResponse{FileDescriptorProto: b}, + out.MessageResponse = &v1alphapb.ServerReflectionResponse_FileDescriptorResponse{ + FileDescriptorResponse: &v1alphapb.FileDescriptorResponse{FileDescriptorProto: b}, } } - case *rpb.ServerReflectionRequest_FileContainingSymbol: + case *v1alphapb.ServerReflectionRequest_FileContainingSymbol: b, err := s.fileDescEncodingContainingSymbol(req.FileContainingSymbol, sentFileDescriptors) if err != nil { - out.MessageResponse = &rpb.ServerReflectionResponse_ErrorResponse{ - ErrorResponse: &rpb.ErrorResponse{ + out.MessageResponse = &v1alphapb.ServerReflectionResponse_ErrorResponse{ + ErrorResponse: &v1alphapb.ErrorResponse{ ErrorCode: int32(codes.NotFound), ErrorMessage: err.Error(), }, } } else { - out.MessageResponse = &rpb.ServerReflectionResponse_FileDescriptorResponse{ - FileDescriptorResponse: &rpb.FileDescriptorResponse{FileDescriptorProto: b}, + out.MessageResponse = &v1alphapb.ServerReflectionResponse_FileDescriptorResponse{ + FileDescriptorResponse: &v1alphapb.FileDescriptorResponse{FileDescriptorProto: b}, } } - case *rpb.ServerReflectionRequest_FileContainingExtension: + case *v1alphapb.ServerReflectionRequest_FileContainingExtension: typeName := req.FileContainingExtension.ContainingType extNum := req.FileContainingExtension.ExtensionNumber b, err := s.fileDescEncodingContainingExtension(typeName, extNum, sentFileDescriptors) if err != nil { - out.MessageResponse = &rpb.ServerReflectionResponse_ErrorResponse{ - ErrorResponse: &rpb.ErrorResponse{ + out.MessageResponse = &v1alphapb.ServerReflectionResponse_ErrorResponse{ + ErrorResponse: &v1alphapb.ErrorResponse{ ErrorCode: int32(codes.NotFound), ErrorMessage: err.Error(), }, } } else { - out.MessageResponse = &rpb.ServerReflectionResponse_FileDescriptorResponse{ - FileDescriptorResponse: &rpb.FileDescriptorResponse{FileDescriptorProto: b}, + out.MessageResponse = &v1alphapb.ServerReflectionResponse_FileDescriptorResponse{ + FileDescriptorResponse: &v1alphapb.FileDescriptorResponse{FileDescriptorProto: b}, } } - case *rpb.ServerReflectionRequest_AllExtensionNumbersOfType: + case *v1alphapb.ServerReflectionRequest_AllExtensionNumbersOfType: extNums, err := s.allExtensionNumbersForTypeName(req.AllExtensionNumbersOfType) if err != nil { - out.MessageResponse = &rpb.ServerReflectionResponse_ErrorResponse{ - ErrorResponse: &rpb.ErrorResponse{ + out.MessageResponse = &v1alphapb.ServerReflectionResponse_ErrorResponse{ + ErrorResponse: &v1alphapb.ErrorResponse{ ErrorCode: int32(codes.NotFound), ErrorMessage: err.Error(), }, } } else { - out.MessageResponse = &rpb.ServerReflectionResponse_AllExtensionNumbersResponse{ - AllExtensionNumbersResponse: &rpb.ExtensionNumberResponse{ + out.MessageResponse = &v1alphapb.ServerReflectionResponse_AllExtensionNumbersResponse{ + AllExtensionNumbersResponse: &v1alphapb.ExtensionNumberResponse{ BaseTypeName: req.AllExtensionNumbersOfType, ExtensionNumber: extNums, }, } } - case *rpb.ServerReflectionRequest_ListServices: - out.MessageResponse = &rpb.ServerReflectionResponse_ListServicesResponse{ - ListServicesResponse: &rpb.ListServiceResponse{ + case *v1alphapb.ServerReflectionRequest_ListServices: + out.MessageResponse = &v1alphapb.ServerReflectionResponse_ListServicesResponse{ + ListServicesResponse: &v1alphapb.ListServiceResponse{ Service: s.listServices(), }, } diff --git a/vendor/google.golang.org/grpc/regenerate.sh b/vendor/google.golang.org/grpc/regenerate.sh index 978b89f37a4ab..a6f26c8ab0f03 100644 --- a/vendor/google.golang.org/grpc/regenerate.sh +++ b/vendor/google.golang.org/grpc/regenerate.sh @@ -57,7 +57,8 @@ LEGACY_SOURCES=( ${WORKDIR}/grpc-proto/grpc/health/v1/health.proto ${WORKDIR}/grpc-proto/grpc/lb/v1/load_balancer.proto profiling/proto/service.proto - reflection/grpc_reflection_v1alpha/reflection.proto + ${WORKDIR}/grpc-proto/grpc/reflection/v1alpha/reflection.proto + ${WORKDIR}/grpc-proto/grpc/reflection/v1/reflection.proto ) # Generates only the new gRPC Service symbols @@ -68,7 +69,6 @@ SOURCES=( ${WORKDIR}/grpc-proto/grpc/gcp/transport_security_common.proto ${WORKDIR}/grpc-proto/grpc/lookup/v1/rls.proto ${WORKDIR}/grpc-proto/grpc/lookup/v1/rls_config.proto - ${WORKDIR}/grpc-proto/grpc/service_config/service_config.proto ${WORKDIR}/grpc-proto/grpc/testing/*.proto ${WORKDIR}/grpc-proto/grpc/core/*.proto ) @@ -80,8 +80,7 @@ SOURCES=( # Note that the protos listed here are all for testing purposes. All protos to # be used externally should have a go_package option (and they don't need to be # listed here). -OPTS=Mgrpc/service_config/service_config.proto=/internal/proto/grpc_service_config,\ -Mgrpc/core/stats.proto=google.golang.org/grpc/interop/grpc_testing/core,\ +OPTS=Mgrpc/core/stats.proto=google.golang.org/grpc/interop/grpc_testing/core,\ Mgrpc/testing/benchmark_service.proto=google.golang.org/grpc/interop/grpc_testing,\ Mgrpc/testing/stats.proto=google.golang.org/grpc/interop/grpc_testing,\ Mgrpc/testing/report_qps_scenario_service.proto=google.golang.org/grpc/interop/grpc_testing,\ @@ -121,11 +120,4 @@ mv ${WORKDIR}/out/google.golang.org/grpc/lookup/grpc_lookup_v1/* ${WORKDIR}/out/ # see grpc_testing_not_regenerate/README.md for details. rm ${WORKDIR}/out/google.golang.org/grpc/reflection/grpc_testing_not_regenerate/*.pb.go -# grpc/service_config/service_config.proto does not have a go_package option. -mv ${WORKDIR}/out/grpc/service_config/service_config.pb.go internal/proto/grpc_service_config - -# grpc/testing does not have a go_package option. -mv ${WORKDIR}/out/grpc/testing/*.pb.go interop/grpc_testing/ -mv ${WORKDIR}/out/grpc/core/*.pb.go interop/grpc_testing/core/ - cp -R ${WORKDIR}/out/google.golang.org/grpc/* . diff --git a/vendor/google.golang.org/grpc/resolver/manual/manual.go b/vendor/google.golang.org/grpc/resolver/manual/manual.go index f6e7b5ae35818..f27978e1281fe 100644 --- a/vendor/google.golang.org/grpc/resolver/manual/manual.go +++ b/vendor/google.golang.org/grpc/resolver/manual/manual.go @@ -21,6 +21,8 @@ package manual import ( + "sync" + "google.golang.org/grpc/resolver" ) @@ -50,6 +52,7 @@ type Resolver struct { scheme string // Fields actually belong to the resolver. + mu sync.Mutex // Guards access to CC. CC resolver.ClientConn bootstrapState *resolver.State } @@ -62,8 +65,10 @@ func (r *Resolver) InitialState(s resolver.State) { // Build returns itself for Resolver, because it's both a builder and a resolver. func (r *Resolver) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error) { - r.BuildCallback(target, cc, opts) + r.mu.Lock() r.CC = cc + r.mu.Unlock() + r.BuildCallback(target, cc, opts) if r.bootstrapState != nil { r.UpdateState(*r.bootstrapState) } @@ -87,10 +92,14 @@ func (r *Resolver) Close() { // UpdateState calls CC.UpdateState. func (r *Resolver) UpdateState(s resolver.State) { + r.mu.Lock() r.CC.UpdateState(s) + r.mu.Unlock() } // ReportError calls CC.ReportError. func (r *Resolver) ReportError(err error) { + r.mu.Lock() r.CC.ReportError(err) + r.mu.Unlock() } diff --git a/vendor/google.golang.org/grpc/resolver/map.go b/vendor/google.golang.org/grpc/resolver/map.go index e87ecd0eeb38e..efcb7f3efd82d 100644 --- a/vendor/google.golang.org/grpc/resolver/map.go +++ b/vendor/google.golang.org/grpc/resolver/map.go @@ -28,25 +28,40 @@ type addressMapEntry struct { // Multiple accesses may not be performed concurrently. Must be created via // NewAddressMap; do not construct directly. type AddressMap struct { - m map[string]addressMapEntryList + // The underlying map is keyed by an Address with fields that we don't care + // about being set to their zero values. The only fields that we care about + // are `Addr`, `ServerName` and `Attributes`. Since we need to be able to + // distinguish between addresses with same `Addr` and `ServerName`, but + // different `Attributes`, we cannot store the `Attributes` in the map key. + // + // The comparison operation for structs work as follows: + // Struct values are comparable if all their fields are comparable. Two + // struct values are equal if their corresponding non-blank fields are equal. + // + // The value type of the map contains a slice of addresses which match the key + // in their `Addr` and `ServerName` fields and contain the corresponding value + // associated with them. + m map[Address]addressMapEntryList +} + +func toMapKey(addr *Address) Address { + return Address{Addr: addr.Addr, ServerName: addr.ServerName} } type addressMapEntryList []*addressMapEntry // NewAddressMap creates a new AddressMap. func NewAddressMap() *AddressMap { - return &AddressMap{m: make(map[string]addressMapEntryList)} + return &AddressMap{m: make(map[Address]addressMapEntryList)} } // find returns the index of addr in the addressMapEntry slice, or -1 if not // present. func (l addressMapEntryList) find(addr Address) int { - if len(l) == 0 { - return -1 - } for i, entry := range l { - if entry.addr.ServerName == addr.ServerName && - entry.addr.Attributes.Equal(addr.Attributes) { + // Attributes are the only thing to match on here, since `Addr` and + // `ServerName` are already equal. + if entry.addr.Attributes.Equal(addr.Attributes) { return i } } @@ -55,7 +70,8 @@ func (l addressMapEntryList) find(addr Address) int { // Get returns the value for the address in the map, if present. func (a *AddressMap) Get(addr Address) (value interface{}, ok bool) { - entryList := a.m[addr.Addr] + addrKey := toMapKey(&addr) + entryList := a.m[addrKey] if entry := entryList.find(addr); entry != -1 { return entryList[entry].value, true } @@ -64,17 +80,19 @@ func (a *AddressMap) Get(addr Address) (value interface{}, ok bool) { // Set updates or adds the value to the address in the map. func (a *AddressMap) Set(addr Address, value interface{}) { - entryList := a.m[addr.Addr] + addrKey := toMapKey(&addr) + entryList := a.m[addrKey] if entry := entryList.find(addr); entry != -1 { - a.m[addr.Addr][entry].value = value + entryList[entry].value = value return } - a.m[addr.Addr] = append(a.m[addr.Addr], &addressMapEntry{addr: addr, value: value}) + a.m[addrKey] = append(entryList, &addressMapEntry{addr: addr, value: value}) } // Delete removes addr from the map. func (a *AddressMap) Delete(addr Address) { - entryList := a.m[addr.Addr] + addrKey := toMapKey(&addr) + entryList := a.m[addrKey] entry := entryList.find(addr) if entry == -1 { return @@ -85,7 +103,7 @@ func (a *AddressMap) Delete(addr Address) { copy(entryList[entry:], entryList[entry+1:]) entryList = entryList[:len(entryList)-1] } - a.m[addr.Addr] = entryList + a.m[addrKey] = entryList } // Len returns the number of entries in the map. @@ -107,3 +125,14 @@ func (a *AddressMap) Keys() []Address { } return ret } + +// Values returns a slice of all current map values. +func (a *AddressMap) Values() []interface{} { + ret := make([]interface{}, 0, a.Len()) + for _, entryList := range a.m { + for _, entry := range entryList { + ret = append(ret, entry.value) + } + } + return ret +} diff --git a/vendor/google.golang.org/grpc/resolver/resolver.go b/vendor/google.golang.org/grpc/resolver/resolver.go index ca2e35a3596f7..353c10b69a5b8 100644 --- a/vendor/google.golang.org/grpc/resolver/resolver.go +++ b/vendor/google.golang.org/grpc/resolver/resolver.go @@ -22,12 +22,13 @@ package resolver import ( "context" + "fmt" "net" "net/url" + "strings" "google.golang.org/grpc/attributes" "google.golang.org/grpc/credentials" - "google.golang.org/grpc/internal/pretty" "google.golang.org/grpc/serviceconfig" ) @@ -40,8 +41,9 @@ var ( // TODO(bar) install dns resolver in init(){}. -// Register registers the resolver builder to the resolver map. b.Scheme will be -// used as the scheme registered with this builder. +// Register registers the resolver builder to the resolver map. b.Scheme will +// be used as the scheme registered with this builder. The registry is case +// sensitive, and schemes should not contain any uppercase characters. // // NOTE: this function must only be called during initialization time (i.e. in // an init() function), and is not thread-safe. If multiple Resolvers are @@ -96,7 +98,7 @@ const ( // Address represents a server the client connects to. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -122,7 +124,7 @@ type Address struct { Attributes *attributes.Attributes // BalancerAttributes contains arbitrary data about this address intended - // for consumption by the LB policy. These attribes do not affect SubConn + // for consumption by the LB policy. These attributes do not affect SubConn // creation, connection establishment, handshaking, etc. BalancerAttributes *attributes.Attributes @@ -149,7 +151,17 @@ func (a Address) Equal(o Address) bool { // String returns JSON formatted string representation of the address. func (a Address) String() string { - return pretty.ToJSON(a) + var sb strings.Builder + sb.WriteString(fmt.Sprintf("{Addr: %q, ", a.Addr)) + sb.WriteString(fmt.Sprintf("ServerName: %q, ", a.ServerName)) + if a.Attributes != nil { + sb.WriteString(fmt.Sprintf("Attributes: %v, ", a.Attributes.String())) + } + if a.BalancerAttributes != nil { + sb.WriteString(fmt.Sprintf("BalancerAttributes: %v", a.BalancerAttributes.String())) + } + sb.WriteString("}") + return sb.String() } // BuildOptions includes additional information for the builder to create @@ -202,6 +214,15 @@ type State struct { // gRPC to add new methods to this interface. type ClientConn interface { // UpdateState updates the state of the ClientConn appropriately. + // + // If an error is returned, the resolver should try to resolve the + // target again. The resolver should use a backoff timer to prevent + // overloading the server with requests. If a resolver is certain that + // reresolving will not change the result, e.g. because it is + // a watch-based resolver, returned errors can be ignored. + // + // If the resolved State is the same as the last reported one, calling + // UpdateState can be omitted. UpdateState(State) error // ReportError notifies the ClientConn that the Resolver encountered an // error. The ClientConn will notify the load balancer and begin calling @@ -236,20 +257,17 @@ type ClientConn interface { // // Examples: // -// - "dns://some_authority/foo.bar" -// Target{Scheme: "dns", Authority: "some_authority", Endpoint: "foo.bar"} -// - "foo.bar" -// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "foo.bar"} -// - "unknown_scheme://authority/endpoint" -// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "unknown_scheme://authority/endpoint"} +// - "dns://some_authority/foo.bar" +// Target{Scheme: "dns", Authority: "some_authority", Endpoint: "foo.bar"} +// - "foo.bar" +// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "foo.bar"} +// - "unknown_scheme://authority/endpoint" +// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "unknown_scheme://authority/endpoint"} type Target struct { // Deprecated: use URL.Scheme instead. Scheme string // Deprecated: use URL.Host instead. Authority string - // Deprecated: use URL.Path or URL.Opaque instead. The latter is set when - // the former is empty. - Endpoint string // URL contains the parsed dial target with an optional default scheme added // to it if the original dial target contained no scheme or contained an // unregistered scheme. Any query params specified in the original dial @@ -257,6 +275,24 @@ type Target struct { URL url.URL } +// Endpoint retrieves endpoint without leading "/" from either `URL.Path` +// or `URL.Opaque`. The latter is used when the former is empty. +func (t Target) Endpoint() string { + endpoint := t.URL.Path + if endpoint == "" { + endpoint = t.URL.Opaque + } + // For targets of the form "[scheme]://[authority]/endpoint, the endpoint + // value returned from url.Parse() contains a leading "/". Although this is + // in accordance with RFC 3986, we do not want to break existing resolver + // implementations which expect the endpoint without the leading "/". So, we + // end up stripping the leading "/" here. But this will result in an + // incorrect parsing for something like "unix:///path/to/socket". Since we + // own the "unix" resolver, we can workaround in the unix resolver by using + // the `URL` field. + return strings.TrimPrefix(endpoint, "/") +} + // Builder creates a resolver that will be used to watch name resolution updates. type Builder interface { // Build creates a new resolver for the given target. @@ -264,8 +300,10 @@ type Builder interface { // gRPC dial calls Build synchronously, and fails if the returned error is // not nil. Build(target Target, cc ClientConn, opts BuildOptions) (Resolver, error) - // Scheme returns the scheme supported by this resolver. - // Scheme is defined at https://github.com/grpc/grpc/blob/master/doc/naming.md. + // Scheme returns the scheme supported by this resolver. Scheme is defined + // at https://github.com/grpc/grpc/blob/master/doc/naming.md. The returned + // string should not contain uppercase characters, as they will not match + // the parsed target's scheme as defined in RFC 3986. Scheme() string } diff --git a/vendor/google.golang.org/grpc/resolver_conn_wrapper.go b/vendor/google.golang.org/grpc/resolver_conn_wrapper.go index 05a9d4e0bac00..b408b3688f2ea 100644 --- a/vendor/google.golang.org/grpc/resolver_conn_wrapper.go +++ b/vendor/google.golang.org/grpc/resolver_conn_wrapper.go @@ -19,11 +19,11 @@ package grpc import ( + "context" "strings" "sync" "google.golang.org/grpc/balancer" - "google.golang.org/grpc/credentials" "google.golang.org/grpc/internal/channelz" "google.golang.org/grpc/internal/grpcsync" "google.golang.org/grpc/internal/pretty" @@ -31,129 +31,192 @@ import ( "google.golang.org/grpc/serviceconfig" ) +// resolverStateUpdater wraps the single method used by ccResolverWrapper to +// report a state update from the actual resolver implementation. +type resolverStateUpdater interface { + updateResolverState(s resolver.State, err error) error +} + // ccResolverWrapper is a wrapper on top of cc for resolvers. // It implements resolver.ClientConn interface. type ccResolverWrapper struct { - cc *ClientConn - resolverMu sync.Mutex - resolver resolver.Resolver - done *grpcsync.Event - curState resolver.State + // The following fields are initialized when the wrapper is created and are + // read-only afterwards, and therefore can be accessed without a mutex. + cc resolverStateUpdater + channelzID *channelz.Identifier + ignoreServiceConfig bool + opts ccResolverWrapperOpts + serializer *grpcsync.CallbackSerializer // To serialize all incoming calls. + serializerCancel context.CancelFunc // To close the serializer, accessed only from close(). + + // All incoming (resolver --> gRPC) calls are guaranteed to execute in a + // mutually exclusive manner as they are scheduled on the serializer. + // Fields accessed *only* in these serializer callbacks, can therefore be + // accessed without a mutex. + curState resolver.State + + // mu guards access to the below fields. + mu sync.Mutex + closed bool + resolver resolver.Resolver // Accessed only from outgoing calls. +} - incomingMu sync.Mutex // Synchronizes all the incoming calls. +// ccResolverWrapperOpts wraps the arguments to be passed when creating a new +// ccResolverWrapper. +type ccResolverWrapperOpts struct { + target resolver.Target // User specified dial target to resolve. + builder resolver.Builder // Resolver builder to use. + bOpts resolver.BuildOptions // Resolver build options to use. + channelzID *channelz.Identifier // Channelz identifier for the channel. } // newCCResolverWrapper uses the resolver.Builder to build a Resolver and // returns a ccResolverWrapper object which wraps the newly built resolver. -func newCCResolverWrapper(cc *ClientConn, rb resolver.Builder) (*ccResolverWrapper, error) { +func newCCResolverWrapper(cc resolverStateUpdater, opts ccResolverWrapperOpts) (*ccResolverWrapper, error) { + ctx, cancel := context.WithCancel(context.Background()) ccr := &ccResolverWrapper{ - cc: cc, - done: grpcsync.NewEvent(), - } - - var credsClone credentials.TransportCredentials - if creds := cc.dopts.copts.TransportCredentials; creds != nil { - credsClone = creds.Clone() - } - rbo := resolver.BuildOptions{ - DisableServiceConfig: cc.dopts.disableServiceConfig, - DialCreds: credsClone, - CredsBundle: cc.dopts.copts.CredsBundle, - Dialer: cc.dopts.copts.Dialer, - } - - var err error - // We need to hold the lock here while we assign to the ccr.resolver field - // to guard against a data race caused by the following code path, - // rb.Build-->ccr.ReportError-->ccr.poll-->ccr.resolveNow, would end up - // accessing ccr.resolver which is being assigned here. - ccr.resolverMu.Lock() - defer ccr.resolverMu.Unlock() - ccr.resolver, err = rb.Build(cc.parsedTarget, ccr, rbo) + cc: cc, + channelzID: opts.channelzID, + ignoreServiceConfig: opts.bOpts.DisableServiceConfig, + opts: opts, + serializer: grpcsync.NewCallbackSerializer(ctx), + serializerCancel: cancel, + } + + // Cannot hold the lock at build time because the resolver can send an + // update or error inline and these incoming calls grab the lock to schedule + // a callback in the serializer. + r, err := opts.builder.Build(opts.target, ccr, opts.bOpts) if err != nil { + cancel() return nil, err } + + // Any error reported by the resolver at build time that leads to a + // re-resolution request from the balancer is dropped by grpc until we + // return from this function. So, we don't have to handle pending resolveNow + // requests here. + ccr.mu.Lock() + ccr.resolver = r + ccr.mu.Unlock() + return ccr, nil } func (ccr *ccResolverWrapper) resolveNow(o resolver.ResolveNowOptions) { - ccr.resolverMu.Lock() - if !ccr.done.HasFired() { - ccr.resolver.ResolveNow(o) + ccr.mu.Lock() + defer ccr.mu.Unlock() + + // ccr.resolver field is set only after the call to Build() returns. But in + // the process of building, the resolver may send an error update which when + // propagated to the balancer may result in a re-resolution request. + if ccr.closed || ccr.resolver == nil { + return } - ccr.resolverMu.Unlock() + ccr.resolver.ResolveNow(o) } func (ccr *ccResolverWrapper) close() { - ccr.resolverMu.Lock() - ccr.resolver.Close() - ccr.done.Fire() - ccr.resolverMu.Unlock() + ccr.mu.Lock() + if ccr.closed { + ccr.mu.Unlock() + return + } + + channelz.Info(logger, ccr.channelzID, "Closing the name resolver") + + // Close the serializer to ensure that no more calls from the resolver are + // handled, before actually closing the resolver. + ccr.serializerCancel() + ccr.closed = true + r := ccr.resolver + ccr.mu.Unlock() + + // Give enqueued callbacks a chance to finish. + <-ccr.serializer.Done + + // Spawn a goroutine to close the resolver (since it may block trying to + // cleanup all allocated resources) and return early. + go r.Close() +} + +// serializerScheduleLocked is a convenience method to schedule a function to be +// run on the serializer while holding ccr.mu. +func (ccr *ccResolverWrapper) serializerScheduleLocked(f func(context.Context)) { + ccr.mu.Lock() + ccr.serializer.Schedule(f) + ccr.mu.Unlock() } +// UpdateState is called by resolver implementations to report new state to gRPC +// which includes addresses and service config. func (ccr *ccResolverWrapper) UpdateState(s resolver.State) error { - ccr.incomingMu.Lock() - defer ccr.incomingMu.Unlock() - if ccr.done.HasFired() { + errCh := make(chan error, 1) + ok := ccr.serializer.Schedule(func(context.Context) { + ccr.addChannelzTraceEvent(s) + ccr.curState = s + if err := ccr.cc.updateResolverState(ccr.curState, nil); err == balancer.ErrBadResolverState { + errCh <- balancer.ErrBadResolverState + return + } + errCh <- nil + }) + if !ok { + // The only time when Schedule() fail to add the callback to the + // serializer is when the serializer is closed, and this happens only + // when the resolver wrapper is closed. return nil } - ccr.addChannelzTraceEvent(s) - ccr.curState = s - if err := ccr.cc.updateResolverState(ccr.curState, nil); err == balancer.ErrBadResolverState { - return balancer.ErrBadResolverState - } - return nil + return <-errCh } +// ReportError is called by resolver implementations to report errors +// encountered during name resolution to gRPC. func (ccr *ccResolverWrapper) ReportError(err error) { - ccr.incomingMu.Lock() - defer ccr.incomingMu.Unlock() - if ccr.done.HasFired() { - return - } - channelz.Warningf(logger, ccr.cc.channelzID, "ccResolverWrapper: reporting error to cc: %v", err) - ccr.cc.updateResolverState(resolver.State{}, err) + ccr.serializerScheduleLocked(func(_ context.Context) { + channelz.Warningf(logger, ccr.channelzID, "ccResolverWrapper: reporting error to cc: %v", err) + ccr.cc.updateResolverState(resolver.State{}, err) + }) } -// NewAddress is called by the resolver implementation to send addresses to gRPC. +// NewAddress is called by the resolver implementation to send addresses to +// gRPC. func (ccr *ccResolverWrapper) NewAddress(addrs []resolver.Address) { - ccr.incomingMu.Lock() - defer ccr.incomingMu.Unlock() - if ccr.done.HasFired() { - return - } - ccr.addChannelzTraceEvent(resolver.State{Addresses: addrs, ServiceConfig: ccr.curState.ServiceConfig}) - ccr.curState.Addresses = addrs - ccr.cc.updateResolverState(ccr.curState, nil) + ccr.serializerScheduleLocked(func(_ context.Context) { + ccr.addChannelzTraceEvent(resolver.State{Addresses: addrs, ServiceConfig: ccr.curState.ServiceConfig}) + ccr.curState.Addresses = addrs + ccr.cc.updateResolverState(ccr.curState, nil) + }) } // NewServiceConfig is called by the resolver implementation to send service // configs to gRPC. func (ccr *ccResolverWrapper) NewServiceConfig(sc string) { - ccr.incomingMu.Lock() - defer ccr.incomingMu.Unlock() - if ccr.done.HasFired() { - return - } - channelz.Infof(logger, ccr.cc.channelzID, "ccResolverWrapper: got new service config: %s", sc) - if ccr.cc.dopts.disableServiceConfig { - channelz.Info(logger, ccr.cc.channelzID, "Service config lookups disabled; ignoring config") - return - } - scpr := parseServiceConfig(sc) - if scpr.Err != nil { - channelz.Warningf(logger, ccr.cc.channelzID, "ccResolverWrapper: error parsing service config: %v", scpr.Err) - return - } - ccr.addChannelzTraceEvent(resolver.State{Addresses: ccr.curState.Addresses, ServiceConfig: scpr}) - ccr.curState.ServiceConfig = scpr - ccr.cc.updateResolverState(ccr.curState, nil) + ccr.serializerScheduleLocked(func(_ context.Context) { + channelz.Infof(logger, ccr.channelzID, "ccResolverWrapper: got new service config: %s", sc) + if ccr.ignoreServiceConfig { + channelz.Info(logger, ccr.channelzID, "Service config lookups disabled; ignoring config") + return + } + scpr := parseServiceConfig(sc) + if scpr.Err != nil { + channelz.Warningf(logger, ccr.channelzID, "ccResolverWrapper: error parsing service config: %v", scpr.Err) + return + } + ccr.addChannelzTraceEvent(resolver.State{Addresses: ccr.curState.Addresses, ServiceConfig: scpr}) + ccr.curState.ServiceConfig = scpr + ccr.cc.updateResolverState(ccr.curState, nil) + }) } +// ParseServiceConfig is called by resolver implementations to parse a JSON +// representation of the service config. func (ccr *ccResolverWrapper) ParseServiceConfig(scJSON string) *serviceconfig.ParseResult { return parseServiceConfig(scJSON) } +// addChannelzTraceEvent adds a channelz trace event containing the new +// state received from resolver implementations. func (ccr *ccResolverWrapper) addChannelzTraceEvent(s resolver.State) { var updates []string var oldSC, newSC *ServiceConfig @@ -172,5 +235,5 @@ func (ccr *ccResolverWrapper) addChannelzTraceEvent(s resolver.State) { } else if len(ccr.curState.Addresses) == 0 && len(s.Addresses) > 0 { updates = append(updates, "resolver returned new addresses") } - channelz.Infof(logger, ccr.cc.channelzID, "Resolver state updated: %s (%v)", pretty.ToJSON(s), strings.Join(updates, "; ")) + channelz.Infof(logger, ccr.channelzID, "Resolver state updated: %s (%v)", pretty.ToJSON(s), strings.Join(updates, "; ")) } diff --git a/vendor/google.golang.org/grpc/rpc_util.go b/vendor/google.golang.org/grpc/rpc_util.go index 5d407b004b0ed..2030736a306ba 100644 --- a/vendor/google.golang.org/grpc/rpc_util.go +++ b/vendor/google.golang.org/grpc/rpc_util.go @@ -25,7 +25,6 @@ import ( "encoding/binary" "fmt" "io" - "io/ioutil" "math" "strings" "sync" @@ -77,7 +76,7 @@ func NewGZIPCompressorWithLevel(level int) (Compressor, error) { return &gzipCompressor{ pool: sync.Pool{ New: func() interface{} { - w, err := gzip.NewWriterLevel(ioutil.Discard, level) + w, err := gzip.NewWriterLevel(io.Discard, level) if err != nil { panic(err) } @@ -143,7 +142,7 @@ func (d *gzipDecompressor) Do(r io.Reader) ([]byte, error) { z.Close() d.pool.Put(z) }() - return ioutil.ReadAll(z) + return io.ReadAll(z) } func (d *gzipDecompressor) Type() string { @@ -160,6 +159,7 @@ type callInfo struct { contentSubtype string codec baseCodec maxRetryRPCBufferSize int + onFinish []func(err error) } func defaultCallInfo() *callInfo { @@ -198,7 +198,7 @@ func Header(md *metadata.MD) CallOption { // HeaderCallOption is a CallOption for collecting response header metadata. // The metadata field will be populated *after* the RPC completes. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -220,7 +220,7 @@ func Trailer(md *metadata.MD) CallOption { // TrailerCallOption is a CallOption for collecting response trailer metadata. // The metadata field will be populated *after* the RPC completes. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -242,7 +242,7 @@ func Peer(p *peer.Peer) CallOption { // PeerCallOption is a CallOption for collecting the identity of the remote // peer. The peer field will be populated *after* the RPC completes. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -282,7 +282,7 @@ func FailFast(failFast bool) CallOption { // FailFastCallOption is a CallOption for indicating whether an RPC should fail // fast or not. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -296,8 +296,44 @@ func (o FailFastCallOption) before(c *callInfo) error { } func (o FailFastCallOption) after(c *callInfo, attempt *csAttempt) {} +// OnFinish returns a CallOption that configures a callback to be called when +// the call completes. The error passed to the callback is the status of the +// RPC, and may be nil. The onFinish callback provided will only be called once +// by gRPC. This is mainly used to be used by streaming interceptors, to be +// notified when the RPC completes along with information about the status of +// the RPC. +// +// # Experimental +// +// Notice: This API is EXPERIMENTAL and may be changed or removed in a +// later release. +func OnFinish(onFinish func(err error)) CallOption { + return OnFinishCallOption{ + OnFinish: onFinish, + } +} + +// OnFinishCallOption is CallOption that indicates a callback to be called when +// the call completes. +// +// # Experimental +// +// Notice: This type is EXPERIMENTAL and may be changed or removed in a +// later release. +type OnFinishCallOption struct { + OnFinish func(error) +} + +func (o OnFinishCallOption) before(c *callInfo) error { + c.onFinish = append(c.onFinish, o.OnFinish) + return nil +} + +func (o OnFinishCallOption) after(c *callInfo, attempt *csAttempt) {} + // MaxCallRecvMsgSize returns a CallOption which sets the maximum message size -// in bytes the client can receive. +// in bytes the client can receive. If this is not set, gRPC uses the default +// 4MB. func MaxCallRecvMsgSize(bytes int) CallOption { return MaxRecvMsgSizeCallOption{MaxRecvMsgSize: bytes} } @@ -305,7 +341,7 @@ func MaxCallRecvMsgSize(bytes int) CallOption { // MaxRecvMsgSizeCallOption is a CallOption that indicates the maximum message // size in bytes the client can receive. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -320,7 +356,8 @@ func (o MaxRecvMsgSizeCallOption) before(c *callInfo) error { func (o MaxRecvMsgSizeCallOption) after(c *callInfo, attempt *csAttempt) {} // MaxCallSendMsgSize returns a CallOption which sets the maximum message size -// in bytes the client can send. +// in bytes the client can send. If this is not set, gRPC uses the default +// `math.MaxInt32`. func MaxCallSendMsgSize(bytes int) CallOption { return MaxSendMsgSizeCallOption{MaxSendMsgSize: bytes} } @@ -328,7 +365,7 @@ func MaxCallSendMsgSize(bytes int) CallOption { // MaxSendMsgSizeCallOption is a CallOption that indicates the maximum message // size in bytes the client can send. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -351,7 +388,7 @@ func PerRPCCredentials(creds credentials.PerRPCCredentials) CallOption { // PerRPCCredsCallOption is a CallOption that indicates the per-RPC // credentials to use for the call. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -369,7 +406,7 @@ func (o PerRPCCredsCallOption) after(c *callInfo, attempt *csAttempt) {} // sending the request. If WithCompressor is also set, UseCompressor has // higher priority. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -379,7 +416,7 @@ func UseCompressor(name string) CallOption { // CompressorCallOption is a CallOption that indicates the compressor to use. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -416,7 +453,7 @@ func CallContentSubtype(contentSubtype string) CallOption { // ContentSubtypeCallOption is a CallOption that indicates the content-subtype // used for marshaling messages. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -444,7 +481,7 @@ func (o ContentSubtypeCallOption) after(c *callInfo, attempt *csAttempt) {} // This function is provided for advanced users; prefer to use only // CallContentSubtype to select a registered codec instead. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -455,7 +492,7 @@ func ForceCodec(codec encoding.Codec) CallOption { // ForceCodecCallOption is a CallOption that indicates the codec used for // marshaling messages. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -480,7 +517,7 @@ func CallCustomCodec(codec Codec) CallOption { // CustomCodecCallOption is a CallOption that indicates the codec used for // marshaling messages. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -497,7 +534,7 @@ func (o CustomCodecCallOption) after(c *callInfo, attempt *csAttempt) {} // MaxRetryRPCBufferSize returns a CallOption that limits the amount of memory // used for buffering this RPC's requests for retry purposes. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -508,7 +545,7 @@ func MaxRetryRPCBufferSize(bytes int) CallOption { // MaxRetryRPCBufferSizeCallOption is a CallOption indicating the amount of // memory to be used for caching this RPC for retry purposes. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -548,10 +585,11 @@ type parser struct { // format. The caller owns the returned msg memory. // // If there is an error, possible values are: -// * io.EOF, when no messages remain -// * io.ErrUnexpectedEOF -// * of type transport.ConnectionError -// * an error from the status package +// - io.EOF, when no messages remain +// - io.ErrUnexpectedEOF +// - of type transport.ConnectionError +// - an error from the status package +// // No other error values or types must be returned, which also means // that the underlying io.Reader must not return an incompatible // error. @@ -656,12 +694,13 @@ func msgHeader(data, compData []byte) (hdr []byte, payload []byte) { func outPayload(client bool, msg interface{}, data, payload []byte, t time.Time) *stats.OutPayload { return &stats.OutPayload{ - Client: client, - Payload: msg, - Data: data, - Length: len(data), - WireLength: len(payload) + headerLen, - SentTime: t, + Client: client, + Payload: msg, + Data: data, + Length: len(data), + WireLength: len(payload) + headerLen, + CompressedLength: len(payload), + SentTime: t, } } @@ -682,7 +721,7 @@ func checkRecvPayload(pf payloadFormat, recvCompress string, haveCompressor bool } type payloadInfo struct { - wireLength int // The compressed length got from wire. + compressedLength int // The compressed length got from wire. uncompressedBytes []byte } @@ -692,7 +731,7 @@ func recvAndDecompress(p *parser, s *transport.Stream, dc Decompressor, maxRecei return nil, err } if payInfo != nil { - payInfo.wireLength = len(d) + payInfo.compressedLength = len(d) } if st := checkRecvPayload(pf, s.RecvCompress(), compressor != nil || dc != nil); st != nil { @@ -710,7 +749,7 @@ func recvAndDecompress(p *parser, s *transport.Stream, dc Decompressor, maxRecei d, size, err = decompress(compressor, d, maxReceiveMessageSize) } if err != nil { - return nil, status.Errorf(codes.Internal, "grpc: failed to decompress the received message %v", err) + return nil, status.Errorf(codes.Internal, "grpc: failed to decompress the received message: %v", err) } if size > maxReceiveMessageSize { // TODO: Revisit the error code. Currently keep it consistent with java @@ -745,7 +784,7 @@ func decompress(compressor encoding.Compressor, d []byte, maxReceiveMessageSize } // Read from LimitReader with limit max+1. So if the underlying // reader is over limit, the result will be bigger than max. - d, err = ioutil.ReadAll(io.LimitReader(dcReader, int64(maxReceiveMessageSize)+1)) + d, err = io.ReadAll(io.LimitReader(dcReader, int64(maxReceiveMessageSize)+1)) return d, len(d), err } @@ -758,7 +797,7 @@ func recv(p *parser, c baseCodec, s *transport.Stream, dc Decompressor, m interf return err } if err := c.Unmarshal(d, m); err != nil { - return status.Errorf(codes.Internal, "grpc: failed to unmarshal the received message %v", err) + return status.Errorf(codes.Internal, "grpc: failed to unmarshal the received message: %v", err) } if payInfo != nil { payInfo.uncompressedBytes = d diff --git a/vendor/google.golang.org/grpc/server.go b/vendor/google.golang.org/grpc/server.go index 65de84b300741..8869cc906f25e 100644 --- a/vendor/google.golang.org/grpc/server.go +++ b/vendor/google.golang.org/grpc/server.go @@ -43,8 +43,8 @@ import ( "google.golang.org/grpc/internal" "google.golang.org/grpc/internal/binarylog" "google.golang.org/grpc/internal/channelz" - "google.golang.org/grpc/internal/grpcrand" "google.golang.org/grpc/internal/grpcsync" + "google.golang.org/grpc/internal/grpcutil" "google.golang.org/grpc/internal/transport" "google.golang.org/grpc/keepalive" "google.golang.org/grpc/metadata" @@ -73,6 +73,14 @@ func init() { internal.DrainServerTransports = func(srv *Server, addr string) { srv.drainServerTransports(addr) } + internal.AddGlobalServerOptions = func(opt ...ServerOption) { + globalServerOptions = append(globalServerOptions, opt...) + } + internal.ClearGlobalServerOptions = func() { + globalServerOptions = nil + } + internal.BinaryLogger = binaryLogger + internal.JoinServerOptions = newJoinServerOption } var statusOK = status.New(codes.OK, "") @@ -107,12 +115,6 @@ type serviceInfo struct { mdata interface{} } -type serverWorkerData struct { - st transport.ServerTransport - wg *sync.WaitGroup - stream *transport.Stream -} - // Server is a gRPC server to serve RPC requests. type Server struct { opts serverOptions @@ -137,7 +139,7 @@ type Server struct { channelzID *channelz.Identifier czData *channelzData - serverWorkerChannels []chan *serverWorkerData + serverWorkerChannel chan func() } type serverOptions struct { @@ -149,8 +151,9 @@ type serverOptions struct { streamInt StreamServerInterceptor chainUnaryInts []UnaryServerInterceptor chainStreamInts []StreamServerInterceptor + binaryLogger binarylog.Logger inTapHandle tap.ServerInHandle - statsHandler stats.Handler + statsHandlers []stats.Handler maxConcurrentStreams uint32 maxReceiveMessageSize int maxSendMessageSize int @@ -168,12 +171,14 @@ type serverOptions struct { } var defaultServerOptions = serverOptions{ + maxConcurrentStreams: math.MaxUint32, maxReceiveMessageSize: defaultServerMaxReceiveMessageSize, maxSendMessageSize: defaultServerMaxSendMessageSize, connectionTimeout: 120 * time.Second, writeBufferSize: defaultWriteBufSize, readBufferSize: defaultReadBufSize, } +var globalServerOptions []ServerOption // A ServerOption sets options such as credentials, codec and keepalive parameters, etc. type ServerOption interface { @@ -183,7 +188,7 @@ type ServerOption interface { // EmptyServerOption does not alter the server configuration. It can be embedded // in another structure to build custom server options. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -207,10 +212,27 @@ func newFuncServerOption(f func(*serverOptions)) *funcServerOption { } } -// WriteBufferSize determines how much data can be batched before doing a write on the wire. -// The corresponding memory allocation for this buffer will be twice the size to keep syscalls low. -// The default value for this buffer is 32KB. -// Zero will disable the write buffer such that each write will be on underlying connection. +// joinServerOption provides a way to combine arbitrary number of server +// options into one. +type joinServerOption struct { + opts []ServerOption +} + +func (mdo *joinServerOption) apply(do *serverOptions) { + for _, opt := range mdo.opts { + opt.apply(do) + } +} + +func newJoinServerOption(opts ...ServerOption) ServerOption { + return &joinServerOption{opts: opts} +} + +// WriteBufferSize determines how much data can be batched before doing a write +// on the wire. The corresponding memory allocation for this buffer will be +// twice the size to keep syscalls low. The default value for this buffer is +// 32KB. Zero or negative values will disable the write buffer such that each +// write will be on underlying connection. // Note: A Send call may not directly translate to a write. func WriteBufferSize(s int) ServerOption { return newFuncServerOption(func(o *serverOptions) { @@ -218,11 +240,10 @@ func WriteBufferSize(s int) ServerOption { }) } -// ReadBufferSize lets you set the size of read buffer, this determines how much data can be read at most -// for one read syscall. -// The default value for this buffer is 32KB. -// Zero will disable read buffer for a connection so data framer can access the underlying -// conn directly. +// ReadBufferSize lets you set the size of read buffer, this determines how much +// data can be read at most for one read syscall. The default value for this +// buffer is 32KB. Zero or negative values will disable read buffer for a +// connection so data framer can access the underlying conn directly. func ReadBufferSize(s int) ServerOption { return newFuncServerOption(func(o *serverOptions) { o.readBufferSize = s @@ -298,7 +319,7 @@ func CustomCodec(codec Codec) ServerOption { // https://github.com/grpc/grpc-go/blob/master/Documentation/encoding.md#using-a-codec. // Will be supported throughout 1.x. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -361,6 +382,9 @@ func MaxSendMsgSize(m int) ServerOption { // MaxConcurrentStreams returns a ServerOption that will apply a limit on the number // of concurrent streams to each ServerTransport. func MaxConcurrentStreams(n uint32) ServerOption { + if n == 0 { + n = math.MaxUint32 + } return newFuncServerOption(func(o *serverOptions) { o.maxConcurrentStreams = n }) @@ -419,7 +443,7 @@ func ChainStreamInterceptor(interceptors ...StreamServerInterceptor) ServerOptio // InTapHandle returns a ServerOption that sets the tap handle for all the server // transport to be created. Only one can be installed. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -435,7 +459,21 @@ func InTapHandle(h tap.ServerInHandle) ServerOption { // StatsHandler returns a ServerOption that sets the stats handler for the server. func StatsHandler(h stats.Handler) ServerOption { return newFuncServerOption(func(o *serverOptions) { - o.statsHandler = h + if h == nil { + logger.Error("ignoring nil parameter in grpc.StatsHandler ServerOption") + // Do not allow a nil stats handler, which would otherwise cause + // panics. + return + } + o.statsHandlers = append(o.statsHandlers, h) + }) +} + +// binaryLogger returns a ServerOption that can set the binary logger for the +// server. +func binaryLogger(bl binarylog.Logger) ServerOption { + return newFuncServerOption(func(o *serverOptions) { + o.binaryLogger = bl }) } @@ -462,7 +500,7 @@ func UnknownServiceHandler(streamHandler StreamHandler) ServerOption { // new connections. If this is not set, the default is 120 seconds. A zero or // negative value will result in an immediate timeout. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -483,7 +521,7 @@ func MaxHeaderListSize(s uint32) ServerOption { // HeaderTableSize returns a ServerOption that sets the size of dynamic // header table for stream. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -498,7 +536,7 @@ func HeaderTableSize(s uint32) ServerOption { // zero (default) will disable workers and spawn a new goroutine for each // stream. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -520,46 +558,42 @@ func NumStreamWorkers(numServerWorkers uint32) ServerOption { const serverWorkerResetThreshold = 1 << 16 // serverWorkers blocks on a *transport.Stream channel forever and waits for -// data to be fed by serveStreams. This allows different requests to be +// data to be fed by serveStreams. This allows multiple requests to be // processed by the same goroutine, removing the need for expensive stack // re-allocations (see the runtime.morestack problem [1]). // // [1] https://github.com/golang/go/issues/18138 -func (s *Server) serverWorker(ch chan *serverWorkerData) { - // To make sure all server workers don't reset at the same time, choose a - // random number of iterations before resetting. - threshold := serverWorkerResetThreshold + grpcrand.Intn(serverWorkerResetThreshold) - for completed := 0; completed < threshold; completed++ { - data, ok := <-ch +func (s *Server) serverWorker() { + for completed := 0; completed < serverWorkerResetThreshold; completed++ { + f, ok := <-s.serverWorkerChannel if !ok { return } - s.handleStream(data.st, data.stream, s.traceInfo(data.st, data.stream)) - data.wg.Done() + f() } - go s.serverWorker(ch) + go s.serverWorker() } -// initServerWorkers creates worker goroutines and channels to process incoming +// initServerWorkers creates worker goroutines and a channel to process incoming // connections to reduce the time spent overall on runtime.morestack. func (s *Server) initServerWorkers() { - s.serverWorkerChannels = make([]chan *serverWorkerData, s.opts.numServerWorkers) + s.serverWorkerChannel = make(chan func()) for i := uint32(0); i < s.opts.numServerWorkers; i++ { - s.serverWorkerChannels[i] = make(chan *serverWorkerData) - go s.serverWorker(s.serverWorkerChannels[i]) + go s.serverWorker() } } func (s *Server) stopServerWorkers() { - for i := uint32(0); i < s.opts.numServerWorkers; i++ { - close(s.serverWorkerChannels[i]) - } + close(s.serverWorkerChannel) } // NewServer creates a gRPC server which has no service registered and has not // started to accept requests yet. func NewServer(opt ...ServerOption) *Server { opts := defaultServerOptions + for _, o := range globalServerOptions { + o.apply(&opts) + } for _, o := range opt { o.apply(&opts) } @@ -854,7 +888,7 @@ func (s *Server) drainServerTransports(addr string) { s.mu.Lock() conns := s.conns[addr] for st := range conns { - st.Drain() + st.Drain("") } s.mu.Unlock() } @@ -867,7 +901,7 @@ func (s *Server) newHTTP2Transport(c net.Conn) transport.ServerTransport { ConnectionTimeout: s.opts.connectionTimeout, Credentials: s.opts.creds, InTapHandle: s.opts.inTapHandle, - StatsHandler: s.opts.statsHandler, + StatsHandlers: s.opts.statsHandlers, KeepaliveParams: s.opts.keepaliveParams, KeepalivePolicy: s.opts.keepalivePolicy, InitialWindowSize: s.opts.initialWindowSize, @@ -888,7 +922,7 @@ func (s *Server) newHTTP2Transport(c net.Conn) transport.ServerTransport { if err != credentials.ErrConnDispatched { // Don't log on ErrConnDispatched and io.EOF to prevent log spam. if err != io.EOF { - channelz.Warning(logger, s.channelzID, "grpc: Server.Serve failed to create ServerTransport: ", err) + channelz.Info(logger, s.channelzID, "grpc: Server.Serve failed to create ServerTransport: ", err) } c.Close() } @@ -899,29 +933,29 @@ func (s *Server) newHTTP2Transport(c net.Conn) transport.ServerTransport { } func (s *Server) serveStreams(st transport.ServerTransport) { - defer st.Close() + defer st.Close(errors.New("finished serving streams for the server transport")) var wg sync.WaitGroup - var roundRobinCounter uint32 + streamQuota := newHandlerQuota(s.opts.maxConcurrentStreams) st.HandleStreams(func(stream *transport.Stream) { wg.Add(1) + + streamQuota.acquire() + f := func() { + defer streamQuota.release() + defer wg.Done() + s.handleStream(st, stream, s.traceInfo(st, stream)) + } + if s.opts.numServerWorkers > 0 { - data := &serverWorkerData{st: st, wg: &wg, stream: stream} select { - case s.serverWorkerChannels[atomic.AddUint32(&roundRobinCounter, 1)%s.opts.numServerWorkers] <- data: + case s.serverWorkerChannel <- f: + return default: // If all stream workers are busy, fallback to the default code path. - go func() { - s.handleStream(st, stream, s.traceInfo(st, stream)) - wg.Done() - }() } - } else { - go func() { - defer wg.Done() - s.handleStream(st, stream, s.traceInfo(st, stream)) - }() } + go f() }, func(ctx context.Context, method string) context.Context { if !EnableTracing { return ctx @@ -946,26 +980,27 @@ var _ http.Handler = (*Server)(nil) // To share one port (such as 443 for https) between gRPC and an // existing http.Handler, use a root http.Handler such as: // -// if r.ProtoMajor == 2 && strings.HasPrefix( -// r.Header.Get("Content-Type"), "application/grpc") { -// grpcServer.ServeHTTP(w, r) -// } else { -// yourMux.ServeHTTP(w, r) -// } +// if r.ProtoMajor == 2 && strings.HasPrefix( +// r.Header.Get("Content-Type"), "application/grpc") { +// grpcServer.ServeHTTP(w, r) +// } else { +// yourMux.ServeHTTP(w, r) +// } // // Note that ServeHTTP uses Go's HTTP/2 server implementation which is totally // separate from grpc-go's HTTP/2 server. Performance and features may vary // between the two paths. ServeHTTP does not support some gRPC features // available through grpc-go's HTTP/2 server. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { - st, err := transport.NewServerHandlerTransport(w, r, s.opts.statsHandler) + st, err := transport.NewServerHandlerTransport(w, r, s.opts.statsHandlers) if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) + // Errors returned from transport.NewServerHandlerTransport have + // already been written to w. return } if !s.addConn(listenerAddressForServeHTTP, st) { @@ -1003,13 +1038,13 @@ func (s *Server) addConn(addr string, st transport.ServerTransport) bool { s.mu.Lock() defer s.mu.Unlock() if s.conns == nil { - st.Close() + st.Close(errors.New("Server.addConn called when server has already been stopped")) return false } if s.drain { // Transport added after we drained our existing conns: drain it // immediately. - st.Drain() + st.Drain("") } if s.conns[addr] == nil { @@ -1076,8 +1111,10 @@ func (s *Server) sendResponse(t transport.ServerTransport, stream *transport.Str return status.Errorf(codes.ResourceExhausted, "grpc: trying to send message larger than max (%d vs. %d)", len(payload), s.opts.maxSendMessageSize) } err = t.Write(stream, hdr, payload, opts) - if err == nil && s.opts.statsHandler != nil { - s.opts.statsHandler.HandleRPC(stream.Context(), outPayload(false, msg, data, payload, time.Now())) + if err == nil { + for _, sh := range s.opts.statsHandlers { + sh.HandleRPC(stream.Context(), outPayload(false, msg, data, payload, time.Now())) + } } return err } @@ -1105,32 +1142,27 @@ func chainUnaryServerInterceptors(s *Server) { func chainUnaryInterceptors(interceptors []UnaryServerInterceptor) UnaryServerInterceptor { return func(ctx context.Context, req interface{}, info *UnaryServerInfo, handler UnaryHandler) (interface{}, error) { - // the struct ensures the variables are allocated together, rather than separately, since we - // know they should be garbage collected together. This saves 1 allocation and decreases - // time/call by about 10% on the microbenchmark. - var state struct { - i int - next UnaryHandler - } - state.next = func(ctx context.Context, req interface{}) (interface{}, error) { - if state.i == len(interceptors)-1 { - return interceptors[state.i](ctx, req, info, handler) - } - state.i++ - return interceptors[state.i-1](ctx, req, info, state.next) - } - return state.next(ctx, req) + return interceptors[0](ctx, req, info, getChainUnaryHandler(interceptors, 0, info, handler)) + } +} + +func getChainUnaryHandler(interceptors []UnaryServerInterceptor, curr int, info *UnaryServerInfo, finalHandler UnaryHandler) UnaryHandler { + if curr == len(interceptors)-1 { + return finalHandler + } + return func(ctx context.Context, req interface{}) (interface{}, error) { + return interceptors[curr+1](ctx, req, info, getChainUnaryHandler(interceptors, curr+1, info, finalHandler)) } } func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.Stream, info *serviceInfo, md *MethodDesc, trInfo *traceInfo) (err error) { - sh := s.opts.statsHandler - if sh != nil || trInfo != nil || channelz.IsOn() { + shs := s.opts.statsHandlers + if len(shs) != 0 || trInfo != nil || channelz.IsOn() { if channelz.IsOn() { s.incrCallsStarted() } var statsBegin *stats.Begin - if sh != nil { + for _, sh := range shs { beginTime := time.Now() statsBegin = &stats.Begin{ BeginTime: beginTime, @@ -1161,7 +1193,7 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport. trInfo.tr.Finish() } - if sh != nil { + for _, sh := range shs { end := &stats.End{ BeginTime: statsBegin.BeginTime, EndTime: time.Now(), @@ -1181,9 +1213,16 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport. } }() } - - binlog := binarylog.GetMethodLogger(stream.Method()) - if binlog != nil { + var binlogs []binarylog.MethodLogger + if ml := binarylog.GetMethodLogger(stream.Method()); ml != nil { + binlogs = append(binlogs, ml) + } + if s.opts.binaryLogger != nil { + if ml := s.opts.binaryLogger.GetMethodLogger(stream.Method()); ml != nil { + binlogs = append(binlogs, ml) + } + } + if len(binlogs) != 0 { ctx := stream.Context() md, _ := metadata.FromIncomingContext(ctx) logEntry := &binarylog.ClientHeader{ @@ -1203,7 +1242,9 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport. if peer, ok := peer.FromContext(ctx); ok { logEntry.PeerAddr = peer.Addr } - binlog.Log(logEntry) + for _, binlog := range binlogs { + binlog.Log(ctx, logEntry) + } } // comp and cp are used for compression. decomp and dc are used for @@ -1213,6 +1254,7 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport. var comp, decomp encoding.Compressor var cp Compressor var dc Decompressor + var sendCompressorName string // If dc is set and matches the stream's compression, use it. Otherwise, try // to find a matching registered compressor for decomp. @@ -1233,23 +1275,29 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport. // NOTE: this needs to be ahead of all handling, https://github.com/grpc/grpc-go/issues/686. if s.opts.cp != nil { cp = s.opts.cp - stream.SetSendCompress(cp.Type()) + sendCompressorName = cp.Type() } else if rc := stream.RecvCompress(); rc != "" && rc != encoding.Identity { // Legacy compressor not specified; attempt to respond with same encoding. comp = encoding.GetCompressor(rc) if comp != nil { - stream.SetSendCompress(rc) + sendCompressorName = comp.Name() + } + } + + if sendCompressorName != "" { + if err := stream.SetSendCompress(sendCompressorName); err != nil { + return status.Errorf(codes.Internal, "grpc: failed to set send compressor: %v", err) } } var payInfo *payloadInfo - if sh != nil || binlog != nil { + if len(shs) != 0 || len(binlogs) != 0 { payInfo = &payloadInfo{} } d, err := recvAndDecompress(&parser{r: stream}, stream, dc, s.opts.maxReceiveMessageSize, payInfo, decomp) if err != nil { if e := t.WriteStatus(stream, status.Convert(err)); e != nil { - channelz.Warningf(logger, s.channelzID, "grpc: Server.processUnaryRPC failed to write status %v", e) + channelz.Warningf(logger, s.channelzID, "grpc: Server.processUnaryRPC failed to write status: %v", e) } return err } @@ -1260,19 +1308,23 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport. if err := s.getCodec(stream.ContentSubtype()).Unmarshal(d, v); err != nil { return status.Errorf(codes.Internal, "grpc: error unmarshalling request: %v", err) } - if sh != nil { + for _, sh := range shs { sh.HandleRPC(stream.Context(), &stats.InPayload{ - RecvTime: time.Now(), - Payload: v, - WireLength: payInfo.wireLength + headerLen, - Data: d, - Length: len(d), + RecvTime: time.Now(), + Payload: v, + Length: len(d), + WireLength: payInfo.compressedLength + headerLen, + CompressedLength: payInfo.compressedLength, + Data: d, }) } - if binlog != nil { - binlog.Log(&binarylog.ClientMessage{ + if len(binlogs) != 0 { + cm := &binarylog.ClientMessage{ Message: d, - }) + } + for _, binlog := range binlogs { + binlog.Log(stream.Context(), cm) + } } if trInfo != nil { trInfo.tr.LazyLog(&payload{sent: false, msg: v}, true) @@ -1296,18 +1348,24 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport. if e := t.WriteStatus(stream, appStatus); e != nil { channelz.Warningf(logger, s.channelzID, "grpc: Server.processUnaryRPC failed to write status: %v", e) } - if binlog != nil { + if len(binlogs) != 0 { if h, _ := stream.Header(); h.Len() > 0 { // Only log serverHeader if there was header. Otherwise it can // be trailer only. - binlog.Log(&binarylog.ServerHeader{ + sh := &binarylog.ServerHeader{ Header: h, - }) + } + for _, binlog := range binlogs { + binlog.Log(stream.Context(), sh) + } } - binlog.Log(&binarylog.ServerTrailer{ + st := &binarylog.ServerTrailer{ Trailer: stream.Trailer(), Err: appErr, - }) + } + for _, binlog := range binlogs { + binlog.Log(stream.Context(), st) + } } return appErr } @@ -1316,6 +1374,11 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport. } opts := &transport.Options{Last: true} + // Server handler could have set new compressor by calling SetSendCompressor. + // In case it is set, we need to use it for compressing outbound message. + if stream.SendCompress() != sendCompressorName { + comp = encoding.GetCompressor(stream.SendCompress()) + } if err := s.sendResponse(t, stream, reply, cp, opts, comp); err != nil { if err == io.EOF { // The entire stream is done (for unary RPC only). @@ -1333,26 +1396,34 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport. panic(fmt.Sprintf("grpc: Unexpected error (%T) from sendResponse: %v", st, st)) } } - if binlog != nil { + if len(binlogs) != 0 { h, _ := stream.Header() - binlog.Log(&binarylog.ServerHeader{ + sh := &binarylog.ServerHeader{ Header: h, - }) - binlog.Log(&binarylog.ServerTrailer{ + } + st := &binarylog.ServerTrailer{ Trailer: stream.Trailer(), Err: appErr, - }) + } + for _, binlog := range binlogs { + binlog.Log(stream.Context(), sh) + binlog.Log(stream.Context(), st) + } } return err } - if binlog != nil { + if len(binlogs) != 0 { h, _ := stream.Header() - binlog.Log(&binarylog.ServerHeader{ + sh := &binarylog.ServerHeader{ Header: h, - }) - binlog.Log(&binarylog.ServerMessage{ + } + sm := &binarylog.ServerMessage{ Message: reply, - }) + } + for _, binlog := range binlogs { + binlog.Log(stream.Context(), sh) + binlog.Log(stream.Context(), sm) + } } if channelz.IsOn() { t.IncrMsgSent() @@ -1363,14 +1434,16 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport. // TODO: Should we be logging if writing status failed here, like above? // Should the logging be in WriteStatus? Should we ignore the WriteStatus // error or allow the stats handler to see it? - err = t.WriteStatus(stream, statusOK) - if binlog != nil { - binlog.Log(&binarylog.ServerTrailer{ + if len(binlogs) != 0 { + st := &binarylog.ServerTrailer{ Trailer: stream.Trailer(), Err: appErr, - }) + } + for _, binlog := range binlogs { + binlog.Log(stream.Context(), st) + } } - return err + return t.WriteStatus(stream, statusOK) } // chainStreamServerInterceptors chains all stream server interceptors into one. @@ -1396,21 +1469,16 @@ func chainStreamServerInterceptors(s *Server) { func chainStreamInterceptors(interceptors []StreamServerInterceptor) StreamServerInterceptor { return func(srv interface{}, ss ServerStream, info *StreamServerInfo, handler StreamHandler) error { - // the struct ensures the variables are allocated together, rather than separately, since we - // know they should be garbage collected together. This saves 1 allocation and decreases - // time/call by about 10% on the microbenchmark. - var state struct { - i int - next StreamHandler - } - state.next = func(srv interface{}, ss ServerStream) error { - if state.i == len(interceptors)-1 { - return interceptors[state.i](srv, ss, info, handler) - } - state.i++ - return interceptors[state.i-1](srv, ss, info, state.next) - } - return state.next(srv, ss) + return interceptors[0](srv, ss, info, getChainStreamHandler(interceptors, 0, info, handler)) + } +} + +func getChainStreamHandler(interceptors []StreamServerInterceptor, curr int, info *StreamServerInfo, finalHandler StreamHandler) StreamHandler { + if curr == len(interceptors)-1 { + return finalHandler + } + return func(srv interface{}, stream ServerStream) error { + return interceptors[curr+1](srv, stream, info, getChainStreamHandler(interceptors, curr+1, info, finalHandler)) } } @@ -1418,16 +1486,18 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp if channelz.IsOn() { s.incrCallsStarted() } - sh := s.opts.statsHandler + shs := s.opts.statsHandlers var statsBegin *stats.Begin - if sh != nil { + if len(shs) != 0 { beginTime := time.Now() statsBegin = &stats.Begin{ BeginTime: beginTime, IsClientStream: sd.ClientStreams, IsServerStream: sd.ServerStreams, } - sh.HandleRPC(stream.Context(), statsBegin) + for _, sh := range shs { + sh.HandleRPC(stream.Context(), statsBegin) + } } ctx := NewContextWithServerTransportStream(stream.Context(), stream) ss := &serverStream{ @@ -1439,10 +1509,10 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp maxReceiveMessageSize: s.opts.maxReceiveMessageSize, maxSendMessageSize: s.opts.maxSendMessageSize, trInfo: trInfo, - statsHandler: sh, + statsHandler: shs, } - if sh != nil || trInfo != nil || channelz.IsOn() { + if len(shs) != 0 || trInfo != nil || channelz.IsOn() { // See comment in processUnaryRPC on defers. defer func() { if trInfo != nil { @@ -1456,7 +1526,7 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp ss.mu.Unlock() } - if sh != nil { + if len(shs) != 0 { end := &stats.End{ BeginTime: statsBegin.BeginTime, EndTime: time.Now(), @@ -1464,7 +1534,9 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp if err != nil && err != io.EOF { end.Error = toRPCErr(err) } - sh.HandleRPC(stream.Context(), end) + for _, sh := range shs { + sh.HandleRPC(stream.Context(), end) + } } if channelz.IsOn() { @@ -1477,8 +1549,15 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp }() } - ss.binlog = binarylog.GetMethodLogger(stream.Method()) - if ss.binlog != nil { + if ml := binarylog.GetMethodLogger(stream.Method()); ml != nil { + ss.binlogs = append(ss.binlogs, ml) + } + if s.opts.binaryLogger != nil { + if ml := s.opts.binaryLogger.GetMethodLogger(stream.Method()); ml != nil { + ss.binlogs = append(ss.binlogs, ml) + } + } + if len(ss.binlogs) != 0 { md, _ := metadata.FromIncomingContext(ctx) logEntry := &binarylog.ClientHeader{ Header: md, @@ -1497,7 +1576,9 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp if peer, ok := peer.FromContext(ss.Context()); ok { logEntry.PeerAddr = peer.Addr } - ss.binlog.Log(logEntry) + for _, binlog := range ss.binlogs { + binlog.Log(stream.Context(), logEntry) + } } // If dc is set and matches the stream's compression, use it. Otherwise, try @@ -1519,12 +1600,18 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp // NOTE: this needs to be ahead of all handling, https://github.com/grpc/grpc-go/issues/686. if s.opts.cp != nil { ss.cp = s.opts.cp - stream.SetSendCompress(s.opts.cp.Type()) + ss.sendCompressorName = s.opts.cp.Type() } else if rc := stream.RecvCompress(); rc != "" && rc != encoding.Identity { // Legacy compressor not specified; attempt to respond with same encoding. ss.comp = encoding.GetCompressor(rc) if ss.comp != nil { - stream.SetSendCompress(rc) + ss.sendCompressorName = rc + } + } + + if ss.sendCompressorName != "" { + if err := stream.SetSendCompress(ss.sendCompressorName); err != nil { + return status.Errorf(codes.Internal, "grpc: failed to set send compressor: %v", err) } } @@ -1562,13 +1649,16 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp ss.trInfo.tr.SetError() ss.mu.Unlock() } - t.WriteStatus(ss.s, appStatus) - if ss.binlog != nil { - ss.binlog.Log(&binarylog.ServerTrailer{ + if len(ss.binlogs) != 0 { + st := &binarylog.ServerTrailer{ Trailer: ss.s.Trailer(), Err: appErr, - }) + } + for _, binlog := range ss.binlogs { + binlog.Log(stream.Context(), st) + } } + t.WriteStatus(ss.s, appStatus) // TODO: Should we log an error from WriteStatus here and below? return appErr } @@ -1577,14 +1667,16 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp ss.trInfo.tr.LazyLog(stringer("OK"), false) ss.mu.Unlock() } - err = t.WriteStatus(ss.s, statusOK) - if ss.binlog != nil { - ss.binlog.Log(&binarylog.ServerTrailer{ + if len(ss.binlogs) != 0 { + st := &binarylog.ServerTrailer{ Trailer: ss.s.Trailer(), Err: appErr, - }) + } + for _, binlog := range ss.binlogs { + binlog.Log(stream.Context(), st) + } } - return err + return t.WriteStatus(ss.s, statusOK) } func (s *Server) handleStream(t transport.ServerTransport, stream *transport.Stream, trInfo *traceInfo) { @@ -1658,7 +1750,7 @@ type streamKey struct{} // NewContextWithServerTransportStream creates a new context from ctx and // attaches stream to it. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -1673,7 +1765,7 @@ func NewContextWithServerTransportStream(ctx context.Context, stream ServerTrans // // See also NewContextWithServerTransportStream. // -// Experimental +// # Experimental // // Notice: This type is EXPERIMENTAL and may be changed or removed in a // later release. @@ -1688,7 +1780,7 @@ type ServerTransportStream interface { // ctx. Returns nil if the given context has no stream associated with it // (which implies it is not an RPC invocation context). // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. @@ -1726,7 +1818,7 @@ func (s *Server) Stop() { } for _, cs := range conns { for st := range cs { - st.Close() + st.Close(errors.New("Server.Stop called")) } } if s.opts.numServerWorkers > 0 { @@ -1762,7 +1854,7 @@ func (s *Server) GracefulStop() { if !s.drain { for _, conns := range s.conns { for st := range conns { - st.Drain() + st.Drain("graceful_stop") } } s.drain = true @@ -1809,12 +1901,12 @@ func (s *Server) getCodec(contentSubtype string) baseCodec { // When called multiple times, all the provided metadata will be merged. All // the metadata will be sent out when one of the following happens: // -// - grpc.SendHeader is called, or for streaming handlers, stream.SendHeader. -// - The first response message is sent. For unary handlers, this occurs when -// the handler returns; for streaming handlers, this can happen when stream's -// SendMsg method is called. -// - An RPC status is sent out (error or success). This occurs when the handler -// returns. +// - grpc.SendHeader is called, or for streaming handlers, stream.SendHeader. +// - The first response message is sent. For unary handlers, this occurs when +// the handler returns; for streaming handlers, this can happen when stream's +// SendMsg method is called. +// - An RPC status is sent out (error or success). This occurs when the handler +// returns. // // SetHeader will fail if called after any of the events above. // @@ -1851,6 +1943,60 @@ func SendHeader(ctx context.Context, md metadata.MD) error { return nil } +// SetSendCompressor sets a compressor for outbound messages from the server. +// It must not be called after any event that causes headers to be sent +// (see ServerStream.SetHeader for the complete list). Provided compressor is +// used when below conditions are met: +// +// - compressor is registered via encoding.RegisterCompressor +// - compressor name must exist in the client advertised compressor names +// sent in grpc-accept-encoding header. Use ClientSupportedCompressors to +// get client supported compressor names. +// +// The context provided must be the context passed to the server's handler. +// It must be noted that compressor name encoding.Identity disables the +// outbound compression. +// By default, server messages will be sent using the same compressor with +// which request messages were sent. +// +// It is not safe to call SetSendCompressor concurrently with SendHeader and +// SendMsg. +// +// # Experimental +// +// Notice: This function is EXPERIMENTAL and may be changed or removed in a +// later release. +func SetSendCompressor(ctx context.Context, name string) error { + stream, ok := ServerTransportStreamFromContext(ctx).(*transport.Stream) + if !ok || stream == nil { + return fmt.Errorf("failed to fetch the stream from the given context") + } + + if err := validateSendCompressor(name, stream.ClientAdvertisedCompressors()); err != nil { + return fmt.Errorf("unable to set send compressor: %w", err) + } + + return stream.SetSendCompress(name) +} + +// ClientSupportedCompressors returns compressor names advertised by the client +// via grpc-accept-encoding header. +// +// The context provided must be the context passed to the server's handler. +// +// # Experimental +// +// Notice: This function is EXPERIMENTAL and may be changed or removed in a +// later release. +func ClientSupportedCompressors(ctx context.Context) ([]string, error) { + stream, ok := ServerTransportStreamFromContext(ctx).(*transport.Stream) + if !ok || stream == nil { + return nil, fmt.Errorf("failed to fetch the stream from the given context %v", ctx) + } + + return strings.Split(stream.ClientAdvertisedCompressors(), ","), nil +} + // SetTrailer sets the trailer metadata that will be sent when an RPC returns. // When called more than once, all the provided metadata will be merged. // @@ -1885,3 +2031,51 @@ type channelzServer struct { func (c *channelzServer) ChannelzMetric() *channelz.ServerInternalMetric { return c.s.channelzMetric() } + +// validateSendCompressor returns an error when given compressor name cannot be +// handled by the server or the client based on the advertised compressors. +func validateSendCompressor(name, clientCompressors string) error { + if name == encoding.Identity { + return nil + } + + if !grpcutil.IsCompressorNameRegistered(name) { + return fmt.Errorf("compressor not registered %q", name) + } + + for _, c := range strings.Split(clientCompressors, ",") { + if c == name { + return nil // found match + } + } + return fmt.Errorf("client does not support compressor %q", name) +} + +// atomicSemaphore implements a blocking, counting semaphore. acquire should be +// called synchronously; release may be called asynchronously. +type atomicSemaphore struct { + n int64 + wait chan struct{} +} + +func (q *atomicSemaphore) acquire() { + if atomic.AddInt64(&q.n, -1) < 0 { + // We ran out of quota. Block until a release happens. + <-q.wait + } +} + +func (q *atomicSemaphore) release() { + // N.B. the "<= 0" check below should allow for this to work with multiple + // concurrent calls to acquire, but also note that with synchronous calls to + // acquire, as our system does, n will never be less than -1. There are + // fairness issues (queuing) to consider if this was to be generalized. + if atomic.AddInt64(&q.n, 1) <= 0 { + // An acquire was waiting on us. Unblock it. + q.wait <- struct{}{} + } +} + +func newHandlerQuota(n uint32) *atomicSemaphore { + return &atomicSemaphore{n: int64(n), wait: make(chan struct{}, 1)} +} diff --git a/vendor/google.golang.org/grpc/service_config.go b/vendor/google.golang.org/grpc/service_config.go index b01c548bb9a99..0df11fc098825 100644 --- a/vendor/google.golang.org/grpc/service_config.go +++ b/vendor/google.golang.org/grpc/service_config.go @@ -23,8 +23,6 @@ import ( "errors" "fmt" "reflect" - "strconv" - "strings" "time" "google.golang.org/grpc/codes" @@ -57,10 +55,9 @@ type lbConfig struct { type ServiceConfig struct { serviceconfig.Config - // LB is the load balancer the service providers recommends. The balancer - // specified via grpc.WithBalancerName will override this. This is deprecated; - // lbConfigs is preferred. If lbConfig and LB are both present, lbConfig - // will be used. + // LB is the load balancer the service providers recommends. This is + // deprecated; lbConfigs is preferred. If lbConfig and LB are both present, + // lbConfig will be used. LB *string // lbConfig is the service config's load balancing configuration. If @@ -107,8 +104,8 @@ type healthCheckConfig struct { type jsonRetryPolicy struct { MaxAttempts int - InitialBackoff string - MaxBackoff string + InitialBackoff internalserviceconfig.Duration + MaxBackoff internalserviceconfig.Duration BackoffMultiplier float64 RetryableStatusCodes []codes.Code } @@ -130,50 +127,6 @@ type retryThrottlingPolicy struct { TokenRatio float64 } -func parseDuration(s *string) (*time.Duration, error) { - if s == nil { - return nil, nil - } - if !strings.HasSuffix(*s, "s") { - return nil, fmt.Errorf("malformed duration %q", *s) - } - ss := strings.SplitN((*s)[:len(*s)-1], ".", 3) - if len(ss) > 2 { - return nil, fmt.Errorf("malformed duration %q", *s) - } - // hasDigits is set if either the whole or fractional part of the number is - // present, since both are optional but one is required. - hasDigits := false - var d time.Duration - if len(ss[0]) > 0 { - i, err := strconv.ParseInt(ss[0], 10, 32) - if err != nil { - return nil, fmt.Errorf("malformed duration %q: %v", *s, err) - } - d = time.Duration(i) * time.Second - hasDigits = true - } - if len(ss) == 2 && len(ss[1]) > 0 { - if len(ss[1]) > 9 { - return nil, fmt.Errorf("malformed duration %q", *s) - } - f, err := strconv.ParseInt(ss[1], 10, 64) - if err != nil { - return nil, fmt.Errorf("malformed duration %q: %v", *s, err) - } - for i := 9; i > len(ss[1]); i-- { - f *= 10 - } - d += time.Duration(f) - hasDigits = true - } - if !hasDigits { - return nil, fmt.Errorf("malformed duration %q", *s) - } - - return &d, nil -} - type jsonName struct { Service string Method string @@ -202,7 +155,7 @@ func (j jsonName) generatePath() (string, error) { type jsonMC struct { Name *[]jsonName WaitForReady *bool - Timeout *string + Timeout *internalserviceconfig.Duration MaxRequestMessageBytes *int64 MaxResponseMessageBytes *int64 RetryPolicy *jsonRetryPolicy @@ -227,7 +180,7 @@ func parseServiceConfig(js string) *serviceconfig.ParseResult { var rsc jsonSC err := json.Unmarshal([]byte(js), &rsc) if err != nil { - logger.Warningf("grpc: parseServiceConfig error unmarshaling %s due to %v", js, err) + logger.Warningf("grpc: unmarshaling service config %s: %v", js, err) return &serviceconfig.ParseResult{Err: err} } sc := ServiceConfig{ @@ -253,18 +206,13 @@ func parseServiceConfig(js string) *serviceconfig.ParseResult { if m.Name == nil { continue } - d, err := parseDuration(m.Timeout) - if err != nil { - logger.Warningf("grpc: parseServiceConfig error unmarshaling %s due to %v", js, err) - return &serviceconfig.ParseResult{Err: err} - } mc := MethodConfig{ WaitForReady: m.WaitForReady, - Timeout: d, + Timeout: (*time.Duration)(m.Timeout), } if mc.RetryPolicy, err = convertRetryPolicy(m.RetryPolicy); err != nil { - logger.Warningf("grpc: parseServiceConfig error unmarshaling %s due to %v", js, err) + logger.Warningf("grpc: unmarshaling service config %s: %v", js, err) return &serviceconfig.ParseResult{Err: err} } if m.MaxRequestMessageBytes != nil { @@ -284,13 +232,13 @@ func parseServiceConfig(js string) *serviceconfig.ParseResult { for i, n := range *m.Name { path, err := n.generatePath() if err != nil { - logger.Warningf("grpc: parseServiceConfig error unmarshaling %s due to methodConfig[%d]: %v", js, i, err) + logger.Warningf("grpc: error unmarshaling service config %s due to methodConfig[%d]: %v", js, i, err) return &serviceconfig.ParseResult{Err: err} } if _, ok := paths[path]; ok { err = errDuplicatedName - logger.Warningf("grpc: parseServiceConfig error unmarshaling %s due to methodConfig[%d]: %v", js, i, err) + logger.Warningf("grpc: error unmarshaling service config %s due to methodConfig[%d]: %v", js, i, err) return &serviceconfig.ParseResult{Err: err} } paths[path] = struct{}{} @@ -313,18 +261,10 @@ func convertRetryPolicy(jrp *jsonRetryPolicy) (p *internalserviceconfig.RetryPol if jrp == nil { return nil, nil } - ib, err := parseDuration(&jrp.InitialBackoff) - if err != nil { - return nil, err - } - mb, err := parseDuration(&jrp.MaxBackoff) - if err != nil { - return nil, err - } if jrp.MaxAttempts <= 1 || - *ib <= 0 || - *mb <= 0 || + jrp.InitialBackoff <= 0 || + jrp.MaxBackoff <= 0 || jrp.BackoffMultiplier <= 0 || len(jrp.RetryableStatusCodes) == 0 { logger.Warningf("grpc: ignoring retry policy %v due to illegal configuration", jrp) @@ -333,8 +273,8 @@ func convertRetryPolicy(jrp *jsonRetryPolicy) (p *internalserviceconfig.RetryPol rp := &internalserviceconfig.RetryPolicy{ MaxAttempts: jrp.MaxAttempts, - InitialBackoff: *ib, - MaxBackoff: *mb, + InitialBackoff: time.Duration(jrp.InitialBackoff), + MaxBackoff: time.Duration(jrp.MaxBackoff), BackoffMultiplier: jrp.BackoffMultiplier, RetryableStatusCodes: make(map[codes.Code]bool), } diff --git a/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go b/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go index 73a2f926613e4..35e7a20a04baa 100644 --- a/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go +++ b/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go @@ -19,7 +19,7 @@ // Package serviceconfig defines types and methods for operating on gRPC // service configs. // -// Experimental +// # Experimental // // Notice: This package is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/stats/stats.go b/vendor/google.golang.org/grpc/stats/stats.go index 0285dcc6a2683..7a552a9b78711 100644 --- a/vendor/google.golang.org/grpc/stats/stats.go +++ b/vendor/google.golang.org/grpc/stats/stats.go @@ -67,10 +67,18 @@ type InPayload struct { Payload interface{} // Data is the serialized message payload. Data []byte - // Length is the length of uncompressed data. + + // Length is the size of the uncompressed payload data. Does not include any + // framing (gRPC or HTTP/2). Length int - // WireLength is the length of data on wire (compressed, signed, encrypted). + // CompressedLength is the size of the compressed payload data. Does not + // include any framing (gRPC or HTTP/2). Same as Length if compression not + // enabled. + CompressedLength int + // WireLength is the size of the compressed payload data plus gRPC framing. + // Does not include HTTP/2 framing. WireLength int + // RecvTime is the time when the payload is received. RecvTime time.Time } @@ -129,9 +137,15 @@ type OutPayload struct { Payload interface{} // Data is the serialized message payload. Data []byte - // Length is the length of uncompressed data. + // Length is the size of the uncompressed payload data. Does not include any + // framing (gRPC or HTTP/2). Length int - // WireLength is the length of data on wire (compressed, signed, encrypted). + // CompressedLength is the size of the compressed payload data. Does not + // include any framing (gRPC or HTTP/2). Same as Length if compression not + // enabled. + CompressedLength int + // WireLength is the size of the compressed payload data plus gRPC framing. + // Does not include HTTP/2 framing. WireLength int // SentTime is the time when the payload is sent. SentTime time.Time diff --git a/vendor/google.golang.org/grpc/status/status.go b/vendor/google.golang.org/grpc/status/status.go index 6d163b6e38422..bcf2e4d81beb3 100644 --- a/vendor/google.golang.org/grpc/status/status.go +++ b/vendor/google.golang.org/grpc/status/status.go @@ -76,22 +76,50 @@ func FromProto(s *spb.Status) *Status { // FromError returns a Status representation of err. // -// - If err was produced by this package or implements the method `GRPCStatus() -// *Status`, the appropriate Status is returned. +// - If err was produced by this package or implements the method `GRPCStatus() +// *Status` and `GRPCStatus()` does not return nil, or if err wraps a type +// satisfying this, the Status from `GRPCStatus()` is returned. For wrapped +// errors, the message returned contains the entire err.Error() text and not +// just the wrapped status. In that case, ok is true. // -// - If err is nil, a Status is returned with codes.OK and no message. +// - If err is nil, a Status is returned with codes.OK and no message, and ok +// is true. // -// - Otherwise, err is an error not compatible with this package. In this -// case, a Status is returned with codes.Unknown and err's Error() message, -// and ok is false. +// - If err implements the method `GRPCStatus() *Status` and `GRPCStatus()` +// returns nil (which maps to Codes.OK), or if err wraps a type +// satisfying this, a Status is returned with codes.Unknown and err's +// Error() message, and ok is false. +// +// - Otherwise, err is an error not compatible with this package. In this +// case, a Status is returned with codes.Unknown and err's Error() message, +// and ok is false. func FromError(err error) (s *Status, ok bool) { if err == nil { return nil, true } - if se, ok := err.(interface { - GRPCStatus() *Status - }); ok { - return se.GRPCStatus(), true + type grpcstatus interface{ GRPCStatus() *Status } + if gs, ok := err.(grpcstatus); ok { + if gs.GRPCStatus() == nil { + // Error has status nil, which maps to codes.OK. There + // is no sensible behavior for this, so we turn it into + // an error with codes.Unknown and discard the existing + // status. + return New(codes.Unknown, err.Error()), false + } + return gs.GRPCStatus(), true + } + var gs grpcstatus + if errors.As(err, &gs) { + if gs.GRPCStatus() == nil { + // Error wraps an error that has status nil, which maps + // to codes.OK. There is no sensible behavior for this, + // so we turn it into an error with codes.Unknown and + // discard the existing status. + return New(codes.Unknown, err.Error()), false + } + p := gs.GRPCStatus().Proto() + p.Message = err.Error() + return status.FromProto(p), true } return New(codes.Unknown, err.Error()), false } @@ -103,19 +131,16 @@ func Convert(err error) *Status { return s } -// Code returns the Code of the error if it is a Status error, codes.OK if err -// is nil, or codes.Unknown otherwise. +// Code returns the Code of the error if it is a Status error or if it wraps a +// Status error. If that is not the case, it returns codes.OK if err is nil, or +// codes.Unknown otherwise. func Code(err error) codes.Code { // Don't use FromError to avoid allocation of OK status. if err == nil { return codes.OK } - if se, ok := err.(interface { - GRPCStatus() *Status - }); ok { - return se.GRPCStatus().Code() - } - return codes.Unknown + + return Convert(err).Code() } // FromContextError converts a context error or wrapped context error into a diff --git a/vendor/google.golang.org/grpc/stream.go b/vendor/google.golang.org/grpc/stream.go index 236fc17ec3c48..10092685b2283 100644 --- a/vendor/google.golang.org/grpc/stream.go +++ b/vendor/google.golang.org/grpc/stream.go @@ -39,6 +39,7 @@ import ( imetadata "google.golang.org/grpc/internal/metadata" iresolver "google.golang.org/grpc/internal/resolver" "google.golang.org/grpc/internal/serviceconfig" + istatus "google.golang.org/grpc/internal/status" "google.golang.org/grpc/internal/transport" "google.golang.org/grpc/metadata" "google.golang.org/grpc/peer" @@ -122,6 +123,9 @@ type ClientStream interface { // calling RecvMsg on the same stream at the same time, but it is not safe // to call SendMsg on the same stream in different goroutines. It is also // not safe to call CloseSend concurrently with SendMsg. + // + // It is not safe to modify the message after calling SendMsg. Tracing + // libraries and stats handlers may use the message lazily. SendMsg(m interface{}) error // RecvMsg blocks until it receives a message into m or the stream is // done. It returns io.EOF when the stream completes successfully. On @@ -140,17 +144,22 @@ type ClientStream interface { // To ensure resources are not leaked due to the stream returned, one of the following // actions must be performed: // -// 1. Call Close on the ClientConn. -// 2. Cancel the context provided. -// 3. Call RecvMsg until a non-nil error is returned. A protobuf-generated -// client-streaming RPC, for instance, might use the helper function -// CloseAndRecv (note that CloseSend does not Recv, therefore is not -// guaranteed to release all resources). -// 4. Receive a non-nil, non-io.EOF error from Header or SendMsg. +// 1. Call Close on the ClientConn. +// 2. Cancel the context provided. +// 3. Call RecvMsg until a non-nil error is returned. A protobuf-generated +// client-streaming RPC, for instance, might use the helper function +// CloseAndRecv (note that CloseSend does not Recv, therefore is not +// guaranteed to release all resources). +// 4. Receive a non-nil, non-io.EOF error from Header or SendMsg. // // If none of the above happen, a goroutine and a context will be leaked, and grpc // will not call the optionally-configured stats handler with a stats.End message. func (cc *ClientConn) NewStream(ctx context.Context, desc *StreamDesc, method string, opts ...CallOption) (ClientStream, error) { + if err := cc.idlenessMgr.onCallBegin(); err != nil { + return nil, err + } + defer cc.idlenessMgr.onCallEnd() + // allow interceptor to see all applicable call options, which means those // configured as defaults from dial option as well as per-call options opts = combine(cc.dopts.callOptions, opts) @@ -167,10 +176,19 @@ func NewClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, meth } func newClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, method string, opts ...CallOption) (_ ClientStream, err error) { - if md, _, ok := metadata.FromOutgoingContextRaw(ctx); ok { + if md, added, ok := metadata.FromOutgoingContextRaw(ctx); ok { + // validate md if err := imetadata.Validate(md); err != nil { return nil, status.Error(codes.Internal, err.Error()) } + // validate added + for _, kvs := range added { + for i := 0; i < len(kvs); i += 2 { + if err := imetadata.ValidatePair(kvs[i], kvs[i+1]); err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + } + } } if channelz.IsOn() { cc.incrCallsStarted() @@ -195,6 +213,13 @@ func newClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, meth rpcInfo := iresolver.RPCInfo{Context: ctx, Method: method} rpcConfig, err := cc.safeConfigSelector.SelectConfig(rpcInfo) if err != nil { + if st, ok := status.FromError(err); ok { + // Restrict the code to the list allowed by gRFC A54. + if istatus.IsRestrictedControlPlaneCode(st) { + err = status.Errorf(codes.Internal, "config selector returned illegal status: %v", err) + } + return nil, err + } return nil, toRPCErr(err) } @@ -301,12 +326,13 @@ func newClientStreamWithParams(ctx context.Context, desc *StreamDesc, cc *Client if !cc.dopts.disableRetry { cs.retryThrottler = cc.retryThrottler.Load().(*retryThrottler) } - cs.binlog = binarylog.GetMethodLogger(method) - - cs.attempt, err = cs.newAttemptLocked(false /* isTransparent */) - if err != nil { - cs.finish(err) - return nil, err + if ml := binarylog.GetMethodLogger(method); ml != nil { + cs.binlogs = append(cs.binlogs, ml) + } + if cc.dopts.binaryLogger != nil { + if ml := cc.dopts.binaryLogger.GetMethodLogger(method); ml != nil { + cs.binlogs = append(cs.binlogs, ml) + } } // Pick the transport to use and create a new stream on the transport. @@ -328,7 +354,7 @@ func newClientStreamWithParams(ctx context.Context, desc *StreamDesc, cc *Client return nil, err } - if cs.binlog != nil { + if len(cs.binlogs) != 0 { md, _ := metadata.FromOutgoingContext(ctx) logEntry := &binarylog.ClientHeader{ OnClientSide: true, @@ -342,7 +368,9 @@ func newClientStreamWithParams(ctx context.Context, desc *StreamDesc, cc *Client logEntry.Timeout = 0 } } - cs.binlog.Log(logEntry) + for _, binlog := range cs.binlogs { + binlog.Log(cs.ctx, logEntry) + } } if desc != unaryStreamDesc { @@ -374,9 +402,9 @@ func (cs *clientStream) newAttemptLocked(isTransparent bool) (*csAttempt, error) ctx := newContextWithRPCInfo(cs.ctx, cs.callInfo.failFast, cs.callInfo.codec, cs.cp, cs.comp) method := cs.callHdr.Method - sh := cs.cc.dopts.copts.StatsHandler var beginTime time.Time - if sh != nil { + shs := cs.cc.dopts.copts.StatsHandlers + for _, sh := range shs { ctx = sh.TagRPC(ctx, &stats.RPCTagInfo{FullMethodName: method, FailFast: cs.callInfo.failFast}) beginTime = time.Now() begin := &stats.Begin{ @@ -405,7 +433,7 @@ func (cs *clientStream) newAttemptLocked(isTransparent bool) (*csAttempt, error) ctx = trace.NewContext(ctx, trInfo.tr) } - if cs.cc.parsedTarget.Scheme == "xds" { + if cs.cc.parsedTarget.URL.Scheme == "xds" { // Add extra metadata (metadata that will be added by transport) to context // so the balancer can see them. ctx = grpcutil.WithExtraMetadata(ctx, metadata.Pairs( @@ -414,12 +442,12 @@ func (cs *clientStream) newAttemptLocked(isTransparent bool) (*csAttempt, error) } return &csAttempt{ - ctx: ctx, - beginTime: beginTime, - cs: cs, - dc: cs.cc.dopts.dc, - statsHandler: sh, - trInfo: trInfo, + ctx: ctx, + beginTime: beginTime, + cs: cs, + dc: cs.cc.dopts.dc, + statsHandlers: shs, + trInfo: trInfo, }, nil } @@ -427,7 +455,7 @@ func (a *csAttempt) getTransport() error { cs := a.cs var err error - a.t, a.done, err = cs.cc.getTransport(a.ctx, cs.callInfo.failFast, cs.callHdr.Method) + a.t, a.pickResult, err = cs.cc.getTransport(a.ctx, cs.callInfo.failFast, cs.callHdr.Method) if err != nil { if de, ok := err.(dropError); ok { err = de.error @@ -444,6 +472,25 @@ func (a *csAttempt) getTransport() error { func (a *csAttempt) newStream() error { cs := a.cs cs.callHdr.PreviousAttempts = cs.numRetries + + // Merge metadata stored in PickResult, if any, with existing call metadata. + // It is safe to overwrite the csAttempt's context here, since all state + // maintained in it are local to the attempt. When the attempt has to be + // retried, a new instance of csAttempt will be created. + if a.pickResult.Metadata != nil { + // We currently do not have a function it the metadata package which + // merges given metadata with existing metadata in a context. Existing + // function `AppendToOutgoingContext()` takes a variadic argument of key + // value pairs. + // + // TODO: Make it possible to retrieve key value pairs from metadata.MD + // in a form passable to AppendToOutgoingContext(), or create a version + // of AppendToOutgoingContext() that accepts a metadata.MD. + md, _ := metadata.FromOutgoingContext(a.ctx) + md = metadata.Join(md, a.pickResult.Metadata) + a.ctx = metadata.NewOutgoingContext(a.ctx, md) + } + s, err := a.t.NewStream(a.ctx, cs.callHdr) if err != nil { nse, ok := err.(*transport.NewStreamError) @@ -486,7 +533,7 @@ type clientStream struct { retryThrottler *retryThrottler // The throttler active when the RPC began. - binlog binarylog.MethodLogger // Binary logger, can be nil. + binlogs []binarylog.MethodLogger // serverHeaderBinlogged is a boolean for whether server header has been // logged. Server header will be logged when the first time one of those // happens: stream.Header(), stream.Recv(). @@ -518,12 +565,12 @@ type clientStream struct { // csAttempt implements a single transport stream attempt within a // clientStream. type csAttempt struct { - ctx context.Context - cs *clientStream - t transport.ClientTransport - s *transport.Stream - p *parser - done func(balancer.DoneInfo) + ctx context.Context + cs *clientStream + t transport.ClientTransport + s *transport.Stream + p *parser + pickResult balancer.PickResult finished bool dc Decompressor @@ -536,8 +583,8 @@ type csAttempt struct { // and cleared when the finish method is called. trInfo *traceInfo - statsHandler stats.Handler - beginTime time.Time + statsHandlers []stats.Handler + beginTime time.Time // set for newStream errors that may be transparently retried allowTransparentRetry bool @@ -704,6 +751,18 @@ func (cs *clientStream) withRetry(op func(a *csAttempt) error, onSuccess func()) // already be status errors. return toRPCErr(op(cs.attempt)) } + if len(cs.buffer) == 0 { + // For the first op, which controls creation of the stream and + // assigns cs.attempt, we need to create a new attempt inline + // before executing the first op. On subsequent ops, the attempt + // is created immediately before replaying the ops. + var err error + if cs.attempt, err = cs.newAttemptLocked(false /* isTransparent */); err != nil { + cs.mu.Unlock() + cs.finish(err) + return err + } + } a := cs.attempt cs.mu.Unlock() err := op(a) @@ -729,17 +788,25 @@ func (cs *clientStream) withRetry(op func(a *csAttempt) error, onSuccess func()) func (cs *clientStream) Header() (metadata.MD, error) { var m metadata.MD + noHeader := false err := cs.withRetry(func(a *csAttempt) error { var err error m, err = a.s.Header() + if err == transport.ErrNoHeaders { + noHeader = true + return nil + } return toRPCErr(err) }, cs.commitAttemptLocked) + if err != nil { cs.finish(err) return nil, err } - if cs.binlog != nil && !cs.serverHeaderBinlogged { - // Only log if binary log is on and header has not been logged. + + if len(cs.binlogs) != 0 && !cs.serverHeaderBinlogged && !noHeader { + // Only log if binary log is on and header has not been logged, and + // there is actually headers to log. logEntry := &binarylog.ServerHeader{ OnClientSide: true, Header: m, @@ -748,8 +815,10 @@ func (cs *clientStream) Header() (metadata.MD, error) { if peer, ok := peer.FromContext(cs.Context()); ok { logEntry.PeerAddr = peer.Addr } - cs.binlog.Log(logEntry) cs.serverHeaderBinlogged = true + for _, binlog := range cs.binlogs { + binlog.Log(cs.ctx, logEntry) + } } return m, nil } @@ -823,38 +892,44 @@ func (cs *clientStream) SendMsg(m interface{}) (err error) { return a.sendMsg(m, hdr, payload, data) } err = cs.withRetry(op, func() { cs.bufferForRetryLocked(len(hdr)+len(payload), op) }) - if cs.binlog != nil && err == nil { - cs.binlog.Log(&binarylog.ClientMessage{ + if len(cs.binlogs) != 0 && err == nil { + cm := &binarylog.ClientMessage{ OnClientSide: true, Message: data, - }) + } + for _, binlog := range cs.binlogs { + binlog.Log(cs.ctx, cm) + } } return err } func (cs *clientStream) RecvMsg(m interface{}) error { - if cs.binlog != nil && !cs.serverHeaderBinlogged { + if len(cs.binlogs) != 0 && !cs.serverHeaderBinlogged { // Call Header() to binary log header if it's not already logged. cs.Header() } var recvInfo *payloadInfo - if cs.binlog != nil { + if len(cs.binlogs) != 0 { recvInfo = &payloadInfo{} } err := cs.withRetry(func(a *csAttempt) error { return a.recvMsg(m, recvInfo) }, cs.commitAttemptLocked) - if cs.binlog != nil && err == nil { - cs.binlog.Log(&binarylog.ServerMessage{ + if len(cs.binlogs) != 0 && err == nil { + sm := &binarylog.ServerMessage{ OnClientSide: true, Message: recvInfo.uncompressedBytes, - }) + } + for _, binlog := range cs.binlogs { + binlog.Log(cs.ctx, sm) + } } if err != nil || !cs.desc.ServerStreams { // err != nil or non-server-streaming indicates end of stream. cs.finish(err) - if cs.binlog != nil { + if len(cs.binlogs) != 0 { // finish will not log Trailer. Log Trailer here. logEntry := &binarylog.ServerTrailer{ OnClientSide: true, @@ -867,7 +942,9 @@ func (cs *clientStream) RecvMsg(m interface{}) error { if peer, ok := peer.FromContext(cs.Context()); ok { logEntry.PeerAddr = peer.Addr } - cs.binlog.Log(logEntry) + for _, binlog := range cs.binlogs { + binlog.Log(cs.ctx, logEntry) + } } } return err @@ -888,10 +965,13 @@ func (cs *clientStream) CloseSend() error { return nil } cs.withRetry(op, func() { cs.bufferForRetryLocked(0, op) }) - if cs.binlog != nil { - cs.binlog.Log(&binarylog.ClientHalfClose{ + if len(cs.binlogs) != 0 { + chc := &binarylog.ClientHalfClose{ OnClientSide: true, - }) + } + for _, binlog := range cs.binlogs { + binlog.Log(cs.ctx, chc) + } } // We never returned an error here for reasons. return nil @@ -908,6 +988,9 @@ func (cs *clientStream) finish(err error) { return } cs.finished = true + for _, onFinish := range cs.callInfo.onFinish { + onFinish(err) + } cs.commitAttemptLocked() if cs.attempt != nil { cs.attempt.finish(err) @@ -924,10 +1007,13 @@ func (cs *clientStream) finish(err error) { // // Only one of cancel or trailer needs to be logged. In the cases where // users don't call RecvMsg, users must have already canceled the RPC. - if cs.binlog != nil && status.Code(err) == codes.Canceled { - cs.binlog.Log(&binarylog.Cancel{ + if len(cs.binlogs) != 0 && status.Code(err) == codes.Canceled { + c := &binarylog.Cancel{ OnClientSide: true, - }) + } + for _, binlog := range cs.binlogs { + binlog.Log(cs.ctx, c) + } } if err == nil { cs.retryThrottler.successfulRPC() @@ -960,8 +1046,8 @@ func (a *csAttempt) sendMsg(m interface{}, hdr, payld, data []byte) error { } return io.EOF } - if a.statsHandler != nil { - a.statsHandler.HandleRPC(a.ctx, outPayload(true, m, data, payld, time.Now())) + for _, sh := range a.statsHandlers { + sh.HandleRPC(a.ctx, outPayload(true, m, data, payld, time.Now())) } if channelz.IsOn() { a.t.IncrMsgSent() @@ -971,7 +1057,7 @@ func (a *csAttempt) sendMsg(m interface{}, hdr, payld, data []byte) error { func (a *csAttempt) recvMsg(m interface{}, payInfo *payloadInfo) (err error) { cs := a.cs - if a.statsHandler != nil && payInfo == nil { + if len(a.statsHandlers) != 0 && payInfo == nil { payInfo = &payloadInfo{} } @@ -999,6 +1085,7 @@ func (a *csAttempt) recvMsg(m interface{}, payInfo *payloadInfo) (err error) { } return io.EOF // indicates successful end of stream. } + return toRPCErr(err) } if a.trInfo != nil { @@ -1008,15 +1095,16 @@ func (a *csAttempt) recvMsg(m interface{}, payInfo *payloadInfo) (err error) { } a.mu.Unlock() } - if a.statsHandler != nil { - a.statsHandler.HandleRPC(a.ctx, &stats.InPayload{ + for _, sh := range a.statsHandlers { + sh.HandleRPC(a.ctx, &stats.InPayload{ Client: true, RecvTime: time.Now(), Payload: m, // TODO truncate large payload. - Data: payInfo.uncompressedBytes, - WireLength: payInfo.wireLength + headerLen, - Length: len(payInfo.uncompressedBytes), + Data: payInfo.uncompressedBytes, + WireLength: payInfo.compressedLength + headerLen, + CompressedLength: payInfo.compressedLength, + Length: len(payInfo.uncompressedBytes), }) } if channelz.IsOn() { @@ -1055,12 +1143,12 @@ func (a *csAttempt) finish(err error) { tr = a.s.Trailer() } - if a.done != nil { + if a.pickResult.Done != nil { br := false if a.s != nil { br = a.s.BytesReceived() } - a.done(balancer.DoneInfo{ + a.pickResult.Done(balancer.DoneInfo{ Err: err, Trailer: tr, BytesSent: a.s != nil, @@ -1068,7 +1156,7 @@ func (a *csAttempt) finish(err error) { ServerLoad: balancerload.Parse(tr), }) } - if a.statsHandler != nil { + for _, sh := range a.statsHandlers { end := &stats.End{ Client: true, BeginTime: a.beginTime, @@ -1076,7 +1164,7 @@ func (a *csAttempt) finish(err error) { Trailer: tr, Error: err, } - a.statsHandler.HandleRPC(a.ctx, end) + sh.HandleRPC(a.ctx, end) } if a.trInfo != nil && a.trInfo.tr != nil { if err == nil { @@ -1185,14 +1273,19 @@ func newNonRetryClientStream(ctx context.Context, desc *StreamDesc, method strin as.p = &parser{r: s} ac.incrCallsStarted() if desc != unaryStreamDesc { - // Listen on cc and stream contexts to cleanup when the user closes the - // ClientConn or cancels the stream context. In all other cases, an error - // should already be injected into the recv buffer by the transport, which - // the client will eventually receive, and then we will cancel the stream's - // context in clientStream.finish. + // Listen on stream context to cleanup when the stream context is + // canceled. Also listen for the addrConn's context in case the + // addrConn is closed or reconnects to a different address. In all + // other cases, an error should already be injected into the recv + // buffer by the transport, which the client will eventually receive, + // and then we will cancel the stream's context in + // addrConnStream.finish. go func() { + ac.mu.Lock() + acCtx := ac.ctx + ac.mu.Unlock() select { - case <-ac.ctx.Done(): + case <-acCtx.Done(): as.finish(status.Error(codes.Canceled, "grpc: the SubConn is closing")) case <-ctx.Done(): as.finish(toRPCErr(ctx.Err())) @@ -1416,6 +1509,9 @@ type ServerStream interface { // It is safe to have a goroutine calling SendMsg and another goroutine // calling RecvMsg on the same stream at the same time, but it is not safe // to call SendMsg on the same stream in different goroutines. + // + // It is not safe to modify the message after calling SendMsg. Tracing + // libraries and stats handlers may use the message lazily. SendMsg(m interface{}) error // RecvMsg blocks until it receives a message into m or the stream is // done. It returns io.EOF when the client has performed a CloseSend. On @@ -1441,13 +1537,15 @@ type serverStream struct { comp encoding.Compressor decomp encoding.Compressor + sendCompressorName string + maxReceiveMessageSize int maxSendMessageSize int trInfo *traceInfo - statsHandler stats.Handler + statsHandler []stats.Handler - binlog binarylog.MethodLogger + binlogs []binarylog.MethodLogger // serverHeaderBinlogged indicates whether server header has been logged. It // will happen when one of the following two happens: stream.SendHeader(), // stream.Send(). @@ -1481,12 +1579,15 @@ func (ss *serverStream) SendHeader(md metadata.MD) error { } err = ss.t.WriteHeader(ss.s, md) - if ss.binlog != nil && !ss.serverHeaderBinlogged { + if len(ss.binlogs) != 0 && !ss.serverHeaderBinlogged { h, _ := ss.s.Header() - ss.binlog.Log(&binarylog.ServerHeader{ + sh := &binarylog.ServerHeader{ Header: h, - }) + } ss.serverHeaderBinlogged = true + for _, binlog := range ss.binlogs { + binlog.Log(ss.ctx, sh) + } } return err } @@ -1530,6 +1631,13 @@ func (ss *serverStream) SendMsg(m interface{}) (err error) { } }() + // Server handler could have set new compressor by calling SetSendCompressor. + // In case it is set, we need to use it for compressing outbound message. + if sendCompressorsName := ss.s.SendCompress(); sendCompressorsName != ss.sendCompressorName { + ss.comp = encoding.GetCompressor(sendCompressorsName) + ss.sendCompressorName = sendCompressorsName + } + // load hdr, payload, data hdr, payload, data, err := prepareMsg(m, ss.codec, ss.cp, ss.comp) if err != nil { @@ -1543,20 +1651,28 @@ func (ss *serverStream) SendMsg(m interface{}) (err error) { if err := ss.t.Write(ss.s, hdr, payload, &transport.Options{Last: false}); err != nil { return toRPCErr(err) } - if ss.binlog != nil { + if len(ss.binlogs) != 0 { if !ss.serverHeaderBinlogged { h, _ := ss.s.Header() - ss.binlog.Log(&binarylog.ServerHeader{ + sh := &binarylog.ServerHeader{ Header: h, - }) + } ss.serverHeaderBinlogged = true + for _, binlog := range ss.binlogs { + binlog.Log(ss.ctx, sh) + } } - ss.binlog.Log(&binarylog.ServerMessage{ + sm := &binarylog.ServerMessage{ Message: data, - }) + } + for _, binlog := range ss.binlogs { + binlog.Log(ss.ctx, sm) + } } - if ss.statsHandler != nil { - ss.statsHandler.HandleRPC(ss.s.Context(), outPayload(false, m, data, payload, time.Now())) + if len(ss.statsHandler) != 0 { + for _, sh := range ss.statsHandler { + sh.HandleRPC(ss.s.Context(), outPayload(false, m, data, payload, time.Now())) + } } return nil } @@ -1590,13 +1706,16 @@ func (ss *serverStream) RecvMsg(m interface{}) (err error) { } }() var payInfo *payloadInfo - if ss.statsHandler != nil || ss.binlog != nil { + if len(ss.statsHandler) != 0 || len(ss.binlogs) != 0 { payInfo = &payloadInfo{} } if err := recv(ss.p, ss.codec, ss.s, ss.dc, m, ss.maxReceiveMessageSize, payInfo, ss.decomp); err != nil { if err == io.EOF { - if ss.binlog != nil { - ss.binlog.Log(&binarylog.ClientHalfClose{}) + if len(ss.binlogs) != 0 { + chc := &binarylog.ClientHalfClose{} + for _, binlog := range ss.binlogs { + binlog.Log(ss.ctx, chc) + } } return err } @@ -1605,20 +1724,26 @@ func (ss *serverStream) RecvMsg(m interface{}) (err error) { } return toRPCErr(err) } - if ss.statsHandler != nil { - ss.statsHandler.HandleRPC(ss.s.Context(), &stats.InPayload{ - RecvTime: time.Now(), - Payload: m, - // TODO truncate large payload. - Data: payInfo.uncompressedBytes, - WireLength: payInfo.wireLength + headerLen, - Length: len(payInfo.uncompressedBytes), - }) + if len(ss.statsHandler) != 0 { + for _, sh := range ss.statsHandler { + sh.HandleRPC(ss.s.Context(), &stats.InPayload{ + RecvTime: time.Now(), + Payload: m, + // TODO truncate large payload. + Data: payInfo.uncompressedBytes, + Length: len(payInfo.uncompressedBytes), + WireLength: payInfo.compressedLength + headerLen, + CompressedLength: payInfo.compressedLength, + }) + } } - if ss.binlog != nil { - ss.binlog.Log(&binarylog.ClientMessage{ + if len(ss.binlogs) != 0 { + cm := &binarylog.ClientMessage{ Message: payInfo.uncompressedBytes, - }) + } + for _, binlog := range ss.binlogs { + binlog.Log(ss.ctx, cm) + } } return nil } diff --git a/vendor/google.golang.org/grpc/tap/tap.go b/vendor/google.golang.org/grpc/tap/tap.go index dbf34e6bb5f57..bfa5dfa40e4d1 100644 --- a/vendor/google.golang.org/grpc/tap/tap.go +++ b/vendor/google.golang.org/grpc/tap/tap.go @@ -19,7 +19,7 @@ // Package tap defines the function handles which are executed on the transport // layer of gRPC-Go and related information. // -// Experimental +// # Experimental // // Notice: This API is EXPERIMENTAL and may be changed or removed in a // later release. diff --git a/vendor/google.golang.org/grpc/version.go b/vendor/google.golang.org/grpc/version.go index 5bc03f9b3612c..3cc754062185a 100644 --- a/vendor/google.golang.org/grpc/version.go +++ b/vendor/google.golang.org/grpc/version.go @@ -19,4 +19,4 @@ package grpc // Version is the current grpc version. -const Version = "1.47.0" +const Version = "1.56.3" diff --git a/vendor/google.golang.org/grpc/vet.sh b/vendor/google.golang.org/grpc/vet.sh index ceb436c6ce47b..a8e4732b3d204 100644 --- a/vendor/google.golang.org/grpc/vet.sh +++ b/vendor/google.golang.org/grpc/vet.sh @@ -41,16 +41,8 @@ if [[ "$1" = "-install" ]]; then github.com/client9/misspell/cmd/misspell popd if [[ -z "${VET_SKIP_PROTO}" ]]; then - if [[ "${TRAVIS}" = "true" ]]; then - PROTOBUF_VERSION=3.14.0 - PROTOC_FILENAME=protoc-${PROTOBUF_VERSION}-linux-x86_64.zip - pushd /home/travis - wget https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/${PROTOC_FILENAME} - unzip ${PROTOC_FILENAME} - bin/protoc --version - popd - elif [[ "${GITHUB_ACTIONS}" = "true" ]]; then - PROTOBUF_VERSION=3.14.0 + if [[ "${GITHUB_ACTIONS}" = "true" ]]; then + PROTOBUF_VERSION=22.0 # a.k.a v4.22.0 in pb.go files. PROTOC_FILENAME=protoc-${PROTOBUF_VERSION}-linux-x86_64.zip pushd /home/runner/go wget https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/${PROTOC_FILENAME} @@ -66,8 +58,20 @@ elif [[ "$#" -ne 0 ]]; then die "Unknown argument(s): $*" fi +# - Check that generated proto files are up to date. +if [[ -z "${VET_SKIP_PROTO}" ]]; then + make proto && git status --porcelain 2>&1 | fail_on_output || \ + (git status; git --no-pager diff; exit 1) +fi + +if [[ -n "${VET_ONLY_PROTO}" ]]; then + exit 0 +fi + # - Ensure all source files contain a copyright message. -not git grep -L "\(Copyright [0-9]\{4,\} gRPC authors\)\|DO NOT EDIT" -- '*.go' +# (Done in two parts because Darwin "git grep" has broken support for compound +# exclusion matches.) +(grep -L "DO NOT EDIT" $(git grep -L "\(Copyright [0-9]\{4,\} gRPC authors\)" -- '*.go') || true) | fail_on_output # - Make sure all tests in grpc and grpc/test use leakcheck via Teardown. not grep 'func Test[^(]' *_test.go @@ -81,7 +85,7 @@ not git grep -l 'x/net/context' -- "*.go" git grep -l '"math/rand"' -- "*.go" 2>&1 | not grep -v '^examples\|^stress\|grpcrand\|^benchmark\|wrr_test' # - Do not call grpclog directly. Use grpclog.Component instead. -git grep -l 'grpclog.I\|grpclog.W\|grpclog.E\|grpclog.F\|grpclog.V' -- "*.go" | not grep -v '^grpclog/component.go\|^internal/grpctest/tlogger_test.go' +git grep -l -e 'grpclog.I' --or -e 'grpclog.W' --or -e 'grpclog.E' --or -e 'grpclog.F' --or -e 'grpclog.V' -- "*.go" | not grep -v '^grpclog/component.go\|^internal/grpctest/tlogger_test.go' # - Ensure all ptypes proto packages are renamed when importing. not git grep "\(import \|^\s*\)\"github.com/golang/protobuf/ptypes/" -- "*.go" @@ -91,13 +95,6 @@ git grep '"github.com/envoyproxy/go-control-plane/envoy' -- '*.go' ':(exclude)*. misspell -error . -# - Check that generated proto files are up to date. -if [[ -z "${VET_SKIP_PROTO}" ]]; then - PATH="/home/travis/bin:${PATH}" make proto && \ - git status --porcelain 2>&1 | fail_on_output || \ - (git status; git --no-pager diff; exit 1) -fi - # - gofmt, goimports, golint (with exceptions for generated code), go vet, # go mod tidy. # Perform these checks on each module inside gRPC. @@ -109,7 +106,7 @@ for MOD_FILE in $(find . -name 'go.mod'); do goimports -l . 2>&1 | not grep -vE "\.pb\.go" golint ./... 2>&1 | not grep -vE "/grpc_testing_not_regenerate/.*\.pb\.go:" - go mod tidy + go mod tidy -compat=1.17 git status --porcelain 2>&1 | fail_on_output || \ (git status; git --no-pager diff; exit 1) popd @@ -119,8 +116,9 @@ done # # TODO(dfawley): don't use deprecated functions in examples or first-party # plugins. +# TODO(dfawley): enable ST1019 (duplicate imports) but allow for protobufs. SC_OUT="$(mktemp)" -staticcheck -go 1.9 -checks 'inherit,-ST1015' ./... > "${SC_OUT}" || true +staticcheck -go 1.19 -checks 'inherit,-ST1015,-ST1019,-SA1019' ./... > "${SC_OUT}" || true # Error if anything other than deprecation warnings are printed. not grep -v "is deprecated:.*SA1019" "${SC_OUT}" # Only ignore the following deprecated types/fields/functions. @@ -147,7 +145,6 @@ grpc.NewGZIPDecompressor grpc.RPCCompressor grpc.RPCDecompressor grpc.ServiceConfig -grpc.WithBalancerName grpc.WithCompressor grpc.WithDecompressor grpc.WithDialer diff --git a/vendor/google.golang.org/protobuf/AUTHORS b/vendor/google.golang.org/protobuf/AUTHORS deleted file mode 100644 index 2b00ddba0dfee..0000000000000 --- a/vendor/google.golang.org/protobuf/AUTHORS +++ /dev/null @@ -1,3 +0,0 @@ -# This source code refers to The Go Authors for copyright purposes. -# The master list of authors is in the main Go distribution, -# visible at https://tip.golang.org/AUTHORS. diff --git a/vendor/google.golang.org/protobuf/CONTRIBUTORS b/vendor/google.golang.org/protobuf/CONTRIBUTORS deleted file mode 100644 index 1fbd3e976faf5..0000000000000 --- a/vendor/google.golang.org/protobuf/CONTRIBUTORS +++ /dev/null @@ -1,3 +0,0 @@ -# This source code was written by the Go contributors. -# The master list of contributors is in the main Go distribution, -# visible at https://tip.golang.org/CONTRIBUTORS. diff --git a/vendor/google.golang.org/protobuf/encoding/protojson/decode.go b/vendor/google.golang.org/protobuf/encoding/protojson/decode.go index 07da5db3450e8..5f28148d805b3 100644 --- a/vendor/google.golang.org/protobuf/encoding/protojson/decode.go +++ b/vendor/google.golang.org/protobuf/encoding/protojson/decode.go @@ -19,7 +19,7 @@ import ( "google.golang.org/protobuf/internal/pragma" "google.golang.org/protobuf/internal/set" "google.golang.org/protobuf/proto" - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" ) @@ -113,7 +113,7 @@ func (d decoder) syntaxError(pos int, f string, x ...interface{}) error { } // unmarshalMessage unmarshals a message into the given protoreflect.Message. -func (d decoder) unmarshalMessage(m pref.Message, skipTypeURL bool) error { +func (d decoder) unmarshalMessage(m protoreflect.Message, skipTypeURL bool) error { if unmarshal := wellKnownTypeUnmarshaler(m.Descriptor().FullName()); unmarshal != nil { return unmarshal(d, m) } @@ -159,10 +159,10 @@ func (d decoder) unmarshalMessage(m pref.Message, skipTypeURL bool) error { } // Get the FieldDescriptor. - var fd pref.FieldDescriptor + var fd protoreflect.FieldDescriptor if strings.HasPrefix(name, "[") && strings.HasSuffix(name, "]") { // Only extension names are in [name] format. - extName := pref.FullName(name[1 : len(name)-1]) + extName := protoreflect.FullName(name[1 : len(name)-1]) extType, err := d.opts.Resolver.FindExtensionByName(extName) if err != nil && err != protoregistry.NotFound { return d.newError(tok.Pos(), "unable to resolve %s: %v", tok.RawString(), err) @@ -240,23 +240,23 @@ func (d decoder) unmarshalMessage(m pref.Message, skipTypeURL bool) error { } } -func isKnownValue(fd pref.FieldDescriptor) bool { +func isKnownValue(fd protoreflect.FieldDescriptor) bool { md := fd.Message() return md != nil && md.FullName() == genid.Value_message_fullname } -func isNullValue(fd pref.FieldDescriptor) bool { +func isNullValue(fd protoreflect.FieldDescriptor) bool { ed := fd.Enum() return ed != nil && ed.FullName() == genid.NullValue_enum_fullname } // unmarshalSingular unmarshals to the non-repeated field specified // by the given FieldDescriptor. -func (d decoder) unmarshalSingular(m pref.Message, fd pref.FieldDescriptor) error { - var val pref.Value +func (d decoder) unmarshalSingular(m protoreflect.Message, fd protoreflect.FieldDescriptor) error { + var val protoreflect.Value var err error switch fd.Kind() { - case pref.MessageKind, pref.GroupKind: + case protoreflect.MessageKind, protoreflect.GroupKind: val = m.NewField(fd) err = d.unmarshalMessage(val.Message(), false) default: @@ -272,63 +272,63 @@ func (d decoder) unmarshalSingular(m pref.Message, fd pref.FieldDescriptor) erro // unmarshalScalar unmarshals to a scalar/enum protoreflect.Value specified by // the given FieldDescriptor. -func (d decoder) unmarshalScalar(fd pref.FieldDescriptor) (pref.Value, error) { +func (d decoder) unmarshalScalar(fd protoreflect.FieldDescriptor) (protoreflect.Value, error) { const b32 int = 32 const b64 int = 64 tok, err := d.Read() if err != nil { - return pref.Value{}, err + return protoreflect.Value{}, err } kind := fd.Kind() switch kind { - case pref.BoolKind: + case protoreflect.BoolKind: if tok.Kind() == json.Bool { - return pref.ValueOfBool(tok.Bool()), nil + return protoreflect.ValueOfBool(tok.Bool()), nil } - case pref.Int32Kind, pref.Sint32Kind, pref.Sfixed32Kind: + case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: if v, ok := unmarshalInt(tok, b32); ok { return v, nil } - case pref.Int64Kind, pref.Sint64Kind, pref.Sfixed64Kind: + case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: if v, ok := unmarshalInt(tok, b64); ok { return v, nil } - case pref.Uint32Kind, pref.Fixed32Kind: + case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: if v, ok := unmarshalUint(tok, b32); ok { return v, nil } - case pref.Uint64Kind, pref.Fixed64Kind: + case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: if v, ok := unmarshalUint(tok, b64); ok { return v, nil } - case pref.FloatKind: + case protoreflect.FloatKind: if v, ok := unmarshalFloat(tok, b32); ok { return v, nil } - case pref.DoubleKind: + case protoreflect.DoubleKind: if v, ok := unmarshalFloat(tok, b64); ok { return v, nil } - case pref.StringKind: + case protoreflect.StringKind: if tok.Kind() == json.String { - return pref.ValueOfString(tok.ParsedString()), nil + return protoreflect.ValueOfString(tok.ParsedString()), nil } - case pref.BytesKind: + case protoreflect.BytesKind: if v, ok := unmarshalBytes(tok); ok { return v, nil } - case pref.EnumKind: + case protoreflect.EnumKind: if v, ok := unmarshalEnum(tok, fd); ok { return v, nil } @@ -337,10 +337,10 @@ func (d decoder) unmarshalScalar(fd pref.FieldDescriptor) (pref.Value, error) { panic(fmt.Sprintf("unmarshalScalar: invalid scalar kind %v", kind)) } - return pref.Value{}, d.newError(tok.Pos(), "invalid value for %v type: %v", kind, tok.RawString()) + return protoreflect.Value{}, d.newError(tok.Pos(), "invalid value for %v type: %v", kind, tok.RawString()) } -func unmarshalInt(tok json.Token, bitSize int) (pref.Value, bool) { +func unmarshalInt(tok json.Token, bitSize int) (protoreflect.Value, bool) { switch tok.Kind() { case json.Number: return getInt(tok, bitSize) @@ -349,30 +349,30 @@ func unmarshalInt(tok json.Token, bitSize int) (pref.Value, bool) { // Decode number from string. s := strings.TrimSpace(tok.ParsedString()) if len(s) != len(tok.ParsedString()) { - return pref.Value{}, false + return protoreflect.Value{}, false } dec := json.NewDecoder([]byte(s)) tok, err := dec.Read() if err != nil { - return pref.Value{}, false + return protoreflect.Value{}, false } return getInt(tok, bitSize) } - return pref.Value{}, false + return protoreflect.Value{}, false } -func getInt(tok json.Token, bitSize int) (pref.Value, bool) { +func getInt(tok json.Token, bitSize int) (protoreflect.Value, bool) { n, ok := tok.Int(bitSize) if !ok { - return pref.Value{}, false + return protoreflect.Value{}, false } if bitSize == 32 { - return pref.ValueOfInt32(int32(n)), true + return protoreflect.ValueOfInt32(int32(n)), true } - return pref.ValueOfInt64(n), true + return protoreflect.ValueOfInt64(n), true } -func unmarshalUint(tok json.Token, bitSize int) (pref.Value, bool) { +func unmarshalUint(tok json.Token, bitSize int) (protoreflect.Value, bool) { switch tok.Kind() { case json.Number: return getUint(tok, bitSize) @@ -381,30 +381,30 @@ func unmarshalUint(tok json.Token, bitSize int) (pref.Value, bool) { // Decode number from string. s := strings.TrimSpace(tok.ParsedString()) if len(s) != len(tok.ParsedString()) { - return pref.Value{}, false + return protoreflect.Value{}, false } dec := json.NewDecoder([]byte(s)) tok, err := dec.Read() if err != nil { - return pref.Value{}, false + return protoreflect.Value{}, false } return getUint(tok, bitSize) } - return pref.Value{}, false + return protoreflect.Value{}, false } -func getUint(tok json.Token, bitSize int) (pref.Value, bool) { +func getUint(tok json.Token, bitSize int) (protoreflect.Value, bool) { n, ok := tok.Uint(bitSize) if !ok { - return pref.Value{}, false + return protoreflect.Value{}, false } if bitSize == 32 { - return pref.ValueOfUint32(uint32(n)), true + return protoreflect.ValueOfUint32(uint32(n)), true } - return pref.ValueOfUint64(n), true + return protoreflect.ValueOfUint64(n), true } -func unmarshalFloat(tok json.Token, bitSize int) (pref.Value, bool) { +func unmarshalFloat(tok json.Token, bitSize int) (protoreflect.Value, bool) { switch tok.Kind() { case json.Number: return getFloat(tok, bitSize) @@ -414,49 +414,49 @@ func unmarshalFloat(tok json.Token, bitSize int) (pref.Value, bool) { switch s { case "NaN": if bitSize == 32 { - return pref.ValueOfFloat32(float32(math.NaN())), true + return protoreflect.ValueOfFloat32(float32(math.NaN())), true } - return pref.ValueOfFloat64(math.NaN()), true + return protoreflect.ValueOfFloat64(math.NaN()), true case "Infinity": if bitSize == 32 { - return pref.ValueOfFloat32(float32(math.Inf(+1))), true + return protoreflect.ValueOfFloat32(float32(math.Inf(+1))), true } - return pref.ValueOfFloat64(math.Inf(+1)), true + return protoreflect.ValueOfFloat64(math.Inf(+1)), true case "-Infinity": if bitSize == 32 { - return pref.ValueOfFloat32(float32(math.Inf(-1))), true + return protoreflect.ValueOfFloat32(float32(math.Inf(-1))), true } - return pref.ValueOfFloat64(math.Inf(-1)), true + return protoreflect.ValueOfFloat64(math.Inf(-1)), true } // Decode number from string. if len(s) != len(strings.TrimSpace(s)) { - return pref.Value{}, false + return protoreflect.Value{}, false } dec := json.NewDecoder([]byte(s)) tok, err := dec.Read() if err != nil { - return pref.Value{}, false + return protoreflect.Value{}, false } return getFloat(tok, bitSize) } - return pref.Value{}, false + return protoreflect.Value{}, false } -func getFloat(tok json.Token, bitSize int) (pref.Value, bool) { +func getFloat(tok json.Token, bitSize int) (protoreflect.Value, bool) { n, ok := tok.Float(bitSize) if !ok { - return pref.Value{}, false + return protoreflect.Value{}, false } if bitSize == 32 { - return pref.ValueOfFloat32(float32(n)), true + return protoreflect.ValueOfFloat32(float32(n)), true } - return pref.ValueOfFloat64(n), true + return protoreflect.ValueOfFloat64(n), true } -func unmarshalBytes(tok json.Token) (pref.Value, bool) { +func unmarshalBytes(tok json.Token) (protoreflect.Value, bool) { if tok.Kind() != json.String { - return pref.Value{}, false + return protoreflect.Value{}, false } s := tok.ParsedString() @@ -469,36 +469,36 @@ func unmarshalBytes(tok json.Token) (pref.Value, bool) { } b, err := enc.DecodeString(s) if err != nil { - return pref.Value{}, false + return protoreflect.Value{}, false } - return pref.ValueOfBytes(b), true + return protoreflect.ValueOfBytes(b), true } -func unmarshalEnum(tok json.Token, fd pref.FieldDescriptor) (pref.Value, bool) { +func unmarshalEnum(tok json.Token, fd protoreflect.FieldDescriptor) (protoreflect.Value, bool) { switch tok.Kind() { case json.String: // Lookup EnumNumber based on name. s := tok.ParsedString() - if enumVal := fd.Enum().Values().ByName(pref.Name(s)); enumVal != nil { - return pref.ValueOfEnum(enumVal.Number()), true + if enumVal := fd.Enum().Values().ByName(protoreflect.Name(s)); enumVal != nil { + return protoreflect.ValueOfEnum(enumVal.Number()), true } case json.Number: if n, ok := tok.Int(32); ok { - return pref.ValueOfEnum(pref.EnumNumber(n)), true + return protoreflect.ValueOfEnum(protoreflect.EnumNumber(n)), true } case json.Null: // This is only valid for google.protobuf.NullValue. if isNullValue(fd) { - return pref.ValueOfEnum(0), true + return protoreflect.ValueOfEnum(0), true } } - return pref.Value{}, false + return protoreflect.Value{}, false } -func (d decoder) unmarshalList(list pref.List, fd pref.FieldDescriptor) error { +func (d decoder) unmarshalList(list protoreflect.List, fd protoreflect.FieldDescriptor) error { tok, err := d.Read() if err != nil { return err @@ -508,7 +508,7 @@ func (d decoder) unmarshalList(list pref.List, fd pref.FieldDescriptor) error { } switch fd.Kind() { - case pref.MessageKind, pref.GroupKind: + case protoreflect.MessageKind, protoreflect.GroupKind: for { tok, err := d.Peek() if err != nil { @@ -549,7 +549,7 @@ func (d decoder) unmarshalList(list pref.List, fd pref.FieldDescriptor) error { return nil } -func (d decoder) unmarshalMap(mmap pref.Map, fd pref.FieldDescriptor) error { +func (d decoder) unmarshalMap(mmap protoreflect.Map, fd protoreflect.FieldDescriptor) error { tok, err := d.Read() if err != nil { return err @@ -561,18 +561,18 @@ func (d decoder) unmarshalMap(mmap pref.Map, fd pref.FieldDescriptor) error { // Determine ahead whether map entry is a scalar type or a message type in // order to call the appropriate unmarshalMapValue func inside the for loop // below. - var unmarshalMapValue func() (pref.Value, error) + var unmarshalMapValue func() (protoreflect.Value, error) switch fd.MapValue().Kind() { - case pref.MessageKind, pref.GroupKind: - unmarshalMapValue = func() (pref.Value, error) { + case protoreflect.MessageKind, protoreflect.GroupKind: + unmarshalMapValue = func() (protoreflect.Value, error) { val := mmap.NewValue() if err := d.unmarshalMessage(val.Message(), false); err != nil { - return pref.Value{}, err + return protoreflect.Value{}, err } return val, nil } default: - unmarshalMapValue = func() (pref.Value, error) { + unmarshalMapValue = func() (protoreflect.Value, error) { return d.unmarshalScalar(fd.MapValue()) } } @@ -618,7 +618,7 @@ Loop: // unmarshalMapKey converts given token of Name kind into a protoreflect.MapKey. // A map key type is any integral or string type. -func (d decoder) unmarshalMapKey(tok json.Token, fd pref.FieldDescriptor) (pref.MapKey, error) { +func (d decoder) unmarshalMapKey(tok json.Token, fd protoreflect.FieldDescriptor) (protoreflect.MapKey, error) { const b32 = 32 const b64 = 64 const base10 = 10 @@ -626,40 +626,40 @@ func (d decoder) unmarshalMapKey(tok json.Token, fd pref.FieldDescriptor) (pref. name := tok.Name() kind := fd.Kind() switch kind { - case pref.StringKind: - return pref.ValueOfString(name).MapKey(), nil + case protoreflect.StringKind: + return protoreflect.ValueOfString(name).MapKey(), nil - case pref.BoolKind: + case protoreflect.BoolKind: switch name { case "true": - return pref.ValueOfBool(true).MapKey(), nil + return protoreflect.ValueOfBool(true).MapKey(), nil case "false": - return pref.ValueOfBool(false).MapKey(), nil + return protoreflect.ValueOfBool(false).MapKey(), nil } - case pref.Int32Kind, pref.Sint32Kind, pref.Sfixed32Kind: + case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: if n, err := strconv.ParseInt(name, base10, b32); err == nil { - return pref.ValueOfInt32(int32(n)).MapKey(), nil + return protoreflect.ValueOfInt32(int32(n)).MapKey(), nil } - case pref.Int64Kind, pref.Sint64Kind, pref.Sfixed64Kind: + case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: if n, err := strconv.ParseInt(name, base10, b64); err == nil { - return pref.ValueOfInt64(int64(n)).MapKey(), nil + return protoreflect.ValueOfInt64(int64(n)).MapKey(), nil } - case pref.Uint32Kind, pref.Fixed32Kind: + case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: if n, err := strconv.ParseUint(name, base10, b32); err == nil { - return pref.ValueOfUint32(uint32(n)).MapKey(), nil + return protoreflect.ValueOfUint32(uint32(n)).MapKey(), nil } - case pref.Uint64Kind, pref.Fixed64Kind: + case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: if n, err := strconv.ParseUint(name, base10, b64); err == nil { - return pref.ValueOfUint64(uint64(n)).MapKey(), nil + return protoreflect.ValueOfUint64(uint64(n)).MapKey(), nil } default: panic(fmt.Sprintf("invalid kind for map key: %v", kind)) } - return pref.MapKey{}, d.newError(tok.Pos(), "invalid value for %v key: %s", kind, tok.RawString()) + return protoreflect.MapKey{}, d.newError(tok.Pos(), "invalid value for %v key: %s", kind, tok.RawString()) } diff --git a/vendor/google.golang.org/protobuf/encoding/protojson/doc.go b/vendor/google.golang.org/protobuf/encoding/protojson/doc.go index 00ea2fecfb79c..21d5d2cb18e1e 100644 --- a/vendor/google.golang.org/protobuf/encoding/protojson/doc.go +++ b/vendor/google.golang.org/protobuf/encoding/protojson/doc.go @@ -4,7 +4,7 @@ // Package protojson marshals and unmarshals protocol buffer messages as JSON // format. It follows the guide at -// https://developers.google.com/protocol-buffers/docs/proto3#json. +// https://protobuf.dev/programming-guides/proto3#json. // // This package produces a different output than the standard "encoding/json" // package, which does not operate correctly on protocol buffer messages. diff --git a/vendor/google.golang.org/protobuf/encoding/protojson/encode.go b/vendor/google.golang.org/protobuf/encoding/protojson/encode.go index ba971f07810c6..d09d22e139bce 100644 --- a/vendor/google.golang.org/protobuf/encoding/protojson/encode.go +++ b/vendor/google.golang.org/protobuf/encoding/protojson/encode.go @@ -18,7 +18,6 @@ import ( "google.golang.org/protobuf/internal/pragma" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" - pref "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" ) @@ -164,8 +163,8 @@ type typeURLFieldRanger struct { typeURL string } -func (m typeURLFieldRanger) Range(f func(pref.FieldDescriptor, pref.Value) bool) { - if !f(typeFieldDesc, pref.ValueOfString(m.typeURL)) { +func (m typeURLFieldRanger) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if !f(typeFieldDesc, protoreflect.ValueOfString(m.typeURL)) { return } m.FieldRanger.Range(f) @@ -173,9 +172,9 @@ func (m typeURLFieldRanger) Range(f func(pref.FieldDescriptor, pref.Value) bool) // unpopulatedFieldRanger wraps a protoreflect.Message and modifies its Range // method to additionally iterate over unpopulated fields. -type unpopulatedFieldRanger struct{ pref.Message } +type unpopulatedFieldRanger struct{ protoreflect.Message } -func (m unpopulatedFieldRanger) Range(f func(pref.FieldDescriptor, pref.Value) bool) { +func (m unpopulatedFieldRanger) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { fds := m.Descriptor().Fields() for i := 0; i < fds.Len(); i++ { fd := fds.Get(i) @@ -184,10 +183,10 @@ func (m unpopulatedFieldRanger) Range(f func(pref.FieldDescriptor, pref.Value) b } v := m.Get(fd) - isProto2Scalar := fd.Syntax() == pref.Proto2 && fd.Default().IsValid() - isSingularMessage := fd.Cardinality() != pref.Repeated && fd.Message() != nil + isProto2Scalar := fd.Syntax() == protoreflect.Proto2 && fd.Default().IsValid() + isSingularMessage := fd.Cardinality() != protoreflect.Repeated && fd.Message() != nil if isProto2Scalar || isSingularMessage { - v = pref.Value{} // use invalid value to emit null + v = protoreflect.Value{} // use invalid value to emit null } if !f(fd, v) { return @@ -199,7 +198,7 @@ func (m unpopulatedFieldRanger) Range(f func(pref.FieldDescriptor, pref.Value) b // marshalMessage marshals the fields in the given protoreflect.Message. // If the typeURL is non-empty, then a synthetic "@type" field is injected // containing the URL as the value. -func (e encoder) marshalMessage(m pref.Message, typeURL string) error { +func (e encoder) marshalMessage(m protoreflect.Message, typeURL string) error { if !flags.ProtoLegacy && messageset.IsMessageSet(m.Descriptor()) { return errors.New("no support for proto1 MessageSets") } @@ -220,7 +219,7 @@ func (e encoder) marshalMessage(m pref.Message, typeURL string) error { } var err error - order.RangeFields(fields, order.IndexNameFieldOrder, func(fd pref.FieldDescriptor, v pref.Value) bool { + order.RangeFields(fields, order.IndexNameFieldOrder, func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { name := fd.JSONName() if e.opts.UseProtoNames { name = fd.TextName() @@ -238,7 +237,7 @@ func (e encoder) marshalMessage(m pref.Message, typeURL string) error { } // marshalValue marshals the given protoreflect.Value. -func (e encoder) marshalValue(val pref.Value, fd pref.FieldDescriptor) error { +func (e encoder) marshalValue(val protoreflect.Value, fd protoreflect.FieldDescriptor) error { switch { case fd.IsList(): return e.marshalList(val.List(), fd) @@ -251,44 +250,44 @@ func (e encoder) marshalValue(val pref.Value, fd pref.FieldDescriptor) error { // marshalSingular marshals the given non-repeated field value. This includes // all scalar types, enums, messages, and groups. -func (e encoder) marshalSingular(val pref.Value, fd pref.FieldDescriptor) error { +func (e encoder) marshalSingular(val protoreflect.Value, fd protoreflect.FieldDescriptor) error { if !val.IsValid() { e.WriteNull() return nil } switch kind := fd.Kind(); kind { - case pref.BoolKind: + case protoreflect.BoolKind: e.WriteBool(val.Bool()) - case pref.StringKind: + case protoreflect.StringKind: if e.WriteString(val.String()) != nil { return errors.InvalidUTF8(string(fd.FullName())) } - case pref.Int32Kind, pref.Sint32Kind, pref.Sfixed32Kind: + case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: e.WriteInt(val.Int()) - case pref.Uint32Kind, pref.Fixed32Kind: + case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: e.WriteUint(val.Uint()) - case pref.Int64Kind, pref.Sint64Kind, pref.Uint64Kind, - pref.Sfixed64Kind, pref.Fixed64Kind: + case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Uint64Kind, + protoreflect.Sfixed64Kind, protoreflect.Fixed64Kind: // 64-bit integers are written out as JSON string. e.WriteString(val.String()) - case pref.FloatKind: + case protoreflect.FloatKind: // Encoder.WriteFloat handles the special numbers NaN and infinites. e.WriteFloat(val.Float(), 32) - case pref.DoubleKind: + case protoreflect.DoubleKind: // Encoder.WriteFloat handles the special numbers NaN and infinites. e.WriteFloat(val.Float(), 64) - case pref.BytesKind: + case protoreflect.BytesKind: e.WriteString(base64.StdEncoding.EncodeToString(val.Bytes())) - case pref.EnumKind: + case protoreflect.EnumKind: if fd.Enum().FullName() == genid.NullValue_enum_fullname { e.WriteNull() } else { @@ -300,7 +299,7 @@ func (e encoder) marshalSingular(val pref.Value, fd pref.FieldDescriptor) error } } - case pref.MessageKind, pref.GroupKind: + case protoreflect.MessageKind, protoreflect.GroupKind: if err := e.marshalMessage(val.Message(), ""); err != nil { return err } @@ -312,7 +311,7 @@ func (e encoder) marshalSingular(val pref.Value, fd pref.FieldDescriptor) error } // marshalList marshals the given protoreflect.List. -func (e encoder) marshalList(list pref.List, fd pref.FieldDescriptor) error { +func (e encoder) marshalList(list protoreflect.List, fd protoreflect.FieldDescriptor) error { e.StartArray() defer e.EndArray() @@ -326,12 +325,12 @@ func (e encoder) marshalList(list pref.List, fd pref.FieldDescriptor) error { } // marshalMap marshals given protoreflect.Map. -func (e encoder) marshalMap(mmap pref.Map, fd pref.FieldDescriptor) error { +func (e encoder) marshalMap(mmap protoreflect.Map, fd protoreflect.FieldDescriptor) error { e.StartObject() defer e.EndObject() var err error - order.RangeEntries(mmap, order.GenericKeyOrder, func(k pref.MapKey, v pref.Value) bool { + order.RangeEntries(mmap, order.GenericKeyOrder, func(k protoreflect.MapKey, v protoreflect.Value) bool { if err = e.WriteName(k.String()); err != nil { return false } diff --git a/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go b/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go index 72924a9050cfb..6c37d417449a5 100644 --- a/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go +++ b/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go @@ -17,14 +17,14 @@ import ( "google.golang.org/protobuf/internal/genid" "google.golang.org/protobuf/internal/strs" "google.golang.org/protobuf/proto" - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" ) -type marshalFunc func(encoder, pref.Message) error +type marshalFunc func(encoder, protoreflect.Message) error // wellKnownTypeMarshaler returns a marshal function if the message type // has specialized serialization behavior. It returns nil otherwise. -func wellKnownTypeMarshaler(name pref.FullName) marshalFunc { +func wellKnownTypeMarshaler(name protoreflect.FullName) marshalFunc { if name.Parent() == genid.GoogleProtobuf_package { switch name.Name() { case genid.Any_message_name: @@ -58,11 +58,11 @@ func wellKnownTypeMarshaler(name pref.FullName) marshalFunc { return nil } -type unmarshalFunc func(decoder, pref.Message) error +type unmarshalFunc func(decoder, protoreflect.Message) error // wellKnownTypeUnmarshaler returns a unmarshal function if the message type // has specialized serialization behavior. It returns nil otherwise. -func wellKnownTypeUnmarshaler(name pref.FullName) unmarshalFunc { +func wellKnownTypeUnmarshaler(name protoreflect.FullName) unmarshalFunc { if name.Parent() == genid.GoogleProtobuf_package { switch name.Name() { case genid.Any_message_name: @@ -102,7 +102,7 @@ func wellKnownTypeUnmarshaler(name pref.FullName) unmarshalFunc { // custom JSON representation, that representation will be embedded adding a // field `value` which holds the custom JSON in addition to the `@type` field. -func (e encoder) marshalAny(m pref.Message) error { +func (e encoder) marshalAny(m protoreflect.Message) error { fds := m.Descriptor().Fields() fdType := fds.ByNumber(genid.Any_TypeUrl_field_number) fdValue := fds.ByNumber(genid.Any_Value_field_number) @@ -163,7 +163,7 @@ func (e encoder) marshalAny(m pref.Message) error { return nil } -func (d decoder) unmarshalAny(m pref.Message) error { +func (d decoder) unmarshalAny(m protoreflect.Message) error { // Peek to check for json.ObjectOpen to avoid advancing a read. start, err := d.Peek() if err != nil { @@ -233,8 +233,8 @@ func (d decoder) unmarshalAny(m pref.Message) error { fdType := fds.ByNumber(genid.Any_TypeUrl_field_number) fdValue := fds.ByNumber(genid.Any_Value_field_number) - m.Set(fdType, pref.ValueOfString(typeURL)) - m.Set(fdValue, pref.ValueOfBytes(b)) + m.Set(fdType, protoreflect.ValueOfString(typeURL)) + m.Set(fdValue, protoreflect.ValueOfBytes(b)) return nil } @@ -354,7 +354,7 @@ func (d decoder) skipJSONValue() error { // unmarshalAnyValue unmarshals the given custom-type message from the JSON // object's "value" field. -func (d decoder) unmarshalAnyValue(unmarshal unmarshalFunc, m pref.Message) error { +func (d decoder) unmarshalAnyValue(unmarshal unmarshalFunc, m protoreflect.Message) error { // Skip ObjectOpen, and start reading the fields. d.Read() @@ -402,13 +402,13 @@ func (d decoder) unmarshalAnyValue(unmarshal unmarshalFunc, m pref.Message) erro // Wrapper types are encoded as JSON primitives like string, number or boolean. -func (e encoder) marshalWrapperType(m pref.Message) error { +func (e encoder) marshalWrapperType(m protoreflect.Message) error { fd := m.Descriptor().Fields().ByNumber(genid.WrapperValue_Value_field_number) val := m.Get(fd) return e.marshalSingular(val, fd) } -func (d decoder) unmarshalWrapperType(m pref.Message) error { +func (d decoder) unmarshalWrapperType(m protoreflect.Message) error { fd := m.Descriptor().Fields().ByNumber(genid.WrapperValue_Value_field_number) val, err := d.unmarshalScalar(fd) if err != nil { @@ -420,13 +420,13 @@ func (d decoder) unmarshalWrapperType(m pref.Message) error { // The JSON representation for Empty is an empty JSON object. -func (e encoder) marshalEmpty(pref.Message) error { +func (e encoder) marshalEmpty(protoreflect.Message) error { e.StartObject() e.EndObject() return nil } -func (d decoder) unmarshalEmpty(pref.Message) error { +func (d decoder) unmarshalEmpty(protoreflect.Message) error { tok, err := d.Read() if err != nil { return err @@ -462,12 +462,12 @@ func (d decoder) unmarshalEmpty(pref.Message) error { // The JSON representation for Struct is a JSON object that contains the encoded // Struct.fields map and follows the serialization rules for a map. -func (e encoder) marshalStruct(m pref.Message) error { +func (e encoder) marshalStruct(m protoreflect.Message) error { fd := m.Descriptor().Fields().ByNumber(genid.Struct_Fields_field_number) return e.marshalMap(m.Get(fd).Map(), fd) } -func (d decoder) unmarshalStruct(m pref.Message) error { +func (d decoder) unmarshalStruct(m protoreflect.Message) error { fd := m.Descriptor().Fields().ByNumber(genid.Struct_Fields_field_number) return d.unmarshalMap(m.Mutable(fd).Map(), fd) } @@ -476,12 +476,12 @@ func (d decoder) unmarshalStruct(m pref.Message) error { // ListValue.values repeated field and follows the serialization rules for a // repeated field. -func (e encoder) marshalListValue(m pref.Message) error { +func (e encoder) marshalListValue(m protoreflect.Message) error { fd := m.Descriptor().Fields().ByNumber(genid.ListValue_Values_field_number) return e.marshalList(m.Get(fd).List(), fd) } -func (d decoder) unmarshalListValue(m pref.Message) error { +func (d decoder) unmarshalListValue(m protoreflect.Message) error { fd := m.Descriptor().Fields().ByNumber(genid.ListValue_Values_field_number) return d.unmarshalList(m.Mutable(fd).List(), fd) } @@ -490,7 +490,7 @@ func (d decoder) unmarshalListValue(m pref.Message) error { // set. Each of the field in the oneof has its own custom serialization rule. A // Value message needs to be a oneof field set, else it is an error. -func (e encoder) marshalKnownValue(m pref.Message) error { +func (e encoder) marshalKnownValue(m protoreflect.Message) error { od := m.Descriptor().Oneofs().ByName(genid.Value_Kind_oneof_name) fd := m.WhichOneof(od) if fd == nil { @@ -504,19 +504,19 @@ func (e encoder) marshalKnownValue(m pref.Message) error { return e.marshalSingular(m.Get(fd), fd) } -func (d decoder) unmarshalKnownValue(m pref.Message) error { +func (d decoder) unmarshalKnownValue(m protoreflect.Message) error { tok, err := d.Peek() if err != nil { return err } - var fd pref.FieldDescriptor - var val pref.Value + var fd protoreflect.FieldDescriptor + var val protoreflect.Value switch tok.Kind() { case json.Null: d.Read() fd = m.Descriptor().Fields().ByNumber(genid.Value_NullValue_field_number) - val = pref.ValueOfEnum(0) + val = protoreflect.ValueOfEnum(0) case json.Bool: tok, err := d.Read() @@ -524,7 +524,7 @@ func (d decoder) unmarshalKnownValue(m pref.Message) error { return err } fd = m.Descriptor().Fields().ByNumber(genid.Value_BoolValue_field_number) - val = pref.ValueOfBool(tok.Bool()) + val = protoreflect.ValueOfBool(tok.Bool()) case json.Number: tok, err := d.Read() @@ -550,7 +550,7 @@ func (d decoder) unmarshalKnownValue(m pref.Message) error { return err } fd = m.Descriptor().Fields().ByNumber(genid.Value_StringValue_field_number) - val = pref.ValueOfString(tok.ParsedString()) + val = protoreflect.ValueOfString(tok.ParsedString()) case json.ObjectOpen: fd = m.Descriptor().Fields().ByNumber(genid.Value_StructValue_field_number) @@ -591,7 +591,7 @@ const ( maxSecondsInDuration = 315576000000 ) -func (e encoder) marshalDuration(m pref.Message) error { +func (e encoder) marshalDuration(m protoreflect.Message) error { fds := m.Descriptor().Fields() fdSeconds := fds.ByNumber(genid.Duration_Seconds_field_number) fdNanos := fds.ByNumber(genid.Duration_Nanos_field_number) @@ -623,7 +623,7 @@ func (e encoder) marshalDuration(m pref.Message) error { return nil } -func (d decoder) unmarshalDuration(m pref.Message) error { +func (d decoder) unmarshalDuration(m protoreflect.Message) error { tok, err := d.Read() if err != nil { return err @@ -646,8 +646,8 @@ func (d decoder) unmarshalDuration(m pref.Message) error { fdSeconds := fds.ByNumber(genid.Duration_Seconds_field_number) fdNanos := fds.ByNumber(genid.Duration_Nanos_field_number) - m.Set(fdSeconds, pref.ValueOfInt64(secs)) - m.Set(fdNanos, pref.ValueOfInt32(nanos)) + m.Set(fdSeconds, protoreflect.ValueOfInt64(secs)) + m.Set(fdNanos, protoreflect.ValueOfInt32(nanos)) return nil } @@ -779,7 +779,7 @@ const ( minTimestampSeconds = -62135596800 ) -func (e encoder) marshalTimestamp(m pref.Message) error { +func (e encoder) marshalTimestamp(m protoreflect.Message) error { fds := m.Descriptor().Fields() fdSeconds := fds.ByNumber(genid.Timestamp_Seconds_field_number) fdNanos := fds.ByNumber(genid.Timestamp_Nanos_field_number) @@ -805,7 +805,7 @@ func (e encoder) marshalTimestamp(m pref.Message) error { return nil } -func (d decoder) unmarshalTimestamp(m pref.Message) error { +func (d decoder) unmarshalTimestamp(m protoreflect.Message) error { tok, err := d.Read() if err != nil { return err @@ -814,23 +814,29 @@ func (d decoder) unmarshalTimestamp(m pref.Message) error { return d.unexpectedTokenError(tok) } - t, err := time.Parse(time.RFC3339Nano, tok.ParsedString()) + s := tok.ParsedString() + t, err := time.Parse(time.RFC3339Nano, s) if err != nil { return d.newError(tok.Pos(), "invalid %v value %v", genid.Timestamp_message_fullname, tok.RawString()) } - // Validate seconds. No need to validate nanos because time.Parse would have - // covered that already. + // Validate seconds. secs := t.Unix() if secs < minTimestampSeconds || secs > maxTimestampSeconds { return d.newError(tok.Pos(), "%v value out of range: %v", genid.Timestamp_message_fullname, tok.RawString()) } + // Validate subseconds. + i := strings.LastIndexByte(s, '.') // start of subsecond field + j := strings.LastIndexAny(s, "Z-+") // start of timezone field + if i >= 0 && j >= i && j-i > len(".999999999") { + return d.newError(tok.Pos(), "invalid %v value %v", genid.Timestamp_message_fullname, tok.RawString()) + } fds := m.Descriptor().Fields() fdSeconds := fds.ByNumber(genid.Timestamp_Seconds_field_number) fdNanos := fds.ByNumber(genid.Timestamp_Nanos_field_number) - m.Set(fdSeconds, pref.ValueOfInt64(secs)) - m.Set(fdNanos, pref.ValueOfInt32(int32(t.Nanosecond()))) + m.Set(fdSeconds, protoreflect.ValueOfInt64(secs)) + m.Set(fdNanos, protoreflect.ValueOfInt32(int32(t.Nanosecond()))) return nil } @@ -839,14 +845,14 @@ func (d decoder) unmarshalTimestamp(m pref.Message) error { // lower-camel naming conventions. Encoding should fail if the path name would // end up differently after a round-trip. -func (e encoder) marshalFieldMask(m pref.Message) error { +func (e encoder) marshalFieldMask(m protoreflect.Message) error { fd := m.Descriptor().Fields().ByNumber(genid.FieldMask_Paths_field_number) list := m.Get(fd).List() paths := make([]string, 0, list.Len()) for i := 0; i < list.Len(); i++ { s := list.Get(i).String() - if !pref.FullName(s).IsValid() { + if !protoreflect.FullName(s).IsValid() { return errors.New("%s contains invalid path: %q", genid.FieldMask_Paths_field_fullname, s) } // Return error if conversion to camelCase is not reversible. @@ -861,7 +867,7 @@ func (e encoder) marshalFieldMask(m pref.Message) error { return nil } -func (d decoder) unmarshalFieldMask(m pref.Message) error { +func (d decoder) unmarshalFieldMask(m protoreflect.Message) error { tok, err := d.Read() if err != nil { return err @@ -880,10 +886,10 @@ func (d decoder) unmarshalFieldMask(m pref.Message) error { for _, s0 := range paths { s := strs.JSONSnakeCase(s0) - if strings.Contains(s0, "_") || !pref.FullName(s).IsValid() { + if strings.Contains(s0, "_") || !protoreflect.FullName(s).IsValid() { return d.newError(tok.Pos(), "%v contains invalid path: %q", genid.FieldMask_Paths_field_fullname, s0) } - list.Append(pref.ValueOfString(s)) + list.Append(protoreflect.ValueOfString(s)) } return nil } diff --git a/vendor/google.golang.org/protobuf/encoding/prototext/decode.go b/vendor/google.golang.org/protobuf/encoding/prototext/decode.go index 179d6e8fc1ce0..4921b2d4a76f1 100644 --- a/vendor/google.golang.org/protobuf/encoding/prototext/decode.go +++ b/vendor/google.golang.org/protobuf/encoding/prototext/decode.go @@ -17,7 +17,7 @@ import ( "google.golang.org/protobuf/internal/set" "google.golang.org/protobuf/internal/strs" "google.golang.org/protobuf/proto" - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" ) @@ -103,7 +103,7 @@ func (d decoder) syntaxError(pos int, f string, x ...interface{}) error { } // unmarshalMessage unmarshals into the given protoreflect.Message. -func (d decoder) unmarshalMessage(m pref.Message, checkDelims bool) error { +func (d decoder) unmarshalMessage(m protoreflect.Message, checkDelims bool) error { messageDesc := m.Descriptor() if !flags.ProtoLegacy && messageset.IsMessageSet(messageDesc) { return errors.New("no support for proto1 MessageSets") @@ -150,24 +150,24 @@ func (d decoder) unmarshalMessage(m pref.Message, checkDelims bool) error { } // Resolve the field descriptor. - var name pref.Name - var fd pref.FieldDescriptor - var xt pref.ExtensionType + var name protoreflect.Name + var fd protoreflect.FieldDescriptor + var xt protoreflect.ExtensionType var xtErr error var isFieldNumberName bool switch tok.NameKind() { case text.IdentName: - name = pref.Name(tok.IdentName()) + name = protoreflect.Name(tok.IdentName()) fd = fieldDescs.ByTextName(string(name)) case text.TypeName: // Handle extensions only. This code path is not for Any. - xt, xtErr = d.opts.Resolver.FindExtensionByName(pref.FullName(tok.TypeName())) + xt, xtErr = d.opts.Resolver.FindExtensionByName(protoreflect.FullName(tok.TypeName())) case text.FieldNumber: isFieldNumberName = true - num := pref.FieldNumber(tok.FieldNumber()) + num := protoreflect.FieldNumber(tok.FieldNumber()) if !num.IsValid() { return d.newError(tok.Pos(), "invalid field number: %d", num) } @@ -215,7 +215,7 @@ func (d decoder) unmarshalMessage(m pref.Message, checkDelims bool) error { switch { case fd.IsList(): kind := fd.Kind() - if kind != pref.MessageKind && kind != pref.GroupKind && !tok.HasSeparator() { + if kind != protoreflect.MessageKind && kind != protoreflect.GroupKind && !tok.HasSeparator() { return d.syntaxError(tok.Pos(), "missing field separator :") } @@ -232,7 +232,7 @@ func (d decoder) unmarshalMessage(m pref.Message, checkDelims bool) error { default: kind := fd.Kind() - if kind != pref.MessageKind && kind != pref.GroupKind && !tok.HasSeparator() { + if kind != protoreflect.MessageKind && kind != protoreflect.GroupKind && !tok.HasSeparator() { return d.syntaxError(tok.Pos(), "missing field separator :") } @@ -262,11 +262,11 @@ func (d decoder) unmarshalMessage(m pref.Message, checkDelims bool) error { // unmarshalSingular unmarshals a non-repeated field value specified by the // given FieldDescriptor. -func (d decoder) unmarshalSingular(fd pref.FieldDescriptor, m pref.Message) error { - var val pref.Value +func (d decoder) unmarshalSingular(fd protoreflect.FieldDescriptor, m protoreflect.Message) error { + var val protoreflect.Value var err error switch fd.Kind() { - case pref.MessageKind, pref.GroupKind: + case protoreflect.MessageKind, protoreflect.GroupKind: val = m.NewField(fd) err = d.unmarshalMessage(val.Message(), true) default: @@ -280,94 +280,94 @@ func (d decoder) unmarshalSingular(fd pref.FieldDescriptor, m pref.Message) erro // unmarshalScalar unmarshals a scalar/enum protoreflect.Value specified by the // given FieldDescriptor. -func (d decoder) unmarshalScalar(fd pref.FieldDescriptor) (pref.Value, error) { +func (d decoder) unmarshalScalar(fd protoreflect.FieldDescriptor) (protoreflect.Value, error) { tok, err := d.Read() if err != nil { - return pref.Value{}, err + return protoreflect.Value{}, err } if tok.Kind() != text.Scalar { - return pref.Value{}, d.unexpectedTokenError(tok) + return protoreflect.Value{}, d.unexpectedTokenError(tok) } kind := fd.Kind() switch kind { - case pref.BoolKind: + case protoreflect.BoolKind: if b, ok := tok.Bool(); ok { - return pref.ValueOfBool(b), nil + return protoreflect.ValueOfBool(b), nil } - case pref.Int32Kind, pref.Sint32Kind, pref.Sfixed32Kind: + case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: if n, ok := tok.Int32(); ok { - return pref.ValueOfInt32(n), nil + return protoreflect.ValueOfInt32(n), nil } - case pref.Int64Kind, pref.Sint64Kind, pref.Sfixed64Kind: + case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: if n, ok := tok.Int64(); ok { - return pref.ValueOfInt64(n), nil + return protoreflect.ValueOfInt64(n), nil } - case pref.Uint32Kind, pref.Fixed32Kind: + case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: if n, ok := tok.Uint32(); ok { - return pref.ValueOfUint32(n), nil + return protoreflect.ValueOfUint32(n), nil } - case pref.Uint64Kind, pref.Fixed64Kind: + case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: if n, ok := tok.Uint64(); ok { - return pref.ValueOfUint64(n), nil + return protoreflect.ValueOfUint64(n), nil } - case pref.FloatKind: + case protoreflect.FloatKind: if n, ok := tok.Float32(); ok { - return pref.ValueOfFloat32(n), nil + return protoreflect.ValueOfFloat32(n), nil } - case pref.DoubleKind: + case protoreflect.DoubleKind: if n, ok := tok.Float64(); ok { - return pref.ValueOfFloat64(n), nil + return protoreflect.ValueOfFloat64(n), nil } - case pref.StringKind: + case protoreflect.StringKind: if s, ok := tok.String(); ok { if strs.EnforceUTF8(fd) && !utf8.ValidString(s) { - return pref.Value{}, d.newError(tok.Pos(), "contains invalid UTF-8") + return protoreflect.Value{}, d.newError(tok.Pos(), "contains invalid UTF-8") } - return pref.ValueOfString(s), nil + return protoreflect.ValueOfString(s), nil } - case pref.BytesKind: + case protoreflect.BytesKind: if b, ok := tok.String(); ok { - return pref.ValueOfBytes([]byte(b)), nil + return protoreflect.ValueOfBytes([]byte(b)), nil } - case pref.EnumKind: + case protoreflect.EnumKind: if lit, ok := tok.Enum(); ok { // Lookup EnumNumber based on name. - if enumVal := fd.Enum().Values().ByName(pref.Name(lit)); enumVal != nil { - return pref.ValueOfEnum(enumVal.Number()), nil + if enumVal := fd.Enum().Values().ByName(protoreflect.Name(lit)); enumVal != nil { + return protoreflect.ValueOfEnum(enumVal.Number()), nil } } if num, ok := tok.Int32(); ok { - return pref.ValueOfEnum(pref.EnumNumber(num)), nil + return protoreflect.ValueOfEnum(protoreflect.EnumNumber(num)), nil } default: panic(fmt.Sprintf("invalid scalar kind %v", kind)) } - return pref.Value{}, d.newError(tok.Pos(), "invalid value for %v type: %v", kind, tok.RawString()) + return protoreflect.Value{}, d.newError(tok.Pos(), "invalid value for %v type: %v", kind, tok.RawString()) } // unmarshalList unmarshals into given protoreflect.List. A list value can // either be in [] syntax or simply just a single scalar/message value. -func (d decoder) unmarshalList(fd pref.FieldDescriptor, list pref.List) error { +func (d decoder) unmarshalList(fd protoreflect.FieldDescriptor, list protoreflect.List) error { tok, err := d.Peek() if err != nil { return err } switch fd.Kind() { - case pref.MessageKind, pref.GroupKind: + case protoreflect.MessageKind, protoreflect.GroupKind: switch tok.Kind() { case text.ListOpen: d.Read() @@ -441,22 +441,22 @@ func (d decoder) unmarshalList(fd pref.FieldDescriptor, list pref.List) error { // unmarshalMap unmarshals into given protoreflect.Map. A map value is a // textproto message containing {key: , value: }. -func (d decoder) unmarshalMap(fd pref.FieldDescriptor, mmap pref.Map) error { +func (d decoder) unmarshalMap(fd protoreflect.FieldDescriptor, mmap protoreflect.Map) error { // Determine ahead whether map entry is a scalar type or a message type in // order to call the appropriate unmarshalMapValue func inside // unmarshalMapEntry. - var unmarshalMapValue func() (pref.Value, error) + var unmarshalMapValue func() (protoreflect.Value, error) switch fd.MapValue().Kind() { - case pref.MessageKind, pref.GroupKind: - unmarshalMapValue = func() (pref.Value, error) { + case protoreflect.MessageKind, protoreflect.GroupKind: + unmarshalMapValue = func() (protoreflect.Value, error) { pval := mmap.NewValue() if err := d.unmarshalMessage(pval.Message(), true); err != nil { - return pref.Value{}, err + return protoreflect.Value{}, err } return pval, nil } default: - unmarshalMapValue = func() (pref.Value, error) { + unmarshalMapValue = func() (protoreflect.Value, error) { return d.unmarshalScalar(fd.MapValue()) } } @@ -494,9 +494,9 @@ func (d decoder) unmarshalMap(fd pref.FieldDescriptor, mmap pref.Map) error { // unmarshalMap unmarshals into given protoreflect.Map. A map value is a // textproto message containing {key: , value: }. -func (d decoder) unmarshalMapEntry(fd pref.FieldDescriptor, mmap pref.Map, unmarshalMapValue func() (pref.Value, error)) error { - var key pref.MapKey - var pval pref.Value +func (d decoder) unmarshalMapEntry(fd protoreflect.FieldDescriptor, mmap protoreflect.Map, unmarshalMapValue func() (protoreflect.Value, error)) error { + var key protoreflect.MapKey + var pval protoreflect.Value Loop: for { // Read field name. @@ -520,7 +520,7 @@ Loop: return d.unexpectedTokenError(tok) } - switch name := pref.Name(tok.IdentName()); name { + switch name := protoreflect.Name(tok.IdentName()); name { case genid.MapEntry_Key_field_name: if !tok.HasSeparator() { return d.syntaxError(tok.Pos(), "missing field separator :") @@ -535,7 +535,7 @@ Loop: key = val.MapKey() case genid.MapEntry_Value_field_name: - if kind := fd.MapValue().Kind(); (kind != pref.MessageKind) && (kind != pref.GroupKind) { + if kind := fd.MapValue().Kind(); (kind != protoreflect.MessageKind) && (kind != protoreflect.GroupKind) { if !tok.HasSeparator() { return d.syntaxError(tok.Pos(), "missing field separator :") } @@ -561,7 +561,7 @@ Loop: } if !pval.IsValid() { switch fd.MapValue().Kind() { - case pref.MessageKind, pref.GroupKind: + case protoreflect.MessageKind, protoreflect.GroupKind: // If value field is not set for message/group types, construct an // empty one as default. pval = mmap.NewValue() @@ -575,7 +575,7 @@ Loop: // unmarshalAny unmarshals an Any textproto. It can either be in expanded form // or non-expanded form. -func (d decoder) unmarshalAny(m pref.Message, checkDelims bool) error { +func (d decoder) unmarshalAny(m protoreflect.Message, checkDelims bool) error { var typeURL string var bValue []byte var seenTypeUrl bool @@ -619,7 +619,7 @@ Loop: return d.syntaxError(tok.Pos(), "missing field separator :") } - switch name := pref.Name(tok.IdentName()); name { + switch name := protoreflect.Name(tok.IdentName()); name { case genid.Any_TypeUrl_field_name: if seenTypeUrl { return d.newError(tok.Pos(), "duplicate %v field", genid.Any_TypeUrl_field_fullname) @@ -686,10 +686,10 @@ Loop: fds := m.Descriptor().Fields() if len(typeURL) > 0 { - m.Set(fds.ByNumber(genid.Any_TypeUrl_field_number), pref.ValueOfString(typeURL)) + m.Set(fds.ByNumber(genid.Any_TypeUrl_field_number), protoreflect.ValueOfString(typeURL)) } if len(bValue) > 0 { - m.Set(fds.ByNumber(genid.Any_Value_field_number), pref.ValueOfBytes(bValue)) + m.Set(fds.ByNumber(genid.Any_Value_field_number), protoreflect.ValueOfBytes(bValue)) } return nil } diff --git a/vendor/google.golang.org/protobuf/encoding/prototext/encode.go b/vendor/google.golang.org/protobuf/encoding/prototext/encode.go index 8d5304dc5b320..ebf6c65284ddf 100644 --- a/vendor/google.golang.org/protobuf/encoding/prototext/encode.go +++ b/vendor/google.golang.org/protobuf/encoding/prototext/encode.go @@ -20,7 +20,6 @@ import ( "google.golang.org/protobuf/internal/strs" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" - pref "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" ) @@ -150,7 +149,7 @@ type encoder struct { } // marshalMessage marshals the given protoreflect.Message. -func (e encoder) marshalMessage(m pref.Message, inclDelims bool) error { +func (e encoder) marshalMessage(m protoreflect.Message, inclDelims bool) error { messageDesc := m.Descriptor() if !flags.ProtoLegacy && messageset.IsMessageSet(messageDesc) { return errors.New("no support for proto1 MessageSets") @@ -190,7 +189,7 @@ func (e encoder) marshalMessage(m pref.Message, inclDelims bool) error { } // marshalField marshals the given field with protoreflect.Value. -func (e encoder) marshalField(name string, val pref.Value, fd pref.FieldDescriptor) error { +func (e encoder) marshalField(name string, val protoreflect.Value, fd protoreflect.FieldDescriptor) error { switch { case fd.IsList(): return e.marshalList(name, val.List(), fd) @@ -204,40 +203,40 @@ func (e encoder) marshalField(name string, val pref.Value, fd pref.FieldDescript // marshalSingular marshals the given non-repeated field value. This includes // all scalar types, enums, messages, and groups. -func (e encoder) marshalSingular(val pref.Value, fd pref.FieldDescriptor) error { +func (e encoder) marshalSingular(val protoreflect.Value, fd protoreflect.FieldDescriptor) error { kind := fd.Kind() switch kind { - case pref.BoolKind: + case protoreflect.BoolKind: e.WriteBool(val.Bool()) - case pref.StringKind: + case protoreflect.StringKind: s := val.String() if !e.opts.allowInvalidUTF8 && strs.EnforceUTF8(fd) && !utf8.ValidString(s) { return errors.InvalidUTF8(string(fd.FullName())) } e.WriteString(s) - case pref.Int32Kind, pref.Int64Kind, - pref.Sint32Kind, pref.Sint64Kind, - pref.Sfixed32Kind, pref.Sfixed64Kind: + case protoreflect.Int32Kind, protoreflect.Int64Kind, + protoreflect.Sint32Kind, protoreflect.Sint64Kind, + protoreflect.Sfixed32Kind, protoreflect.Sfixed64Kind: e.WriteInt(val.Int()) - case pref.Uint32Kind, pref.Uint64Kind, - pref.Fixed32Kind, pref.Fixed64Kind: + case protoreflect.Uint32Kind, protoreflect.Uint64Kind, + protoreflect.Fixed32Kind, protoreflect.Fixed64Kind: e.WriteUint(val.Uint()) - case pref.FloatKind: + case protoreflect.FloatKind: // Encoder.WriteFloat handles the special numbers NaN and infinites. e.WriteFloat(val.Float(), 32) - case pref.DoubleKind: + case protoreflect.DoubleKind: // Encoder.WriteFloat handles the special numbers NaN and infinites. e.WriteFloat(val.Float(), 64) - case pref.BytesKind: + case protoreflect.BytesKind: e.WriteString(string(val.Bytes())) - case pref.EnumKind: + case protoreflect.EnumKind: num := val.Enum() if desc := fd.Enum().Values().ByNumber(num); desc != nil { e.WriteLiteral(string(desc.Name())) @@ -246,7 +245,7 @@ func (e encoder) marshalSingular(val pref.Value, fd pref.FieldDescriptor) error e.WriteInt(int64(num)) } - case pref.MessageKind, pref.GroupKind: + case protoreflect.MessageKind, protoreflect.GroupKind: return e.marshalMessage(val.Message(), true) default: @@ -256,7 +255,7 @@ func (e encoder) marshalSingular(val pref.Value, fd pref.FieldDescriptor) error } // marshalList marshals the given protoreflect.List as multiple name-value fields. -func (e encoder) marshalList(name string, list pref.List, fd pref.FieldDescriptor) error { +func (e encoder) marshalList(name string, list protoreflect.List, fd protoreflect.FieldDescriptor) error { size := list.Len() for i := 0; i < size; i++ { e.WriteName(name) @@ -268,9 +267,9 @@ func (e encoder) marshalList(name string, list pref.List, fd pref.FieldDescripto } // marshalMap marshals the given protoreflect.Map as multiple name-value fields. -func (e encoder) marshalMap(name string, mmap pref.Map, fd pref.FieldDescriptor) error { +func (e encoder) marshalMap(name string, mmap protoreflect.Map, fd protoreflect.FieldDescriptor) error { var err error - order.RangeEntries(mmap, order.GenericKeyOrder, func(key pref.MapKey, val pref.Value) bool { + order.RangeEntries(mmap, order.GenericKeyOrder, func(key protoreflect.MapKey, val protoreflect.Value) bool { e.WriteName(name) e.StartMessage() defer e.EndMessage() @@ -334,7 +333,7 @@ func (e encoder) marshalUnknown(b []byte) { // marshalAny marshals the given google.protobuf.Any message in expanded form. // It returns true if it was able to marshal, else false. -func (e encoder) marshalAny(any pref.Message) bool { +func (e encoder) marshalAny(any protoreflect.Message) bool { // Construct the embedded message. fds := any.Descriptor().Fields() fdType := fds.ByNumber(genid.Any_TypeUrl_field_number) diff --git a/vendor/google.golang.org/protobuf/encoding/protowire/wire.go b/vendor/google.golang.org/protobuf/encoding/protowire/wire.go index 9c61112f58d13..f4b4686cf9de0 100644 --- a/vendor/google.golang.org/protobuf/encoding/protowire/wire.go +++ b/vendor/google.golang.org/protobuf/encoding/protowire/wire.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. // Package protowire parses and formats the raw wire encoding. -// See https://developers.google.com/protocol-buffers/docs/encoding. +// See https://protobuf.dev/programming-guides/encoding. // // For marshaling and unmarshaling entire protobuf messages, // use the "google.golang.org/protobuf/proto" package instead. @@ -29,12 +29,8 @@ const ( ) // IsValid reports whether the field number is semantically valid. -// -// Note that while numbers within the reserved range are semantically invalid, -// they are syntactically valid in the wire format. -// Implementations may treat records with reserved field numbers as unknown. func (n Number) IsValid() bool { - return MinValidNumber <= n && n < FirstReservedNumber || LastReservedNumber < n && n <= MaxValidNumber + return MinValidNumber <= n && n <= MaxValidNumber } // Type represents the wire type. @@ -516,6 +512,7 @@ func EncodeTag(num Number, typ Type) uint64 { } // DecodeZigZag decodes a zig-zag-encoded uint64 as an int64. +// // Input: {…, 5, 3, 1, 0, 2, 4, 6, …} // Output: {…, -3, -2, -1, 0, +1, +2, +3, …} func DecodeZigZag(x uint64) int64 { @@ -523,6 +520,7 @@ func DecodeZigZag(x uint64) int64 { } // EncodeZigZag encodes an int64 as a zig-zag-encoded uint64. +// // Input: {…, -3, -2, -1, 0, +1, +2, +3, …} // Output: {…, 5, 3, 1, 0, 2, 4, 6, …} func EncodeZigZag(x int64) uint64 { @@ -530,6 +528,7 @@ func EncodeZigZag(x int64) uint64 { } // DecodeBool decodes a uint64 as a bool. +// // Input: { 0, 1, 2, …} // Output: {false, true, true, …} func DecodeBool(x uint64) bool { @@ -537,6 +536,7 @@ func DecodeBool(x uint64) bool { } // EncodeBool encodes a bool as a uint64. +// // Input: {false, true} // Output: { 0, 1} func EncodeBool(x bool) uint64 { diff --git a/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go b/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go index 360c63329d4dc..db5248e1b512b 100644 --- a/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go +++ b/vendor/google.golang.org/protobuf/internal/descfmt/stringer.go @@ -14,7 +14,7 @@ import ( "google.golang.org/protobuf/internal/detrand" "google.golang.org/protobuf/internal/pragma" - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" ) type list interface { @@ -30,17 +30,17 @@ func formatListOpt(vs list, isRoot, allowMulti bool) string { if isRoot { var name string switch vs.(type) { - case pref.Names: + case protoreflect.Names: name = "Names" - case pref.FieldNumbers: + case protoreflect.FieldNumbers: name = "FieldNumbers" - case pref.FieldRanges: + case protoreflect.FieldRanges: name = "FieldRanges" - case pref.EnumRanges: + case protoreflect.EnumRanges: name = "EnumRanges" - case pref.FileImports: + case protoreflect.FileImports: name = "FileImports" - case pref.Descriptor: + case protoreflect.Descriptor: name = reflect.ValueOf(vs).MethodByName("Get").Type().Out(0).Name() + "s" default: name = reflect.ValueOf(vs).Elem().Type().Name() @@ -50,17 +50,17 @@ func formatListOpt(vs list, isRoot, allowMulti bool) string { var ss []string switch vs := vs.(type) { - case pref.Names: + case protoreflect.Names: for i := 0; i < vs.Len(); i++ { ss = append(ss, fmt.Sprint(vs.Get(i))) } return start + joinStrings(ss, false) + end - case pref.FieldNumbers: + case protoreflect.FieldNumbers: for i := 0; i < vs.Len(); i++ { ss = append(ss, fmt.Sprint(vs.Get(i))) } return start + joinStrings(ss, false) + end - case pref.FieldRanges: + case protoreflect.FieldRanges: for i := 0; i < vs.Len(); i++ { r := vs.Get(i) if r[0]+1 == r[1] { @@ -70,7 +70,7 @@ func formatListOpt(vs list, isRoot, allowMulti bool) string { } } return start + joinStrings(ss, false) + end - case pref.EnumRanges: + case protoreflect.EnumRanges: for i := 0; i < vs.Len(); i++ { r := vs.Get(i) if r[0] == r[1] { @@ -80,7 +80,7 @@ func formatListOpt(vs list, isRoot, allowMulti bool) string { } } return start + joinStrings(ss, false) + end - case pref.FileImports: + case protoreflect.FileImports: for i := 0; i < vs.Len(); i++ { var rs records rs.Append(reflect.ValueOf(vs.Get(i)), "Path", "Package", "IsPublic", "IsWeak") @@ -88,11 +88,11 @@ func formatListOpt(vs list, isRoot, allowMulti bool) string { } return start + joinStrings(ss, allowMulti) + end default: - _, isEnumValue := vs.(pref.EnumValueDescriptors) + _, isEnumValue := vs.(protoreflect.EnumValueDescriptors) for i := 0; i < vs.Len(); i++ { m := reflect.ValueOf(vs).MethodByName("Get") v := m.Call([]reflect.Value{reflect.ValueOf(i)})[0].Interface() - ss = append(ss, formatDescOpt(v.(pref.Descriptor), false, allowMulti && !isEnumValue)) + ss = append(ss, formatDescOpt(v.(protoreflect.Descriptor), false, allowMulti && !isEnumValue)) } return start + joinStrings(ss, allowMulti && isEnumValue) + end } @@ -106,20 +106,20 @@ func formatListOpt(vs list, isRoot, allowMulti bool) string { // // Using a list allows us to print the accessors in a sensible order. var descriptorAccessors = map[reflect.Type][]string{ - reflect.TypeOf((*pref.FileDescriptor)(nil)).Elem(): {"Path", "Package", "Imports", "Messages", "Enums", "Extensions", "Services"}, - reflect.TypeOf((*pref.MessageDescriptor)(nil)).Elem(): {"IsMapEntry", "Fields", "Oneofs", "ReservedNames", "ReservedRanges", "RequiredNumbers", "ExtensionRanges", "Messages", "Enums", "Extensions"}, - reflect.TypeOf((*pref.FieldDescriptor)(nil)).Elem(): {"Number", "Cardinality", "Kind", "HasJSONName", "JSONName", "HasPresence", "IsExtension", "IsPacked", "IsWeak", "IsList", "IsMap", "MapKey", "MapValue", "HasDefault", "Default", "ContainingOneof", "ContainingMessage", "Message", "Enum"}, - reflect.TypeOf((*pref.OneofDescriptor)(nil)).Elem(): {"Fields"}, // not directly used; must keep in sync with formatDescOpt - reflect.TypeOf((*pref.EnumDescriptor)(nil)).Elem(): {"Values", "ReservedNames", "ReservedRanges"}, - reflect.TypeOf((*pref.EnumValueDescriptor)(nil)).Elem(): {"Number"}, - reflect.TypeOf((*pref.ServiceDescriptor)(nil)).Elem(): {"Methods"}, - reflect.TypeOf((*pref.MethodDescriptor)(nil)).Elem(): {"Input", "Output", "IsStreamingClient", "IsStreamingServer"}, + reflect.TypeOf((*protoreflect.FileDescriptor)(nil)).Elem(): {"Path", "Package", "Imports", "Messages", "Enums", "Extensions", "Services"}, + reflect.TypeOf((*protoreflect.MessageDescriptor)(nil)).Elem(): {"IsMapEntry", "Fields", "Oneofs", "ReservedNames", "ReservedRanges", "RequiredNumbers", "ExtensionRanges", "Messages", "Enums", "Extensions"}, + reflect.TypeOf((*protoreflect.FieldDescriptor)(nil)).Elem(): {"Number", "Cardinality", "Kind", "HasJSONName", "JSONName", "HasPresence", "IsExtension", "IsPacked", "IsWeak", "IsList", "IsMap", "MapKey", "MapValue", "HasDefault", "Default", "ContainingOneof", "ContainingMessage", "Message", "Enum"}, + reflect.TypeOf((*protoreflect.OneofDescriptor)(nil)).Elem(): {"Fields"}, // not directly used; must keep in sync with formatDescOpt + reflect.TypeOf((*protoreflect.EnumDescriptor)(nil)).Elem(): {"Values", "ReservedNames", "ReservedRanges"}, + reflect.TypeOf((*protoreflect.EnumValueDescriptor)(nil)).Elem(): {"Number"}, + reflect.TypeOf((*protoreflect.ServiceDescriptor)(nil)).Elem(): {"Methods"}, + reflect.TypeOf((*protoreflect.MethodDescriptor)(nil)).Elem(): {"Input", "Output", "IsStreamingClient", "IsStreamingServer"}, } -func FormatDesc(s fmt.State, r rune, t pref.Descriptor) { +func FormatDesc(s fmt.State, r rune, t protoreflect.Descriptor) { io.WriteString(s, formatDescOpt(t, true, r == 'v' && (s.Flag('+') || s.Flag('#')))) } -func formatDescOpt(t pref.Descriptor, isRoot, allowMulti bool) string { +func formatDescOpt(t protoreflect.Descriptor, isRoot, allowMulti bool) string { rv := reflect.ValueOf(t) rt := rv.MethodByName("ProtoType").Type().In(0) @@ -128,7 +128,7 @@ func formatDescOpt(t pref.Descriptor, isRoot, allowMulti bool) string { start = rt.Name() + "{" } - _, isFile := t.(pref.FileDescriptor) + _, isFile := t.(protoreflect.FileDescriptor) rs := records{allowMulti: allowMulti} if t.IsPlaceholder() { if isFile { @@ -146,7 +146,7 @@ func formatDescOpt(t pref.Descriptor, isRoot, allowMulti bool) string { rs.Append(rv, "Name") } switch t := t.(type) { - case pref.FieldDescriptor: + case protoreflect.FieldDescriptor: for _, s := range descriptorAccessors[rt] { switch s { case "MapKey": @@ -156,9 +156,9 @@ func formatDescOpt(t pref.Descriptor, isRoot, allowMulti bool) string { case "MapValue": if v := t.MapValue(); v != nil { switch v.Kind() { - case pref.EnumKind: + case protoreflect.EnumKind: rs.recs = append(rs.recs, [2]string{"MapValue", string(v.Enum().FullName())}) - case pref.MessageKind, pref.GroupKind: + case protoreflect.MessageKind, protoreflect.GroupKind: rs.recs = append(rs.recs, [2]string{"MapValue", string(v.Message().FullName())}) default: rs.recs = append(rs.recs, [2]string{"MapValue", v.Kind().String()}) @@ -180,7 +180,7 @@ func formatDescOpt(t pref.Descriptor, isRoot, allowMulti bool) string { rs.Append(rv, s) } } - case pref.OneofDescriptor: + case protoreflect.OneofDescriptor: var ss []string fs := t.Fields() for i := 0; i < fs.Len(); i++ { @@ -216,7 +216,7 @@ func (rs *records) Append(v reflect.Value, accessors ...string) { if !rv.IsValid() { panic(fmt.Sprintf("unknown accessor: %v.%s", v.Type(), a)) } - if _, ok := rv.Interface().(pref.Value); ok { + if _, ok := rv.Interface().(protoreflect.Value); ok { rv = rv.MethodByName("Interface").Call(nil)[0] if !rv.IsNil() { rv = rv.Elem() @@ -250,9 +250,9 @@ func (rs *records) Append(v reflect.Value, accessors ...string) { switch v := v.(type) { case list: s = formatListOpt(v, false, rs.allowMulti) - case pref.FieldDescriptor, pref.OneofDescriptor, pref.EnumValueDescriptor, pref.MethodDescriptor: - s = string(v.(pref.Descriptor).Name()) - case pref.Descriptor: + case protoreflect.FieldDescriptor, protoreflect.OneofDescriptor, protoreflect.EnumValueDescriptor, protoreflect.MethodDescriptor: + s = string(v.(protoreflect.Descriptor).Name()) + case protoreflect.Descriptor: s = string(v.FullName()) case string: s = strconv.Quote(v) diff --git a/vendor/google.golang.org/protobuf/internal/encoding/defval/default.go b/vendor/google.golang.org/protobuf/internal/encoding/defval/default.go index fdd9b13f2fcff..328dc733b042d 100644 --- a/vendor/google.golang.org/protobuf/internal/encoding/defval/default.go +++ b/vendor/google.golang.org/protobuf/internal/encoding/defval/default.go @@ -15,8 +15,8 @@ import ( "strconv" ptext "google.golang.org/protobuf/internal/encoding/text" - errors "google.golang.org/protobuf/internal/errors" - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/internal/errors" + "google.golang.org/protobuf/reflect/protoreflect" ) // Format is the serialization format used to represent the default value. @@ -35,56 +35,56 @@ const ( // Unmarshal deserializes the default string s according to the given kind k. // When k is an enum, a list of enum value descriptors must be provided. -func Unmarshal(s string, k pref.Kind, evs pref.EnumValueDescriptors, f Format) (pref.Value, pref.EnumValueDescriptor, error) { +func Unmarshal(s string, k protoreflect.Kind, evs protoreflect.EnumValueDescriptors, f Format) (protoreflect.Value, protoreflect.EnumValueDescriptor, error) { switch k { - case pref.BoolKind: + case protoreflect.BoolKind: if f == GoTag { switch s { case "1": - return pref.ValueOfBool(true), nil, nil + return protoreflect.ValueOfBool(true), nil, nil case "0": - return pref.ValueOfBool(false), nil, nil + return protoreflect.ValueOfBool(false), nil, nil } } else { switch s { case "true": - return pref.ValueOfBool(true), nil, nil + return protoreflect.ValueOfBool(true), nil, nil case "false": - return pref.ValueOfBool(false), nil, nil + return protoreflect.ValueOfBool(false), nil, nil } } - case pref.EnumKind: + case protoreflect.EnumKind: if f == GoTag { // Go tags use the numeric form of the enum value. if n, err := strconv.ParseInt(s, 10, 32); err == nil { - if ev := evs.ByNumber(pref.EnumNumber(n)); ev != nil { - return pref.ValueOfEnum(ev.Number()), ev, nil + if ev := evs.ByNumber(protoreflect.EnumNumber(n)); ev != nil { + return protoreflect.ValueOfEnum(ev.Number()), ev, nil } } } else { // Descriptor default_value use the enum identifier. - ev := evs.ByName(pref.Name(s)) + ev := evs.ByName(protoreflect.Name(s)) if ev != nil { - return pref.ValueOfEnum(ev.Number()), ev, nil + return protoreflect.ValueOfEnum(ev.Number()), ev, nil } } - case pref.Int32Kind, pref.Sint32Kind, pref.Sfixed32Kind: + case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: if v, err := strconv.ParseInt(s, 10, 32); err == nil { - return pref.ValueOfInt32(int32(v)), nil, nil + return protoreflect.ValueOfInt32(int32(v)), nil, nil } - case pref.Int64Kind, pref.Sint64Kind, pref.Sfixed64Kind: + case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: if v, err := strconv.ParseInt(s, 10, 64); err == nil { - return pref.ValueOfInt64(int64(v)), nil, nil + return protoreflect.ValueOfInt64(int64(v)), nil, nil } - case pref.Uint32Kind, pref.Fixed32Kind: + case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: if v, err := strconv.ParseUint(s, 10, 32); err == nil { - return pref.ValueOfUint32(uint32(v)), nil, nil + return protoreflect.ValueOfUint32(uint32(v)), nil, nil } - case pref.Uint64Kind, pref.Fixed64Kind: + case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: if v, err := strconv.ParseUint(s, 10, 64); err == nil { - return pref.ValueOfUint64(uint64(v)), nil, nil + return protoreflect.ValueOfUint64(uint64(v)), nil, nil } - case pref.FloatKind, pref.DoubleKind: + case protoreflect.FloatKind, protoreflect.DoubleKind: var v float64 var err error switch s { @@ -98,29 +98,29 @@ func Unmarshal(s string, k pref.Kind, evs pref.EnumValueDescriptors, f Format) ( v, err = strconv.ParseFloat(s, 64) } if err == nil { - if k == pref.FloatKind { - return pref.ValueOfFloat32(float32(v)), nil, nil + if k == protoreflect.FloatKind { + return protoreflect.ValueOfFloat32(float32(v)), nil, nil } else { - return pref.ValueOfFloat64(float64(v)), nil, nil + return protoreflect.ValueOfFloat64(float64(v)), nil, nil } } - case pref.StringKind: + case protoreflect.StringKind: // String values are already unescaped and can be used as is. - return pref.ValueOfString(s), nil, nil - case pref.BytesKind: + return protoreflect.ValueOfString(s), nil, nil + case protoreflect.BytesKind: if b, ok := unmarshalBytes(s); ok { - return pref.ValueOfBytes(b), nil, nil + return protoreflect.ValueOfBytes(b), nil, nil } } - return pref.Value{}, nil, errors.New("could not parse value for %v: %q", k, s) + return protoreflect.Value{}, nil, errors.New("could not parse value for %v: %q", k, s) } // Marshal serializes v as the default string according to the given kind k. // When specifying the Descriptor format for an enum kind, the associated // enum value descriptor must be provided. -func Marshal(v pref.Value, ev pref.EnumValueDescriptor, k pref.Kind, f Format) (string, error) { +func Marshal(v protoreflect.Value, ev protoreflect.EnumValueDescriptor, k protoreflect.Kind, f Format) (string, error) { switch k { - case pref.BoolKind: + case protoreflect.BoolKind: if f == GoTag { if v.Bool() { return "1", nil @@ -134,17 +134,17 @@ func Marshal(v pref.Value, ev pref.EnumValueDescriptor, k pref.Kind, f Format) ( return "false", nil } } - case pref.EnumKind: + case protoreflect.EnumKind: if f == GoTag { return strconv.FormatInt(int64(v.Enum()), 10), nil } else { return string(ev.Name()), nil } - case pref.Int32Kind, pref.Sint32Kind, pref.Sfixed32Kind, pref.Int64Kind, pref.Sint64Kind, pref.Sfixed64Kind: + case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind, protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: return strconv.FormatInt(v.Int(), 10), nil - case pref.Uint32Kind, pref.Fixed32Kind, pref.Uint64Kind, pref.Fixed64Kind: + case protoreflect.Uint32Kind, protoreflect.Fixed32Kind, protoreflect.Uint64Kind, protoreflect.Fixed64Kind: return strconv.FormatUint(v.Uint(), 10), nil - case pref.FloatKind, pref.DoubleKind: + case protoreflect.FloatKind, protoreflect.DoubleKind: f := v.Float() switch { case math.IsInf(f, -1): @@ -154,16 +154,16 @@ func Marshal(v pref.Value, ev pref.EnumValueDescriptor, k pref.Kind, f Format) ( case math.IsNaN(f): return "nan", nil default: - if k == pref.FloatKind { + if k == protoreflect.FloatKind { return strconv.FormatFloat(f, 'g', -1, 32), nil } else { return strconv.FormatFloat(f, 'g', -1, 64), nil } } - case pref.StringKind: + case protoreflect.StringKind: // String values are serialized as is without any escaping. return v.String(), nil - case pref.BytesKind: + case protoreflect.BytesKind: if s, ok := marshalBytes(v.Bytes()); ok { return s, nil } diff --git a/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go b/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go index b13fd29e81e6d..d043a6ebe0b9a 100644 --- a/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go +++ b/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go @@ -294,7 +294,7 @@ func (d *Decoder) isValueNext() bool { } // consumeToken constructs a Token for given Kind with raw value derived from -// current d.in and given size, and consumes the given size-lenght of it. +// current d.in and given size, and consumes the given size-length of it. func (d *Decoder) consumeToken(kind Kind, size int) Token { tok := Token{ kind: kind, diff --git a/vendor/google.golang.org/protobuf/internal/encoding/messageset/messageset.go b/vendor/google.golang.org/protobuf/internal/encoding/messageset/messageset.go index c1866f3c1a78c..a6693f0a2f39c 100644 --- a/vendor/google.golang.org/protobuf/internal/encoding/messageset/messageset.go +++ b/vendor/google.golang.org/protobuf/internal/encoding/messageset/messageset.go @@ -10,7 +10,7 @@ import ( "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/internal/errors" - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" ) // The MessageSet wire format is equivalent to a message defined as follows, @@ -33,6 +33,7 @@ const ( // ExtensionName is the field name for extensions of MessageSet. // // A valid MessageSet extension must be of the form: +// // message MyMessage { // extend proto2.bridge.MessageSet { // optional MyMessage message_set_extension = 1234; @@ -42,13 +43,13 @@ const ( const ExtensionName = "message_set_extension" // IsMessageSet returns whether the message uses the MessageSet wire format. -func IsMessageSet(md pref.MessageDescriptor) bool { +func IsMessageSet(md protoreflect.MessageDescriptor) bool { xmd, ok := md.(interface{ IsMessageSet() bool }) return ok && xmd.IsMessageSet() } // IsMessageSetExtension reports this field properly extends a MessageSet. -func IsMessageSetExtension(fd pref.FieldDescriptor) bool { +func IsMessageSetExtension(fd protoreflect.FieldDescriptor) bool { switch { case fd.Name() != ExtensionName: return false diff --git a/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go b/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go index 38f1931c6fd1a..373d208374f80 100644 --- a/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go +++ b/vendor/google.golang.org/protobuf/internal/encoding/tag/tag.go @@ -11,10 +11,10 @@ import ( "strconv" "strings" - defval "google.golang.org/protobuf/internal/encoding/defval" - fdesc "google.golang.org/protobuf/internal/filedesc" + "google.golang.org/protobuf/internal/encoding/defval" + "google.golang.org/protobuf/internal/filedesc" "google.golang.org/protobuf/internal/strs" - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" ) var byteType = reflect.TypeOf(byte(0)) @@ -29,9 +29,9 @@ var byteType = reflect.TypeOf(byte(0)) // This does not populate the Enum or Message (except for weak message). // // This function is a best effort attempt; parsing errors are ignored. -func Unmarshal(tag string, goType reflect.Type, evs pref.EnumValueDescriptors) pref.FieldDescriptor { - f := new(fdesc.Field) - f.L0.ParentFile = fdesc.SurrogateProto2 +func Unmarshal(tag string, goType reflect.Type, evs protoreflect.EnumValueDescriptors) protoreflect.FieldDescriptor { + f := new(filedesc.Field) + f.L0.ParentFile = filedesc.SurrogateProto2 for len(tag) > 0 { i := strings.IndexByte(tag, ',') if i < 0 { @@ -39,68 +39,68 @@ func Unmarshal(tag string, goType reflect.Type, evs pref.EnumValueDescriptors) p } switch s := tag[:i]; { case strings.HasPrefix(s, "name="): - f.L0.FullName = pref.FullName(s[len("name="):]) + f.L0.FullName = protoreflect.FullName(s[len("name="):]) case strings.Trim(s, "0123456789") == "": n, _ := strconv.ParseUint(s, 10, 32) - f.L1.Number = pref.FieldNumber(n) + f.L1.Number = protoreflect.FieldNumber(n) case s == "opt": - f.L1.Cardinality = pref.Optional + f.L1.Cardinality = protoreflect.Optional case s == "req": - f.L1.Cardinality = pref.Required + f.L1.Cardinality = protoreflect.Required case s == "rep": - f.L1.Cardinality = pref.Repeated + f.L1.Cardinality = protoreflect.Repeated case s == "varint": switch goType.Kind() { case reflect.Bool: - f.L1.Kind = pref.BoolKind + f.L1.Kind = protoreflect.BoolKind case reflect.Int32: - f.L1.Kind = pref.Int32Kind + f.L1.Kind = protoreflect.Int32Kind case reflect.Int64: - f.L1.Kind = pref.Int64Kind + f.L1.Kind = protoreflect.Int64Kind case reflect.Uint32: - f.L1.Kind = pref.Uint32Kind + f.L1.Kind = protoreflect.Uint32Kind case reflect.Uint64: - f.L1.Kind = pref.Uint64Kind + f.L1.Kind = protoreflect.Uint64Kind } case s == "zigzag32": if goType.Kind() == reflect.Int32 { - f.L1.Kind = pref.Sint32Kind + f.L1.Kind = protoreflect.Sint32Kind } case s == "zigzag64": if goType.Kind() == reflect.Int64 { - f.L1.Kind = pref.Sint64Kind + f.L1.Kind = protoreflect.Sint64Kind } case s == "fixed32": switch goType.Kind() { case reflect.Int32: - f.L1.Kind = pref.Sfixed32Kind + f.L1.Kind = protoreflect.Sfixed32Kind case reflect.Uint32: - f.L1.Kind = pref.Fixed32Kind + f.L1.Kind = protoreflect.Fixed32Kind case reflect.Float32: - f.L1.Kind = pref.FloatKind + f.L1.Kind = protoreflect.FloatKind } case s == "fixed64": switch goType.Kind() { case reflect.Int64: - f.L1.Kind = pref.Sfixed64Kind + f.L1.Kind = protoreflect.Sfixed64Kind case reflect.Uint64: - f.L1.Kind = pref.Fixed64Kind + f.L1.Kind = protoreflect.Fixed64Kind case reflect.Float64: - f.L1.Kind = pref.DoubleKind + f.L1.Kind = protoreflect.DoubleKind } case s == "bytes": switch { case goType.Kind() == reflect.String: - f.L1.Kind = pref.StringKind + f.L1.Kind = protoreflect.StringKind case goType.Kind() == reflect.Slice && goType.Elem() == byteType: - f.L1.Kind = pref.BytesKind + f.L1.Kind = protoreflect.BytesKind default: - f.L1.Kind = pref.MessageKind + f.L1.Kind = protoreflect.MessageKind } case s == "group": - f.L1.Kind = pref.GroupKind + f.L1.Kind = protoreflect.GroupKind case strings.HasPrefix(s, "enum="): - f.L1.Kind = pref.EnumKind + f.L1.Kind = protoreflect.EnumKind case strings.HasPrefix(s, "json="): jsonName := s[len("json="):] if jsonName != strs.JSONCamelCase(string(f.L0.FullName.Name())) { @@ -111,23 +111,23 @@ func Unmarshal(tag string, goType reflect.Type, evs pref.EnumValueDescriptors) p f.L1.IsPacked = true case strings.HasPrefix(s, "weak="): f.L1.IsWeak = true - f.L1.Message = fdesc.PlaceholderMessage(pref.FullName(s[len("weak="):])) + f.L1.Message = filedesc.PlaceholderMessage(protoreflect.FullName(s[len("weak="):])) case strings.HasPrefix(s, "def="): // The default tag is special in that everything afterwards is the // default regardless of the presence of commas. s, i = tag[len("def="):], len(tag) v, ev, _ := defval.Unmarshal(s, f.L1.Kind, evs, defval.GoTag) - f.L1.Default = fdesc.DefaultValue(v, ev) + f.L1.Default = filedesc.DefaultValue(v, ev) case s == "proto3": - f.L0.ParentFile = fdesc.SurrogateProto3 + f.L0.ParentFile = filedesc.SurrogateProto3 } tag = strings.TrimPrefix(tag[i:], ",") } // The generator uses the group message name instead of the field name. // We obtain the real field name by lowercasing the group name. - if f.L1.Kind == pref.GroupKind { - f.L0.FullName = pref.FullName(strings.ToLower(string(f.L0.FullName))) + if f.L1.Kind == protoreflect.GroupKind { + f.L0.FullName = protoreflect.FullName(strings.ToLower(string(f.L0.FullName))) } return f } @@ -140,38 +140,38 @@ func Unmarshal(tag string, goType reflect.Type, evs pref.EnumValueDescriptors) p // Depending on the context on how Marshal is called, there are different ways // through which that information is determined. As such it is the caller's // responsibility to provide a function to obtain that information. -func Marshal(fd pref.FieldDescriptor, enumName string) string { +func Marshal(fd protoreflect.FieldDescriptor, enumName string) string { var tag []string switch fd.Kind() { - case pref.BoolKind, pref.EnumKind, pref.Int32Kind, pref.Uint32Kind, pref.Int64Kind, pref.Uint64Kind: + case protoreflect.BoolKind, protoreflect.EnumKind, protoreflect.Int32Kind, protoreflect.Uint32Kind, protoreflect.Int64Kind, protoreflect.Uint64Kind: tag = append(tag, "varint") - case pref.Sint32Kind: + case protoreflect.Sint32Kind: tag = append(tag, "zigzag32") - case pref.Sint64Kind: + case protoreflect.Sint64Kind: tag = append(tag, "zigzag64") - case pref.Sfixed32Kind, pref.Fixed32Kind, pref.FloatKind: + case protoreflect.Sfixed32Kind, protoreflect.Fixed32Kind, protoreflect.FloatKind: tag = append(tag, "fixed32") - case pref.Sfixed64Kind, pref.Fixed64Kind, pref.DoubleKind: + case protoreflect.Sfixed64Kind, protoreflect.Fixed64Kind, protoreflect.DoubleKind: tag = append(tag, "fixed64") - case pref.StringKind, pref.BytesKind, pref.MessageKind: + case protoreflect.StringKind, protoreflect.BytesKind, protoreflect.MessageKind: tag = append(tag, "bytes") - case pref.GroupKind: + case protoreflect.GroupKind: tag = append(tag, "group") } tag = append(tag, strconv.Itoa(int(fd.Number()))) switch fd.Cardinality() { - case pref.Optional: + case protoreflect.Optional: tag = append(tag, "opt") - case pref.Required: + case protoreflect.Required: tag = append(tag, "req") - case pref.Repeated: + case protoreflect.Repeated: tag = append(tag, "rep") } if fd.IsPacked() { tag = append(tag, "packed") } name := string(fd.Name()) - if fd.Kind() == pref.GroupKind { + if fd.Kind() == protoreflect.GroupKind { // The name of the FieldDescriptor for a group field is // lowercased. To find the original capitalization, we // look in the field's MessageType. @@ -189,10 +189,10 @@ func Marshal(fd pref.FieldDescriptor, enumName string) string { // The previous implementation does not tag extension fields as proto3, // even when the field is defined in a proto3 file. Match that behavior // for consistency. - if fd.Syntax() == pref.Proto3 && !fd.IsExtension() { + if fd.Syntax() == protoreflect.Proto3 && !fd.IsExtension() { tag = append(tag, "proto3") } - if fd.Kind() == pref.EnumKind && enumName != "" { + if fd.Kind() == protoreflect.EnumKind && enumName != "" { tag = append(tag, "enum="+enumName) } if fd.ContainingOneof() != nil { diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go b/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go index 37803773fa390..87853e786d0d2 100644 --- a/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go +++ b/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go @@ -8,7 +8,6 @@ import ( "bytes" "fmt" "io" - "regexp" "strconv" "unicode/utf8" @@ -413,15 +412,16 @@ func (d *Decoder) parseFieldName() (tok Token, err error) { // Field number. Identify if input is a valid number that is not negative // and is decimal integer within 32-bit range. if num := parseNumber(d.in); num.size > 0 { + str := num.string(d.in) if !num.neg && num.kind == numDec { - if _, err := strconv.ParseInt(string(d.in[:num.size]), 10, 32); err == nil { + if _, err := strconv.ParseInt(str, 10, 32); err == nil { return d.consumeToken(Name, num.size, uint8(FieldNumber)), nil } } - return Token{}, d.newSyntaxError("invalid field number: %s", d.in[:num.size]) + return Token{}, d.newSyntaxError("invalid field number: %s", str) } - return Token{}, d.newSyntaxError("invalid field name: %s", errRegexp.Find(d.in)) + return Token{}, d.newSyntaxError("invalid field name: %s", errId(d.in)) } // parseTypeName parses Any type URL or extension field name. The name is @@ -571,7 +571,7 @@ func (d *Decoder) parseScalar() (Token, error) { return tok, nil } - return Token{}, d.newSyntaxError("invalid scalar value: %s", errRegexp.Find(d.in)) + return Token{}, d.newSyntaxError("invalid scalar value: %s", errId(d.in)) } // parseLiteralValue parses a literal value. A literal value is used for @@ -653,8 +653,29 @@ func consume(b []byte, n int) []byte { return b } -// Any sequence that looks like a non-delimiter (for error reporting). -var errRegexp = regexp.MustCompile(`^([-+._a-zA-Z0-9\/]+|.)`) +// errId extracts a byte sequence that looks like an invalid ID +// (for the purposes of error reporting). +func errId(seq []byte) []byte { + const maxLen = 32 + for i := 0; i < len(seq); { + if i > maxLen { + return append(seq[:i:i], "…"...) + } + r, size := utf8.DecodeRune(seq[i:]) + if r > utf8.RuneSelf || (r != '/' && isDelim(byte(r))) { + if i == 0 { + // Either the first byte is invalid UTF-8 or a + // delimiter, or the first rune is non-ASCII. + // Return it as-is. + i = size + } + return seq[:i:i] + } + i += size + } + // No delimiter found. + return seq +} // isDelim returns true if given byte is a delimiter character. func isDelim(c byte) bool { diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/decode_number.go b/vendor/google.golang.org/protobuf/internal/encoding/text/decode_number.go index f2d90b78999f3..45c81f0298e22 100644 --- a/vendor/google.golang.org/protobuf/internal/encoding/text/decode_number.go +++ b/vendor/google.golang.org/protobuf/internal/encoding/text/decode_number.go @@ -15,17 +15,12 @@ func (d *Decoder) parseNumberValue() (Token, bool) { if num.neg { numAttrs |= isNegative } - strSize := num.size - last := num.size - 1 - if num.kind == numFloat && (d.in[last] == 'f' || d.in[last] == 'F') { - strSize = last - } tok := Token{ kind: Scalar, attrs: numberValue, pos: len(d.orig) - len(d.in), raw: d.in[:num.size], - str: string(d.in[:strSize]), + str: num.string(d.in), numAttrs: numAttrs, } d.consume(num.size) @@ -46,12 +41,35 @@ type number struct { kind uint8 neg bool size int + // if neg, this is the length of whitespace and comments between + // the minus sign and the rest fo the number literal + sep int +} + +func (num number) string(data []byte) string { + strSize := num.size + last := num.size - 1 + if num.kind == numFloat && (data[last] == 'f' || data[last] == 'F') { + strSize = last + } + if num.neg && num.sep > 0 { + // strip whitespace/comments between negative sign and the rest + strLen := strSize - num.sep + str := make([]byte, strLen) + str[0] = data[0] + copy(str[1:], data[num.sep+1:strSize]) + return string(str) + } + return string(data[:strSize]) + } // parseNumber constructs a number object from given input. It allows for the // following patterns: -// integer: ^-?([1-9][0-9]*|0[xX][0-9a-fA-F]+|0[0-7]*) -// float: ^-?((0|[1-9][0-9]*)?([.][0-9]*)?([eE][+-]?[0-9]+)?[fF]?) +// +// integer: ^-?([1-9][0-9]*|0[xX][0-9a-fA-F]+|0[0-7]*) +// float: ^-?((0|[1-9][0-9]*)?([.][0-9]*)?([eE][+-]?[0-9]+)?[fF]?) +// // It also returns the number of parsed bytes for the given number, 0 if it is // not a number. func parseNumber(input []byte) number { @@ -65,19 +83,22 @@ func parseNumber(input []byte) number { } // Optional - + var sep int if s[0] == '-' { neg = true s = s[1:] size++ + // Consume any whitespace or comments between the + // negative sign and the rest of the number + lenBefore := len(s) + s = consume(s, 0) + sep = lenBefore - len(s) + size += sep if len(s) == 0 { return number{} } } - // C++ allows for whitespace and comments in between the negative sign and - // the rest of the number. This logic currently does not but is consistent - // with v1. - switch { case s[0] == '0': if len(s) > 1 { @@ -114,7 +135,7 @@ func parseNumber(input []byte) number { if len(s) > 0 && !isDelim(s[0]) { return number{} } - return number{kind: kind, neg: neg, size: size} + return number{kind: kind, neg: neg, size: size, sep: sep} } } s = s[1:] @@ -186,5 +207,5 @@ func parseNumber(input []byte) number { return number{} } - return number{kind: kind, neg: neg, size: size} + return number{kind: kind, neg: neg, size: size, sep: sep} } diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/doc.go b/vendor/google.golang.org/protobuf/internal/encoding/text/doc.go index 0ce8d6fb83d9e..7ae6c2a3c26d3 100644 --- a/vendor/google.golang.org/protobuf/internal/encoding/text/doc.go +++ b/vendor/google.golang.org/protobuf/internal/encoding/text/doc.go @@ -24,6 +24,6 @@ // the Go implementation should as well. // // The text format is almost a superset of JSON except: -// * message keys are not quoted strings, but identifiers -// * the top-level value must be a message without the delimiters +// - message keys are not quoted strings, but identifiers +// - the top-level value must be a message without the delimiters package text diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/build.go b/vendor/google.golang.org/protobuf/internal/filedesc/build.go index b293b6947361d..7cac1c19016f9 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/build.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/build.go @@ -12,8 +12,7 @@ import ( "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/internal/genid" "google.golang.org/protobuf/reflect/protoreflect" - pref "google.golang.org/protobuf/reflect/protoreflect" - preg "google.golang.org/protobuf/reflect/protoregistry" + "google.golang.org/protobuf/reflect/protoregistry" ) // Builder construct a protoreflect.FileDescriptor from the raw descriptor. @@ -38,7 +37,7 @@ type Builder struct { // TypeResolver resolves extension field types for descriptor options. // If nil, it uses protoregistry.GlobalTypes. TypeResolver interface { - preg.ExtensionTypeResolver + protoregistry.ExtensionTypeResolver } // FileRegistry is use to lookup file, enum, and message dependencies. @@ -46,8 +45,8 @@ type Builder struct { // If nil, it uses protoregistry.GlobalFiles. FileRegistry interface { FindFileByPath(string) (protoreflect.FileDescriptor, error) - FindDescriptorByName(pref.FullName) (pref.Descriptor, error) - RegisterFile(pref.FileDescriptor) error + FindDescriptorByName(protoreflect.FullName) (protoreflect.Descriptor, error) + RegisterFile(protoreflect.FileDescriptor) error } } @@ -55,8 +54,8 @@ type Builder struct { // If so, it permits looking up an enum or message dependency based on the // sub-list and element index into filetype.Builder.DependencyIndexes. type resolverByIndex interface { - FindEnumByIndex(int32, int32, []Enum, []Message) pref.EnumDescriptor - FindMessageByIndex(int32, int32, []Enum, []Message) pref.MessageDescriptor + FindEnumByIndex(int32, int32, []Enum, []Message) protoreflect.EnumDescriptor + FindMessageByIndex(int32, int32, []Enum, []Message) protoreflect.MessageDescriptor } // Indexes of each sub-list in filetype.Builder.DependencyIndexes. @@ -70,7 +69,7 @@ const ( // Out is the output of the Builder. type Out struct { - File pref.FileDescriptor + File protoreflect.FileDescriptor // Enums is all enum descriptors in "flattened ordering". Enums []Enum @@ -97,10 +96,10 @@ func (db Builder) Build() (out Out) { // Initialize resolvers and registries if unpopulated. if db.TypeResolver == nil { - db.TypeResolver = preg.GlobalTypes + db.TypeResolver = protoregistry.GlobalTypes } if db.FileRegistry == nil { - db.FileRegistry = preg.GlobalFiles + db.FileRegistry = protoregistry.GlobalFiles } fd := newRawFile(db) diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go index 98ab142aeee67..7c3689baee8a5 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go @@ -17,7 +17,7 @@ import ( "google.golang.org/protobuf/internal/genid" "google.golang.org/protobuf/internal/pragma" "google.golang.org/protobuf/internal/strs" - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" ) @@ -43,9 +43,9 @@ type ( L2 *FileL2 } FileL1 struct { - Syntax pref.Syntax + Syntax protoreflect.Syntax Path string - Package pref.FullName + Package protoreflect.FullName Enums Enums Messages Messages @@ -53,36 +53,36 @@ type ( Services Services } FileL2 struct { - Options func() pref.ProtoMessage + Options func() protoreflect.ProtoMessage Imports FileImports Locations SourceLocations } ) -func (fd *File) ParentFile() pref.FileDescriptor { return fd } -func (fd *File) Parent() pref.Descriptor { return nil } -func (fd *File) Index() int { return 0 } -func (fd *File) Syntax() pref.Syntax { return fd.L1.Syntax } -func (fd *File) Name() pref.Name { return fd.L1.Package.Name() } -func (fd *File) FullName() pref.FullName { return fd.L1.Package } -func (fd *File) IsPlaceholder() bool { return false } -func (fd *File) Options() pref.ProtoMessage { +func (fd *File) ParentFile() protoreflect.FileDescriptor { return fd } +func (fd *File) Parent() protoreflect.Descriptor { return nil } +func (fd *File) Index() int { return 0 } +func (fd *File) Syntax() protoreflect.Syntax { return fd.L1.Syntax } +func (fd *File) Name() protoreflect.Name { return fd.L1.Package.Name() } +func (fd *File) FullName() protoreflect.FullName { return fd.L1.Package } +func (fd *File) IsPlaceholder() bool { return false } +func (fd *File) Options() protoreflect.ProtoMessage { if f := fd.lazyInit().Options; f != nil { return f() } return descopts.File } -func (fd *File) Path() string { return fd.L1.Path } -func (fd *File) Package() pref.FullName { return fd.L1.Package } -func (fd *File) Imports() pref.FileImports { return &fd.lazyInit().Imports } -func (fd *File) Enums() pref.EnumDescriptors { return &fd.L1.Enums } -func (fd *File) Messages() pref.MessageDescriptors { return &fd.L1.Messages } -func (fd *File) Extensions() pref.ExtensionDescriptors { return &fd.L1.Extensions } -func (fd *File) Services() pref.ServiceDescriptors { return &fd.L1.Services } -func (fd *File) SourceLocations() pref.SourceLocations { return &fd.lazyInit().Locations } -func (fd *File) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, fd) } -func (fd *File) ProtoType(pref.FileDescriptor) {} -func (fd *File) ProtoInternal(pragma.DoNotImplement) {} +func (fd *File) Path() string { return fd.L1.Path } +func (fd *File) Package() protoreflect.FullName { return fd.L1.Package } +func (fd *File) Imports() protoreflect.FileImports { return &fd.lazyInit().Imports } +func (fd *File) Enums() protoreflect.EnumDescriptors { return &fd.L1.Enums } +func (fd *File) Messages() protoreflect.MessageDescriptors { return &fd.L1.Messages } +func (fd *File) Extensions() protoreflect.ExtensionDescriptors { return &fd.L1.Extensions } +func (fd *File) Services() protoreflect.ServiceDescriptors { return &fd.L1.Services } +func (fd *File) SourceLocations() protoreflect.SourceLocations { return &fd.lazyInit().Locations } +func (fd *File) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, fd) } +func (fd *File) ProtoType(protoreflect.FileDescriptor) {} +func (fd *File) ProtoInternal(pragma.DoNotImplement) {} func (fd *File) lazyInit() *FileL2 { if atomic.LoadUint32(&fd.once) == 0 { @@ -119,7 +119,7 @@ type ( eagerValues bool // controls whether EnumL2.Values is already populated } EnumL2 struct { - Options func() pref.ProtoMessage + Options func() protoreflect.ProtoMessage Values EnumValues ReservedNames Names ReservedRanges EnumRanges @@ -130,41 +130,41 @@ type ( L1 EnumValueL1 } EnumValueL1 struct { - Options func() pref.ProtoMessage - Number pref.EnumNumber + Options func() protoreflect.ProtoMessage + Number protoreflect.EnumNumber } ) -func (ed *Enum) Options() pref.ProtoMessage { +func (ed *Enum) Options() protoreflect.ProtoMessage { if f := ed.lazyInit().Options; f != nil { return f() } return descopts.Enum } -func (ed *Enum) Values() pref.EnumValueDescriptors { +func (ed *Enum) Values() protoreflect.EnumValueDescriptors { if ed.L1.eagerValues { return &ed.L2.Values } return &ed.lazyInit().Values } -func (ed *Enum) ReservedNames() pref.Names { return &ed.lazyInit().ReservedNames } -func (ed *Enum) ReservedRanges() pref.EnumRanges { return &ed.lazyInit().ReservedRanges } -func (ed *Enum) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, ed) } -func (ed *Enum) ProtoType(pref.EnumDescriptor) {} +func (ed *Enum) ReservedNames() protoreflect.Names { return &ed.lazyInit().ReservedNames } +func (ed *Enum) ReservedRanges() protoreflect.EnumRanges { return &ed.lazyInit().ReservedRanges } +func (ed *Enum) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, ed) } +func (ed *Enum) ProtoType(protoreflect.EnumDescriptor) {} func (ed *Enum) lazyInit() *EnumL2 { ed.L0.ParentFile.lazyInit() // implicitly initializes L2 return ed.L2 } -func (ed *EnumValue) Options() pref.ProtoMessage { +func (ed *EnumValue) Options() protoreflect.ProtoMessage { if f := ed.L1.Options; f != nil { return f() } return descopts.EnumValue } -func (ed *EnumValue) Number() pref.EnumNumber { return ed.L1.Number } -func (ed *EnumValue) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, ed) } -func (ed *EnumValue) ProtoType(pref.EnumValueDescriptor) {} +func (ed *EnumValue) Number() protoreflect.EnumNumber { return ed.L1.Number } +func (ed *EnumValue) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, ed) } +func (ed *EnumValue) ProtoType(protoreflect.EnumValueDescriptor) {} type ( Message struct { @@ -180,14 +180,14 @@ type ( IsMessageSet bool // promoted from google.protobuf.MessageOptions } MessageL2 struct { - Options func() pref.ProtoMessage + Options func() protoreflect.ProtoMessage Fields Fields Oneofs Oneofs ReservedNames Names ReservedRanges FieldRanges RequiredNumbers FieldNumbers // must be consistent with Fields.Cardinality ExtensionRanges FieldRanges - ExtensionRangeOptions []func() pref.ProtoMessage // must be same length as ExtensionRanges + ExtensionRangeOptions []func() protoreflect.ProtoMessage // must be same length as ExtensionRanges } Field struct { @@ -195,10 +195,10 @@ type ( L1 FieldL1 } FieldL1 struct { - Options func() pref.ProtoMessage - Number pref.FieldNumber - Cardinality pref.Cardinality // must be consistent with Message.RequiredNumbers - Kind pref.Kind + Options func() protoreflect.ProtoMessage + Number protoreflect.FieldNumber + Cardinality protoreflect.Cardinality // must be consistent with Message.RequiredNumbers + Kind protoreflect.Kind StringName stringName IsProto3Optional bool // promoted from google.protobuf.FieldDescriptorProto IsWeak bool // promoted from google.protobuf.FieldOptions @@ -207,9 +207,9 @@ type ( HasEnforceUTF8 bool // promoted from google.protobuf.FieldOptions EnforceUTF8 bool // promoted from google.protobuf.FieldOptions Default defaultValue - ContainingOneof pref.OneofDescriptor // must be consistent with Message.Oneofs.Fields - Enum pref.EnumDescriptor - Message pref.MessageDescriptor + ContainingOneof protoreflect.OneofDescriptor // must be consistent with Message.Oneofs.Fields + Enum protoreflect.EnumDescriptor + Message protoreflect.MessageDescriptor } Oneof struct { @@ -217,35 +217,35 @@ type ( L1 OneofL1 } OneofL1 struct { - Options func() pref.ProtoMessage + Options func() protoreflect.ProtoMessage Fields OneofFields // must be consistent with Message.Fields.ContainingOneof } ) -func (md *Message) Options() pref.ProtoMessage { +func (md *Message) Options() protoreflect.ProtoMessage { if f := md.lazyInit().Options; f != nil { return f() } return descopts.Message } -func (md *Message) IsMapEntry() bool { return md.L1.IsMapEntry } -func (md *Message) Fields() pref.FieldDescriptors { return &md.lazyInit().Fields } -func (md *Message) Oneofs() pref.OneofDescriptors { return &md.lazyInit().Oneofs } -func (md *Message) ReservedNames() pref.Names { return &md.lazyInit().ReservedNames } -func (md *Message) ReservedRanges() pref.FieldRanges { return &md.lazyInit().ReservedRanges } -func (md *Message) RequiredNumbers() pref.FieldNumbers { return &md.lazyInit().RequiredNumbers } -func (md *Message) ExtensionRanges() pref.FieldRanges { return &md.lazyInit().ExtensionRanges } -func (md *Message) ExtensionRangeOptions(i int) pref.ProtoMessage { +func (md *Message) IsMapEntry() bool { return md.L1.IsMapEntry } +func (md *Message) Fields() protoreflect.FieldDescriptors { return &md.lazyInit().Fields } +func (md *Message) Oneofs() protoreflect.OneofDescriptors { return &md.lazyInit().Oneofs } +func (md *Message) ReservedNames() protoreflect.Names { return &md.lazyInit().ReservedNames } +func (md *Message) ReservedRanges() protoreflect.FieldRanges { return &md.lazyInit().ReservedRanges } +func (md *Message) RequiredNumbers() protoreflect.FieldNumbers { return &md.lazyInit().RequiredNumbers } +func (md *Message) ExtensionRanges() protoreflect.FieldRanges { return &md.lazyInit().ExtensionRanges } +func (md *Message) ExtensionRangeOptions(i int) protoreflect.ProtoMessage { if f := md.lazyInit().ExtensionRangeOptions[i]; f != nil { return f() } return descopts.ExtensionRange } -func (md *Message) Enums() pref.EnumDescriptors { return &md.L1.Enums } -func (md *Message) Messages() pref.MessageDescriptors { return &md.L1.Messages } -func (md *Message) Extensions() pref.ExtensionDescriptors { return &md.L1.Extensions } -func (md *Message) ProtoType(pref.MessageDescriptor) {} -func (md *Message) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, md) } +func (md *Message) Enums() protoreflect.EnumDescriptors { return &md.L1.Enums } +func (md *Message) Messages() protoreflect.MessageDescriptors { return &md.L1.Messages } +func (md *Message) Extensions() protoreflect.ExtensionDescriptors { return &md.L1.Extensions } +func (md *Message) ProtoType(protoreflect.MessageDescriptor) {} +func (md *Message) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, md) } func (md *Message) lazyInit() *MessageL2 { md.L0.ParentFile.lazyInit() // implicitly initializes L2 return md.L2 @@ -260,28 +260,28 @@ func (md *Message) IsMessageSet() bool { return md.L1.IsMessageSet } -func (fd *Field) Options() pref.ProtoMessage { +func (fd *Field) Options() protoreflect.ProtoMessage { if f := fd.L1.Options; f != nil { return f() } return descopts.Field } -func (fd *Field) Number() pref.FieldNumber { return fd.L1.Number } -func (fd *Field) Cardinality() pref.Cardinality { return fd.L1.Cardinality } -func (fd *Field) Kind() pref.Kind { return fd.L1.Kind } -func (fd *Field) HasJSONName() bool { return fd.L1.StringName.hasJSON } -func (fd *Field) JSONName() string { return fd.L1.StringName.getJSON(fd) } -func (fd *Field) TextName() string { return fd.L1.StringName.getText(fd) } +func (fd *Field) Number() protoreflect.FieldNumber { return fd.L1.Number } +func (fd *Field) Cardinality() protoreflect.Cardinality { return fd.L1.Cardinality } +func (fd *Field) Kind() protoreflect.Kind { return fd.L1.Kind } +func (fd *Field) HasJSONName() bool { return fd.L1.StringName.hasJSON } +func (fd *Field) JSONName() string { return fd.L1.StringName.getJSON(fd) } +func (fd *Field) TextName() string { return fd.L1.StringName.getText(fd) } func (fd *Field) HasPresence() bool { - return fd.L1.Cardinality != pref.Repeated && (fd.L0.ParentFile.L1.Syntax == pref.Proto2 || fd.L1.Message != nil || fd.L1.ContainingOneof != nil) + return fd.L1.Cardinality != protoreflect.Repeated && (fd.L0.ParentFile.L1.Syntax == protoreflect.Proto2 || fd.L1.Message != nil || fd.L1.ContainingOneof != nil) } func (fd *Field) HasOptionalKeyword() bool { - return (fd.L0.ParentFile.L1.Syntax == pref.Proto2 && fd.L1.Cardinality == pref.Optional && fd.L1.ContainingOneof == nil) || fd.L1.IsProto3Optional + return (fd.L0.ParentFile.L1.Syntax == protoreflect.Proto2 && fd.L1.Cardinality == protoreflect.Optional && fd.L1.ContainingOneof == nil) || fd.L1.IsProto3Optional } func (fd *Field) IsPacked() bool { - if !fd.L1.HasPacked && fd.L0.ParentFile.L1.Syntax != pref.Proto2 && fd.L1.Cardinality == pref.Repeated { + if !fd.L1.HasPacked && fd.L0.ParentFile.L1.Syntax != protoreflect.Proto2 && fd.L1.Cardinality == protoreflect.Repeated { switch fd.L1.Kind { - case pref.StringKind, pref.BytesKind, pref.MessageKind, pref.GroupKind: + case protoreflect.StringKind, protoreflect.BytesKind, protoreflect.MessageKind, protoreflect.GroupKind: default: return true } @@ -290,40 +290,40 @@ func (fd *Field) IsPacked() bool { } func (fd *Field) IsExtension() bool { return false } func (fd *Field) IsWeak() bool { return fd.L1.IsWeak } -func (fd *Field) IsList() bool { return fd.Cardinality() == pref.Repeated && !fd.IsMap() } +func (fd *Field) IsList() bool { return fd.Cardinality() == protoreflect.Repeated && !fd.IsMap() } func (fd *Field) IsMap() bool { return fd.Message() != nil && fd.Message().IsMapEntry() } -func (fd *Field) MapKey() pref.FieldDescriptor { +func (fd *Field) MapKey() protoreflect.FieldDescriptor { if !fd.IsMap() { return nil } return fd.Message().Fields().ByNumber(genid.MapEntry_Key_field_number) } -func (fd *Field) MapValue() pref.FieldDescriptor { +func (fd *Field) MapValue() protoreflect.FieldDescriptor { if !fd.IsMap() { return nil } return fd.Message().Fields().ByNumber(genid.MapEntry_Value_field_number) } -func (fd *Field) HasDefault() bool { return fd.L1.Default.has } -func (fd *Field) Default() pref.Value { return fd.L1.Default.get(fd) } -func (fd *Field) DefaultEnumValue() pref.EnumValueDescriptor { return fd.L1.Default.enum } -func (fd *Field) ContainingOneof() pref.OneofDescriptor { return fd.L1.ContainingOneof } -func (fd *Field) ContainingMessage() pref.MessageDescriptor { - return fd.L0.Parent.(pref.MessageDescriptor) +func (fd *Field) HasDefault() bool { return fd.L1.Default.has } +func (fd *Field) Default() protoreflect.Value { return fd.L1.Default.get(fd) } +func (fd *Field) DefaultEnumValue() protoreflect.EnumValueDescriptor { return fd.L1.Default.enum } +func (fd *Field) ContainingOneof() protoreflect.OneofDescriptor { return fd.L1.ContainingOneof } +func (fd *Field) ContainingMessage() protoreflect.MessageDescriptor { + return fd.L0.Parent.(protoreflect.MessageDescriptor) } -func (fd *Field) Enum() pref.EnumDescriptor { +func (fd *Field) Enum() protoreflect.EnumDescriptor { return fd.L1.Enum } -func (fd *Field) Message() pref.MessageDescriptor { +func (fd *Field) Message() protoreflect.MessageDescriptor { if fd.L1.IsWeak { if d, _ := protoregistry.GlobalFiles.FindDescriptorByName(fd.L1.Message.FullName()); d != nil { - return d.(pref.MessageDescriptor) + return d.(protoreflect.MessageDescriptor) } } return fd.L1.Message } -func (fd *Field) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, fd) } -func (fd *Field) ProtoType(pref.FieldDescriptor) {} +func (fd *Field) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, fd) } +func (fd *Field) ProtoType(protoreflect.FieldDescriptor) {} // EnforceUTF8 is a pseudo-internal API to determine whether to enforce UTF-8 // validation for the string field. This exists for Google-internal use only @@ -336,21 +336,21 @@ func (fd *Field) EnforceUTF8() bool { if fd.L1.HasEnforceUTF8 { return fd.L1.EnforceUTF8 } - return fd.L0.ParentFile.L1.Syntax == pref.Proto3 + return fd.L0.ParentFile.L1.Syntax == protoreflect.Proto3 } func (od *Oneof) IsSynthetic() bool { - return od.L0.ParentFile.L1.Syntax == pref.Proto3 && len(od.L1.Fields.List) == 1 && od.L1.Fields.List[0].HasOptionalKeyword() + return od.L0.ParentFile.L1.Syntax == protoreflect.Proto3 && len(od.L1.Fields.List) == 1 && od.L1.Fields.List[0].HasOptionalKeyword() } -func (od *Oneof) Options() pref.ProtoMessage { +func (od *Oneof) Options() protoreflect.ProtoMessage { if f := od.L1.Options; f != nil { return f() } return descopts.Oneof } -func (od *Oneof) Fields() pref.FieldDescriptors { return &od.L1.Fields } -func (od *Oneof) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, od) } -func (od *Oneof) ProtoType(pref.OneofDescriptor) {} +func (od *Oneof) Fields() protoreflect.FieldDescriptors { return &od.L1.Fields } +func (od *Oneof) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, od) } +func (od *Oneof) ProtoType(protoreflect.OneofDescriptor) {} type ( Extension struct { @@ -359,55 +359,57 @@ type ( L2 *ExtensionL2 // protected by fileDesc.once } ExtensionL1 struct { - Number pref.FieldNumber - Extendee pref.MessageDescriptor - Cardinality pref.Cardinality - Kind pref.Kind + Number protoreflect.FieldNumber + Extendee protoreflect.MessageDescriptor + Cardinality protoreflect.Cardinality + Kind protoreflect.Kind } ExtensionL2 struct { - Options func() pref.ProtoMessage + Options func() protoreflect.ProtoMessage StringName stringName IsProto3Optional bool // promoted from google.protobuf.FieldDescriptorProto IsPacked bool // promoted from google.protobuf.FieldOptions Default defaultValue - Enum pref.EnumDescriptor - Message pref.MessageDescriptor + Enum protoreflect.EnumDescriptor + Message protoreflect.MessageDescriptor } ) -func (xd *Extension) Options() pref.ProtoMessage { +func (xd *Extension) Options() protoreflect.ProtoMessage { if f := xd.lazyInit().Options; f != nil { return f() } return descopts.Field } -func (xd *Extension) Number() pref.FieldNumber { return xd.L1.Number } -func (xd *Extension) Cardinality() pref.Cardinality { return xd.L1.Cardinality } -func (xd *Extension) Kind() pref.Kind { return xd.L1.Kind } -func (xd *Extension) HasJSONName() bool { return xd.lazyInit().StringName.hasJSON } -func (xd *Extension) JSONName() string { return xd.lazyInit().StringName.getJSON(xd) } -func (xd *Extension) TextName() string { return xd.lazyInit().StringName.getText(xd) } -func (xd *Extension) HasPresence() bool { return xd.L1.Cardinality != pref.Repeated } +func (xd *Extension) Number() protoreflect.FieldNumber { return xd.L1.Number } +func (xd *Extension) Cardinality() protoreflect.Cardinality { return xd.L1.Cardinality } +func (xd *Extension) Kind() protoreflect.Kind { return xd.L1.Kind } +func (xd *Extension) HasJSONName() bool { return xd.lazyInit().StringName.hasJSON } +func (xd *Extension) JSONName() string { return xd.lazyInit().StringName.getJSON(xd) } +func (xd *Extension) TextName() string { return xd.lazyInit().StringName.getText(xd) } +func (xd *Extension) HasPresence() bool { return xd.L1.Cardinality != protoreflect.Repeated } func (xd *Extension) HasOptionalKeyword() bool { - return (xd.L0.ParentFile.L1.Syntax == pref.Proto2 && xd.L1.Cardinality == pref.Optional) || xd.lazyInit().IsProto3Optional -} -func (xd *Extension) IsPacked() bool { return xd.lazyInit().IsPacked } -func (xd *Extension) IsExtension() bool { return true } -func (xd *Extension) IsWeak() bool { return false } -func (xd *Extension) IsList() bool { return xd.Cardinality() == pref.Repeated } -func (xd *Extension) IsMap() bool { return false } -func (xd *Extension) MapKey() pref.FieldDescriptor { return nil } -func (xd *Extension) MapValue() pref.FieldDescriptor { return nil } -func (xd *Extension) HasDefault() bool { return xd.lazyInit().Default.has } -func (xd *Extension) Default() pref.Value { return xd.lazyInit().Default.get(xd) } -func (xd *Extension) DefaultEnumValue() pref.EnumValueDescriptor { return xd.lazyInit().Default.enum } -func (xd *Extension) ContainingOneof() pref.OneofDescriptor { return nil } -func (xd *Extension) ContainingMessage() pref.MessageDescriptor { return xd.L1.Extendee } -func (xd *Extension) Enum() pref.EnumDescriptor { return xd.lazyInit().Enum } -func (xd *Extension) Message() pref.MessageDescriptor { return xd.lazyInit().Message } -func (xd *Extension) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, xd) } -func (xd *Extension) ProtoType(pref.FieldDescriptor) {} -func (xd *Extension) ProtoInternal(pragma.DoNotImplement) {} + return (xd.L0.ParentFile.L1.Syntax == protoreflect.Proto2 && xd.L1.Cardinality == protoreflect.Optional) || xd.lazyInit().IsProto3Optional +} +func (xd *Extension) IsPacked() bool { return xd.lazyInit().IsPacked } +func (xd *Extension) IsExtension() bool { return true } +func (xd *Extension) IsWeak() bool { return false } +func (xd *Extension) IsList() bool { return xd.Cardinality() == protoreflect.Repeated } +func (xd *Extension) IsMap() bool { return false } +func (xd *Extension) MapKey() protoreflect.FieldDescriptor { return nil } +func (xd *Extension) MapValue() protoreflect.FieldDescriptor { return nil } +func (xd *Extension) HasDefault() bool { return xd.lazyInit().Default.has } +func (xd *Extension) Default() protoreflect.Value { return xd.lazyInit().Default.get(xd) } +func (xd *Extension) DefaultEnumValue() protoreflect.EnumValueDescriptor { + return xd.lazyInit().Default.enum +} +func (xd *Extension) ContainingOneof() protoreflect.OneofDescriptor { return nil } +func (xd *Extension) ContainingMessage() protoreflect.MessageDescriptor { return xd.L1.Extendee } +func (xd *Extension) Enum() protoreflect.EnumDescriptor { return xd.lazyInit().Enum } +func (xd *Extension) Message() protoreflect.MessageDescriptor { return xd.lazyInit().Message } +func (xd *Extension) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, xd) } +func (xd *Extension) ProtoType(protoreflect.FieldDescriptor) {} +func (xd *Extension) ProtoInternal(pragma.DoNotImplement) {} func (xd *Extension) lazyInit() *ExtensionL2 { xd.L0.ParentFile.lazyInit() // implicitly initializes L2 return xd.L2 @@ -421,7 +423,7 @@ type ( } ServiceL1 struct{} ServiceL2 struct { - Options func() pref.ProtoMessage + Options func() protoreflect.ProtoMessage Methods Methods } @@ -430,48 +432,48 @@ type ( L1 MethodL1 } MethodL1 struct { - Options func() pref.ProtoMessage - Input pref.MessageDescriptor - Output pref.MessageDescriptor + Options func() protoreflect.ProtoMessage + Input protoreflect.MessageDescriptor + Output protoreflect.MessageDescriptor IsStreamingClient bool IsStreamingServer bool } ) -func (sd *Service) Options() pref.ProtoMessage { +func (sd *Service) Options() protoreflect.ProtoMessage { if f := sd.lazyInit().Options; f != nil { return f() } return descopts.Service } -func (sd *Service) Methods() pref.MethodDescriptors { return &sd.lazyInit().Methods } -func (sd *Service) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, sd) } -func (sd *Service) ProtoType(pref.ServiceDescriptor) {} -func (sd *Service) ProtoInternal(pragma.DoNotImplement) {} +func (sd *Service) Methods() protoreflect.MethodDescriptors { return &sd.lazyInit().Methods } +func (sd *Service) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, sd) } +func (sd *Service) ProtoType(protoreflect.ServiceDescriptor) {} +func (sd *Service) ProtoInternal(pragma.DoNotImplement) {} func (sd *Service) lazyInit() *ServiceL2 { sd.L0.ParentFile.lazyInit() // implicitly initializes L2 return sd.L2 } -func (md *Method) Options() pref.ProtoMessage { +func (md *Method) Options() protoreflect.ProtoMessage { if f := md.L1.Options; f != nil { return f() } return descopts.Method } -func (md *Method) Input() pref.MessageDescriptor { return md.L1.Input } -func (md *Method) Output() pref.MessageDescriptor { return md.L1.Output } -func (md *Method) IsStreamingClient() bool { return md.L1.IsStreamingClient } -func (md *Method) IsStreamingServer() bool { return md.L1.IsStreamingServer } -func (md *Method) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, md) } -func (md *Method) ProtoType(pref.MethodDescriptor) {} -func (md *Method) ProtoInternal(pragma.DoNotImplement) {} +func (md *Method) Input() protoreflect.MessageDescriptor { return md.L1.Input } +func (md *Method) Output() protoreflect.MessageDescriptor { return md.L1.Output } +func (md *Method) IsStreamingClient() bool { return md.L1.IsStreamingClient } +func (md *Method) IsStreamingServer() bool { return md.L1.IsStreamingServer } +func (md *Method) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, md) } +func (md *Method) ProtoType(protoreflect.MethodDescriptor) {} +func (md *Method) ProtoInternal(pragma.DoNotImplement) {} // Surrogate files are can be used to create standalone descriptors // where the syntax is only information derived from the parent file. var ( - SurrogateProto2 = &File{L1: FileL1{Syntax: pref.Proto2}, L2: &FileL2{}} - SurrogateProto3 = &File{L1: FileL1{Syntax: pref.Proto3}, L2: &FileL2{}} + SurrogateProto2 = &File{L1: FileL1{Syntax: protoreflect.Proto2}, L2: &FileL2{}} + SurrogateProto3 = &File{L1: FileL1{Syntax: protoreflect.Proto3}, L2: &FileL2{}} ) type ( @@ -479,24 +481,24 @@ type ( L0 BaseL0 } BaseL0 struct { - FullName pref.FullName // must be populated - ParentFile *File // must be populated - Parent pref.Descriptor + FullName protoreflect.FullName // must be populated + ParentFile *File // must be populated + Parent protoreflect.Descriptor Index int } ) -func (d *Base) Name() pref.Name { return d.L0.FullName.Name() } -func (d *Base) FullName() pref.FullName { return d.L0.FullName } -func (d *Base) ParentFile() pref.FileDescriptor { +func (d *Base) Name() protoreflect.Name { return d.L0.FullName.Name() } +func (d *Base) FullName() protoreflect.FullName { return d.L0.FullName } +func (d *Base) ParentFile() protoreflect.FileDescriptor { if d.L0.ParentFile == SurrogateProto2 || d.L0.ParentFile == SurrogateProto3 { return nil // surrogate files are not real parents } return d.L0.ParentFile } -func (d *Base) Parent() pref.Descriptor { return d.L0.Parent } +func (d *Base) Parent() protoreflect.Descriptor { return d.L0.Parent } func (d *Base) Index() int { return d.L0.Index } -func (d *Base) Syntax() pref.Syntax { return d.L0.ParentFile.Syntax() } +func (d *Base) Syntax() protoreflect.Syntax { return d.L0.ParentFile.Syntax() } func (d *Base) IsPlaceholder() bool { return false } func (d *Base) ProtoInternal(pragma.DoNotImplement) {} @@ -513,7 +515,7 @@ func (s *stringName) InitJSON(name string) { s.nameJSON = name } -func (s *stringName) lazyInit(fd pref.FieldDescriptor) *stringName { +func (s *stringName) lazyInit(fd protoreflect.FieldDescriptor) *stringName { s.once.Do(func() { if fd.IsExtension() { // For extensions, JSON and text are formatted the same way. @@ -533,7 +535,7 @@ func (s *stringName) lazyInit(fd pref.FieldDescriptor) *stringName { // Format the text name. s.nameText = string(fd.Name()) - if fd.Kind() == pref.GroupKind { + if fd.Kind() == protoreflect.GroupKind { s.nameText = string(fd.Message().Name()) } } @@ -541,10 +543,10 @@ func (s *stringName) lazyInit(fd pref.FieldDescriptor) *stringName { return s } -func (s *stringName) getJSON(fd pref.FieldDescriptor) string { return s.lazyInit(fd).nameJSON } -func (s *stringName) getText(fd pref.FieldDescriptor) string { return s.lazyInit(fd).nameText } +func (s *stringName) getJSON(fd protoreflect.FieldDescriptor) string { return s.lazyInit(fd).nameJSON } +func (s *stringName) getText(fd protoreflect.FieldDescriptor) string { return s.lazyInit(fd).nameText } -func DefaultValue(v pref.Value, ev pref.EnumValueDescriptor) defaultValue { +func DefaultValue(v protoreflect.Value, ev protoreflect.EnumValueDescriptor) defaultValue { dv := defaultValue{has: v.IsValid(), val: v, enum: ev} if b, ok := v.Interface().([]byte); ok { // Store a copy of the default bytes, so that we can detect @@ -554,9 +556,9 @@ func DefaultValue(v pref.Value, ev pref.EnumValueDescriptor) defaultValue { return dv } -func unmarshalDefault(b []byte, k pref.Kind, pf *File, ed pref.EnumDescriptor) defaultValue { - var evs pref.EnumValueDescriptors - if k == pref.EnumKind { +func unmarshalDefault(b []byte, k protoreflect.Kind, pf *File, ed protoreflect.EnumDescriptor) defaultValue { + var evs protoreflect.EnumValueDescriptors + if k == protoreflect.EnumKind { // If the enum is declared within the same file, be careful not to // blindly call the Values method, lest we bind ourselves in a deadlock. if e, ok := ed.(*Enum); ok && e.L0.ParentFile == pf { @@ -567,9 +569,9 @@ func unmarshalDefault(b []byte, k pref.Kind, pf *File, ed pref.EnumDescriptor) d // If we are unable to resolve the enum dependency, use a placeholder // enum value since we will not be able to parse the default value. - if ed.IsPlaceholder() && pref.Name(b).IsValid() { - v := pref.ValueOfEnum(0) - ev := PlaceholderEnumValue(ed.FullName().Parent().Append(pref.Name(b))) + if ed.IsPlaceholder() && protoreflect.Name(b).IsValid() { + v := protoreflect.ValueOfEnum(0) + ev := PlaceholderEnumValue(ed.FullName().Parent().Append(protoreflect.Name(b))) return DefaultValue(v, ev) } } @@ -583,41 +585,41 @@ func unmarshalDefault(b []byte, k pref.Kind, pf *File, ed pref.EnumDescriptor) d type defaultValue struct { has bool - val pref.Value - enum pref.EnumValueDescriptor + val protoreflect.Value + enum protoreflect.EnumValueDescriptor bytes []byte } -func (dv *defaultValue) get(fd pref.FieldDescriptor) pref.Value { +func (dv *defaultValue) get(fd protoreflect.FieldDescriptor) protoreflect.Value { // Return the zero value as the default if unpopulated. if !dv.has { - if fd.Cardinality() == pref.Repeated { - return pref.Value{} + if fd.Cardinality() == protoreflect.Repeated { + return protoreflect.Value{} } switch fd.Kind() { - case pref.BoolKind: - return pref.ValueOfBool(false) - case pref.Int32Kind, pref.Sint32Kind, pref.Sfixed32Kind: - return pref.ValueOfInt32(0) - case pref.Int64Kind, pref.Sint64Kind, pref.Sfixed64Kind: - return pref.ValueOfInt64(0) - case pref.Uint32Kind, pref.Fixed32Kind: - return pref.ValueOfUint32(0) - case pref.Uint64Kind, pref.Fixed64Kind: - return pref.ValueOfUint64(0) - case pref.FloatKind: - return pref.ValueOfFloat32(0) - case pref.DoubleKind: - return pref.ValueOfFloat64(0) - case pref.StringKind: - return pref.ValueOfString("") - case pref.BytesKind: - return pref.ValueOfBytes(nil) - case pref.EnumKind: + case protoreflect.BoolKind: + return protoreflect.ValueOfBool(false) + case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: + return protoreflect.ValueOfInt32(0) + case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: + return protoreflect.ValueOfInt64(0) + case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: + return protoreflect.ValueOfUint32(0) + case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: + return protoreflect.ValueOfUint64(0) + case protoreflect.FloatKind: + return protoreflect.ValueOfFloat32(0) + case protoreflect.DoubleKind: + return protoreflect.ValueOfFloat64(0) + case protoreflect.StringKind: + return protoreflect.ValueOfString("") + case protoreflect.BytesKind: + return protoreflect.ValueOfBytes(nil) + case protoreflect.EnumKind: if evs := fd.Enum().Values(); evs.Len() > 0 { - return pref.ValueOfEnum(evs.Get(0).Number()) + return protoreflect.ValueOfEnum(evs.Get(0).Number()) } - return pref.ValueOfEnum(0) + return protoreflect.ValueOfEnum(0) } } diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go index 66e1fee522432..4a1584c9d29fd 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go @@ -10,7 +10,7 @@ import ( "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/internal/genid" "google.golang.org/protobuf/internal/strs" - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" ) // fileRaw is a data struct used when initializing a file descriptor from @@ -95,7 +95,7 @@ func (fd *File) unmarshalSeed(b []byte) { sb := getBuilder() defer putBuilder(sb) - var prevField pref.FieldNumber + var prevField protoreflect.FieldNumber var numEnums, numMessages, numExtensions, numServices int var posEnums, posMessages, posExtensions, posServices int b0 := b @@ -110,16 +110,16 @@ func (fd *File) unmarshalSeed(b []byte) { case genid.FileDescriptorProto_Syntax_field_number: switch string(v) { case "proto2": - fd.L1.Syntax = pref.Proto2 + fd.L1.Syntax = protoreflect.Proto2 case "proto3": - fd.L1.Syntax = pref.Proto3 + fd.L1.Syntax = protoreflect.Proto3 default: panic("invalid syntax") } case genid.FileDescriptorProto_Name_field_number: fd.L1.Path = sb.MakeString(v) case genid.FileDescriptorProto_Package_field_number: - fd.L1.Package = pref.FullName(sb.MakeString(v)) + fd.L1.Package = protoreflect.FullName(sb.MakeString(v)) case genid.FileDescriptorProto_EnumType_field_number: if prevField != genid.FileDescriptorProto_EnumType_field_number { if numEnums > 0 { @@ -163,7 +163,7 @@ func (fd *File) unmarshalSeed(b []byte) { // If syntax is missing, it is assumed to be proto2. if fd.L1.Syntax == 0 { - fd.L1.Syntax = pref.Proto2 + fd.L1.Syntax = protoreflect.Proto2 } // Must allocate all declarations before parsing each descriptor type @@ -219,7 +219,7 @@ func (fd *File) unmarshalSeed(b []byte) { } } -func (ed *Enum) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd pref.Descriptor, i int) { +func (ed *Enum) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) { ed.L0.ParentFile = pf ed.L0.Parent = pd ed.L0.Index = i @@ -271,12 +271,12 @@ func (ed *Enum) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd pref.Desc } } -func (md *Message) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd pref.Descriptor, i int) { +func (md *Message) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) { md.L0.ParentFile = pf md.L0.Parent = pd md.L0.Index = i - var prevField pref.FieldNumber + var prevField protoreflect.FieldNumber var numEnums, numMessages, numExtensions int var posEnums, posMessages, posExtensions int b0 := b @@ -387,7 +387,7 @@ func (md *Message) unmarshalSeedOptions(b []byte) { } } -func (xd *Extension) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd pref.Descriptor, i int) { +func (xd *Extension) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) { xd.L0.ParentFile = pf xd.L0.Parent = pd xd.L0.Index = i @@ -401,11 +401,11 @@ func (xd *Extension) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd pref b = b[m:] switch num { case genid.FieldDescriptorProto_Number_field_number: - xd.L1.Number = pref.FieldNumber(v) + xd.L1.Number = protoreflect.FieldNumber(v) case genid.FieldDescriptorProto_Label_field_number: - xd.L1.Cardinality = pref.Cardinality(v) + xd.L1.Cardinality = protoreflect.Cardinality(v) case genid.FieldDescriptorProto_Type_field_number: - xd.L1.Kind = pref.Kind(v) + xd.L1.Kind = protoreflect.Kind(v) } case protowire.BytesType: v, m := protowire.ConsumeBytes(b) @@ -423,7 +423,7 @@ func (xd *Extension) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd pref } } -func (sd *Service) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd pref.Descriptor, i int) { +func (sd *Service) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) { sd.L0.ParentFile = pf sd.L0.Parent = pd sd.L0.Index = i @@ -459,13 +459,13 @@ func putBuilder(b *strs.Builder) { // makeFullName converts b to a protoreflect.FullName, // where b must start with a leading dot. -func makeFullName(sb *strs.Builder, b []byte) pref.FullName { +func makeFullName(sb *strs.Builder, b []byte) protoreflect.FullName { if len(b) == 0 || b[0] != '.' { panic("name reference must be fully qualified") } - return pref.FullName(sb.MakeString(b[1:])) + return protoreflect.FullName(sb.MakeString(b[1:])) } -func appendFullName(sb *strs.Builder, prefix pref.FullName, suffix []byte) pref.FullName { - return sb.AppendFullName(prefix, pref.Name(strs.UnsafeString(suffix))) +func appendFullName(sb *strs.Builder, prefix protoreflect.FullName, suffix []byte) protoreflect.FullName { + return sb.AppendFullName(prefix, protoreflect.Name(strs.UnsafeString(suffix))) } diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go index 198451e3ec941..736a19a75bc73 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go @@ -13,7 +13,7 @@ import ( "google.golang.org/protobuf/internal/genid" "google.golang.org/protobuf/internal/strs" "google.golang.org/protobuf/proto" - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" ) func (fd *File) lazyRawInit() { @@ -39,10 +39,10 @@ func (file *File) resolveMessages() { // Resolve message field dependency. switch fd.L1.Kind { - case pref.EnumKind: + case protoreflect.EnumKind: fd.L1.Enum = file.resolveEnumDependency(fd.L1.Enum, listFieldDeps, depIdx) depIdx++ - case pref.MessageKind, pref.GroupKind: + case protoreflect.MessageKind, protoreflect.GroupKind: fd.L1.Message = file.resolveMessageDependency(fd.L1.Message, listFieldDeps, depIdx) depIdx++ } @@ -62,10 +62,10 @@ func (file *File) resolveExtensions() { // Resolve extension field dependency. switch xd.L1.Kind { - case pref.EnumKind: + case protoreflect.EnumKind: xd.L2.Enum = file.resolveEnumDependency(xd.L2.Enum, listExtDeps, depIdx) depIdx++ - case pref.MessageKind, pref.GroupKind: + case protoreflect.MessageKind, protoreflect.GroupKind: xd.L2.Message = file.resolveMessageDependency(xd.L2.Message, listExtDeps, depIdx) depIdx++ } @@ -92,7 +92,7 @@ func (file *File) resolveServices() { } } -func (file *File) resolveEnumDependency(ed pref.EnumDescriptor, i, j int32) pref.EnumDescriptor { +func (file *File) resolveEnumDependency(ed protoreflect.EnumDescriptor, i, j int32) protoreflect.EnumDescriptor { r := file.builder.FileRegistry if r, ok := r.(resolverByIndex); ok { if ed2 := r.FindEnumByIndex(i, j, file.allEnums, file.allMessages); ed2 != nil { @@ -105,12 +105,12 @@ func (file *File) resolveEnumDependency(ed pref.EnumDescriptor, i, j int32) pref } } if d, _ := r.FindDescriptorByName(ed.FullName()); d != nil { - return d.(pref.EnumDescriptor) + return d.(protoreflect.EnumDescriptor) } return ed } -func (file *File) resolveMessageDependency(md pref.MessageDescriptor, i, j int32) pref.MessageDescriptor { +func (file *File) resolveMessageDependency(md protoreflect.MessageDescriptor, i, j int32) protoreflect.MessageDescriptor { r := file.builder.FileRegistry if r, ok := r.(resolverByIndex); ok { if md2 := r.FindMessageByIndex(i, j, file.allEnums, file.allMessages); md2 != nil { @@ -123,7 +123,7 @@ func (file *File) resolveMessageDependency(md pref.MessageDescriptor, i, j int32 } } if d, _ := r.FindDescriptorByName(md.FullName()); d != nil { - return d.(pref.MessageDescriptor) + return d.(protoreflect.MessageDescriptor) } return md } @@ -158,7 +158,7 @@ func (fd *File) unmarshalFull(b []byte) { if imp == nil { imp = PlaceholderFile(path) } - fd.L2.Imports = append(fd.L2.Imports, pref.FileImport{FileDescriptor: imp}) + fd.L2.Imports = append(fd.L2.Imports, protoreflect.FileImport{FileDescriptor: imp}) case genid.FileDescriptorProto_EnumType_field_number: fd.L1.Enums.List[enumIdx].unmarshalFull(v, sb) enumIdx++ @@ -199,7 +199,7 @@ func (ed *Enum) unmarshalFull(b []byte, sb *strs.Builder) { case genid.EnumDescriptorProto_Value_field_number: rawValues = append(rawValues, v) case genid.EnumDescriptorProto_ReservedName_field_number: - ed.L2.ReservedNames.List = append(ed.L2.ReservedNames.List, pref.Name(sb.MakeString(v))) + ed.L2.ReservedNames.List = append(ed.L2.ReservedNames.List, protoreflect.Name(sb.MakeString(v))) case genid.EnumDescriptorProto_ReservedRange_field_number: ed.L2.ReservedRanges.List = append(ed.L2.ReservedRanges.List, unmarshalEnumReservedRange(v)) case genid.EnumDescriptorProto_Options_field_number: @@ -219,7 +219,7 @@ func (ed *Enum) unmarshalFull(b []byte, sb *strs.Builder) { ed.L2.Options = ed.L0.ParentFile.builder.optionsUnmarshaler(&descopts.Enum, rawOptions) } -func unmarshalEnumReservedRange(b []byte) (r [2]pref.EnumNumber) { +func unmarshalEnumReservedRange(b []byte) (r [2]protoreflect.EnumNumber) { for len(b) > 0 { num, typ, n := protowire.ConsumeTag(b) b = b[n:] @@ -229,9 +229,9 @@ func unmarshalEnumReservedRange(b []byte) (r [2]pref.EnumNumber) { b = b[m:] switch num { case genid.EnumDescriptorProto_EnumReservedRange_Start_field_number: - r[0] = pref.EnumNumber(v) + r[0] = protoreflect.EnumNumber(v) case genid.EnumDescriptorProto_EnumReservedRange_End_field_number: - r[1] = pref.EnumNumber(v) + r[1] = protoreflect.EnumNumber(v) } default: m := protowire.ConsumeFieldValue(num, typ, b) @@ -241,7 +241,7 @@ func unmarshalEnumReservedRange(b []byte) (r [2]pref.EnumNumber) { return r } -func (vd *EnumValue) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd pref.Descriptor, i int) { +func (vd *EnumValue) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) { vd.L0.ParentFile = pf vd.L0.Parent = pd vd.L0.Index = i @@ -256,7 +256,7 @@ func (vd *EnumValue) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd pref b = b[m:] switch num { case genid.EnumValueDescriptorProto_Number_field_number: - vd.L1.Number = pref.EnumNumber(v) + vd.L1.Number = protoreflect.EnumNumber(v) } case protowire.BytesType: v, m := protowire.ConsumeBytes(b) @@ -294,7 +294,7 @@ func (md *Message) unmarshalFull(b []byte, sb *strs.Builder) { case genid.DescriptorProto_OneofDecl_field_number: rawOneofs = append(rawOneofs, v) case genid.DescriptorProto_ReservedName_field_number: - md.L2.ReservedNames.List = append(md.L2.ReservedNames.List, pref.Name(sb.MakeString(v))) + md.L2.ReservedNames.List = append(md.L2.ReservedNames.List, protoreflect.Name(sb.MakeString(v))) case genid.DescriptorProto_ReservedRange_field_number: md.L2.ReservedRanges.List = append(md.L2.ReservedRanges.List, unmarshalMessageReservedRange(v)) case genid.DescriptorProto_ExtensionRange_field_number: @@ -326,7 +326,7 @@ func (md *Message) unmarshalFull(b []byte, sb *strs.Builder) { for i, b := range rawFields { fd := &md.L2.Fields.List[i] fd.unmarshalFull(b, sb, md.L0.ParentFile, md, i) - if fd.L1.Cardinality == pref.Required { + if fd.L1.Cardinality == protoreflect.Required { md.L2.RequiredNumbers.List = append(md.L2.RequiredNumbers.List, fd.L1.Number) } } @@ -359,7 +359,7 @@ func (md *Message) unmarshalOptions(b []byte) { } } -func unmarshalMessageReservedRange(b []byte) (r [2]pref.FieldNumber) { +func unmarshalMessageReservedRange(b []byte) (r [2]protoreflect.FieldNumber) { for len(b) > 0 { num, typ, n := protowire.ConsumeTag(b) b = b[n:] @@ -369,9 +369,9 @@ func unmarshalMessageReservedRange(b []byte) (r [2]pref.FieldNumber) { b = b[m:] switch num { case genid.DescriptorProto_ReservedRange_Start_field_number: - r[0] = pref.FieldNumber(v) + r[0] = protoreflect.FieldNumber(v) case genid.DescriptorProto_ReservedRange_End_field_number: - r[1] = pref.FieldNumber(v) + r[1] = protoreflect.FieldNumber(v) } default: m := protowire.ConsumeFieldValue(num, typ, b) @@ -381,7 +381,7 @@ func unmarshalMessageReservedRange(b []byte) (r [2]pref.FieldNumber) { return r } -func unmarshalMessageExtensionRange(b []byte) (r [2]pref.FieldNumber, rawOptions []byte) { +func unmarshalMessageExtensionRange(b []byte) (r [2]protoreflect.FieldNumber, rawOptions []byte) { for len(b) > 0 { num, typ, n := protowire.ConsumeTag(b) b = b[n:] @@ -391,9 +391,9 @@ func unmarshalMessageExtensionRange(b []byte) (r [2]pref.FieldNumber, rawOptions b = b[m:] switch num { case genid.DescriptorProto_ExtensionRange_Start_field_number: - r[0] = pref.FieldNumber(v) + r[0] = protoreflect.FieldNumber(v) case genid.DescriptorProto_ExtensionRange_End_field_number: - r[1] = pref.FieldNumber(v) + r[1] = protoreflect.FieldNumber(v) } case protowire.BytesType: v, m := protowire.ConsumeBytes(b) @@ -410,7 +410,7 @@ func unmarshalMessageExtensionRange(b []byte) (r [2]pref.FieldNumber, rawOptions return r, rawOptions } -func (fd *Field) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd pref.Descriptor, i int) { +func (fd *Field) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) { fd.L0.ParentFile = pf fd.L0.Parent = pd fd.L0.Index = i @@ -426,11 +426,11 @@ func (fd *Field) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd pref.Des b = b[m:] switch num { case genid.FieldDescriptorProto_Number_field_number: - fd.L1.Number = pref.FieldNumber(v) + fd.L1.Number = protoreflect.FieldNumber(v) case genid.FieldDescriptorProto_Label_field_number: - fd.L1.Cardinality = pref.Cardinality(v) + fd.L1.Cardinality = protoreflect.Cardinality(v) case genid.FieldDescriptorProto_Type_field_number: - fd.L1.Kind = pref.Kind(v) + fd.L1.Kind = protoreflect.Kind(v) case genid.FieldDescriptorProto_OneofIndex_field_number: // In Message.unmarshalFull, we allocate slices for both // the field and oneof descriptors before unmarshaling either @@ -453,7 +453,7 @@ func (fd *Field) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd pref.Des case genid.FieldDescriptorProto_JsonName_field_number: fd.L1.StringName.InitJSON(sb.MakeString(v)) case genid.FieldDescriptorProto_DefaultValue_field_number: - fd.L1.Default.val = pref.ValueOfBytes(v) // temporarily store as bytes; later resolved in resolveMessages + fd.L1.Default.val = protoreflect.ValueOfBytes(v) // temporarily store as bytes; later resolved in resolveMessages case genid.FieldDescriptorProto_TypeName_field_number: rawTypeName = v case genid.FieldDescriptorProto_Options_field_number: @@ -468,9 +468,9 @@ func (fd *Field) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd pref.Des if rawTypeName != nil { name := makeFullName(sb, rawTypeName) switch fd.L1.Kind { - case pref.EnumKind: + case protoreflect.EnumKind: fd.L1.Enum = PlaceholderEnum(name) - case pref.MessageKind, pref.GroupKind: + case protoreflect.MessageKind, protoreflect.GroupKind: fd.L1.Message = PlaceholderMessage(name) } } @@ -504,7 +504,7 @@ func (fd *Field) unmarshalOptions(b []byte) { } } -func (od *Oneof) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd pref.Descriptor, i int) { +func (od *Oneof) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) { od.L0.ParentFile = pf od.L0.Parent = pd od.L0.Index = i @@ -553,7 +553,7 @@ func (xd *Extension) unmarshalFull(b []byte, sb *strs.Builder) { case genid.FieldDescriptorProto_JsonName_field_number: xd.L2.StringName.InitJSON(sb.MakeString(v)) case genid.FieldDescriptorProto_DefaultValue_field_number: - xd.L2.Default.val = pref.ValueOfBytes(v) // temporarily store as bytes; later resolved in resolveExtensions + xd.L2.Default.val = protoreflect.ValueOfBytes(v) // temporarily store as bytes; later resolved in resolveExtensions case genid.FieldDescriptorProto_TypeName_field_number: rawTypeName = v case genid.FieldDescriptorProto_Options_field_number: @@ -568,9 +568,9 @@ func (xd *Extension) unmarshalFull(b []byte, sb *strs.Builder) { if rawTypeName != nil { name := makeFullName(sb, rawTypeName) switch xd.L1.Kind { - case pref.EnumKind: + case protoreflect.EnumKind: xd.L2.Enum = PlaceholderEnum(name) - case pref.MessageKind, pref.GroupKind: + case protoreflect.MessageKind, protoreflect.GroupKind: xd.L2.Message = PlaceholderMessage(name) } } @@ -627,7 +627,7 @@ func (sd *Service) unmarshalFull(b []byte, sb *strs.Builder) { sd.L2.Options = sd.L0.ParentFile.builder.optionsUnmarshaler(&descopts.Service, rawOptions) } -func (md *Method) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd pref.Descriptor, i int) { +func (md *Method) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) { md.L0.ParentFile = pf md.L0.Parent = pd md.L0.Index = i @@ -680,18 +680,18 @@ func appendOptions(dst, src []byte) []byte { // // The type of message to unmarshal to is passed as a pointer since the // vars in descopts may not yet be populated at the time this function is called. -func (db *Builder) optionsUnmarshaler(p *pref.ProtoMessage, b []byte) func() pref.ProtoMessage { +func (db *Builder) optionsUnmarshaler(p *protoreflect.ProtoMessage, b []byte) func() protoreflect.ProtoMessage { if b == nil { return nil } - var opts pref.ProtoMessage + var opts protoreflect.ProtoMessage var once sync.Once - return func() pref.ProtoMessage { + return func() protoreflect.ProtoMessage { once.Do(func() { if *p == nil { panic("Descriptor.Options called without importing the descriptor package") } - opts = reflect.New(reflect.TypeOf(*p).Elem()).Interface().(pref.ProtoMessage) + opts = reflect.New(reflect.TypeOf(*p).Elem()).Interface().(protoreflect.ProtoMessage) if err := (proto.UnmarshalOptions{ AllowPartial: true, Resolver: db.TypeResolver, diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_list.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_list.go index aa294fff99a8f..e3b6587da63ab 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_list.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc_list.go @@ -17,31 +17,30 @@ import ( "google.golang.org/protobuf/internal/errors" "google.golang.org/protobuf/internal/pragma" "google.golang.org/protobuf/reflect/protoreflect" - pref "google.golang.org/protobuf/reflect/protoreflect" ) -type FileImports []pref.FileImport +type FileImports []protoreflect.FileImport func (p *FileImports) Len() int { return len(*p) } -func (p *FileImports) Get(i int) pref.FileImport { return (*p)[i] } +func (p *FileImports) Get(i int) protoreflect.FileImport { return (*p)[i] } func (p *FileImports) Format(s fmt.State, r rune) { descfmt.FormatList(s, r, p) } func (p *FileImports) ProtoInternal(pragma.DoNotImplement) {} type Names struct { - List []pref.Name + List []protoreflect.Name once sync.Once - has map[pref.Name]int // protected by once + has map[protoreflect.Name]int // protected by once } func (p *Names) Len() int { return len(p.List) } -func (p *Names) Get(i int) pref.Name { return p.List[i] } -func (p *Names) Has(s pref.Name) bool { return p.lazyInit().has[s] > 0 } +func (p *Names) Get(i int) protoreflect.Name { return p.List[i] } +func (p *Names) Has(s protoreflect.Name) bool { return p.lazyInit().has[s] > 0 } func (p *Names) Format(s fmt.State, r rune) { descfmt.FormatList(s, r, p) } func (p *Names) ProtoInternal(pragma.DoNotImplement) {} func (p *Names) lazyInit() *Names { p.once.Do(func() { if len(p.List) > 0 { - p.has = make(map[pref.Name]int, len(p.List)) + p.has = make(map[protoreflect.Name]int, len(p.List)) for _, s := range p.List { p.has[s] = p.has[s] + 1 } @@ -67,14 +66,14 @@ func (p *Names) CheckValid() error { } type EnumRanges struct { - List [][2]pref.EnumNumber // start inclusive; end inclusive + List [][2]protoreflect.EnumNumber // start inclusive; end inclusive once sync.Once - sorted [][2]pref.EnumNumber // protected by once + sorted [][2]protoreflect.EnumNumber // protected by once } -func (p *EnumRanges) Len() int { return len(p.List) } -func (p *EnumRanges) Get(i int) [2]pref.EnumNumber { return p.List[i] } -func (p *EnumRanges) Has(n pref.EnumNumber) bool { +func (p *EnumRanges) Len() int { return len(p.List) } +func (p *EnumRanges) Get(i int) [2]protoreflect.EnumNumber { return p.List[i] } +func (p *EnumRanges) Has(n protoreflect.EnumNumber) bool { for ls := p.lazyInit().sorted; len(ls) > 0; { i := len(ls) / 2 switch r := enumRange(ls[i]); { @@ -129,14 +128,14 @@ func (r enumRange) String() string { } type FieldRanges struct { - List [][2]pref.FieldNumber // start inclusive; end exclusive + List [][2]protoreflect.FieldNumber // start inclusive; end exclusive once sync.Once - sorted [][2]pref.FieldNumber // protected by once + sorted [][2]protoreflect.FieldNumber // protected by once } -func (p *FieldRanges) Len() int { return len(p.List) } -func (p *FieldRanges) Get(i int) [2]pref.FieldNumber { return p.List[i] } -func (p *FieldRanges) Has(n pref.FieldNumber) bool { +func (p *FieldRanges) Len() int { return len(p.List) } +func (p *FieldRanges) Get(i int) [2]protoreflect.FieldNumber { return p.List[i] } +func (p *FieldRanges) Has(n protoreflect.FieldNumber) bool { for ls := p.lazyInit().sorted; len(ls) > 0; { i := len(ls) / 2 switch r := fieldRange(ls[i]); { @@ -221,17 +220,17 @@ func (r fieldRange) String() string { } type FieldNumbers struct { - List []pref.FieldNumber + List []protoreflect.FieldNumber once sync.Once - has map[pref.FieldNumber]struct{} // protected by once + has map[protoreflect.FieldNumber]struct{} // protected by once } -func (p *FieldNumbers) Len() int { return len(p.List) } -func (p *FieldNumbers) Get(i int) pref.FieldNumber { return p.List[i] } -func (p *FieldNumbers) Has(n pref.FieldNumber) bool { +func (p *FieldNumbers) Len() int { return len(p.List) } +func (p *FieldNumbers) Get(i int) protoreflect.FieldNumber { return p.List[i] } +func (p *FieldNumbers) Has(n protoreflect.FieldNumber) bool { p.once.Do(func() { if len(p.List) > 0 { - p.has = make(map[pref.FieldNumber]struct{}, len(p.List)) + p.has = make(map[protoreflect.FieldNumber]struct{}, len(p.List)) for _, n := range p.List { p.has[n] = struct{}{} } @@ -244,30 +243,38 @@ func (p *FieldNumbers) Format(s fmt.State, r rune) { descfmt.FormatList func (p *FieldNumbers) ProtoInternal(pragma.DoNotImplement) {} type OneofFields struct { - List []pref.FieldDescriptor + List []protoreflect.FieldDescriptor once sync.Once - byName map[pref.Name]pref.FieldDescriptor // protected by once - byJSON map[string]pref.FieldDescriptor // protected by once - byText map[string]pref.FieldDescriptor // protected by once - byNum map[pref.FieldNumber]pref.FieldDescriptor // protected by once + byName map[protoreflect.Name]protoreflect.FieldDescriptor // protected by once + byJSON map[string]protoreflect.FieldDescriptor // protected by once + byText map[string]protoreflect.FieldDescriptor // protected by once + byNum map[protoreflect.FieldNumber]protoreflect.FieldDescriptor // protected by once } -func (p *OneofFields) Len() int { return len(p.List) } -func (p *OneofFields) Get(i int) pref.FieldDescriptor { return p.List[i] } -func (p *OneofFields) ByName(s pref.Name) pref.FieldDescriptor { return p.lazyInit().byName[s] } -func (p *OneofFields) ByJSONName(s string) pref.FieldDescriptor { return p.lazyInit().byJSON[s] } -func (p *OneofFields) ByTextName(s string) pref.FieldDescriptor { return p.lazyInit().byText[s] } -func (p *OneofFields) ByNumber(n pref.FieldNumber) pref.FieldDescriptor { return p.lazyInit().byNum[n] } -func (p *OneofFields) Format(s fmt.State, r rune) { descfmt.FormatList(s, r, p) } -func (p *OneofFields) ProtoInternal(pragma.DoNotImplement) {} +func (p *OneofFields) Len() int { return len(p.List) } +func (p *OneofFields) Get(i int) protoreflect.FieldDescriptor { return p.List[i] } +func (p *OneofFields) ByName(s protoreflect.Name) protoreflect.FieldDescriptor { + return p.lazyInit().byName[s] +} +func (p *OneofFields) ByJSONName(s string) protoreflect.FieldDescriptor { + return p.lazyInit().byJSON[s] +} +func (p *OneofFields) ByTextName(s string) protoreflect.FieldDescriptor { + return p.lazyInit().byText[s] +} +func (p *OneofFields) ByNumber(n protoreflect.FieldNumber) protoreflect.FieldDescriptor { + return p.lazyInit().byNum[n] +} +func (p *OneofFields) Format(s fmt.State, r rune) { descfmt.FormatList(s, r, p) } +func (p *OneofFields) ProtoInternal(pragma.DoNotImplement) {} func (p *OneofFields) lazyInit() *OneofFields { p.once.Do(func() { if len(p.List) > 0 { - p.byName = make(map[pref.Name]pref.FieldDescriptor, len(p.List)) - p.byJSON = make(map[string]pref.FieldDescriptor, len(p.List)) - p.byText = make(map[string]pref.FieldDescriptor, len(p.List)) - p.byNum = make(map[pref.FieldNumber]pref.FieldDescriptor, len(p.List)) + p.byName = make(map[protoreflect.Name]protoreflect.FieldDescriptor, len(p.List)) + p.byJSON = make(map[string]protoreflect.FieldDescriptor, len(p.List)) + p.byText = make(map[string]protoreflect.FieldDescriptor, len(p.List)) + p.byNum = make(map[protoreflect.FieldNumber]protoreflect.FieldDescriptor, len(p.List)) for _, f := range p.List { // Field names and numbers are guaranteed to be unique. p.byName[f.Name()] = f @@ -284,123 +291,123 @@ type SourceLocations struct { // List is a list of SourceLocations. // The SourceLocation.Next field does not need to be populated // as it will be lazily populated upon first need. - List []pref.SourceLocation + List []protoreflect.SourceLocation // File is the parent file descriptor that these locations are relative to. // If non-nil, ByDescriptor verifies that the provided descriptor // is a child of this file descriptor. - File pref.FileDescriptor + File protoreflect.FileDescriptor once sync.Once byPath map[pathKey]int } -func (p *SourceLocations) Len() int { return len(p.List) } -func (p *SourceLocations) Get(i int) pref.SourceLocation { return p.lazyInit().List[i] } -func (p *SourceLocations) byKey(k pathKey) pref.SourceLocation { +func (p *SourceLocations) Len() int { return len(p.List) } +func (p *SourceLocations) Get(i int) protoreflect.SourceLocation { return p.lazyInit().List[i] } +func (p *SourceLocations) byKey(k pathKey) protoreflect.SourceLocation { if i, ok := p.lazyInit().byPath[k]; ok { return p.List[i] } - return pref.SourceLocation{} + return protoreflect.SourceLocation{} } -func (p *SourceLocations) ByPath(path pref.SourcePath) pref.SourceLocation { +func (p *SourceLocations) ByPath(path protoreflect.SourcePath) protoreflect.SourceLocation { return p.byKey(newPathKey(path)) } -func (p *SourceLocations) ByDescriptor(desc pref.Descriptor) pref.SourceLocation { +func (p *SourceLocations) ByDescriptor(desc protoreflect.Descriptor) protoreflect.SourceLocation { if p.File != nil && desc != nil && p.File != desc.ParentFile() { - return pref.SourceLocation{} // mismatching parent files + return protoreflect.SourceLocation{} // mismatching parent files } var pathArr [16]int32 path := pathArr[:0] for { switch desc.(type) { - case pref.FileDescriptor: + case protoreflect.FileDescriptor: // Reverse the path since it was constructed in reverse. for i, j := 0, len(path)-1; i < j; i, j = i+1, j-1 { path[i], path[j] = path[j], path[i] } return p.byKey(newPathKey(path)) - case pref.MessageDescriptor: + case protoreflect.MessageDescriptor: path = append(path, int32(desc.Index())) desc = desc.Parent() switch desc.(type) { - case pref.FileDescriptor: + case protoreflect.FileDescriptor: path = append(path, int32(genid.FileDescriptorProto_MessageType_field_number)) - case pref.MessageDescriptor: + case protoreflect.MessageDescriptor: path = append(path, int32(genid.DescriptorProto_NestedType_field_number)) default: - return pref.SourceLocation{} + return protoreflect.SourceLocation{} } - case pref.FieldDescriptor: - isExtension := desc.(pref.FieldDescriptor).IsExtension() + case protoreflect.FieldDescriptor: + isExtension := desc.(protoreflect.FieldDescriptor).IsExtension() path = append(path, int32(desc.Index())) desc = desc.Parent() if isExtension { switch desc.(type) { - case pref.FileDescriptor: + case protoreflect.FileDescriptor: path = append(path, int32(genid.FileDescriptorProto_Extension_field_number)) - case pref.MessageDescriptor: + case protoreflect.MessageDescriptor: path = append(path, int32(genid.DescriptorProto_Extension_field_number)) default: - return pref.SourceLocation{} + return protoreflect.SourceLocation{} } } else { switch desc.(type) { - case pref.MessageDescriptor: + case protoreflect.MessageDescriptor: path = append(path, int32(genid.DescriptorProto_Field_field_number)) default: - return pref.SourceLocation{} + return protoreflect.SourceLocation{} } } - case pref.OneofDescriptor: + case protoreflect.OneofDescriptor: path = append(path, int32(desc.Index())) desc = desc.Parent() switch desc.(type) { - case pref.MessageDescriptor: + case protoreflect.MessageDescriptor: path = append(path, int32(genid.DescriptorProto_OneofDecl_field_number)) default: - return pref.SourceLocation{} + return protoreflect.SourceLocation{} } - case pref.EnumDescriptor: + case protoreflect.EnumDescriptor: path = append(path, int32(desc.Index())) desc = desc.Parent() switch desc.(type) { - case pref.FileDescriptor: + case protoreflect.FileDescriptor: path = append(path, int32(genid.FileDescriptorProto_EnumType_field_number)) - case pref.MessageDescriptor: + case protoreflect.MessageDescriptor: path = append(path, int32(genid.DescriptorProto_EnumType_field_number)) default: - return pref.SourceLocation{} + return protoreflect.SourceLocation{} } - case pref.EnumValueDescriptor: + case protoreflect.EnumValueDescriptor: path = append(path, int32(desc.Index())) desc = desc.Parent() switch desc.(type) { - case pref.EnumDescriptor: + case protoreflect.EnumDescriptor: path = append(path, int32(genid.EnumDescriptorProto_Value_field_number)) default: - return pref.SourceLocation{} + return protoreflect.SourceLocation{} } - case pref.ServiceDescriptor: + case protoreflect.ServiceDescriptor: path = append(path, int32(desc.Index())) desc = desc.Parent() switch desc.(type) { - case pref.FileDescriptor: + case protoreflect.FileDescriptor: path = append(path, int32(genid.FileDescriptorProto_Service_field_number)) default: - return pref.SourceLocation{} + return protoreflect.SourceLocation{} } - case pref.MethodDescriptor: + case protoreflect.MethodDescriptor: path = append(path, int32(desc.Index())) desc = desc.Parent() switch desc.(type) { - case pref.ServiceDescriptor: + case protoreflect.ServiceDescriptor: path = append(path, int32(genid.ServiceDescriptorProto_Method_field_number)) default: - return pref.SourceLocation{} + return protoreflect.SourceLocation{} } default: - return pref.SourceLocation{} + return protoreflect.SourceLocation{} } } } @@ -435,7 +442,7 @@ type pathKey struct { str string // used if the path does not fit in arr } -func newPathKey(p pref.SourcePath) (k pathKey) { +func newPathKey(p protoreflect.SourcePath) (k pathKey) { if len(p) < len(k.arr) { for i, ps := range p { if ps < 0 || math.MaxUint8 <= ps { diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go b/vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go index dbf2c605bfe54..28240ebc5c4ab 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/placeholder.go @@ -7,7 +7,7 @@ package filedesc import ( "google.golang.org/protobuf/internal/descopts" "google.golang.org/protobuf/internal/pragma" - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" ) var ( @@ -30,78 +30,80 @@ var ( // PlaceholderFile is a placeholder, representing only the file path. type PlaceholderFile string -func (f PlaceholderFile) ParentFile() pref.FileDescriptor { return f } -func (f PlaceholderFile) Parent() pref.Descriptor { return nil } -func (f PlaceholderFile) Index() int { return 0 } -func (f PlaceholderFile) Syntax() pref.Syntax { return 0 } -func (f PlaceholderFile) Name() pref.Name { return "" } -func (f PlaceholderFile) FullName() pref.FullName { return "" } -func (f PlaceholderFile) IsPlaceholder() bool { return true } -func (f PlaceholderFile) Options() pref.ProtoMessage { return descopts.File } -func (f PlaceholderFile) Path() string { return string(f) } -func (f PlaceholderFile) Package() pref.FullName { return "" } -func (f PlaceholderFile) Imports() pref.FileImports { return emptyFiles } -func (f PlaceholderFile) Messages() pref.MessageDescriptors { return emptyMessages } -func (f PlaceholderFile) Enums() pref.EnumDescriptors { return emptyEnums } -func (f PlaceholderFile) Extensions() pref.ExtensionDescriptors { return emptyExtensions } -func (f PlaceholderFile) Services() pref.ServiceDescriptors { return emptyServices } -func (f PlaceholderFile) SourceLocations() pref.SourceLocations { return emptySourceLocations } -func (f PlaceholderFile) ProtoType(pref.FileDescriptor) { return } -func (f PlaceholderFile) ProtoInternal(pragma.DoNotImplement) { return } +func (f PlaceholderFile) ParentFile() protoreflect.FileDescriptor { return f } +func (f PlaceholderFile) Parent() protoreflect.Descriptor { return nil } +func (f PlaceholderFile) Index() int { return 0 } +func (f PlaceholderFile) Syntax() protoreflect.Syntax { return 0 } +func (f PlaceholderFile) Name() protoreflect.Name { return "" } +func (f PlaceholderFile) FullName() protoreflect.FullName { return "" } +func (f PlaceholderFile) IsPlaceholder() bool { return true } +func (f PlaceholderFile) Options() protoreflect.ProtoMessage { return descopts.File } +func (f PlaceholderFile) Path() string { return string(f) } +func (f PlaceholderFile) Package() protoreflect.FullName { return "" } +func (f PlaceholderFile) Imports() protoreflect.FileImports { return emptyFiles } +func (f PlaceholderFile) Messages() protoreflect.MessageDescriptors { return emptyMessages } +func (f PlaceholderFile) Enums() protoreflect.EnumDescriptors { return emptyEnums } +func (f PlaceholderFile) Extensions() protoreflect.ExtensionDescriptors { return emptyExtensions } +func (f PlaceholderFile) Services() protoreflect.ServiceDescriptors { return emptyServices } +func (f PlaceholderFile) SourceLocations() protoreflect.SourceLocations { return emptySourceLocations } +func (f PlaceholderFile) ProtoType(protoreflect.FileDescriptor) { return } +func (f PlaceholderFile) ProtoInternal(pragma.DoNotImplement) { return } // PlaceholderEnum is a placeholder, representing only the full name. -type PlaceholderEnum pref.FullName +type PlaceholderEnum protoreflect.FullName -func (e PlaceholderEnum) ParentFile() pref.FileDescriptor { return nil } -func (e PlaceholderEnum) Parent() pref.Descriptor { return nil } -func (e PlaceholderEnum) Index() int { return 0 } -func (e PlaceholderEnum) Syntax() pref.Syntax { return 0 } -func (e PlaceholderEnum) Name() pref.Name { return pref.FullName(e).Name() } -func (e PlaceholderEnum) FullName() pref.FullName { return pref.FullName(e) } -func (e PlaceholderEnum) IsPlaceholder() bool { return true } -func (e PlaceholderEnum) Options() pref.ProtoMessage { return descopts.Enum } -func (e PlaceholderEnum) Values() pref.EnumValueDescriptors { return emptyEnumValues } -func (e PlaceholderEnum) ReservedNames() pref.Names { return emptyNames } -func (e PlaceholderEnum) ReservedRanges() pref.EnumRanges { return emptyEnumRanges } -func (e PlaceholderEnum) ProtoType(pref.EnumDescriptor) { return } -func (e PlaceholderEnum) ProtoInternal(pragma.DoNotImplement) { return } +func (e PlaceholderEnum) ParentFile() protoreflect.FileDescriptor { return nil } +func (e PlaceholderEnum) Parent() protoreflect.Descriptor { return nil } +func (e PlaceholderEnum) Index() int { return 0 } +func (e PlaceholderEnum) Syntax() protoreflect.Syntax { return 0 } +func (e PlaceholderEnum) Name() protoreflect.Name { return protoreflect.FullName(e).Name() } +func (e PlaceholderEnum) FullName() protoreflect.FullName { return protoreflect.FullName(e) } +func (e PlaceholderEnum) IsPlaceholder() bool { return true } +func (e PlaceholderEnum) Options() protoreflect.ProtoMessage { return descopts.Enum } +func (e PlaceholderEnum) Values() protoreflect.EnumValueDescriptors { return emptyEnumValues } +func (e PlaceholderEnum) ReservedNames() protoreflect.Names { return emptyNames } +func (e PlaceholderEnum) ReservedRanges() protoreflect.EnumRanges { return emptyEnumRanges } +func (e PlaceholderEnum) ProtoType(protoreflect.EnumDescriptor) { return } +func (e PlaceholderEnum) ProtoInternal(pragma.DoNotImplement) { return } // PlaceholderEnumValue is a placeholder, representing only the full name. -type PlaceholderEnumValue pref.FullName +type PlaceholderEnumValue protoreflect.FullName -func (e PlaceholderEnumValue) ParentFile() pref.FileDescriptor { return nil } -func (e PlaceholderEnumValue) Parent() pref.Descriptor { return nil } -func (e PlaceholderEnumValue) Index() int { return 0 } -func (e PlaceholderEnumValue) Syntax() pref.Syntax { return 0 } -func (e PlaceholderEnumValue) Name() pref.Name { return pref.FullName(e).Name() } -func (e PlaceholderEnumValue) FullName() pref.FullName { return pref.FullName(e) } -func (e PlaceholderEnumValue) IsPlaceholder() bool { return true } -func (e PlaceholderEnumValue) Options() pref.ProtoMessage { return descopts.EnumValue } -func (e PlaceholderEnumValue) Number() pref.EnumNumber { return 0 } -func (e PlaceholderEnumValue) ProtoType(pref.EnumValueDescriptor) { return } -func (e PlaceholderEnumValue) ProtoInternal(pragma.DoNotImplement) { return } +func (e PlaceholderEnumValue) ParentFile() protoreflect.FileDescriptor { return nil } +func (e PlaceholderEnumValue) Parent() protoreflect.Descriptor { return nil } +func (e PlaceholderEnumValue) Index() int { return 0 } +func (e PlaceholderEnumValue) Syntax() protoreflect.Syntax { return 0 } +func (e PlaceholderEnumValue) Name() protoreflect.Name { return protoreflect.FullName(e).Name() } +func (e PlaceholderEnumValue) FullName() protoreflect.FullName { return protoreflect.FullName(e) } +func (e PlaceholderEnumValue) IsPlaceholder() bool { return true } +func (e PlaceholderEnumValue) Options() protoreflect.ProtoMessage { return descopts.EnumValue } +func (e PlaceholderEnumValue) Number() protoreflect.EnumNumber { return 0 } +func (e PlaceholderEnumValue) ProtoType(protoreflect.EnumValueDescriptor) { return } +func (e PlaceholderEnumValue) ProtoInternal(pragma.DoNotImplement) { return } // PlaceholderMessage is a placeholder, representing only the full name. -type PlaceholderMessage pref.FullName +type PlaceholderMessage protoreflect.FullName -func (m PlaceholderMessage) ParentFile() pref.FileDescriptor { return nil } -func (m PlaceholderMessage) Parent() pref.Descriptor { return nil } -func (m PlaceholderMessage) Index() int { return 0 } -func (m PlaceholderMessage) Syntax() pref.Syntax { return 0 } -func (m PlaceholderMessage) Name() pref.Name { return pref.FullName(m).Name() } -func (m PlaceholderMessage) FullName() pref.FullName { return pref.FullName(m) } -func (m PlaceholderMessage) IsPlaceholder() bool { return true } -func (m PlaceholderMessage) Options() pref.ProtoMessage { return descopts.Message } -func (m PlaceholderMessage) IsMapEntry() bool { return false } -func (m PlaceholderMessage) Fields() pref.FieldDescriptors { return emptyFields } -func (m PlaceholderMessage) Oneofs() pref.OneofDescriptors { return emptyOneofs } -func (m PlaceholderMessage) ReservedNames() pref.Names { return emptyNames } -func (m PlaceholderMessage) ReservedRanges() pref.FieldRanges { return emptyFieldRanges } -func (m PlaceholderMessage) RequiredNumbers() pref.FieldNumbers { return emptyFieldNumbers } -func (m PlaceholderMessage) ExtensionRanges() pref.FieldRanges { return emptyFieldRanges } -func (m PlaceholderMessage) ExtensionRangeOptions(int) pref.ProtoMessage { panic("index out of range") } -func (m PlaceholderMessage) Messages() pref.MessageDescriptors { return emptyMessages } -func (m PlaceholderMessage) Enums() pref.EnumDescriptors { return emptyEnums } -func (m PlaceholderMessage) Extensions() pref.ExtensionDescriptors { return emptyExtensions } -func (m PlaceholderMessage) ProtoType(pref.MessageDescriptor) { return } -func (m PlaceholderMessage) ProtoInternal(pragma.DoNotImplement) { return } +func (m PlaceholderMessage) ParentFile() protoreflect.FileDescriptor { return nil } +func (m PlaceholderMessage) Parent() protoreflect.Descriptor { return nil } +func (m PlaceholderMessage) Index() int { return 0 } +func (m PlaceholderMessage) Syntax() protoreflect.Syntax { return 0 } +func (m PlaceholderMessage) Name() protoreflect.Name { return protoreflect.FullName(m).Name() } +func (m PlaceholderMessage) FullName() protoreflect.FullName { return protoreflect.FullName(m) } +func (m PlaceholderMessage) IsPlaceholder() bool { return true } +func (m PlaceholderMessage) Options() protoreflect.ProtoMessage { return descopts.Message } +func (m PlaceholderMessage) IsMapEntry() bool { return false } +func (m PlaceholderMessage) Fields() protoreflect.FieldDescriptors { return emptyFields } +func (m PlaceholderMessage) Oneofs() protoreflect.OneofDescriptors { return emptyOneofs } +func (m PlaceholderMessage) ReservedNames() protoreflect.Names { return emptyNames } +func (m PlaceholderMessage) ReservedRanges() protoreflect.FieldRanges { return emptyFieldRanges } +func (m PlaceholderMessage) RequiredNumbers() protoreflect.FieldNumbers { return emptyFieldNumbers } +func (m PlaceholderMessage) ExtensionRanges() protoreflect.FieldRanges { return emptyFieldRanges } +func (m PlaceholderMessage) ExtensionRangeOptions(int) protoreflect.ProtoMessage { + panic("index out of range") +} +func (m PlaceholderMessage) Messages() protoreflect.MessageDescriptors { return emptyMessages } +func (m PlaceholderMessage) Enums() protoreflect.EnumDescriptors { return emptyEnums } +func (m PlaceholderMessage) Extensions() protoreflect.ExtensionDescriptors { return emptyExtensions } +func (m PlaceholderMessage) ProtoType(protoreflect.MessageDescriptor) { return } +func (m PlaceholderMessage) ProtoInternal(pragma.DoNotImplement) { return } diff --git a/vendor/google.golang.org/protobuf/internal/filetype/build.go b/vendor/google.golang.org/protobuf/internal/filetype/build.go index 0a0dd35de5a7c..f0e38c4ef4e08 100644 --- a/vendor/google.golang.org/protobuf/internal/filetype/build.go +++ b/vendor/google.golang.org/protobuf/internal/filetype/build.go @@ -10,17 +10,16 @@ import ( "reflect" "google.golang.org/protobuf/internal/descopts" - fdesc "google.golang.org/protobuf/internal/filedesc" + "google.golang.org/protobuf/internal/filedesc" pimpl "google.golang.org/protobuf/internal/impl" - pref "google.golang.org/protobuf/reflect/protoreflect" - preg "google.golang.org/protobuf/reflect/protoregistry" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" ) // Builder constructs type descriptors from a raw file descriptor // and associated Go types for each enum and message declaration. // -// -// Flattened Ordering +// # Flattened Ordering // // The protobuf type system represents declarations as a tree. Certain nodes in // the tree require us to either associate it with a concrete Go type or to @@ -52,7 +51,7 @@ import ( // that children themselves may have. type Builder struct { // File is the underlying file descriptor builder. - File fdesc.Builder + File filedesc.Builder // GoTypes is a unique set of the Go types for all declarations and // dependencies. Each type is represented as a zero value of the Go type. @@ -108,22 +107,22 @@ type Builder struct { // TypeRegistry is the registry to register each type descriptor. // If nil, it uses protoregistry.GlobalTypes. TypeRegistry interface { - RegisterMessage(pref.MessageType) error - RegisterEnum(pref.EnumType) error - RegisterExtension(pref.ExtensionType) error + RegisterMessage(protoreflect.MessageType) error + RegisterEnum(protoreflect.EnumType) error + RegisterExtension(protoreflect.ExtensionType) error } } // Out is the output of the builder. type Out struct { - File pref.FileDescriptor + File protoreflect.FileDescriptor } func (tb Builder) Build() (out Out) { // Replace the resolver with one that resolves dependencies by index, // which is faster and more reliable than relying on the global registry. if tb.File.FileRegistry == nil { - tb.File.FileRegistry = preg.GlobalFiles + tb.File.FileRegistry = protoregistry.GlobalFiles } tb.File.FileRegistry = &resolverByIndex{ goTypes: tb.GoTypes, @@ -133,7 +132,7 @@ func (tb Builder) Build() (out Out) { // Initialize registry if unpopulated. if tb.TypeRegistry == nil { - tb.TypeRegistry = preg.GlobalTypes + tb.TypeRegistry = protoregistry.GlobalTypes } fbOut := tb.File.Build() @@ -183,23 +182,23 @@ func (tb Builder) Build() (out Out) { for i := range fbOut.Messages { switch fbOut.Messages[i].Name() { case "FileOptions": - descopts.File = messageGoTypes[i].(pref.ProtoMessage) + descopts.File = messageGoTypes[i].(protoreflect.ProtoMessage) case "EnumOptions": - descopts.Enum = messageGoTypes[i].(pref.ProtoMessage) + descopts.Enum = messageGoTypes[i].(protoreflect.ProtoMessage) case "EnumValueOptions": - descopts.EnumValue = messageGoTypes[i].(pref.ProtoMessage) + descopts.EnumValue = messageGoTypes[i].(protoreflect.ProtoMessage) case "MessageOptions": - descopts.Message = messageGoTypes[i].(pref.ProtoMessage) + descopts.Message = messageGoTypes[i].(protoreflect.ProtoMessage) case "FieldOptions": - descopts.Field = messageGoTypes[i].(pref.ProtoMessage) + descopts.Field = messageGoTypes[i].(protoreflect.ProtoMessage) case "OneofOptions": - descopts.Oneof = messageGoTypes[i].(pref.ProtoMessage) + descopts.Oneof = messageGoTypes[i].(protoreflect.ProtoMessage) case "ExtensionRangeOptions": - descopts.ExtensionRange = messageGoTypes[i].(pref.ProtoMessage) + descopts.ExtensionRange = messageGoTypes[i].(protoreflect.ProtoMessage) case "ServiceOptions": - descopts.Service = messageGoTypes[i].(pref.ProtoMessage) + descopts.Service = messageGoTypes[i].(protoreflect.ProtoMessage) case "MethodOptions": - descopts.Method = messageGoTypes[i].(pref.ProtoMessage) + descopts.Method = messageGoTypes[i].(protoreflect.ProtoMessage) } } } @@ -216,11 +215,11 @@ func (tb Builder) Build() (out Out) { const listExtDeps = 2 var goType reflect.Type switch fbOut.Extensions[i].L1.Kind { - case pref.EnumKind: + case protoreflect.EnumKind: j := depIdxs.Get(tb.DependencyIndexes, listExtDeps, depIdx) goType = reflect.TypeOf(tb.GoTypes[j]) depIdx++ - case pref.MessageKind, pref.GroupKind: + case protoreflect.MessageKind, protoreflect.GroupKind: j := depIdxs.Get(tb.DependencyIndexes, listExtDeps, depIdx) goType = reflect.TypeOf(tb.GoTypes[j]) depIdx++ @@ -242,22 +241,22 @@ func (tb Builder) Build() (out Out) { return out } -var goTypeForPBKind = map[pref.Kind]reflect.Type{ - pref.BoolKind: reflect.TypeOf(bool(false)), - pref.Int32Kind: reflect.TypeOf(int32(0)), - pref.Sint32Kind: reflect.TypeOf(int32(0)), - pref.Sfixed32Kind: reflect.TypeOf(int32(0)), - pref.Int64Kind: reflect.TypeOf(int64(0)), - pref.Sint64Kind: reflect.TypeOf(int64(0)), - pref.Sfixed64Kind: reflect.TypeOf(int64(0)), - pref.Uint32Kind: reflect.TypeOf(uint32(0)), - pref.Fixed32Kind: reflect.TypeOf(uint32(0)), - pref.Uint64Kind: reflect.TypeOf(uint64(0)), - pref.Fixed64Kind: reflect.TypeOf(uint64(0)), - pref.FloatKind: reflect.TypeOf(float32(0)), - pref.DoubleKind: reflect.TypeOf(float64(0)), - pref.StringKind: reflect.TypeOf(string("")), - pref.BytesKind: reflect.TypeOf([]byte(nil)), +var goTypeForPBKind = map[protoreflect.Kind]reflect.Type{ + protoreflect.BoolKind: reflect.TypeOf(bool(false)), + protoreflect.Int32Kind: reflect.TypeOf(int32(0)), + protoreflect.Sint32Kind: reflect.TypeOf(int32(0)), + protoreflect.Sfixed32Kind: reflect.TypeOf(int32(0)), + protoreflect.Int64Kind: reflect.TypeOf(int64(0)), + protoreflect.Sint64Kind: reflect.TypeOf(int64(0)), + protoreflect.Sfixed64Kind: reflect.TypeOf(int64(0)), + protoreflect.Uint32Kind: reflect.TypeOf(uint32(0)), + protoreflect.Fixed32Kind: reflect.TypeOf(uint32(0)), + protoreflect.Uint64Kind: reflect.TypeOf(uint64(0)), + protoreflect.Fixed64Kind: reflect.TypeOf(uint64(0)), + protoreflect.FloatKind: reflect.TypeOf(float32(0)), + protoreflect.DoubleKind: reflect.TypeOf(float64(0)), + protoreflect.StringKind: reflect.TypeOf(string("")), + protoreflect.BytesKind: reflect.TypeOf([]byte(nil)), } type depIdxs []int32 @@ -274,13 +273,13 @@ type ( fileRegistry } fileRegistry interface { - FindFileByPath(string) (pref.FileDescriptor, error) - FindDescriptorByName(pref.FullName) (pref.Descriptor, error) - RegisterFile(pref.FileDescriptor) error + FindFileByPath(string) (protoreflect.FileDescriptor, error) + FindDescriptorByName(protoreflect.FullName) (protoreflect.Descriptor, error) + RegisterFile(protoreflect.FileDescriptor) error } ) -func (r *resolverByIndex) FindEnumByIndex(i, j int32, es []fdesc.Enum, ms []fdesc.Message) pref.EnumDescriptor { +func (r *resolverByIndex) FindEnumByIndex(i, j int32, es []filedesc.Enum, ms []filedesc.Message) protoreflect.EnumDescriptor { if depIdx := int(r.depIdxs.Get(i, j)); int(depIdx) < len(es)+len(ms) { return &es[depIdx] } else { @@ -288,7 +287,7 @@ func (r *resolverByIndex) FindEnumByIndex(i, j int32, es []fdesc.Enum, ms []fdes } } -func (r *resolverByIndex) FindMessageByIndex(i, j int32, es []fdesc.Enum, ms []fdesc.Message) pref.MessageDescriptor { +func (r *resolverByIndex) FindMessageByIndex(i, j int32, es []filedesc.Enum, ms []filedesc.Message) protoreflect.MessageDescriptor { if depIdx := int(r.depIdxs.Get(i, j)); depIdx < len(es)+len(ms) { return &ms[depIdx-len(es)] } else { diff --git a/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go b/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go index e3cdf1c20591f..5c0e8f73f4e47 100644 --- a/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +++ b/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go @@ -50,6 +50,7 @@ const ( FileDescriptorProto_Options_field_name protoreflect.Name = "options" FileDescriptorProto_SourceCodeInfo_field_name protoreflect.Name = "source_code_info" FileDescriptorProto_Syntax_field_name protoreflect.Name = "syntax" + FileDescriptorProto_Edition_field_name protoreflect.Name = "edition" FileDescriptorProto_Name_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.name" FileDescriptorProto_Package_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.package" @@ -63,6 +64,7 @@ const ( FileDescriptorProto_Options_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.options" FileDescriptorProto_SourceCodeInfo_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.source_code_info" FileDescriptorProto_Syntax_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.syntax" + FileDescriptorProto_Edition_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.edition" ) // Field numbers for google.protobuf.FileDescriptorProto. @@ -79,6 +81,7 @@ const ( FileDescriptorProto_Options_field_number protoreflect.FieldNumber = 8 FileDescriptorProto_SourceCodeInfo_field_number protoreflect.FieldNumber = 9 FileDescriptorProto_Syntax_field_number protoreflect.FieldNumber = 12 + FileDescriptorProto_Edition_field_number protoreflect.FieldNumber = 13 ) // Names for google.protobuf.DescriptorProto. @@ -494,26 +497,29 @@ const ( // Field names for google.protobuf.MessageOptions. const ( - MessageOptions_MessageSetWireFormat_field_name protoreflect.Name = "message_set_wire_format" - MessageOptions_NoStandardDescriptorAccessor_field_name protoreflect.Name = "no_standard_descriptor_accessor" - MessageOptions_Deprecated_field_name protoreflect.Name = "deprecated" - MessageOptions_MapEntry_field_name protoreflect.Name = "map_entry" - MessageOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" + MessageOptions_MessageSetWireFormat_field_name protoreflect.Name = "message_set_wire_format" + MessageOptions_NoStandardDescriptorAccessor_field_name protoreflect.Name = "no_standard_descriptor_accessor" + MessageOptions_Deprecated_field_name protoreflect.Name = "deprecated" + MessageOptions_MapEntry_field_name protoreflect.Name = "map_entry" + MessageOptions_DeprecatedLegacyJsonFieldConflicts_field_name protoreflect.Name = "deprecated_legacy_json_field_conflicts" + MessageOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" - MessageOptions_MessageSetWireFormat_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.message_set_wire_format" - MessageOptions_NoStandardDescriptorAccessor_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.no_standard_descriptor_accessor" - MessageOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.deprecated" - MessageOptions_MapEntry_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.map_entry" - MessageOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.uninterpreted_option" + MessageOptions_MessageSetWireFormat_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.message_set_wire_format" + MessageOptions_NoStandardDescriptorAccessor_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.no_standard_descriptor_accessor" + MessageOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.deprecated" + MessageOptions_MapEntry_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.map_entry" + MessageOptions_DeprecatedLegacyJsonFieldConflicts_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.deprecated_legacy_json_field_conflicts" + MessageOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.uninterpreted_option" ) // Field numbers for google.protobuf.MessageOptions. const ( - MessageOptions_MessageSetWireFormat_field_number protoreflect.FieldNumber = 1 - MessageOptions_NoStandardDescriptorAccessor_field_number protoreflect.FieldNumber = 2 - MessageOptions_Deprecated_field_number protoreflect.FieldNumber = 3 - MessageOptions_MapEntry_field_number protoreflect.FieldNumber = 7 - MessageOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 + MessageOptions_MessageSetWireFormat_field_number protoreflect.FieldNumber = 1 + MessageOptions_NoStandardDescriptorAccessor_field_number protoreflect.FieldNumber = 2 + MessageOptions_Deprecated_field_number protoreflect.FieldNumber = 3 + MessageOptions_MapEntry_field_number protoreflect.FieldNumber = 7 + MessageOptions_DeprecatedLegacyJsonFieldConflicts_field_number protoreflect.FieldNumber = 11 + MessageOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 ) // Names for google.protobuf.FieldOptions. @@ -528,16 +534,24 @@ const ( FieldOptions_Packed_field_name protoreflect.Name = "packed" FieldOptions_Jstype_field_name protoreflect.Name = "jstype" FieldOptions_Lazy_field_name protoreflect.Name = "lazy" + FieldOptions_UnverifiedLazy_field_name protoreflect.Name = "unverified_lazy" FieldOptions_Deprecated_field_name protoreflect.Name = "deprecated" FieldOptions_Weak_field_name protoreflect.Name = "weak" + FieldOptions_DebugRedact_field_name protoreflect.Name = "debug_redact" + FieldOptions_Retention_field_name protoreflect.Name = "retention" + FieldOptions_Target_field_name protoreflect.Name = "target" FieldOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" FieldOptions_Ctype_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.ctype" FieldOptions_Packed_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.packed" FieldOptions_Jstype_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.jstype" FieldOptions_Lazy_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.lazy" + FieldOptions_UnverifiedLazy_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.unverified_lazy" FieldOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.deprecated" FieldOptions_Weak_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.weak" + FieldOptions_DebugRedact_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.debug_redact" + FieldOptions_Retention_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.retention" + FieldOptions_Target_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.target" FieldOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.uninterpreted_option" ) @@ -547,8 +561,12 @@ const ( FieldOptions_Packed_field_number protoreflect.FieldNumber = 2 FieldOptions_Jstype_field_number protoreflect.FieldNumber = 6 FieldOptions_Lazy_field_number protoreflect.FieldNumber = 5 + FieldOptions_UnverifiedLazy_field_number protoreflect.FieldNumber = 15 FieldOptions_Deprecated_field_number protoreflect.FieldNumber = 3 FieldOptions_Weak_field_number protoreflect.FieldNumber = 10 + FieldOptions_DebugRedact_field_number protoreflect.FieldNumber = 16 + FieldOptions_Retention_field_number protoreflect.FieldNumber = 17 + FieldOptions_Target_field_number protoreflect.FieldNumber = 18 FieldOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 ) @@ -564,6 +582,18 @@ const ( FieldOptions_JSType_enum_name = "JSType" ) +// Full and short names for google.protobuf.FieldOptions.OptionRetention. +const ( + FieldOptions_OptionRetention_enum_fullname = "google.protobuf.FieldOptions.OptionRetention" + FieldOptions_OptionRetention_enum_name = "OptionRetention" +) + +// Full and short names for google.protobuf.FieldOptions.OptionTargetType. +const ( + FieldOptions_OptionTargetType_enum_fullname = "google.protobuf.FieldOptions.OptionTargetType" + FieldOptions_OptionTargetType_enum_name = "OptionTargetType" +) + // Names for google.protobuf.OneofOptions. const ( OneofOptions_message_name protoreflect.Name = "OneofOptions" @@ -590,20 +620,23 @@ const ( // Field names for google.protobuf.EnumOptions. const ( - EnumOptions_AllowAlias_field_name protoreflect.Name = "allow_alias" - EnumOptions_Deprecated_field_name protoreflect.Name = "deprecated" - EnumOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" + EnumOptions_AllowAlias_field_name protoreflect.Name = "allow_alias" + EnumOptions_Deprecated_field_name protoreflect.Name = "deprecated" + EnumOptions_DeprecatedLegacyJsonFieldConflicts_field_name protoreflect.Name = "deprecated_legacy_json_field_conflicts" + EnumOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" - EnumOptions_AllowAlias_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.allow_alias" - EnumOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.deprecated" - EnumOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.uninterpreted_option" + EnumOptions_AllowAlias_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.allow_alias" + EnumOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.deprecated" + EnumOptions_DeprecatedLegacyJsonFieldConflicts_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.deprecated_legacy_json_field_conflicts" + EnumOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.uninterpreted_option" ) // Field numbers for google.protobuf.EnumOptions. const ( - EnumOptions_AllowAlias_field_number protoreflect.FieldNumber = 2 - EnumOptions_Deprecated_field_number protoreflect.FieldNumber = 3 - EnumOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 + EnumOptions_AllowAlias_field_number protoreflect.FieldNumber = 2 + EnumOptions_Deprecated_field_number protoreflect.FieldNumber = 3 + EnumOptions_DeprecatedLegacyJsonFieldConflicts_field_number protoreflect.FieldNumber = 6 + EnumOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 ) // Names for google.protobuf.EnumValueOptions. @@ -813,11 +846,13 @@ const ( GeneratedCodeInfo_Annotation_SourceFile_field_name protoreflect.Name = "source_file" GeneratedCodeInfo_Annotation_Begin_field_name protoreflect.Name = "begin" GeneratedCodeInfo_Annotation_End_field_name protoreflect.Name = "end" + GeneratedCodeInfo_Annotation_Semantic_field_name protoreflect.Name = "semantic" GeneratedCodeInfo_Annotation_Path_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.path" GeneratedCodeInfo_Annotation_SourceFile_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.source_file" GeneratedCodeInfo_Annotation_Begin_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.begin" GeneratedCodeInfo_Annotation_End_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.end" + GeneratedCodeInfo_Annotation_Semantic_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.semantic" ) // Field numbers for google.protobuf.GeneratedCodeInfo.Annotation. @@ -826,4 +861,11 @@ const ( GeneratedCodeInfo_Annotation_SourceFile_field_number protoreflect.FieldNumber = 2 GeneratedCodeInfo_Annotation_Begin_field_number protoreflect.FieldNumber = 3 GeneratedCodeInfo_Annotation_End_field_number protoreflect.FieldNumber = 4 + GeneratedCodeInfo_Annotation_Semantic_field_number protoreflect.FieldNumber = 5 +) + +// Full and short names for google.protobuf.GeneratedCodeInfo.Annotation.Semantic. +const ( + GeneratedCodeInfo_Annotation_Semantic_enum_fullname = "google.protobuf.GeneratedCodeInfo.Annotation.Semantic" + GeneratedCodeInfo_Annotation_Semantic_enum_name = "Semantic" ) diff --git a/vendor/google.golang.org/protobuf/internal/impl/api_export.go b/vendor/google.golang.org/protobuf/internal/impl/api_export.go index abee5f30e9fd0..a371f98de143f 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/api_export.go +++ b/vendor/google.golang.org/protobuf/internal/impl/api_export.go @@ -12,8 +12,8 @@ import ( "google.golang.org/protobuf/encoding/prototext" "google.golang.org/protobuf/internal/errors" "google.golang.org/protobuf/proto" - pref "google.golang.org/protobuf/reflect/protoreflect" - piface "google.golang.org/protobuf/runtime/protoiface" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/runtime/protoiface" ) // Export is a zero-length named type that exists only to export a set of @@ -32,11 +32,11 @@ type enum = interface{} // EnumOf returns the protoreflect.Enum interface over e. // It returns nil if e is nil. -func (Export) EnumOf(e enum) pref.Enum { +func (Export) EnumOf(e enum) protoreflect.Enum { switch e := e.(type) { case nil: return nil - case pref.Enum: + case protoreflect.Enum: return e default: return legacyWrapEnum(reflect.ValueOf(e)) @@ -45,11 +45,11 @@ func (Export) EnumOf(e enum) pref.Enum { // EnumDescriptorOf returns the protoreflect.EnumDescriptor for e. // It returns nil if e is nil. -func (Export) EnumDescriptorOf(e enum) pref.EnumDescriptor { +func (Export) EnumDescriptorOf(e enum) protoreflect.EnumDescriptor { switch e := e.(type) { case nil: return nil - case pref.Enum: + case protoreflect.Enum: return e.Descriptor() default: return LegacyLoadEnumDesc(reflect.TypeOf(e)) @@ -58,11 +58,11 @@ func (Export) EnumDescriptorOf(e enum) pref.EnumDescriptor { // EnumTypeOf returns the protoreflect.EnumType for e. // It returns nil if e is nil. -func (Export) EnumTypeOf(e enum) pref.EnumType { +func (Export) EnumTypeOf(e enum) protoreflect.EnumType { switch e := e.(type) { case nil: return nil - case pref.Enum: + case protoreflect.Enum: return e.Type() default: return legacyLoadEnumType(reflect.TypeOf(e)) @@ -71,7 +71,7 @@ func (Export) EnumTypeOf(e enum) pref.EnumType { // EnumStringOf returns the enum value as a string, either as the name if // the number is resolvable, or the number formatted as a string. -func (Export) EnumStringOf(ed pref.EnumDescriptor, n pref.EnumNumber) string { +func (Export) EnumStringOf(ed protoreflect.EnumDescriptor, n protoreflect.EnumNumber) string { ev := ed.Values().ByNumber(n) if ev != nil { return string(ev.Name()) @@ -84,7 +84,7 @@ func (Export) EnumStringOf(ed pref.EnumDescriptor, n pref.EnumNumber) string { type message = interface{} // legacyMessageWrapper wraps a v2 message as a v1 message. -type legacyMessageWrapper struct{ m pref.ProtoMessage } +type legacyMessageWrapper struct{ m protoreflect.ProtoMessage } func (m legacyMessageWrapper) Reset() { proto.Reset(m.m) } func (m legacyMessageWrapper) String() string { return Export{}.MessageStringOf(m.m) } @@ -92,30 +92,30 @@ func (m legacyMessageWrapper) ProtoMessage() {} // ProtoMessageV1Of converts either a v1 or v2 message to a v1 message. // It returns nil if m is nil. -func (Export) ProtoMessageV1Of(m message) piface.MessageV1 { +func (Export) ProtoMessageV1Of(m message) protoiface.MessageV1 { switch mv := m.(type) { case nil: return nil - case piface.MessageV1: + case protoiface.MessageV1: return mv case unwrapper: return Export{}.ProtoMessageV1Of(mv.protoUnwrap()) - case pref.ProtoMessage: + case protoreflect.ProtoMessage: return legacyMessageWrapper{mv} default: panic(fmt.Sprintf("message %T is neither a v1 or v2 Message", m)) } } -func (Export) protoMessageV2Of(m message) pref.ProtoMessage { +func (Export) protoMessageV2Of(m message) protoreflect.ProtoMessage { switch mv := m.(type) { case nil: return nil - case pref.ProtoMessage: + case protoreflect.ProtoMessage: return mv case legacyMessageWrapper: return mv.m - case piface.MessageV1: + case protoiface.MessageV1: return nil default: panic(fmt.Sprintf("message %T is neither a v1 or v2 Message", m)) @@ -124,7 +124,7 @@ func (Export) protoMessageV2Of(m message) pref.ProtoMessage { // ProtoMessageV2Of converts either a v1 or v2 message to a v2 message. // It returns nil if m is nil. -func (Export) ProtoMessageV2Of(m message) pref.ProtoMessage { +func (Export) ProtoMessageV2Of(m message) protoreflect.ProtoMessage { if m == nil { return nil } @@ -136,7 +136,7 @@ func (Export) ProtoMessageV2Of(m message) pref.ProtoMessage { // MessageOf returns the protoreflect.Message interface over m. // It returns nil if m is nil. -func (Export) MessageOf(m message) pref.Message { +func (Export) MessageOf(m message) protoreflect.Message { if m == nil { return nil } @@ -148,7 +148,7 @@ func (Export) MessageOf(m message) pref.Message { // MessageDescriptorOf returns the protoreflect.MessageDescriptor for m. // It returns nil if m is nil. -func (Export) MessageDescriptorOf(m message) pref.MessageDescriptor { +func (Export) MessageDescriptorOf(m message) protoreflect.MessageDescriptor { if m == nil { return nil } @@ -160,7 +160,7 @@ func (Export) MessageDescriptorOf(m message) pref.MessageDescriptor { // MessageTypeOf returns the protoreflect.MessageType for m. // It returns nil if m is nil. -func (Export) MessageTypeOf(m message) pref.MessageType { +func (Export) MessageTypeOf(m message) protoreflect.MessageType { if m == nil { return nil } @@ -172,6 +172,6 @@ func (Export) MessageTypeOf(m message) pref.MessageType { // MessageStringOf returns the message value as a string, // which is the message serialized in the protobuf text format. -func (Export) MessageStringOf(m pref.ProtoMessage) string { +func (Export) MessageStringOf(m protoreflect.ProtoMessage) string { return prototext.MarshalOptions{Multiline: false}.Format(m) } diff --git a/vendor/google.golang.org/protobuf/internal/impl/checkinit.go b/vendor/google.golang.org/protobuf/internal/impl/checkinit.go index b82341e575cb3..bff041edc946c 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/checkinit.go +++ b/vendor/google.golang.org/protobuf/internal/impl/checkinit.go @@ -8,18 +8,18 @@ import ( "sync" "google.golang.org/protobuf/internal/errors" - pref "google.golang.org/protobuf/reflect/protoreflect" - piface "google.golang.org/protobuf/runtime/protoiface" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/runtime/protoiface" ) -func (mi *MessageInfo) checkInitialized(in piface.CheckInitializedInput) (piface.CheckInitializedOutput, error) { +func (mi *MessageInfo) checkInitialized(in protoiface.CheckInitializedInput) (protoiface.CheckInitializedOutput, error) { var p pointer if ms, ok := in.Message.(*messageState); ok { p = ms.pointer() } else { p = in.Message.(*messageReflectWrapper).pointer() } - return piface.CheckInitializedOutput{}, mi.checkInitializedPointer(p) + return protoiface.CheckInitializedOutput{}, mi.checkInitializedPointer(p) } func (mi *MessageInfo) checkInitializedPointer(p pointer) error { @@ -90,7 +90,7 @@ var ( // needsInitCheck reports whether a message needs to be checked for partial initialization. // // It returns true if the message transitively includes any required or extension fields. -func needsInitCheck(md pref.MessageDescriptor) bool { +func needsInitCheck(md protoreflect.MessageDescriptor) bool { if v, ok := needsInitCheckMap.Load(md); ok { if has, ok := v.(bool); ok { return has @@ -101,7 +101,7 @@ func needsInitCheck(md pref.MessageDescriptor) bool { return needsInitCheckLocked(md) } -func needsInitCheckLocked(md pref.MessageDescriptor) (has bool) { +func needsInitCheckLocked(md protoreflect.MessageDescriptor) (has bool) { if v, ok := needsInitCheckMap.Load(md); ok { // If has is true, we've previously determined that this message // needs init checks. diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go b/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go index 08d35170b66cc..e74cefdc506fb 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go @@ -10,7 +10,7 @@ import ( "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/internal/errors" - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" ) type extensionFieldInfo struct { @@ -23,7 +23,7 @@ type extensionFieldInfo struct { var legacyExtensionFieldInfoCache sync.Map // map[protoreflect.ExtensionType]*extensionFieldInfo -func getExtensionFieldInfo(xt pref.ExtensionType) *extensionFieldInfo { +func getExtensionFieldInfo(xt protoreflect.ExtensionType) *extensionFieldInfo { if xi, ok := xt.(*ExtensionInfo); ok { xi.lazyInit() return xi.info @@ -32,7 +32,7 @@ func getExtensionFieldInfo(xt pref.ExtensionType) *extensionFieldInfo { } // legacyLoadExtensionFieldInfo dynamically loads a *ExtensionInfo for xt. -func legacyLoadExtensionFieldInfo(xt pref.ExtensionType) *extensionFieldInfo { +func legacyLoadExtensionFieldInfo(xt protoreflect.ExtensionType) *extensionFieldInfo { if xi, ok := legacyExtensionFieldInfoCache.Load(xt); ok { return xi.(*extensionFieldInfo) } @@ -43,7 +43,7 @@ func legacyLoadExtensionFieldInfo(xt pref.ExtensionType) *extensionFieldInfo { return e } -func makeExtensionFieldInfo(xd pref.ExtensionDescriptor) *extensionFieldInfo { +func makeExtensionFieldInfo(xd protoreflect.ExtensionDescriptor) *extensionFieldInfo { var wiretag uint64 if !xd.IsPacked() { wiretag = protowire.EncodeTag(xd.Number(), wireTypes[xd.Kind()]) @@ -59,10 +59,10 @@ func makeExtensionFieldInfo(xd pref.ExtensionDescriptor) *extensionFieldInfo { // This is true for composite types, where we pass in a message, list, or map to fill in, // and for enums, where we pass in a prototype value to specify the concrete enum type. switch xd.Kind() { - case pref.MessageKind, pref.GroupKind, pref.EnumKind: + case protoreflect.MessageKind, protoreflect.GroupKind, protoreflect.EnumKind: e.unmarshalNeedsValue = true default: - if xd.Cardinality() == pref.Repeated { + if xd.Cardinality() == protoreflect.Repeated { e.unmarshalNeedsValue = true } } @@ -73,21 +73,21 @@ type lazyExtensionValue struct { atomicOnce uint32 // atomically set if value is valid mu sync.Mutex xi *extensionFieldInfo - value pref.Value + value protoreflect.Value b []byte - fn func() pref.Value + fn func() protoreflect.Value } type ExtensionField struct { - typ pref.ExtensionType + typ protoreflect.ExtensionType // value is either the value of GetValue, // or a *lazyExtensionValue that then returns the value of GetValue. - value pref.Value + value protoreflect.Value lazy *lazyExtensionValue } -func (f *ExtensionField) appendLazyBytes(xt pref.ExtensionType, xi *extensionFieldInfo, num protowire.Number, wtyp protowire.Type, b []byte) { +func (f *ExtensionField) appendLazyBytes(xt protoreflect.ExtensionType, xi *extensionFieldInfo, num protowire.Number, wtyp protowire.Type, b []byte) { if f.lazy == nil { f.lazy = &lazyExtensionValue{xi: xi} } @@ -97,7 +97,7 @@ func (f *ExtensionField) appendLazyBytes(xt pref.ExtensionType, xi *extensionFie f.lazy.b = append(f.lazy.b, b...) } -func (f *ExtensionField) canLazy(xt pref.ExtensionType) bool { +func (f *ExtensionField) canLazy(xt protoreflect.ExtensionType) bool { if f.typ == nil { return true } @@ -154,7 +154,7 @@ func (f *ExtensionField) lazyInit() { // Set sets the type and value of the extension field. // This must not be called concurrently. -func (f *ExtensionField) Set(t pref.ExtensionType, v pref.Value) { +func (f *ExtensionField) Set(t protoreflect.ExtensionType, v protoreflect.Value) { f.typ = t f.value = v f.lazy = nil @@ -162,14 +162,14 @@ func (f *ExtensionField) Set(t pref.ExtensionType, v pref.Value) { // SetLazy sets the type and a value that is to be lazily evaluated upon first use. // This must not be called concurrently. -func (f *ExtensionField) SetLazy(t pref.ExtensionType, fn func() pref.Value) { +func (f *ExtensionField) SetLazy(t protoreflect.ExtensionType, fn func() protoreflect.Value) { f.typ = t f.lazy = &lazyExtensionValue{fn: fn} } // Value returns the value of the extension field. // This may be called concurrently. -func (f *ExtensionField) Value() pref.Value { +func (f *ExtensionField) Value() protoreflect.Value { if f.lazy != nil { if atomic.LoadUint32(&f.lazy.atomicOnce) == 0 { f.lazyInit() @@ -181,7 +181,7 @@ func (f *ExtensionField) Value() pref.Value { // Type returns the type of the extension field. // This may be called concurrently. -func (f ExtensionField) Type() pref.ExtensionType { +func (f ExtensionField) Type() protoreflect.ExtensionType { return f.typ } @@ -193,7 +193,7 @@ func (f ExtensionField) IsSet() bool { // IsLazy reports whether a field is lazily encoded. // It is exported for testing. -func IsLazy(m pref.Message, fd pref.FieldDescriptor) bool { +func IsLazy(m protoreflect.Message, fd protoreflect.FieldDescriptor) bool { var mi *MessageInfo var p pointer switch m := m.(type) { @@ -206,7 +206,7 @@ func IsLazy(m pref.Message, fd pref.FieldDescriptor) bool { default: return false } - xd, ok := fd.(pref.ExtensionTypeDescriptor) + xd, ok := fd.(protoreflect.ExtensionTypeDescriptor) if !ok { return false } diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_field.go b/vendor/google.golang.org/protobuf/internal/impl/codec_field.go index cb4b482d166f5..3fadd241e1c44 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_field.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_field.go @@ -12,9 +12,9 @@ import ( "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/internal/errors" "google.golang.org/protobuf/proto" - pref "google.golang.org/protobuf/reflect/protoreflect" - preg "google.golang.org/protobuf/reflect/protoregistry" - piface "google.golang.org/protobuf/runtime/protoiface" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" + "google.golang.org/protobuf/runtime/protoiface" ) type errInvalidUTF8 struct{} @@ -30,7 +30,7 @@ func (errInvalidUTF8) Unwrap() error { return errors.Error } // to the appropriate field-specific function as necessary. // // The unmarshal function is set on each field individually as usual. -func (mi *MessageInfo) initOneofFieldCoders(od pref.OneofDescriptor, si structInfo) { +func (mi *MessageInfo) initOneofFieldCoders(od protoreflect.OneofDescriptor, si structInfo) { fs := si.oneofsByName[od.Name()] ft := fs.Type oneofFields := make(map[reflect.Type]*coderFieldInfo) @@ -118,13 +118,13 @@ func (mi *MessageInfo) initOneofFieldCoders(od pref.OneofDescriptor, si structIn } } -func makeWeakMessageFieldCoder(fd pref.FieldDescriptor) pointerCoderFuncs { +func makeWeakMessageFieldCoder(fd protoreflect.FieldDescriptor) pointerCoderFuncs { var once sync.Once - var messageType pref.MessageType + var messageType protoreflect.MessageType lazyInit := func() { once.Do(func() { messageName := fd.Message().FullName() - messageType, _ = preg.GlobalTypes.FindMessageByName(messageName) + messageType, _ = protoregistry.GlobalTypes.FindMessageByName(messageName) }) } @@ -190,7 +190,7 @@ func makeWeakMessageFieldCoder(fd pref.FieldDescriptor) pointerCoderFuncs { } } -func makeMessageFieldCoder(fd pref.FieldDescriptor, ft reflect.Type) pointerCoderFuncs { +func makeMessageFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) pointerCoderFuncs { if mi := getMessageInfo(ft); mi != nil { funcs := pointerCoderFuncs{ size: sizeMessageInfo, @@ -280,7 +280,7 @@ func consumeMessage(b []byte, m proto.Message, wtyp protowire.Type, opts unmarsh if n < 0 { return out, errDecode } - o, err := opts.Options().UnmarshalState(piface.UnmarshalInput{ + o, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{ Buf: v, Message: m.ProtoReflect(), }) @@ -288,27 +288,27 @@ func consumeMessage(b []byte, m proto.Message, wtyp protowire.Type, opts unmarsh return out, err } out.n = n - out.initialized = o.Flags&piface.UnmarshalInitialized != 0 + out.initialized = o.Flags&protoiface.UnmarshalInitialized != 0 return out, nil } -func sizeMessageValue(v pref.Value, tagsize int, opts marshalOptions) int { +func sizeMessageValue(v protoreflect.Value, tagsize int, opts marshalOptions) int { m := v.Message().Interface() return sizeMessage(m, tagsize, opts) } -func appendMessageValue(b []byte, v pref.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { +func appendMessageValue(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { m := v.Message().Interface() return appendMessage(b, m, wiretag, opts) } -func consumeMessageValue(b []byte, v pref.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (pref.Value, unmarshalOutput, error) { +func consumeMessageValue(b []byte, v protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (protoreflect.Value, unmarshalOutput, error) { m := v.Message().Interface() out, err := consumeMessage(b, m, wtyp, opts) return v, out, err } -func isInitMessageValue(v pref.Value) error { +func isInitMessageValue(v protoreflect.Value) error { m := v.Message().Interface() return proto.CheckInitialized(m) } @@ -321,17 +321,17 @@ var coderMessageValue = valueCoderFuncs{ merge: mergeMessageValue, } -func sizeGroupValue(v pref.Value, tagsize int, opts marshalOptions) int { +func sizeGroupValue(v protoreflect.Value, tagsize int, opts marshalOptions) int { m := v.Message().Interface() return sizeGroup(m, tagsize, opts) } -func appendGroupValue(b []byte, v pref.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { +func appendGroupValue(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { m := v.Message().Interface() return appendGroup(b, m, wiretag, opts) } -func consumeGroupValue(b []byte, v pref.Value, num protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (pref.Value, unmarshalOutput, error) { +func consumeGroupValue(b []byte, v protoreflect.Value, num protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (protoreflect.Value, unmarshalOutput, error) { m := v.Message().Interface() out, err := consumeGroup(b, m, num, wtyp, opts) return v, out, err @@ -345,7 +345,7 @@ var coderGroupValue = valueCoderFuncs{ merge: mergeMessageValue, } -func makeGroupFieldCoder(fd pref.FieldDescriptor, ft reflect.Type) pointerCoderFuncs { +func makeGroupFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) pointerCoderFuncs { num := fd.Number() if mi := getMessageInfo(ft); mi != nil { funcs := pointerCoderFuncs{ @@ -424,7 +424,7 @@ func consumeGroup(b []byte, m proto.Message, num protowire.Number, wtyp protowir if n < 0 { return out, errDecode } - o, err := opts.Options().UnmarshalState(piface.UnmarshalInput{ + o, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{ Buf: b, Message: m.ProtoReflect(), }) @@ -432,11 +432,11 @@ func consumeGroup(b []byte, m proto.Message, num protowire.Number, wtyp protowir return out, err } out.n = n - out.initialized = o.Flags&piface.UnmarshalInitialized != 0 + out.initialized = o.Flags&protoiface.UnmarshalInitialized != 0 return out, nil } -func makeMessageSliceFieldCoder(fd pref.FieldDescriptor, ft reflect.Type) pointerCoderFuncs { +func makeMessageSliceFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) pointerCoderFuncs { if mi := getMessageInfo(ft); mi != nil { funcs := pointerCoderFuncs{ size: sizeMessageSliceInfo, @@ -555,7 +555,7 @@ func consumeMessageSlice(b []byte, p pointer, goType reflect.Type, wtyp protowir return out, errDecode } mp := reflect.New(goType.Elem()) - o, err := opts.Options().UnmarshalState(piface.UnmarshalInput{ + o, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{ Buf: v, Message: asMessage(mp).ProtoReflect(), }) @@ -564,7 +564,7 @@ func consumeMessageSlice(b []byte, p pointer, goType reflect.Type, wtyp protowir } p.AppendPointerSlice(pointerOfValue(mp)) out.n = n - out.initialized = o.Flags&piface.UnmarshalInitialized != 0 + out.initialized = o.Flags&protoiface.UnmarshalInitialized != 0 return out, nil } @@ -581,7 +581,7 @@ func isInitMessageSlice(p pointer, goType reflect.Type) error { // Slices of messages -func sizeMessageSliceValue(listv pref.Value, tagsize int, opts marshalOptions) int { +func sizeMessageSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) int { list := listv.List() n := 0 for i, llen := 0, list.Len(); i < llen; i++ { @@ -591,7 +591,7 @@ func sizeMessageSliceValue(listv pref.Value, tagsize int, opts marshalOptions) i return n } -func appendMessageSliceValue(b []byte, listv pref.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { +func appendMessageSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { list := listv.List() mopts := opts.Options() for i, llen := 0, list.Len(); i < llen; i++ { @@ -608,30 +608,30 @@ func appendMessageSliceValue(b []byte, listv pref.Value, wiretag uint64, opts ma return b, nil } -func consumeMessageSliceValue(b []byte, listv pref.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ pref.Value, out unmarshalOutput, err error) { +func consumeMessageSliceValue(b []byte, listv protoreflect.Value, _ protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { list := listv.List() if wtyp != protowire.BytesType { - return pref.Value{}, out, errUnknown + return protoreflect.Value{}, out, errUnknown } v, n := protowire.ConsumeBytes(b) if n < 0 { - return pref.Value{}, out, errDecode + return protoreflect.Value{}, out, errDecode } m := list.NewElement() - o, err := opts.Options().UnmarshalState(piface.UnmarshalInput{ + o, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{ Buf: v, Message: m.Message(), }) if err != nil { - return pref.Value{}, out, err + return protoreflect.Value{}, out, err } list.Append(m) out.n = n - out.initialized = o.Flags&piface.UnmarshalInitialized != 0 + out.initialized = o.Flags&protoiface.UnmarshalInitialized != 0 return listv, out, nil } -func isInitMessageSliceValue(listv pref.Value) error { +func isInitMessageSliceValue(listv protoreflect.Value) error { list := listv.List() for i, llen := 0, list.Len(); i < llen; i++ { m := list.Get(i).Message().Interface() @@ -650,7 +650,7 @@ var coderMessageSliceValue = valueCoderFuncs{ merge: mergeMessageListValue, } -func sizeGroupSliceValue(listv pref.Value, tagsize int, opts marshalOptions) int { +func sizeGroupSliceValue(listv protoreflect.Value, tagsize int, opts marshalOptions) int { list := listv.List() n := 0 for i, llen := 0, list.Len(); i < llen; i++ { @@ -660,7 +660,7 @@ func sizeGroupSliceValue(listv pref.Value, tagsize int, opts marshalOptions) int return n } -func appendGroupSliceValue(b []byte, listv pref.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { +func appendGroupSliceValue(b []byte, listv protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) { list := listv.List() mopts := opts.Options() for i, llen := 0, list.Len(); i < llen; i++ { @@ -676,26 +676,26 @@ func appendGroupSliceValue(b []byte, listv pref.Value, wiretag uint64, opts mars return b, nil } -func consumeGroupSliceValue(b []byte, listv pref.Value, num protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ pref.Value, out unmarshalOutput, err error) { +func consumeGroupSliceValue(b []byte, listv protoreflect.Value, num protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (_ protoreflect.Value, out unmarshalOutput, err error) { list := listv.List() if wtyp != protowire.StartGroupType { - return pref.Value{}, out, errUnknown + return protoreflect.Value{}, out, errUnknown } b, n := protowire.ConsumeGroup(num, b) if n < 0 { - return pref.Value{}, out, errDecode + return protoreflect.Value{}, out, errDecode } m := list.NewElement() - o, err := opts.Options().UnmarshalState(piface.UnmarshalInput{ + o, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{ Buf: b, Message: m.Message(), }) if err != nil { - return pref.Value{}, out, err + return protoreflect.Value{}, out, err } list.Append(m) out.n = n - out.initialized = o.Flags&piface.UnmarshalInitialized != 0 + out.initialized = o.Flags&protoiface.UnmarshalInitialized != 0 return listv, out, nil } @@ -707,7 +707,7 @@ var coderGroupSliceValue = valueCoderFuncs{ merge: mergeMessageListValue, } -func makeGroupSliceFieldCoder(fd pref.FieldDescriptor, ft reflect.Type) pointerCoderFuncs { +func makeGroupSliceFieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) pointerCoderFuncs { num := fd.Number() if mi := getMessageInfo(ft); mi != nil { funcs := pointerCoderFuncs{ @@ -772,7 +772,7 @@ func consumeGroupSlice(b []byte, p pointer, num protowire.Number, wtyp protowire return out, errDecode } mp := reflect.New(goType.Elem()) - o, err := opts.Options().UnmarshalState(piface.UnmarshalInput{ + o, err := opts.Options().UnmarshalState(protoiface.UnmarshalInput{ Buf: b, Message: asMessage(mp).ProtoReflect(), }) @@ -781,7 +781,7 @@ func consumeGroupSlice(b []byte, p pointer, num protowire.Number, wtyp protowire } p.AppendPointerSlice(pointerOfValue(mp)) out.n = n - out.initialized = o.Flags&piface.UnmarshalInitialized != 0 + out.initialized = o.Flags&protoiface.UnmarshalInitialized != 0 return out, nil } @@ -822,8 +822,8 @@ func consumeGroupSliceInfo(b []byte, p pointer, wtyp protowire.Type, f *coderFie return out, nil } -func asMessage(v reflect.Value) pref.ProtoMessage { - if m, ok := v.Interface().(pref.ProtoMessage); ok { +func asMessage(v reflect.Value) protoreflect.ProtoMessage { + if m, ok := v.Interface().(protoreflect.ProtoMessage); ok { return m } return legacyWrapMessage(v).Interface() diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_map.go b/vendor/google.golang.org/protobuf/internal/impl/codec_map.go index c1245fef48765..111b9d16f993b 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_map.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_map.go @@ -10,7 +10,7 @@ import ( "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/internal/genid" - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" ) type mapInfo struct { @@ -19,12 +19,12 @@ type mapInfo struct { valWiretag uint64 keyFuncs valueCoderFuncs valFuncs valueCoderFuncs - keyZero pref.Value - keyKind pref.Kind + keyZero protoreflect.Value + keyKind protoreflect.Kind conv *mapConverter } -func encoderFuncsForMap(fd pref.FieldDescriptor, ft reflect.Type) (valueMessage *MessageInfo, funcs pointerCoderFuncs) { +func encoderFuncsForMap(fd protoreflect.FieldDescriptor, ft reflect.Type) (valueMessage *MessageInfo, funcs pointerCoderFuncs) { // TODO: Consider generating specialized map coders. keyField := fd.MapKey() valField := fd.MapValue() @@ -44,7 +44,7 @@ func encoderFuncsForMap(fd pref.FieldDescriptor, ft reflect.Type) (valueMessage keyKind: keyField.Kind(), conv: conv, } - if valField.Kind() == pref.MessageKind { + if valField.Kind() == protoreflect.MessageKind { valueMessage = getMessageInfo(ft.Elem()) } @@ -68,9 +68,9 @@ func encoderFuncsForMap(fd pref.FieldDescriptor, ft reflect.Type) (valueMessage }, } switch valField.Kind() { - case pref.MessageKind: + case protoreflect.MessageKind: funcs.merge = mergeMapOfMessage - case pref.BytesKind: + case protoreflect.BytesKind: funcs.merge = mergeMapOfBytes default: funcs.merge = mergeMap @@ -135,7 +135,7 @@ func consumeMap(b []byte, mapv reflect.Value, wtyp protowire.Type, mapi *mapInfo err := errUnknown switch num { case genid.MapEntry_Key_field_number: - var v pref.Value + var v protoreflect.Value var o unmarshalOutput v, o, err = mapi.keyFuncs.unmarshal(b, key, num, wtyp, opts) if err != nil { @@ -144,7 +144,7 @@ func consumeMap(b []byte, mapv reflect.Value, wtyp protowire.Type, mapi *mapInfo key = v n = o.n case genid.MapEntry_Value_field_number: - var v pref.Value + var v protoreflect.Value var o unmarshalOutput v, o, err = mapi.valFuncs.unmarshal(b, val, num, wtyp, opts) if err != nil { @@ -192,7 +192,7 @@ func consumeMapOfMessage(b []byte, mapv reflect.Value, wtyp protowire.Type, mapi err := errUnknown switch num { case 1: - var v pref.Value + var v protoreflect.Value var o unmarshalOutput v, o, err = mapi.keyFuncs.unmarshal(b, key, num, wtyp, opts) if err != nil { diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_message.go b/vendor/google.golang.org/protobuf/internal/impl/codec_message.go index cd40527ff6462..6b2fdbb739a23 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_message.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_message.go @@ -12,15 +12,15 @@ import ( "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/internal/encoding/messageset" "google.golang.org/protobuf/internal/order" - pref "google.golang.org/protobuf/reflect/protoreflect" - piface "google.golang.org/protobuf/runtime/protoiface" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/runtime/protoiface" ) // coderMessageInfo contains per-message information used by the fast-path functions. // This is a different type from MessageInfo to keep MessageInfo as general-purpose as // possible. type coderMessageInfo struct { - methods piface.Methods + methods protoiface.Methods orderedCoderFields []*coderFieldInfo denseCoderFields []*coderFieldInfo @@ -38,13 +38,13 @@ type coderFieldInfo struct { funcs pointerCoderFuncs // fast-path per-field functions mi *MessageInfo // field's message ft reflect.Type - validation validationInfo // information used by message validation - num pref.FieldNumber // field number - offset offset // struct field offset - wiretag uint64 // field tag (number + wire type) - tagsize int // size of the varint-encoded tag - isPointer bool // true if IsNil may be called on the struct field - isRequired bool // true if field is required + validation validationInfo // information used by message validation + num protoreflect.FieldNumber // field number + offset offset // struct field offset + wiretag uint64 // field tag (number + wire type) + tagsize int // size of the varint-encoded tag + isPointer bool // true if IsNil may be called on the struct field + isRequired bool // true if field is required } func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) { @@ -125,8 +125,8 @@ func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) { funcs: funcs, mi: childMessage, validation: newFieldValidationInfo(mi, si, fd, ft), - isPointer: fd.Cardinality() == pref.Repeated || fd.HasPresence(), - isRequired: fd.Cardinality() == pref.Required, + isPointer: fd.Cardinality() == protoreflect.Repeated || fd.HasPresence(), + isRequired: fd.Cardinality() == protoreflect.Required, } mi.orderedCoderFields = append(mi.orderedCoderFields, cf) mi.coderFields[cf.num] = cf @@ -149,7 +149,7 @@ func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) { return mi.orderedCoderFields[i].num < mi.orderedCoderFields[j].num }) - var maxDense pref.FieldNumber + var maxDense protoreflect.FieldNumber for _, cf := range mi.orderedCoderFields { if cf.num >= 16 && cf.num >= 2*maxDense { break @@ -175,12 +175,12 @@ func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) { mi.needsInitCheck = needsInitCheck(mi.Desc) if mi.methods.Marshal == nil && mi.methods.Size == nil { - mi.methods.Flags |= piface.SupportMarshalDeterministic + mi.methods.Flags |= protoiface.SupportMarshalDeterministic mi.methods.Marshal = mi.marshal mi.methods.Size = mi.size } if mi.methods.Unmarshal == nil { - mi.methods.Flags |= piface.SupportUnmarshalDiscardUnknown + mi.methods.Flags |= protoiface.SupportUnmarshalDiscardUnknown mi.methods.Unmarshal = mi.unmarshal } if mi.methods.CheckInitialized == nil { diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_tables.go b/vendor/google.golang.org/protobuf/internal/impl/codec_tables.go index e89971238879f..576dcf3aac50a 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_tables.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_tables.go @@ -10,7 +10,7 @@ import ( "google.golang.org/protobuf/encoding/protowire" "google.golang.org/protobuf/internal/strs" - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" ) // pointerCoderFuncs is a set of pointer encoding functions. @@ -25,83 +25,83 @@ type pointerCoderFuncs struct { // valueCoderFuncs is a set of protoreflect.Value encoding functions. type valueCoderFuncs struct { - size func(v pref.Value, tagsize int, opts marshalOptions) int - marshal func(b []byte, v pref.Value, wiretag uint64, opts marshalOptions) ([]byte, error) - unmarshal func(b []byte, v pref.Value, num protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (pref.Value, unmarshalOutput, error) - isInit func(v pref.Value) error - merge func(dst, src pref.Value, opts mergeOptions) pref.Value + size func(v protoreflect.Value, tagsize int, opts marshalOptions) int + marshal func(b []byte, v protoreflect.Value, wiretag uint64, opts marshalOptions) ([]byte, error) + unmarshal func(b []byte, v protoreflect.Value, num protowire.Number, wtyp protowire.Type, opts unmarshalOptions) (protoreflect.Value, unmarshalOutput, error) + isInit func(v protoreflect.Value) error + merge func(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value } // fieldCoder returns pointer functions for a field, used for operating on // struct fields. -func fieldCoder(fd pref.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointerCoderFuncs) { +func fieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointerCoderFuncs) { switch { case fd.IsMap(): return encoderFuncsForMap(fd, ft) - case fd.Cardinality() == pref.Repeated && !fd.IsPacked(): + case fd.Cardinality() == protoreflect.Repeated && !fd.IsPacked(): // Repeated fields (not packed). if ft.Kind() != reflect.Slice { break } ft := ft.Elem() switch fd.Kind() { - case pref.BoolKind: + case protoreflect.BoolKind: if ft.Kind() == reflect.Bool { return nil, coderBoolSlice } - case pref.EnumKind: + case protoreflect.EnumKind: if ft.Kind() == reflect.Int32 { return nil, coderEnumSlice } - case pref.Int32Kind: + case protoreflect.Int32Kind: if ft.Kind() == reflect.Int32 { return nil, coderInt32Slice } - case pref.Sint32Kind: + case protoreflect.Sint32Kind: if ft.Kind() == reflect.Int32 { return nil, coderSint32Slice } - case pref.Uint32Kind: + case protoreflect.Uint32Kind: if ft.Kind() == reflect.Uint32 { return nil, coderUint32Slice } - case pref.Int64Kind: + case protoreflect.Int64Kind: if ft.Kind() == reflect.Int64 { return nil, coderInt64Slice } - case pref.Sint64Kind: + case protoreflect.Sint64Kind: if ft.Kind() == reflect.Int64 { return nil, coderSint64Slice } - case pref.Uint64Kind: + case protoreflect.Uint64Kind: if ft.Kind() == reflect.Uint64 { return nil, coderUint64Slice } - case pref.Sfixed32Kind: + case protoreflect.Sfixed32Kind: if ft.Kind() == reflect.Int32 { return nil, coderSfixed32Slice } - case pref.Fixed32Kind: + case protoreflect.Fixed32Kind: if ft.Kind() == reflect.Uint32 { return nil, coderFixed32Slice } - case pref.FloatKind: + case protoreflect.FloatKind: if ft.Kind() == reflect.Float32 { return nil, coderFloatSlice } - case pref.Sfixed64Kind: + case protoreflect.Sfixed64Kind: if ft.Kind() == reflect.Int64 { return nil, coderSfixed64Slice } - case pref.Fixed64Kind: + case protoreflect.Fixed64Kind: if ft.Kind() == reflect.Uint64 { return nil, coderFixed64Slice } - case pref.DoubleKind: + case protoreflect.DoubleKind: if ft.Kind() == reflect.Float64 { return nil, coderDoubleSlice } - case pref.StringKind: + case protoreflect.StringKind: if ft.Kind() == reflect.String && strs.EnforceUTF8(fd) { return nil, coderStringSliceValidateUTF8 } @@ -114,19 +114,19 @@ func fieldCoder(fd pref.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointer if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 { return nil, coderBytesSlice } - case pref.BytesKind: + case protoreflect.BytesKind: if ft.Kind() == reflect.String { return nil, coderStringSlice } if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 { return nil, coderBytesSlice } - case pref.MessageKind: + case protoreflect.MessageKind: return getMessageInfo(ft), makeMessageSliceFieldCoder(fd, ft) - case pref.GroupKind: + case protoreflect.GroupKind: return getMessageInfo(ft), makeGroupSliceFieldCoder(fd, ft) } - case fd.Cardinality() == pref.Repeated && fd.IsPacked(): + case fd.Cardinality() == protoreflect.Repeated && fd.IsPacked(): // Packed repeated fields. // // Only repeated fields of primitive numeric types @@ -136,128 +136,128 @@ func fieldCoder(fd pref.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointer } ft := ft.Elem() switch fd.Kind() { - case pref.BoolKind: + case protoreflect.BoolKind: if ft.Kind() == reflect.Bool { return nil, coderBoolPackedSlice } - case pref.EnumKind: + case protoreflect.EnumKind: if ft.Kind() == reflect.Int32 { return nil, coderEnumPackedSlice } - case pref.Int32Kind: + case protoreflect.Int32Kind: if ft.Kind() == reflect.Int32 { return nil, coderInt32PackedSlice } - case pref.Sint32Kind: + case protoreflect.Sint32Kind: if ft.Kind() == reflect.Int32 { return nil, coderSint32PackedSlice } - case pref.Uint32Kind: + case protoreflect.Uint32Kind: if ft.Kind() == reflect.Uint32 { return nil, coderUint32PackedSlice } - case pref.Int64Kind: + case protoreflect.Int64Kind: if ft.Kind() == reflect.Int64 { return nil, coderInt64PackedSlice } - case pref.Sint64Kind: + case protoreflect.Sint64Kind: if ft.Kind() == reflect.Int64 { return nil, coderSint64PackedSlice } - case pref.Uint64Kind: + case protoreflect.Uint64Kind: if ft.Kind() == reflect.Uint64 { return nil, coderUint64PackedSlice } - case pref.Sfixed32Kind: + case protoreflect.Sfixed32Kind: if ft.Kind() == reflect.Int32 { return nil, coderSfixed32PackedSlice } - case pref.Fixed32Kind: + case protoreflect.Fixed32Kind: if ft.Kind() == reflect.Uint32 { return nil, coderFixed32PackedSlice } - case pref.FloatKind: + case protoreflect.FloatKind: if ft.Kind() == reflect.Float32 { return nil, coderFloatPackedSlice } - case pref.Sfixed64Kind: + case protoreflect.Sfixed64Kind: if ft.Kind() == reflect.Int64 { return nil, coderSfixed64PackedSlice } - case pref.Fixed64Kind: + case protoreflect.Fixed64Kind: if ft.Kind() == reflect.Uint64 { return nil, coderFixed64PackedSlice } - case pref.DoubleKind: + case protoreflect.DoubleKind: if ft.Kind() == reflect.Float64 { return nil, coderDoublePackedSlice } } - case fd.Kind() == pref.MessageKind: + case fd.Kind() == protoreflect.MessageKind: return getMessageInfo(ft), makeMessageFieldCoder(fd, ft) - case fd.Kind() == pref.GroupKind: + case fd.Kind() == protoreflect.GroupKind: return getMessageInfo(ft), makeGroupFieldCoder(fd, ft) - case fd.Syntax() == pref.Proto3 && fd.ContainingOneof() == nil: + case fd.Syntax() == protoreflect.Proto3 && fd.ContainingOneof() == nil: // Populated oneof fields always encode even if set to the zero value, // which normally are not encoded in proto3. switch fd.Kind() { - case pref.BoolKind: + case protoreflect.BoolKind: if ft.Kind() == reflect.Bool { return nil, coderBoolNoZero } - case pref.EnumKind: + case protoreflect.EnumKind: if ft.Kind() == reflect.Int32 { return nil, coderEnumNoZero } - case pref.Int32Kind: + case protoreflect.Int32Kind: if ft.Kind() == reflect.Int32 { return nil, coderInt32NoZero } - case pref.Sint32Kind: + case protoreflect.Sint32Kind: if ft.Kind() == reflect.Int32 { return nil, coderSint32NoZero } - case pref.Uint32Kind: + case protoreflect.Uint32Kind: if ft.Kind() == reflect.Uint32 { return nil, coderUint32NoZero } - case pref.Int64Kind: + case protoreflect.Int64Kind: if ft.Kind() == reflect.Int64 { return nil, coderInt64NoZero } - case pref.Sint64Kind: + case protoreflect.Sint64Kind: if ft.Kind() == reflect.Int64 { return nil, coderSint64NoZero } - case pref.Uint64Kind: + case protoreflect.Uint64Kind: if ft.Kind() == reflect.Uint64 { return nil, coderUint64NoZero } - case pref.Sfixed32Kind: + case protoreflect.Sfixed32Kind: if ft.Kind() == reflect.Int32 { return nil, coderSfixed32NoZero } - case pref.Fixed32Kind: + case protoreflect.Fixed32Kind: if ft.Kind() == reflect.Uint32 { return nil, coderFixed32NoZero } - case pref.FloatKind: + case protoreflect.FloatKind: if ft.Kind() == reflect.Float32 { return nil, coderFloatNoZero } - case pref.Sfixed64Kind: + case protoreflect.Sfixed64Kind: if ft.Kind() == reflect.Int64 { return nil, coderSfixed64NoZero } - case pref.Fixed64Kind: + case protoreflect.Fixed64Kind: if ft.Kind() == reflect.Uint64 { return nil, coderFixed64NoZero } - case pref.DoubleKind: + case protoreflect.DoubleKind: if ft.Kind() == reflect.Float64 { return nil, coderDoubleNoZero } - case pref.StringKind: + case protoreflect.StringKind: if ft.Kind() == reflect.String && strs.EnforceUTF8(fd) { return nil, coderStringNoZeroValidateUTF8 } @@ -270,7 +270,7 @@ func fieldCoder(fd pref.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointer if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 { return nil, coderBytesNoZero } - case pref.BytesKind: + case protoreflect.BytesKind: if ft.Kind() == reflect.String { return nil, coderStringNoZero } @@ -281,133 +281,133 @@ func fieldCoder(fd pref.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointer case ft.Kind() == reflect.Ptr: ft := ft.Elem() switch fd.Kind() { - case pref.BoolKind: + case protoreflect.BoolKind: if ft.Kind() == reflect.Bool { return nil, coderBoolPtr } - case pref.EnumKind: + case protoreflect.EnumKind: if ft.Kind() == reflect.Int32 { return nil, coderEnumPtr } - case pref.Int32Kind: + case protoreflect.Int32Kind: if ft.Kind() == reflect.Int32 { return nil, coderInt32Ptr } - case pref.Sint32Kind: + case protoreflect.Sint32Kind: if ft.Kind() == reflect.Int32 { return nil, coderSint32Ptr } - case pref.Uint32Kind: + case protoreflect.Uint32Kind: if ft.Kind() == reflect.Uint32 { return nil, coderUint32Ptr } - case pref.Int64Kind: + case protoreflect.Int64Kind: if ft.Kind() == reflect.Int64 { return nil, coderInt64Ptr } - case pref.Sint64Kind: + case protoreflect.Sint64Kind: if ft.Kind() == reflect.Int64 { return nil, coderSint64Ptr } - case pref.Uint64Kind: + case protoreflect.Uint64Kind: if ft.Kind() == reflect.Uint64 { return nil, coderUint64Ptr } - case pref.Sfixed32Kind: + case protoreflect.Sfixed32Kind: if ft.Kind() == reflect.Int32 { return nil, coderSfixed32Ptr } - case pref.Fixed32Kind: + case protoreflect.Fixed32Kind: if ft.Kind() == reflect.Uint32 { return nil, coderFixed32Ptr } - case pref.FloatKind: + case protoreflect.FloatKind: if ft.Kind() == reflect.Float32 { return nil, coderFloatPtr } - case pref.Sfixed64Kind: + case protoreflect.Sfixed64Kind: if ft.Kind() == reflect.Int64 { return nil, coderSfixed64Ptr } - case pref.Fixed64Kind: + case protoreflect.Fixed64Kind: if ft.Kind() == reflect.Uint64 { return nil, coderFixed64Ptr } - case pref.DoubleKind: + case protoreflect.DoubleKind: if ft.Kind() == reflect.Float64 { return nil, coderDoublePtr } - case pref.StringKind: + case protoreflect.StringKind: if ft.Kind() == reflect.String && strs.EnforceUTF8(fd) { return nil, coderStringPtrValidateUTF8 } if ft.Kind() == reflect.String { return nil, coderStringPtr } - case pref.BytesKind: + case protoreflect.BytesKind: if ft.Kind() == reflect.String { return nil, coderStringPtr } } default: switch fd.Kind() { - case pref.BoolKind: + case protoreflect.BoolKind: if ft.Kind() == reflect.Bool { return nil, coderBool } - case pref.EnumKind: + case protoreflect.EnumKind: if ft.Kind() == reflect.Int32 { return nil, coderEnum } - case pref.Int32Kind: + case protoreflect.Int32Kind: if ft.Kind() == reflect.Int32 { return nil, coderInt32 } - case pref.Sint32Kind: + case protoreflect.Sint32Kind: if ft.Kind() == reflect.Int32 { return nil, coderSint32 } - case pref.Uint32Kind: + case protoreflect.Uint32Kind: if ft.Kind() == reflect.Uint32 { return nil, coderUint32 } - case pref.Int64Kind: + case protoreflect.Int64Kind: if ft.Kind() == reflect.Int64 { return nil, coderInt64 } - case pref.Sint64Kind: + case protoreflect.Sint64Kind: if ft.Kind() == reflect.Int64 { return nil, coderSint64 } - case pref.Uint64Kind: + case protoreflect.Uint64Kind: if ft.Kind() == reflect.Uint64 { return nil, coderUint64 } - case pref.Sfixed32Kind: + case protoreflect.Sfixed32Kind: if ft.Kind() == reflect.Int32 { return nil, coderSfixed32 } - case pref.Fixed32Kind: + case protoreflect.Fixed32Kind: if ft.Kind() == reflect.Uint32 { return nil, coderFixed32 } - case pref.FloatKind: + case protoreflect.FloatKind: if ft.Kind() == reflect.Float32 { return nil, coderFloat } - case pref.Sfixed64Kind: + case protoreflect.Sfixed64Kind: if ft.Kind() == reflect.Int64 { return nil, coderSfixed64 } - case pref.Fixed64Kind: + case protoreflect.Fixed64Kind: if ft.Kind() == reflect.Uint64 { return nil, coderFixed64 } - case pref.DoubleKind: + case protoreflect.DoubleKind: if ft.Kind() == reflect.Float64 { return nil, coderDouble } - case pref.StringKind: + case protoreflect.StringKind: if ft.Kind() == reflect.String && strs.EnforceUTF8(fd) { return nil, coderStringValidateUTF8 } @@ -420,7 +420,7 @@ func fieldCoder(fd pref.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointer if ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 { return nil, coderBytes } - case pref.BytesKind: + case protoreflect.BytesKind: if ft.Kind() == reflect.String { return nil, coderString } @@ -434,122 +434,122 @@ func fieldCoder(fd pref.FieldDescriptor, ft reflect.Type) (*MessageInfo, pointer // encoderFuncsForValue returns value functions for a field, used for // extension values and map encoding. -func encoderFuncsForValue(fd pref.FieldDescriptor) valueCoderFuncs { +func encoderFuncsForValue(fd protoreflect.FieldDescriptor) valueCoderFuncs { switch { - case fd.Cardinality() == pref.Repeated && !fd.IsPacked(): + case fd.Cardinality() == protoreflect.Repeated && !fd.IsPacked(): switch fd.Kind() { - case pref.BoolKind: + case protoreflect.BoolKind: return coderBoolSliceValue - case pref.EnumKind: + case protoreflect.EnumKind: return coderEnumSliceValue - case pref.Int32Kind: + case protoreflect.Int32Kind: return coderInt32SliceValue - case pref.Sint32Kind: + case protoreflect.Sint32Kind: return coderSint32SliceValue - case pref.Uint32Kind: + case protoreflect.Uint32Kind: return coderUint32SliceValue - case pref.Int64Kind: + case protoreflect.Int64Kind: return coderInt64SliceValue - case pref.Sint64Kind: + case protoreflect.Sint64Kind: return coderSint64SliceValue - case pref.Uint64Kind: + case protoreflect.Uint64Kind: return coderUint64SliceValue - case pref.Sfixed32Kind: + case protoreflect.Sfixed32Kind: return coderSfixed32SliceValue - case pref.Fixed32Kind: + case protoreflect.Fixed32Kind: return coderFixed32SliceValue - case pref.FloatKind: + case protoreflect.FloatKind: return coderFloatSliceValue - case pref.Sfixed64Kind: + case protoreflect.Sfixed64Kind: return coderSfixed64SliceValue - case pref.Fixed64Kind: + case protoreflect.Fixed64Kind: return coderFixed64SliceValue - case pref.DoubleKind: + case protoreflect.DoubleKind: return coderDoubleSliceValue - case pref.StringKind: + case protoreflect.StringKind: // We don't have a UTF-8 validating coder for repeated string fields. // Value coders are used for extensions and maps. // Extensions are never proto3, and maps never contain lists. return coderStringSliceValue - case pref.BytesKind: + case protoreflect.BytesKind: return coderBytesSliceValue - case pref.MessageKind: + case protoreflect.MessageKind: return coderMessageSliceValue - case pref.GroupKind: + case protoreflect.GroupKind: return coderGroupSliceValue } - case fd.Cardinality() == pref.Repeated && fd.IsPacked(): + case fd.Cardinality() == protoreflect.Repeated && fd.IsPacked(): switch fd.Kind() { - case pref.BoolKind: + case protoreflect.BoolKind: return coderBoolPackedSliceValue - case pref.EnumKind: + case protoreflect.EnumKind: return coderEnumPackedSliceValue - case pref.Int32Kind: + case protoreflect.Int32Kind: return coderInt32PackedSliceValue - case pref.Sint32Kind: + case protoreflect.Sint32Kind: return coderSint32PackedSliceValue - case pref.Uint32Kind: + case protoreflect.Uint32Kind: return coderUint32PackedSliceValue - case pref.Int64Kind: + case protoreflect.Int64Kind: return coderInt64PackedSliceValue - case pref.Sint64Kind: + case protoreflect.Sint64Kind: return coderSint64PackedSliceValue - case pref.Uint64Kind: + case protoreflect.Uint64Kind: return coderUint64PackedSliceValue - case pref.Sfixed32Kind: + case protoreflect.Sfixed32Kind: return coderSfixed32PackedSliceValue - case pref.Fixed32Kind: + case protoreflect.Fixed32Kind: return coderFixed32PackedSliceValue - case pref.FloatKind: + case protoreflect.FloatKind: return coderFloatPackedSliceValue - case pref.Sfixed64Kind: + case protoreflect.Sfixed64Kind: return coderSfixed64PackedSliceValue - case pref.Fixed64Kind: + case protoreflect.Fixed64Kind: return coderFixed64PackedSliceValue - case pref.DoubleKind: + case protoreflect.DoubleKind: return coderDoublePackedSliceValue } default: switch fd.Kind() { default: - case pref.BoolKind: + case protoreflect.BoolKind: return coderBoolValue - case pref.EnumKind: + case protoreflect.EnumKind: return coderEnumValue - case pref.Int32Kind: + case protoreflect.Int32Kind: return coderInt32Value - case pref.Sint32Kind: + case protoreflect.Sint32Kind: return coderSint32Value - case pref.Uint32Kind: + case protoreflect.Uint32Kind: return coderUint32Value - case pref.Int64Kind: + case protoreflect.Int64Kind: return coderInt64Value - case pref.Sint64Kind: + case protoreflect.Sint64Kind: return coderSint64Value - case pref.Uint64Kind: + case protoreflect.Uint64Kind: return coderUint64Value - case pref.Sfixed32Kind: + case protoreflect.Sfixed32Kind: return coderSfixed32Value - case pref.Fixed32Kind: + case protoreflect.Fixed32Kind: return coderFixed32Value - case pref.FloatKind: + case protoreflect.FloatKind: return coderFloatValue - case pref.Sfixed64Kind: + case protoreflect.Sfixed64Kind: return coderSfixed64Value - case pref.Fixed64Kind: + case protoreflect.Fixed64Kind: return coderFixed64Value - case pref.DoubleKind: + case protoreflect.DoubleKind: return coderDoubleValue - case pref.StringKind: + case protoreflect.StringKind: if strs.EnforceUTF8(fd) { return coderStringValueValidateUTF8 } return coderStringValue - case pref.BytesKind: + case protoreflect.BytesKind: return coderBytesValue - case pref.MessageKind: + case protoreflect.MessageKind: return coderMessageValue - case pref.GroupKind: + case protoreflect.GroupKind: return coderGroupValue } } diff --git a/vendor/google.golang.org/protobuf/internal/impl/convert.go b/vendor/google.golang.org/protobuf/internal/impl/convert.go index acd61bb50b2ca..185ef2efa5bfd 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/convert.go +++ b/vendor/google.golang.org/protobuf/internal/impl/convert.go @@ -8,7 +8,7 @@ import ( "fmt" "reflect" - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" ) // unwrapper unwraps the value to the underlying value. @@ -20,13 +20,13 @@ type unwrapper interface { // A Converter coverts to/from Go reflect.Value types and protobuf protoreflect.Value types. type Converter interface { // PBValueOf converts a reflect.Value to a protoreflect.Value. - PBValueOf(reflect.Value) pref.Value + PBValueOf(reflect.Value) protoreflect.Value // GoValueOf converts a protoreflect.Value to a reflect.Value. - GoValueOf(pref.Value) reflect.Value + GoValueOf(protoreflect.Value) reflect.Value // IsValidPB returns whether a protoreflect.Value is compatible with this type. - IsValidPB(pref.Value) bool + IsValidPB(protoreflect.Value) bool // IsValidGo returns whether a reflect.Value is compatible with this type. IsValidGo(reflect.Value) bool @@ -34,12 +34,12 @@ type Converter interface { // New returns a new field value. // For scalars, it returns the default value of the field. // For composite types, it returns a new mutable value. - New() pref.Value + New() protoreflect.Value // Zero returns a new field value. // For scalars, it returns the default value of the field. // For composite types, it returns an immutable, empty value. - Zero() pref.Value + Zero() protoreflect.Value } // NewConverter matches a Go type with a protobuf field and returns a Converter @@ -50,7 +50,7 @@ type Converter interface { // This matcher deliberately supports a wider range of Go types than what // protoc-gen-go historically generated to be able to automatically wrap some // v1 messages generated by other forks of protoc-gen-go. -func NewConverter(t reflect.Type, fd pref.FieldDescriptor) Converter { +func NewConverter(t reflect.Type, fd protoreflect.FieldDescriptor) Converter { switch { case fd.IsList(): return newListConverter(t, fd) @@ -59,7 +59,6 @@ func NewConverter(t reflect.Type, fd pref.FieldDescriptor) Converter { default: return newSingularConverter(t, fd) } - panic(fmt.Sprintf("invalid Go type %v for field %v", t, fd.FullName())) } var ( @@ -76,68 +75,68 @@ var ( ) var ( - boolZero = pref.ValueOfBool(false) - int32Zero = pref.ValueOfInt32(0) - int64Zero = pref.ValueOfInt64(0) - uint32Zero = pref.ValueOfUint32(0) - uint64Zero = pref.ValueOfUint64(0) - float32Zero = pref.ValueOfFloat32(0) - float64Zero = pref.ValueOfFloat64(0) - stringZero = pref.ValueOfString("") - bytesZero = pref.ValueOfBytes(nil) + boolZero = protoreflect.ValueOfBool(false) + int32Zero = protoreflect.ValueOfInt32(0) + int64Zero = protoreflect.ValueOfInt64(0) + uint32Zero = protoreflect.ValueOfUint32(0) + uint64Zero = protoreflect.ValueOfUint64(0) + float32Zero = protoreflect.ValueOfFloat32(0) + float64Zero = protoreflect.ValueOfFloat64(0) + stringZero = protoreflect.ValueOfString("") + bytesZero = protoreflect.ValueOfBytes(nil) ) -func newSingularConverter(t reflect.Type, fd pref.FieldDescriptor) Converter { - defVal := func(fd pref.FieldDescriptor, zero pref.Value) pref.Value { - if fd.Cardinality() == pref.Repeated { +func newSingularConverter(t reflect.Type, fd protoreflect.FieldDescriptor) Converter { + defVal := func(fd protoreflect.FieldDescriptor, zero protoreflect.Value) protoreflect.Value { + if fd.Cardinality() == protoreflect.Repeated { // Default isn't defined for repeated fields. return zero } return fd.Default() } switch fd.Kind() { - case pref.BoolKind: + case protoreflect.BoolKind: if t.Kind() == reflect.Bool { return &boolConverter{t, defVal(fd, boolZero)} } - case pref.Int32Kind, pref.Sint32Kind, pref.Sfixed32Kind: + case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: if t.Kind() == reflect.Int32 { return &int32Converter{t, defVal(fd, int32Zero)} } - case pref.Int64Kind, pref.Sint64Kind, pref.Sfixed64Kind: + case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: if t.Kind() == reflect.Int64 { return &int64Converter{t, defVal(fd, int64Zero)} } - case pref.Uint32Kind, pref.Fixed32Kind: + case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: if t.Kind() == reflect.Uint32 { return &uint32Converter{t, defVal(fd, uint32Zero)} } - case pref.Uint64Kind, pref.Fixed64Kind: + case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: if t.Kind() == reflect.Uint64 { return &uint64Converter{t, defVal(fd, uint64Zero)} } - case pref.FloatKind: + case protoreflect.FloatKind: if t.Kind() == reflect.Float32 { return &float32Converter{t, defVal(fd, float32Zero)} } - case pref.DoubleKind: + case protoreflect.DoubleKind: if t.Kind() == reflect.Float64 { return &float64Converter{t, defVal(fd, float64Zero)} } - case pref.StringKind: + case protoreflect.StringKind: if t.Kind() == reflect.String || (t.Kind() == reflect.Slice && t.Elem() == byteType) { return &stringConverter{t, defVal(fd, stringZero)} } - case pref.BytesKind: + case protoreflect.BytesKind: if t.Kind() == reflect.String || (t.Kind() == reflect.Slice && t.Elem() == byteType) { return &bytesConverter{t, defVal(fd, bytesZero)} } - case pref.EnumKind: + case protoreflect.EnumKind: // Handle enums, which must be a named int32 type. if t.Kind() == reflect.Int32 { return newEnumConverter(t, fd) } - case pref.MessageKind, pref.GroupKind: + case protoreflect.MessageKind, protoreflect.GroupKind: return newMessageConverter(t) } panic(fmt.Sprintf("invalid Go type %v for field %v", t, fd.FullName())) @@ -145,184 +144,184 @@ func newSingularConverter(t reflect.Type, fd pref.FieldDescriptor) Converter { type boolConverter struct { goType reflect.Type - def pref.Value + def protoreflect.Value } -func (c *boolConverter) PBValueOf(v reflect.Value) pref.Value { +func (c *boolConverter) PBValueOf(v reflect.Value) protoreflect.Value { if v.Type() != c.goType { panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) } - return pref.ValueOfBool(v.Bool()) + return protoreflect.ValueOfBool(v.Bool()) } -func (c *boolConverter) GoValueOf(v pref.Value) reflect.Value { +func (c *boolConverter) GoValueOf(v protoreflect.Value) reflect.Value { return reflect.ValueOf(v.Bool()).Convert(c.goType) } -func (c *boolConverter) IsValidPB(v pref.Value) bool { +func (c *boolConverter) IsValidPB(v protoreflect.Value) bool { _, ok := v.Interface().(bool) return ok } func (c *boolConverter) IsValidGo(v reflect.Value) bool { return v.IsValid() && v.Type() == c.goType } -func (c *boolConverter) New() pref.Value { return c.def } -func (c *boolConverter) Zero() pref.Value { return c.def } +func (c *boolConverter) New() protoreflect.Value { return c.def } +func (c *boolConverter) Zero() protoreflect.Value { return c.def } type int32Converter struct { goType reflect.Type - def pref.Value + def protoreflect.Value } -func (c *int32Converter) PBValueOf(v reflect.Value) pref.Value { +func (c *int32Converter) PBValueOf(v reflect.Value) protoreflect.Value { if v.Type() != c.goType { panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) } - return pref.ValueOfInt32(int32(v.Int())) + return protoreflect.ValueOfInt32(int32(v.Int())) } -func (c *int32Converter) GoValueOf(v pref.Value) reflect.Value { +func (c *int32Converter) GoValueOf(v protoreflect.Value) reflect.Value { return reflect.ValueOf(int32(v.Int())).Convert(c.goType) } -func (c *int32Converter) IsValidPB(v pref.Value) bool { +func (c *int32Converter) IsValidPB(v protoreflect.Value) bool { _, ok := v.Interface().(int32) return ok } func (c *int32Converter) IsValidGo(v reflect.Value) bool { return v.IsValid() && v.Type() == c.goType } -func (c *int32Converter) New() pref.Value { return c.def } -func (c *int32Converter) Zero() pref.Value { return c.def } +func (c *int32Converter) New() protoreflect.Value { return c.def } +func (c *int32Converter) Zero() protoreflect.Value { return c.def } type int64Converter struct { goType reflect.Type - def pref.Value + def protoreflect.Value } -func (c *int64Converter) PBValueOf(v reflect.Value) pref.Value { +func (c *int64Converter) PBValueOf(v reflect.Value) protoreflect.Value { if v.Type() != c.goType { panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) } - return pref.ValueOfInt64(int64(v.Int())) + return protoreflect.ValueOfInt64(int64(v.Int())) } -func (c *int64Converter) GoValueOf(v pref.Value) reflect.Value { +func (c *int64Converter) GoValueOf(v protoreflect.Value) reflect.Value { return reflect.ValueOf(int64(v.Int())).Convert(c.goType) } -func (c *int64Converter) IsValidPB(v pref.Value) bool { +func (c *int64Converter) IsValidPB(v protoreflect.Value) bool { _, ok := v.Interface().(int64) return ok } func (c *int64Converter) IsValidGo(v reflect.Value) bool { return v.IsValid() && v.Type() == c.goType } -func (c *int64Converter) New() pref.Value { return c.def } -func (c *int64Converter) Zero() pref.Value { return c.def } +func (c *int64Converter) New() protoreflect.Value { return c.def } +func (c *int64Converter) Zero() protoreflect.Value { return c.def } type uint32Converter struct { goType reflect.Type - def pref.Value + def protoreflect.Value } -func (c *uint32Converter) PBValueOf(v reflect.Value) pref.Value { +func (c *uint32Converter) PBValueOf(v reflect.Value) protoreflect.Value { if v.Type() != c.goType { panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) } - return pref.ValueOfUint32(uint32(v.Uint())) + return protoreflect.ValueOfUint32(uint32(v.Uint())) } -func (c *uint32Converter) GoValueOf(v pref.Value) reflect.Value { +func (c *uint32Converter) GoValueOf(v protoreflect.Value) reflect.Value { return reflect.ValueOf(uint32(v.Uint())).Convert(c.goType) } -func (c *uint32Converter) IsValidPB(v pref.Value) bool { +func (c *uint32Converter) IsValidPB(v protoreflect.Value) bool { _, ok := v.Interface().(uint32) return ok } func (c *uint32Converter) IsValidGo(v reflect.Value) bool { return v.IsValid() && v.Type() == c.goType } -func (c *uint32Converter) New() pref.Value { return c.def } -func (c *uint32Converter) Zero() pref.Value { return c.def } +func (c *uint32Converter) New() protoreflect.Value { return c.def } +func (c *uint32Converter) Zero() protoreflect.Value { return c.def } type uint64Converter struct { goType reflect.Type - def pref.Value + def protoreflect.Value } -func (c *uint64Converter) PBValueOf(v reflect.Value) pref.Value { +func (c *uint64Converter) PBValueOf(v reflect.Value) protoreflect.Value { if v.Type() != c.goType { panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) } - return pref.ValueOfUint64(uint64(v.Uint())) + return protoreflect.ValueOfUint64(uint64(v.Uint())) } -func (c *uint64Converter) GoValueOf(v pref.Value) reflect.Value { +func (c *uint64Converter) GoValueOf(v protoreflect.Value) reflect.Value { return reflect.ValueOf(uint64(v.Uint())).Convert(c.goType) } -func (c *uint64Converter) IsValidPB(v pref.Value) bool { +func (c *uint64Converter) IsValidPB(v protoreflect.Value) bool { _, ok := v.Interface().(uint64) return ok } func (c *uint64Converter) IsValidGo(v reflect.Value) bool { return v.IsValid() && v.Type() == c.goType } -func (c *uint64Converter) New() pref.Value { return c.def } -func (c *uint64Converter) Zero() pref.Value { return c.def } +func (c *uint64Converter) New() protoreflect.Value { return c.def } +func (c *uint64Converter) Zero() protoreflect.Value { return c.def } type float32Converter struct { goType reflect.Type - def pref.Value + def protoreflect.Value } -func (c *float32Converter) PBValueOf(v reflect.Value) pref.Value { +func (c *float32Converter) PBValueOf(v reflect.Value) protoreflect.Value { if v.Type() != c.goType { panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) } - return pref.ValueOfFloat32(float32(v.Float())) + return protoreflect.ValueOfFloat32(float32(v.Float())) } -func (c *float32Converter) GoValueOf(v pref.Value) reflect.Value { +func (c *float32Converter) GoValueOf(v protoreflect.Value) reflect.Value { return reflect.ValueOf(float32(v.Float())).Convert(c.goType) } -func (c *float32Converter) IsValidPB(v pref.Value) bool { +func (c *float32Converter) IsValidPB(v protoreflect.Value) bool { _, ok := v.Interface().(float32) return ok } func (c *float32Converter) IsValidGo(v reflect.Value) bool { return v.IsValid() && v.Type() == c.goType } -func (c *float32Converter) New() pref.Value { return c.def } -func (c *float32Converter) Zero() pref.Value { return c.def } +func (c *float32Converter) New() protoreflect.Value { return c.def } +func (c *float32Converter) Zero() protoreflect.Value { return c.def } type float64Converter struct { goType reflect.Type - def pref.Value + def protoreflect.Value } -func (c *float64Converter) PBValueOf(v reflect.Value) pref.Value { +func (c *float64Converter) PBValueOf(v reflect.Value) protoreflect.Value { if v.Type() != c.goType { panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) } - return pref.ValueOfFloat64(float64(v.Float())) + return protoreflect.ValueOfFloat64(float64(v.Float())) } -func (c *float64Converter) GoValueOf(v pref.Value) reflect.Value { +func (c *float64Converter) GoValueOf(v protoreflect.Value) reflect.Value { return reflect.ValueOf(float64(v.Float())).Convert(c.goType) } -func (c *float64Converter) IsValidPB(v pref.Value) bool { +func (c *float64Converter) IsValidPB(v protoreflect.Value) bool { _, ok := v.Interface().(float64) return ok } func (c *float64Converter) IsValidGo(v reflect.Value) bool { return v.IsValid() && v.Type() == c.goType } -func (c *float64Converter) New() pref.Value { return c.def } -func (c *float64Converter) Zero() pref.Value { return c.def } +func (c *float64Converter) New() protoreflect.Value { return c.def } +func (c *float64Converter) Zero() protoreflect.Value { return c.def } type stringConverter struct { goType reflect.Type - def pref.Value + def protoreflect.Value } -func (c *stringConverter) PBValueOf(v reflect.Value) pref.Value { +func (c *stringConverter) PBValueOf(v reflect.Value) protoreflect.Value { if v.Type() != c.goType { panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) } - return pref.ValueOfString(v.Convert(stringType).String()) + return protoreflect.ValueOfString(v.Convert(stringType).String()) } -func (c *stringConverter) GoValueOf(v pref.Value) reflect.Value { +func (c *stringConverter) GoValueOf(v protoreflect.Value) reflect.Value { // pref.Value.String never panics, so we go through an interface // conversion here to check the type. s := v.Interface().(string) @@ -331,71 +330,71 @@ func (c *stringConverter) GoValueOf(v pref.Value) reflect.Value { } return reflect.ValueOf(s).Convert(c.goType) } -func (c *stringConverter) IsValidPB(v pref.Value) bool { +func (c *stringConverter) IsValidPB(v protoreflect.Value) bool { _, ok := v.Interface().(string) return ok } func (c *stringConverter) IsValidGo(v reflect.Value) bool { return v.IsValid() && v.Type() == c.goType } -func (c *stringConverter) New() pref.Value { return c.def } -func (c *stringConverter) Zero() pref.Value { return c.def } +func (c *stringConverter) New() protoreflect.Value { return c.def } +func (c *stringConverter) Zero() protoreflect.Value { return c.def } type bytesConverter struct { goType reflect.Type - def pref.Value + def protoreflect.Value } -func (c *bytesConverter) PBValueOf(v reflect.Value) pref.Value { +func (c *bytesConverter) PBValueOf(v reflect.Value) protoreflect.Value { if v.Type() != c.goType { panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) } if c.goType.Kind() == reflect.String && v.Len() == 0 { - return pref.ValueOfBytes(nil) // ensure empty string is []byte(nil) + return protoreflect.ValueOfBytes(nil) // ensure empty string is []byte(nil) } - return pref.ValueOfBytes(v.Convert(bytesType).Bytes()) + return protoreflect.ValueOfBytes(v.Convert(bytesType).Bytes()) } -func (c *bytesConverter) GoValueOf(v pref.Value) reflect.Value { +func (c *bytesConverter) GoValueOf(v protoreflect.Value) reflect.Value { return reflect.ValueOf(v.Bytes()).Convert(c.goType) } -func (c *bytesConverter) IsValidPB(v pref.Value) bool { +func (c *bytesConverter) IsValidPB(v protoreflect.Value) bool { _, ok := v.Interface().([]byte) return ok } func (c *bytesConverter) IsValidGo(v reflect.Value) bool { return v.IsValid() && v.Type() == c.goType } -func (c *bytesConverter) New() pref.Value { return c.def } -func (c *bytesConverter) Zero() pref.Value { return c.def } +func (c *bytesConverter) New() protoreflect.Value { return c.def } +func (c *bytesConverter) Zero() protoreflect.Value { return c.def } type enumConverter struct { goType reflect.Type - def pref.Value + def protoreflect.Value } -func newEnumConverter(goType reflect.Type, fd pref.FieldDescriptor) Converter { - var def pref.Value - if fd.Cardinality() == pref.Repeated { - def = pref.ValueOfEnum(fd.Enum().Values().Get(0).Number()) +func newEnumConverter(goType reflect.Type, fd protoreflect.FieldDescriptor) Converter { + var def protoreflect.Value + if fd.Cardinality() == protoreflect.Repeated { + def = protoreflect.ValueOfEnum(fd.Enum().Values().Get(0).Number()) } else { def = fd.Default() } return &enumConverter{goType, def} } -func (c *enumConverter) PBValueOf(v reflect.Value) pref.Value { +func (c *enumConverter) PBValueOf(v reflect.Value) protoreflect.Value { if v.Type() != c.goType { panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) } - return pref.ValueOfEnum(pref.EnumNumber(v.Int())) + return protoreflect.ValueOfEnum(protoreflect.EnumNumber(v.Int())) } -func (c *enumConverter) GoValueOf(v pref.Value) reflect.Value { +func (c *enumConverter) GoValueOf(v protoreflect.Value) reflect.Value { return reflect.ValueOf(v.Enum()).Convert(c.goType) } -func (c *enumConverter) IsValidPB(v pref.Value) bool { - _, ok := v.Interface().(pref.EnumNumber) +func (c *enumConverter) IsValidPB(v protoreflect.Value) bool { + _, ok := v.Interface().(protoreflect.EnumNumber) return ok } @@ -403,11 +402,11 @@ func (c *enumConverter) IsValidGo(v reflect.Value) bool { return v.IsValid() && v.Type() == c.goType } -func (c *enumConverter) New() pref.Value { +func (c *enumConverter) New() protoreflect.Value { return c.def } -func (c *enumConverter) Zero() pref.Value { +func (c *enumConverter) Zero() protoreflect.Value { return c.def } @@ -419,7 +418,7 @@ func newMessageConverter(goType reflect.Type) Converter { return &messageConverter{goType} } -func (c *messageConverter) PBValueOf(v reflect.Value) pref.Value { +func (c *messageConverter) PBValueOf(v reflect.Value) protoreflect.Value { if v.Type() != c.goType { panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) } @@ -430,13 +429,13 @@ func (c *messageConverter) PBValueOf(v reflect.Value) pref.Value { v = reflect.Zero(reflect.PtrTo(v.Type())) } } - if m, ok := v.Interface().(pref.ProtoMessage); ok { - return pref.ValueOfMessage(m.ProtoReflect()) + if m, ok := v.Interface().(protoreflect.ProtoMessage); ok { + return protoreflect.ValueOfMessage(m.ProtoReflect()) } - return pref.ValueOfMessage(legacyWrapMessage(v)) + return protoreflect.ValueOfMessage(legacyWrapMessage(v)) } -func (c *messageConverter) GoValueOf(v pref.Value) reflect.Value { +func (c *messageConverter) GoValueOf(v protoreflect.Value) reflect.Value { m := v.Message() var rv reflect.Value if u, ok := m.(unwrapper); ok { @@ -460,7 +459,7 @@ func (c *messageConverter) GoValueOf(v pref.Value) reflect.Value { return rv } -func (c *messageConverter) IsValidPB(v pref.Value) bool { +func (c *messageConverter) IsValidPB(v protoreflect.Value) bool { m := v.Message() var rv reflect.Value if u, ok := m.(unwrapper); ok { @@ -478,14 +477,14 @@ func (c *messageConverter) IsValidGo(v reflect.Value) bool { return v.IsValid() && v.Type() == c.goType } -func (c *messageConverter) New() pref.Value { +func (c *messageConverter) New() protoreflect.Value { if c.isNonPointer() { return c.PBValueOf(reflect.New(c.goType).Elem()) } return c.PBValueOf(reflect.New(c.goType.Elem())) } -func (c *messageConverter) Zero() pref.Value { +func (c *messageConverter) Zero() protoreflect.Value { return c.PBValueOf(reflect.Zero(c.goType)) } diff --git a/vendor/google.golang.org/protobuf/internal/impl/convert_list.go b/vendor/google.golang.org/protobuf/internal/impl/convert_list.go index 6fccab520e59a..f89136516f96d 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/convert_list.go +++ b/vendor/google.golang.org/protobuf/internal/impl/convert_list.go @@ -8,10 +8,10 @@ import ( "fmt" "reflect" - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" ) -func newListConverter(t reflect.Type, fd pref.FieldDescriptor) Converter { +func newListConverter(t reflect.Type, fd protoreflect.FieldDescriptor) Converter { switch { case t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Slice: return &listPtrConverter{t, newSingularConverter(t.Elem().Elem(), fd)} @@ -26,16 +26,16 @@ type listConverter struct { c Converter } -func (c *listConverter) PBValueOf(v reflect.Value) pref.Value { +func (c *listConverter) PBValueOf(v reflect.Value) protoreflect.Value { if v.Type() != c.goType { panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) } pv := reflect.New(c.goType) pv.Elem().Set(v) - return pref.ValueOfList(&listReflect{pv, c.c}) + return protoreflect.ValueOfList(&listReflect{pv, c.c}) } -func (c *listConverter) GoValueOf(v pref.Value) reflect.Value { +func (c *listConverter) GoValueOf(v protoreflect.Value) reflect.Value { rv := v.List().(*listReflect).v if rv.IsNil() { return reflect.Zero(c.goType) @@ -43,7 +43,7 @@ func (c *listConverter) GoValueOf(v pref.Value) reflect.Value { return rv.Elem() } -func (c *listConverter) IsValidPB(v pref.Value) bool { +func (c *listConverter) IsValidPB(v protoreflect.Value) bool { list, ok := v.Interface().(*listReflect) if !ok { return false @@ -55,12 +55,12 @@ func (c *listConverter) IsValidGo(v reflect.Value) bool { return v.IsValid() && v.Type() == c.goType } -func (c *listConverter) New() pref.Value { - return pref.ValueOfList(&listReflect{reflect.New(c.goType), c.c}) +func (c *listConverter) New() protoreflect.Value { + return protoreflect.ValueOfList(&listReflect{reflect.New(c.goType), c.c}) } -func (c *listConverter) Zero() pref.Value { - return pref.ValueOfList(&listReflect{reflect.Zero(reflect.PtrTo(c.goType)), c.c}) +func (c *listConverter) Zero() protoreflect.Value { + return protoreflect.ValueOfList(&listReflect{reflect.Zero(reflect.PtrTo(c.goType)), c.c}) } type listPtrConverter struct { @@ -68,18 +68,18 @@ type listPtrConverter struct { c Converter } -func (c *listPtrConverter) PBValueOf(v reflect.Value) pref.Value { +func (c *listPtrConverter) PBValueOf(v reflect.Value) protoreflect.Value { if v.Type() != c.goType { panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) } - return pref.ValueOfList(&listReflect{v, c.c}) + return protoreflect.ValueOfList(&listReflect{v, c.c}) } -func (c *listPtrConverter) GoValueOf(v pref.Value) reflect.Value { +func (c *listPtrConverter) GoValueOf(v protoreflect.Value) reflect.Value { return v.List().(*listReflect).v } -func (c *listPtrConverter) IsValidPB(v pref.Value) bool { +func (c *listPtrConverter) IsValidPB(v protoreflect.Value) bool { list, ok := v.Interface().(*listReflect) if !ok { return false @@ -91,11 +91,11 @@ func (c *listPtrConverter) IsValidGo(v reflect.Value) bool { return v.IsValid() && v.Type() == c.goType } -func (c *listPtrConverter) New() pref.Value { +func (c *listPtrConverter) New() protoreflect.Value { return c.PBValueOf(reflect.New(c.goType.Elem())) } -func (c *listPtrConverter) Zero() pref.Value { +func (c *listPtrConverter) Zero() protoreflect.Value { return c.PBValueOf(reflect.Zero(c.goType)) } @@ -110,16 +110,16 @@ func (ls *listReflect) Len() int { } return ls.v.Elem().Len() } -func (ls *listReflect) Get(i int) pref.Value { +func (ls *listReflect) Get(i int) protoreflect.Value { return ls.conv.PBValueOf(ls.v.Elem().Index(i)) } -func (ls *listReflect) Set(i int, v pref.Value) { +func (ls *listReflect) Set(i int, v protoreflect.Value) { ls.v.Elem().Index(i).Set(ls.conv.GoValueOf(v)) } -func (ls *listReflect) Append(v pref.Value) { +func (ls *listReflect) Append(v protoreflect.Value) { ls.v.Elem().Set(reflect.Append(ls.v.Elem(), ls.conv.GoValueOf(v))) } -func (ls *listReflect) AppendMutable() pref.Value { +func (ls *listReflect) AppendMutable() protoreflect.Value { if _, ok := ls.conv.(*messageConverter); !ok { panic("invalid AppendMutable on list with non-message type") } @@ -130,7 +130,7 @@ func (ls *listReflect) AppendMutable() pref.Value { func (ls *listReflect) Truncate(i int) { ls.v.Elem().Set(ls.v.Elem().Slice(0, i)) } -func (ls *listReflect) NewElement() pref.Value { +func (ls *listReflect) NewElement() protoreflect.Value { return ls.conv.New() } func (ls *listReflect) IsValid() bool { diff --git a/vendor/google.golang.org/protobuf/internal/impl/convert_map.go b/vendor/google.golang.org/protobuf/internal/impl/convert_map.go index de06b2593f89a..f30b0a0576de3 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/convert_map.go +++ b/vendor/google.golang.org/protobuf/internal/impl/convert_map.go @@ -8,7 +8,7 @@ import ( "fmt" "reflect" - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" ) type mapConverter struct { @@ -16,7 +16,7 @@ type mapConverter struct { keyConv, valConv Converter } -func newMapConverter(t reflect.Type, fd pref.FieldDescriptor) *mapConverter { +func newMapConverter(t reflect.Type, fd protoreflect.FieldDescriptor) *mapConverter { if t.Kind() != reflect.Map { panic(fmt.Sprintf("invalid Go type %v for field %v", t, fd.FullName())) } @@ -27,18 +27,18 @@ func newMapConverter(t reflect.Type, fd pref.FieldDescriptor) *mapConverter { } } -func (c *mapConverter) PBValueOf(v reflect.Value) pref.Value { +func (c *mapConverter) PBValueOf(v reflect.Value) protoreflect.Value { if v.Type() != c.goType { panic(fmt.Sprintf("invalid type: got %v, want %v", v.Type(), c.goType)) } - return pref.ValueOfMap(&mapReflect{v, c.keyConv, c.valConv}) + return protoreflect.ValueOfMap(&mapReflect{v, c.keyConv, c.valConv}) } -func (c *mapConverter) GoValueOf(v pref.Value) reflect.Value { +func (c *mapConverter) GoValueOf(v protoreflect.Value) reflect.Value { return v.Map().(*mapReflect).v } -func (c *mapConverter) IsValidPB(v pref.Value) bool { +func (c *mapConverter) IsValidPB(v protoreflect.Value) bool { mapv, ok := v.Interface().(*mapReflect) if !ok { return false @@ -50,11 +50,11 @@ func (c *mapConverter) IsValidGo(v reflect.Value) bool { return v.IsValid() && v.Type() == c.goType } -func (c *mapConverter) New() pref.Value { +func (c *mapConverter) New() protoreflect.Value { return c.PBValueOf(reflect.MakeMap(c.goType)) } -func (c *mapConverter) Zero() pref.Value { +func (c *mapConverter) Zero() protoreflect.Value { return c.PBValueOf(reflect.Zero(c.goType)) } @@ -67,29 +67,29 @@ type mapReflect struct { func (ms *mapReflect) Len() int { return ms.v.Len() } -func (ms *mapReflect) Has(k pref.MapKey) bool { +func (ms *mapReflect) Has(k protoreflect.MapKey) bool { rk := ms.keyConv.GoValueOf(k.Value()) rv := ms.v.MapIndex(rk) return rv.IsValid() } -func (ms *mapReflect) Get(k pref.MapKey) pref.Value { +func (ms *mapReflect) Get(k protoreflect.MapKey) protoreflect.Value { rk := ms.keyConv.GoValueOf(k.Value()) rv := ms.v.MapIndex(rk) if !rv.IsValid() { - return pref.Value{} + return protoreflect.Value{} } return ms.valConv.PBValueOf(rv) } -func (ms *mapReflect) Set(k pref.MapKey, v pref.Value) { +func (ms *mapReflect) Set(k protoreflect.MapKey, v protoreflect.Value) { rk := ms.keyConv.GoValueOf(k.Value()) rv := ms.valConv.GoValueOf(v) ms.v.SetMapIndex(rk, rv) } -func (ms *mapReflect) Clear(k pref.MapKey) { +func (ms *mapReflect) Clear(k protoreflect.MapKey) { rk := ms.keyConv.GoValueOf(k.Value()) ms.v.SetMapIndex(rk, reflect.Value{}) } -func (ms *mapReflect) Mutable(k pref.MapKey) pref.Value { +func (ms *mapReflect) Mutable(k protoreflect.MapKey) protoreflect.Value { if _, ok := ms.valConv.(*messageConverter); !ok { panic("invalid Mutable on map with non-message value type") } @@ -100,7 +100,7 @@ func (ms *mapReflect) Mutable(k pref.MapKey) pref.Value { } return v } -func (ms *mapReflect) Range(f func(pref.MapKey, pref.Value) bool) { +func (ms *mapReflect) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { iter := mapRange(ms.v) for iter.Next() { k := ms.keyConv.PBValueOf(iter.Key()).MapKey() @@ -110,7 +110,7 @@ func (ms *mapReflect) Range(f func(pref.MapKey, pref.Value) bool) { } } } -func (ms *mapReflect) NewValue() pref.Value { +func (ms *mapReflect) NewValue() protoreflect.Value { return ms.valConv.New() } func (ms *mapReflect) IsValid() bool { diff --git a/vendor/google.golang.org/protobuf/internal/impl/decode.go b/vendor/google.golang.org/protobuf/internal/impl/decode.go index c65b0325c17e4..cda0520c275cb 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/decode.go +++ b/vendor/google.golang.org/protobuf/internal/impl/decode.go @@ -12,9 +12,8 @@ import ( "google.golang.org/protobuf/internal/flags" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" - preg "google.golang.org/protobuf/reflect/protoregistry" + "google.golang.org/protobuf/reflect/protoregistry" "google.golang.org/protobuf/runtime/protoiface" - piface "google.golang.org/protobuf/runtime/protoiface" ) var errDecode = errors.New("cannot parse invalid wire-format data") @@ -38,14 +37,16 @@ func (o unmarshalOptions) Options() proto.UnmarshalOptions { } } -func (o unmarshalOptions) DiscardUnknown() bool { return o.flags&piface.UnmarshalDiscardUnknown != 0 } +func (o unmarshalOptions) DiscardUnknown() bool { + return o.flags&protoiface.UnmarshalDiscardUnknown != 0 +} func (o unmarshalOptions) IsDefault() bool { - return o.flags == 0 && o.resolver == preg.GlobalTypes + return o.flags == 0 && o.resolver == protoregistry.GlobalTypes } var lazyUnmarshalOptions = unmarshalOptions{ - resolver: preg.GlobalTypes, + resolver: protoregistry.GlobalTypes, depth: protowire.DefaultRecursionLimit, } @@ -55,7 +56,7 @@ type unmarshalOutput struct { } // unmarshal is protoreflect.Methods.Unmarshal. -func (mi *MessageInfo) unmarshal(in piface.UnmarshalInput) (piface.UnmarshalOutput, error) { +func (mi *MessageInfo) unmarshal(in protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { var p pointer if ms, ok := in.Message.(*messageState); ok { p = ms.pointer() @@ -67,11 +68,11 @@ func (mi *MessageInfo) unmarshal(in piface.UnmarshalInput) (piface.UnmarshalOutp resolver: in.Resolver, depth: in.Depth, }) - var flags piface.UnmarshalOutputFlags + var flags protoiface.UnmarshalOutputFlags if out.initialized { - flags |= piface.UnmarshalInitialized + flags |= protoiface.UnmarshalInitialized } - return piface.UnmarshalOutput{ + return protoiface.UnmarshalOutput{ Flags: flags, }, err } @@ -210,7 +211,7 @@ func (mi *MessageInfo) unmarshalExtension(b []byte, num protowire.Number, wtyp p var err error xt, err = opts.resolver.FindExtensionByNumber(mi.Desc.FullName(), num) if err != nil { - if err == preg.NotFound { + if err == protoregistry.NotFound { return out, errUnknown } return out, errors.New("%v: unable to resolve extension %v: %v", mi.Desc.FullName(), num, err) diff --git a/vendor/google.golang.org/protobuf/internal/impl/enum.go b/vendor/google.golang.org/protobuf/internal/impl/enum.go index 8c1eab4bfd869..5f3ef5ad732f6 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/enum.go +++ b/vendor/google.golang.org/protobuf/internal/impl/enum.go @@ -7,15 +7,15 @@ package impl import ( "reflect" - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" ) type EnumInfo struct { GoReflectType reflect.Type // int32 kind - Desc pref.EnumDescriptor + Desc protoreflect.EnumDescriptor } -func (t *EnumInfo) New(n pref.EnumNumber) pref.Enum { - return reflect.ValueOf(n).Convert(t.GoReflectType).Interface().(pref.Enum) +func (t *EnumInfo) New(n protoreflect.EnumNumber) protoreflect.Enum { + return reflect.ValueOf(n).Convert(t.GoReflectType).Interface().(protoreflect.Enum) } -func (t *EnumInfo) Descriptor() pref.EnumDescriptor { return t.Desc } +func (t *EnumInfo) Descriptor() protoreflect.EnumDescriptor { return t.Desc } diff --git a/vendor/google.golang.org/protobuf/internal/impl/extension.go b/vendor/google.golang.org/protobuf/internal/impl/extension.go index e904fd993657c..cb25b0bae1d71 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/extension.go +++ b/vendor/google.golang.org/protobuf/internal/impl/extension.go @@ -9,8 +9,8 @@ import ( "sync" "sync/atomic" - pref "google.golang.org/protobuf/reflect/protoreflect" - piface "google.golang.org/protobuf/runtime/protoiface" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/runtime/protoiface" ) // ExtensionInfo implements ExtensionType. @@ -45,7 +45,7 @@ type ExtensionInfo struct { // since the message may no longer implement the MessageV1 interface. // // Deprecated: Use the ExtendedType method instead. - ExtendedType piface.MessageV1 + ExtendedType protoiface.MessageV1 // ExtensionType is the zero value of the extension type. // @@ -83,31 +83,31 @@ const ( extensionInfoFullInit = 2 ) -func InitExtensionInfo(xi *ExtensionInfo, xd pref.ExtensionDescriptor, goType reflect.Type) { +func InitExtensionInfo(xi *ExtensionInfo, xd protoreflect.ExtensionDescriptor, goType reflect.Type) { xi.goType = goType xi.desc = extensionTypeDescriptor{xd, xi} xi.init = extensionInfoDescInit } -func (xi *ExtensionInfo) New() pref.Value { +func (xi *ExtensionInfo) New() protoreflect.Value { return xi.lazyInit().New() } -func (xi *ExtensionInfo) Zero() pref.Value { +func (xi *ExtensionInfo) Zero() protoreflect.Value { return xi.lazyInit().Zero() } -func (xi *ExtensionInfo) ValueOf(v interface{}) pref.Value { +func (xi *ExtensionInfo) ValueOf(v interface{}) protoreflect.Value { return xi.lazyInit().PBValueOf(reflect.ValueOf(v)) } -func (xi *ExtensionInfo) InterfaceOf(v pref.Value) interface{} { +func (xi *ExtensionInfo) InterfaceOf(v protoreflect.Value) interface{} { return xi.lazyInit().GoValueOf(v).Interface() } -func (xi *ExtensionInfo) IsValidValue(v pref.Value) bool { +func (xi *ExtensionInfo) IsValidValue(v protoreflect.Value) bool { return xi.lazyInit().IsValidPB(v) } func (xi *ExtensionInfo) IsValidInterface(v interface{}) bool { return xi.lazyInit().IsValidGo(reflect.ValueOf(v)) } -func (xi *ExtensionInfo) TypeDescriptor() pref.ExtensionTypeDescriptor { +func (xi *ExtensionInfo) TypeDescriptor() protoreflect.ExtensionTypeDescriptor { if atomic.LoadUint32(&xi.init) < extensionInfoDescInit { xi.lazyInitSlow() } @@ -144,13 +144,13 @@ func (xi *ExtensionInfo) lazyInitSlow() { } type extensionTypeDescriptor struct { - pref.ExtensionDescriptor + protoreflect.ExtensionDescriptor xi *ExtensionInfo } -func (xtd *extensionTypeDescriptor) Type() pref.ExtensionType { +func (xtd *extensionTypeDescriptor) Type() protoreflect.ExtensionType { return xtd.xi } -func (xtd *extensionTypeDescriptor) Descriptor() pref.ExtensionDescriptor { +func (xtd *extensionTypeDescriptor) Descriptor() protoreflect.ExtensionDescriptor { return xtd.ExtensionDescriptor } diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go index f7d7ffb51039e..c2a803bb2f929 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go +++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go @@ -13,13 +13,12 @@ import ( "google.golang.org/protobuf/internal/filedesc" "google.golang.org/protobuf/internal/strs" "google.golang.org/protobuf/reflect/protoreflect" - pref "google.golang.org/protobuf/reflect/protoreflect" ) // legacyEnumName returns the name of enums used in legacy code. // It is neither the protobuf full name nor the qualified Go name, // but rather an odd hybrid of both. -func legacyEnumName(ed pref.EnumDescriptor) string { +func legacyEnumName(ed protoreflect.EnumDescriptor) string { var protoPkg string enumName := string(ed.FullName()) if fd := ed.ParentFile(); fd != nil { @@ -34,68 +33,68 @@ func legacyEnumName(ed pref.EnumDescriptor) string { // legacyWrapEnum wraps v as a protoreflect.Enum, // where v must be a int32 kind and not implement the v2 API already. -func legacyWrapEnum(v reflect.Value) pref.Enum { +func legacyWrapEnum(v reflect.Value) protoreflect.Enum { et := legacyLoadEnumType(v.Type()) - return et.New(pref.EnumNumber(v.Int())) + return et.New(protoreflect.EnumNumber(v.Int())) } var legacyEnumTypeCache sync.Map // map[reflect.Type]protoreflect.EnumType // legacyLoadEnumType dynamically loads a protoreflect.EnumType for t, // where t must be an int32 kind and not implement the v2 API already. -func legacyLoadEnumType(t reflect.Type) pref.EnumType { +func legacyLoadEnumType(t reflect.Type) protoreflect.EnumType { // Fast-path: check if a EnumType is cached for this concrete type. if et, ok := legacyEnumTypeCache.Load(t); ok { - return et.(pref.EnumType) + return et.(protoreflect.EnumType) } // Slow-path: derive enum descriptor and initialize EnumType. - var et pref.EnumType + var et protoreflect.EnumType ed := LegacyLoadEnumDesc(t) et = &legacyEnumType{ desc: ed, goType: t, } if et, ok := legacyEnumTypeCache.LoadOrStore(t, et); ok { - return et.(pref.EnumType) + return et.(protoreflect.EnumType) } return et } type legacyEnumType struct { - desc pref.EnumDescriptor + desc protoreflect.EnumDescriptor goType reflect.Type m sync.Map // map[protoreflect.EnumNumber]proto.Enum } -func (t *legacyEnumType) New(n pref.EnumNumber) pref.Enum { +func (t *legacyEnumType) New(n protoreflect.EnumNumber) protoreflect.Enum { if e, ok := t.m.Load(n); ok { - return e.(pref.Enum) + return e.(protoreflect.Enum) } e := &legacyEnumWrapper{num: n, pbTyp: t, goTyp: t.goType} t.m.Store(n, e) return e } -func (t *legacyEnumType) Descriptor() pref.EnumDescriptor { +func (t *legacyEnumType) Descriptor() protoreflect.EnumDescriptor { return t.desc } type legacyEnumWrapper struct { - num pref.EnumNumber - pbTyp pref.EnumType + num protoreflect.EnumNumber + pbTyp protoreflect.EnumType goTyp reflect.Type } -func (e *legacyEnumWrapper) Descriptor() pref.EnumDescriptor { +func (e *legacyEnumWrapper) Descriptor() protoreflect.EnumDescriptor { return e.pbTyp.Descriptor() } -func (e *legacyEnumWrapper) Type() pref.EnumType { +func (e *legacyEnumWrapper) Type() protoreflect.EnumType { return e.pbTyp } -func (e *legacyEnumWrapper) Number() pref.EnumNumber { +func (e *legacyEnumWrapper) Number() protoreflect.EnumNumber { return e.num } -func (e *legacyEnumWrapper) ProtoReflect() pref.Enum { +func (e *legacyEnumWrapper) ProtoReflect() protoreflect.Enum { return e } func (e *legacyEnumWrapper) protoUnwrap() interface{} { @@ -105,8 +104,8 @@ func (e *legacyEnumWrapper) protoUnwrap() interface{} { } var ( - _ pref.Enum = (*legacyEnumWrapper)(nil) - _ unwrapper = (*legacyEnumWrapper)(nil) + _ protoreflect.Enum = (*legacyEnumWrapper)(nil) + _ unwrapper = (*legacyEnumWrapper)(nil) ) var legacyEnumDescCache sync.Map // map[reflect.Type]protoreflect.EnumDescriptor @@ -115,15 +114,15 @@ var legacyEnumDescCache sync.Map // map[reflect.Type]protoreflect.EnumDescriptor // which must be an int32 kind and not implement the v2 API already. // // This is exported for testing purposes. -func LegacyLoadEnumDesc(t reflect.Type) pref.EnumDescriptor { +func LegacyLoadEnumDesc(t reflect.Type) protoreflect.EnumDescriptor { // Fast-path: check if an EnumDescriptor is cached for this concrete type. if ed, ok := legacyEnumDescCache.Load(t); ok { - return ed.(pref.EnumDescriptor) + return ed.(protoreflect.EnumDescriptor) } // Slow-path: initialize EnumDescriptor from the raw descriptor. ev := reflect.Zero(t).Interface() - if _, ok := ev.(pref.Enum); ok { + if _, ok := ev.(protoreflect.Enum); ok { panic(fmt.Sprintf("%v already implements proto.Enum", t)) } edV1, ok := ev.(enumV1) @@ -132,7 +131,7 @@ func LegacyLoadEnumDesc(t reflect.Type) pref.EnumDescriptor { } b, idxs := edV1.EnumDescriptor() - var ed pref.EnumDescriptor + var ed protoreflect.EnumDescriptor if len(idxs) == 1 { ed = legacyLoadFileDesc(b).Enums().Get(idxs[0]) } else { @@ -158,10 +157,10 @@ var aberrantEnumDescCache sync.Map // map[reflect.Type]protoreflect.EnumDescript // We are unable to use the global enum registry since it is // unfortunately keyed by the protobuf full name, which we also do not know. // Thus, this produces some bogus enum descriptor based on the Go type name. -func aberrantLoadEnumDesc(t reflect.Type) pref.EnumDescriptor { +func aberrantLoadEnumDesc(t reflect.Type) protoreflect.EnumDescriptor { // Fast-path: check if an EnumDescriptor is cached for this concrete type. if ed, ok := aberrantEnumDescCache.Load(t); ok { - return ed.(pref.EnumDescriptor) + return ed.(protoreflect.EnumDescriptor) } // Slow-path: construct a bogus, but unique EnumDescriptor. @@ -182,7 +181,7 @@ func aberrantLoadEnumDesc(t reflect.Type) pref.EnumDescriptor { // An exhaustive query is clearly impractical, but can be best-effort. if ed, ok := aberrantEnumDescCache.LoadOrStore(t, ed); ok { - return ed.(pref.EnumDescriptor) + return ed.(protoreflect.EnumDescriptor) } return ed } @@ -192,7 +191,7 @@ func aberrantLoadEnumDesc(t reflect.Type) pref.EnumDescriptor { // It should be sufficiently unique within a program. // // This is exported for testing purposes. -func AberrantDeriveFullName(t reflect.Type) pref.FullName { +func AberrantDeriveFullName(t reflect.Type) protoreflect.FullName { sanitize := func(r rune) rune { switch { case r == '/': @@ -215,5 +214,5 @@ func AberrantDeriveFullName(t reflect.Type) pref.FullName { ss[i] = "x" + s } } - return pref.FullName(strings.Join(ss, ".")) + return protoreflect.FullName(strings.Join(ss, ".")) } diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_export.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_export.go index e3fb0b578586c..9b64ad5bba285 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/legacy_export.go +++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_export.go @@ -12,21 +12,21 @@ import ( "reflect" "google.golang.org/protobuf/internal/errors" - pref "google.golang.org/protobuf/reflect/protoreflect" - piface "google.golang.org/protobuf/runtime/protoiface" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/runtime/protoiface" ) // These functions exist to support exported APIs in generated protobufs. // While these are deprecated, they cannot be removed for compatibility reasons. // LegacyEnumName returns the name of enums used in legacy code. -func (Export) LegacyEnumName(ed pref.EnumDescriptor) string { +func (Export) LegacyEnumName(ed protoreflect.EnumDescriptor) string { return legacyEnumName(ed) } // LegacyMessageTypeOf returns the protoreflect.MessageType for m, // with name used as the message name if necessary. -func (Export) LegacyMessageTypeOf(m piface.MessageV1, name pref.FullName) pref.MessageType { +func (Export) LegacyMessageTypeOf(m protoiface.MessageV1, name protoreflect.FullName) protoreflect.MessageType { if mv := (Export{}).protoMessageV2Of(m); mv != nil { return mv.ProtoReflect().Type() } @@ -36,9 +36,9 @@ func (Export) LegacyMessageTypeOf(m piface.MessageV1, name pref.FullName) pref.M // UnmarshalJSONEnum unmarshals an enum from a JSON-encoded input. // The input can either be a string representing the enum value by name, // or a number representing the enum number itself. -func (Export) UnmarshalJSONEnum(ed pref.EnumDescriptor, b []byte) (pref.EnumNumber, error) { +func (Export) UnmarshalJSONEnum(ed protoreflect.EnumDescriptor, b []byte) (protoreflect.EnumNumber, error) { if b[0] == '"' { - var name pref.Name + var name protoreflect.Name if err := json.Unmarshal(b, &name); err != nil { return 0, errors.New("invalid input for enum %v: %s", ed.FullName(), b) } @@ -48,7 +48,7 @@ func (Export) UnmarshalJSONEnum(ed pref.EnumDescriptor, b []byte) (pref.EnumNumb } return ev.Number(), nil } else { - var num pref.EnumNumber + var num protoreflect.EnumNumber if err := json.Unmarshal(b, &num); err != nil { return 0, errors.New("invalid input for enum %v: %s", ed.FullName(), b) } @@ -81,8 +81,8 @@ func (Export) CompressGZIP(in []byte) (out []byte) { blockHeader[0] = 0x01 // final bit per RFC 1951, section 3.2.3. blockSize = len(in) } - binary.LittleEndian.PutUint16(blockHeader[1:3], uint16(blockSize)^0x0000) - binary.LittleEndian.PutUint16(blockHeader[3:5], uint16(blockSize)^0xffff) + binary.LittleEndian.PutUint16(blockHeader[1:3], uint16(blockSize)) + binary.LittleEndian.PutUint16(blockHeader[3:5], ^uint16(blockSize)) out = append(out, blockHeader[:]...) out = append(out, in[:blockSize]...) in = in[blockSize:] diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go index 49e723161c018..87b30d0504c17 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go +++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go @@ -12,16 +12,16 @@ import ( ptag "google.golang.org/protobuf/internal/encoding/tag" "google.golang.org/protobuf/internal/filedesc" "google.golang.org/protobuf/internal/pragma" - pref "google.golang.org/protobuf/reflect/protoreflect" - preg "google.golang.org/protobuf/reflect/protoregistry" - piface "google.golang.org/protobuf/runtime/protoiface" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" + "google.golang.org/protobuf/runtime/protoiface" ) func (xi *ExtensionInfo) initToLegacy() { xd := xi.desc - var parent piface.MessageV1 + var parent protoiface.MessageV1 messageName := xd.ContainingMessage().FullName() - if mt, _ := preg.GlobalTypes.FindMessageByName(messageName); mt != nil { + if mt, _ := protoregistry.GlobalTypes.FindMessageByName(messageName); mt != nil { // Create a new parent message and unwrap it if possible. mv := mt.New().Interface() t := reflect.TypeOf(mv) @@ -31,7 +31,7 @@ func (xi *ExtensionInfo) initToLegacy() { // Check whether the message implements the legacy v1 Message interface. mz := reflect.Zero(t).Interface() - if mz, ok := mz.(piface.MessageV1); ok { + if mz, ok := mz.(protoiface.MessageV1); ok { parent = mz } } @@ -46,7 +46,7 @@ func (xi *ExtensionInfo) initToLegacy() { // Reconstruct the legacy enum full name. var enumName string - if xd.Kind() == pref.EnumKind { + if xd.Kind() == protoreflect.EnumKind { enumName = legacyEnumName(xd.Enum()) } @@ -77,16 +77,16 @@ func (xi *ExtensionInfo) initFromLegacy() { // field number is specified. In such a case, use a placeholder. if xi.ExtendedType == nil || xi.ExtensionType == nil { xd := placeholderExtension{ - name: pref.FullName(xi.Name), - number: pref.FieldNumber(xi.Field), + name: protoreflect.FullName(xi.Name), + number: protoreflect.FieldNumber(xi.Field), } xi.desc = extensionTypeDescriptor{xd, xi} return } // Resolve enum or message dependencies. - var ed pref.EnumDescriptor - var md pref.MessageDescriptor + var ed protoreflect.EnumDescriptor + var md protoreflect.MessageDescriptor t := reflect.TypeOf(xi.ExtensionType) isOptional := t.Kind() == reflect.Ptr && t.Elem().Kind() != reflect.Struct isRepeated := t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 @@ -94,18 +94,18 @@ func (xi *ExtensionInfo) initFromLegacy() { t = t.Elem() } switch v := reflect.Zero(t).Interface().(type) { - case pref.Enum: + case protoreflect.Enum: ed = v.Descriptor() case enumV1: ed = LegacyLoadEnumDesc(t) - case pref.ProtoMessage: + case protoreflect.ProtoMessage: md = v.ProtoReflect().Descriptor() case messageV1: md = LegacyLoadMessageDesc(t) } // Derive basic field information from the struct tag. - var evs pref.EnumValueDescriptors + var evs protoreflect.EnumValueDescriptors if ed != nil { evs = ed.Values() } @@ -114,8 +114,8 @@ func (xi *ExtensionInfo) initFromLegacy() { // Construct a v2 ExtensionType. xd := &filedesc.Extension{L2: new(filedesc.ExtensionL2)} xd.L0.ParentFile = filedesc.SurrogateProto2 - xd.L0.FullName = pref.FullName(xi.Name) - xd.L1.Number = pref.FieldNumber(xi.Field) + xd.L0.FullName = protoreflect.FullName(xi.Name) + xd.L1.Number = protoreflect.FieldNumber(xi.Field) xd.L1.Cardinality = fd.L1.Cardinality xd.L1.Kind = fd.L1.Kind xd.L2.IsPacked = fd.L1.IsPacked @@ -138,39 +138,39 @@ func (xi *ExtensionInfo) initFromLegacy() { } type placeholderExtension struct { - name pref.FullName - number pref.FieldNumber + name protoreflect.FullName + number protoreflect.FieldNumber } -func (x placeholderExtension) ParentFile() pref.FileDescriptor { return nil } -func (x placeholderExtension) Parent() pref.Descriptor { return nil } -func (x placeholderExtension) Index() int { return 0 } -func (x placeholderExtension) Syntax() pref.Syntax { return 0 } -func (x placeholderExtension) Name() pref.Name { return x.name.Name() } -func (x placeholderExtension) FullName() pref.FullName { return x.name } -func (x placeholderExtension) IsPlaceholder() bool { return true } -func (x placeholderExtension) Options() pref.ProtoMessage { return descopts.Field } -func (x placeholderExtension) Number() pref.FieldNumber { return x.number } -func (x placeholderExtension) Cardinality() pref.Cardinality { return 0 } -func (x placeholderExtension) Kind() pref.Kind { return 0 } -func (x placeholderExtension) HasJSONName() bool { return false } -func (x placeholderExtension) JSONName() string { return "[" + string(x.name) + "]" } -func (x placeholderExtension) TextName() string { return "[" + string(x.name) + "]" } -func (x placeholderExtension) HasPresence() bool { return false } -func (x placeholderExtension) HasOptionalKeyword() bool { return false } -func (x placeholderExtension) IsExtension() bool { return true } -func (x placeholderExtension) IsWeak() bool { return false } -func (x placeholderExtension) IsPacked() bool { return false } -func (x placeholderExtension) IsList() bool { return false } -func (x placeholderExtension) IsMap() bool { return false } -func (x placeholderExtension) MapKey() pref.FieldDescriptor { return nil } -func (x placeholderExtension) MapValue() pref.FieldDescriptor { return nil } -func (x placeholderExtension) HasDefault() bool { return false } -func (x placeholderExtension) Default() pref.Value { return pref.Value{} } -func (x placeholderExtension) DefaultEnumValue() pref.EnumValueDescriptor { return nil } -func (x placeholderExtension) ContainingOneof() pref.OneofDescriptor { return nil } -func (x placeholderExtension) ContainingMessage() pref.MessageDescriptor { return nil } -func (x placeholderExtension) Enum() pref.EnumDescriptor { return nil } -func (x placeholderExtension) Message() pref.MessageDescriptor { return nil } -func (x placeholderExtension) ProtoType(pref.FieldDescriptor) { return } -func (x placeholderExtension) ProtoInternal(pragma.DoNotImplement) { return } +func (x placeholderExtension) ParentFile() protoreflect.FileDescriptor { return nil } +func (x placeholderExtension) Parent() protoreflect.Descriptor { return nil } +func (x placeholderExtension) Index() int { return 0 } +func (x placeholderExtension) Syntax() protoreflect.Syntax { return 0 } +func (x placeholderExtension) Name() protoreflect.Name { return x.name.Name() } +func (x placeholderExtension) FullName() protoreflect.FullName { return x.name } +func (x placeholderExtension) IsPlaceholder() bool { return true } +func (x placeholderExtension) Options() protoreflect.ProtoMessage { return descopts.Field } +func (x placeholderExtension) Number() protoreflect.FieldNumber { return x.number } +func (x placeholderExtension) Cardinality() protoreflect.Cardinality { return 0 } +func (x placeholderExtension) Kind() protoreflect.Kind { return 0 } +func (x placeholderExtension) HasJSONName() bool { return false } +func (x placeholderExtension) JSONName() string { return "[" + string(x.name) + "]" } +func (x placeholderExtension) TextName() string { return "[" + string(x.name) + "]" } +func (x placeholderExtension) HasPresence() bool { return false } +func (x placeholderExtension) HasOptionalKeyword() bool { return false } +func (x placeholderExtension) IsExtension() bool { return true } +func (x placeholderExtension) IsWeak() bool { return false } +func (x placeholderExtension) IsPacked() bool { return false } +func (x placeholderExtension) IsList() bool { return false } +func (x placeholderExtension) IsMap() bool { return false } +func (x placeholderExtension) MapKey() protoreflect.FieldDescriptor { return nil } +func (x placeholderExtension) MapValue() protoreflect.FieldDescriptor { return nil } +func (x placeholderExtension) HasDefault() bool { return false } +func (x placeholderExtension) Default() protoreflect.Value { return protoreflect.Value{} } +func (x placeholderExtension) DefaultEnumValue() protoreflect.EnumValueDescriptor { return nil } +func (x placeholderExtension) ContainingOneof() protoreflect.OneofDescriptor { return nil } +func (x placeholderExtension) ContainingMessage() protoreflect.MessageDescriptor { return nil } +func (x placeholderExtension) Enum() protoreflect.EnumDescriptor { return nil } +func (x placeholderExtension) Message() protoreflect.MessageDescriptor { return nil } +func (x placeholderExtension) ProtoType(protoreflect.FieldDescriptor) { return } +func (x placeholderExtension) ProtoInternal(pragma.DoNotImplement) { return } diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go index 029feeefd792b..61c483fac06ef 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go +++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go @@ -16,14 +16,12 @@ import ( "google.golang.org/protobuf/internal/filedesc" "google.golang.org/protobuf/internal/strs" "google.golang.org/protobuf/reflect/protoreflect" - pref "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/runtime/protoiface" - piface "google.golang.org/protobuf/runtime/protoiface" ) // legacyWrapMessage wraps v as a protoreflect.Message, // where v must be a *struct kind and not implement the v2 API already. -func legacyWrapMessage(v reflect.Value) pref.Message { +func legacyWrapMessage(v reflect.Value) protoreflect.Message { t := v.Type() if t.Kind() != reflect.Ptr || t.Elem().Kind() != reflect.Struct { return aberrantMessage{v: v} @@ -35,7 +33,7 @@ func legacyWrapMessage(v reflect.Value) pref.Message { // legacyLoadMessageType dynamically loads a protoreflect.Type for t, // where t must be not implement the v2 API already. // The provided name is used if it cannot be determined from the message. -func legacyLoadMessageType(t reflect.Type, name pref.FullName) protoreflect.MessageType { +func legacyLoadMessageType(t reflect.Type, name protoreflect.FullName) protoreflect.MessageType { if t.Kind() != reflect.Ptr || t.Elem().Kind() != reflect.Struct { return aberrantMessageType{t} } @@ -47,7 +45,7 @@ var legacyMessageTypeCache sync.Map // map[reflect.Type]*MessageInfo // legacyLoadMessageInfo dynamically loads a *MessageInfo for t, // where t must be a *struct kind and not implement the v2 API already. // The provided name is used if it cannot be determined from the message. -func legacyLoadMessageInfo(t reflect.Type, name pref.FullName) *MessageInfo { +func legacyLoadMessageInfo(t reflect.Type, name protoreflect.FullName) *MessageInfo { // Fast-path: check if a MessageInfo is cached for this concrete type. if mt, ok := legacyMessageTypeCache.Load(t); ok { return mt.(*MessageInfo) @@ -68,7 +66,7 @@ func legacyLoadMessageInfo(t reflect.Type, name pref.FullName) *MessageInfo { // supports deterministic serialization or not, but this // preserves the v1 implementation's behavior of always // calling Marshal methods when present. - mi.methods.Flags |= piface.SupportMarshalDeterministic + mi.methods.Flags |= protoiface.SupportMarshalDeterministic } if _, hasUnmarshal = v.(legacyUnmarshaler); hasUnmarshal { mi.methods.Unmarshal = legacyUnmarshal @@ -89,18 +87,18 @@ var legacyMessageDescCache sync.Map // map[reflect.Type]protoreflect.MessageDesc // which should be a *struct kind and must not implement the v2 API already. // // This is exported for testing purposes. -func LegacyLoadMessageDesc(t reflect.Type) pref.MessageDescriptor { +func LegacyLoadMessageDesc(t reflect.Type) protoreflect.MessageDescriptor { return legacyLoadMessageDesc(t, "") } -func legacyLoadMessageDesc(t reflect.Type, name pref.FullName) pref.MessageDescriptor { +func legacyLoadMessageDesc(t reflect.Type, name protoreflect.FullName) protoreflect.MessageDescriptor { // Fast-path: check if a MessageDescriptor is cached for this concrete type. if mi, ok := legacyMessageDescCache.Load(t); ok { - return mi.(pref.MessageDescriptor) + return mi.(protoreflect.MessageDescriptor) } // Slow-path: initialize MessageDescriptor from the raw descriptor. mv := reflect.Zero(t).Interface() - if _, ok := mv.(pref.ProtoMessage); ok { + if _, ok := mv.(protoreflect.ProtoMessage); ok { panic(fmt.Sprintf("%v already implements proto.Message", t)) } mdV1, ok := mv.(messageV1) @@ -164,7 +162,7 @@ var ( // // This is a best-effort derivation of the message descriptor using the protobuf // tags on the struct fields. -func aberrantLoadMessageDesc(t reflect.Type, name pref.FullName) pref.MessageDescriptor { +func aberrantLoadMessageDesc(t reflect.Type, name protoreflect.FullName) protoreflect.MessageDescriptor { aberrantMessageDescLock.Lock() defer aberrantMessageDescLock.Unlock() if aberrantMessageDescCache == nil { @@ -172,7 +170,7 @@ func aberrantLoadMessageDesc(t reflect.Type, name pref.FullName) pref.MessageDes } return aberrantLoadMessageDescReentrant(t, name) } -func aberrantLoadMessageDescReentrant(t reflect.Type, name pref.FullName) pref.MessageDescriptor { +func aberrantLoadMessageDescReentrant(t reflect.Type, name protoreflect.FullName) protoreflect.MessageDescriptor { // Fast-path: check if an MessageDescriptor is cached for this concrete type. if md, ok := aberrantMessageDescCache[t]; ok { return md @@ -225,9 +223,9 @@ func aberrantLoadMessageDescReentrant(t reflect.Type, name pref.FullName) pref.M vs := fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))})[0] for i := 0; i < vs.Len(); i++ { v := vs.Index(i) - md.L2.ExtensionRanges.List = append(md.L2.ExtensionRanges.List, [2]pref.FieldNumber{ - pref.FieldNumber(v.FieldByName("Start").Int()), - pref.FieldNumber(v.FieldByName("End").Int() + 1), + md.L2.ExtensionRanges.List = append(md.L2.ExtensionRanges.List, [2]protoreflect.FieldNumber{ + protoreflect.FieldNumber(v.FieldByName("Start").Int()), + protoreflect.FieldNumber(v.FieldByName("End").Int() + 1), }) md.L2.ExtensionRangeOptions = append(md.L2.ExtensionRangeOptions, nil) } @@ -245,7 +243,7 @@ func aberrantLoadMessageDescReentrant(t reflect.Type, name pref.FullName) pref.M n := len(md.L2.Oneofs.List) md.L2.Oneofs.List = append(md.L2.Oneofs.List, filedesc.Oneof{}) od := &md.L2.Oneofs.List[n] - od.L0.FullName = md.FullName().Append(pref.Name(tag)) + od.L0.FullName = md.FullName().Append(protoreflect.Name(tag)) od.L0.ParentFile = md.L0.ParentFile od.L0.Parent = md od.L0.Index = n @@ -267,14 +265,14 @@ func aberrantLoadMessageDescReentrant(t reflect.Type, name pref.FullName) pref.M return md } -func aberrantDeriveMessageName(t reflect.Type, name pref.FullName) pref.FullName { +func aberrantDeriveMessageName(t reflect.Type, name protoreflect.FullName) protoreflect.FullName { if name.IsValid() { return name } func() { defer func() { recover() }() // swallow possible nil panics if m, ok := reflect.Zero(t).Interface().(interface{ XXX_MessageName() string }); ok { - name = pref.FullName(m.XXX_MessageName()) + name = protoreflect.FullName(m.XXX_MessageName()) } }() if name.IsValid() { @@ -305,7 +303,7 @@ func aberrantAppendField(md *filedesc.Message, goType reflect.Type, tag, tagKey, fd.L0.Index = n if fd.L1.IsWeak || fd.L1.HasPacked { - fd.L1.Options = func() pref.ProtoMessage { + fd.L1.Options = func() protoreflect.ProtoMessage { opts := descopts.Field.ProtoReflect().New() if fd.L1.IsWeak { opts.Set(opts.Descriptor().Fields().ByName("weak"), protoreflect.ValueOfBool(true)) @@ -318,17 +316,17 @@ func aberrantAppendField(md *filedesc.Message, goType reflect.Type, tag, tagKey, } // Populate Enum and Message. - if fd.Enum() == nil && fd.Kind() == pref.EnumKind { + if fd.Enum() == nil && fd.Kind() == protoreflect.EnumKind { switch v := reflect.Zero(t).Interface().(type) { - case pref.Enum: + case protoreflect.Enum: fd.L1.Enum = v.Descriptor() default: fd.L1.Enum = LegacyLoadEnumDesc(t) } } - if fd.Message() == nil && (fd.Kind() == pref.MessageKind || fd.Kind() == pref.GroupKind) { + if fd.Message() == nil && (fd.Kind() == protoreflect.MessageKind || fd.Kind() == protoreflect.GroupKind) { switch v := reflect.Zero(t).Interface().(type) { - case pref.ProtoMessage: + case protoreflect.ProtoMessage: fd.L1.Message = v.ProtoReflect().Descriptor() case messageV1: fd.L1.Message = LegacyLoadMessageDesc(t) @@ -337,13 +335,13 @@ func aberrantAppendField(md *filedesc.Message, goType reflect.Type, tag, tagKey, n := len(md.L1.Messages.List) md.L1.Messages.List = append(md.L1.Messages.List, filedesc.Message{L2: new(filedesc.MessageL2)}) md2 := &md.L1.Messages.List[n] - md2.L0.FullName = md.FullName().Append(pref.Name(strs.MapEntryName(string(fd.Name())))) + md2.L0.FullName = md.FullName().Append(protoreflect.Name(strs.MapEntryName(string(fd.Name())))) md2.L0.ParentFile = md.L0.ParentFile md2.L0.Parent = md md2.L0.Index = n md2.L1.IsMapEntry = true - md2.L2.Options = func() pref.ProtoMessage { + md2.L2.Options = func() protoreflect.ProtoMessage { opts := descopts.Message.ProtoReflect().New() opts.Set(opts.Descriptor().Fields().ByName("map_entry"), protoreflect.ValueOfBool(true)) return opts.Interface() @@ -364,8 +362,8 @@ type placeholderEnumValues struct { protoreflect.EnumValueDescriptors } -func (placeholderEnumValues) ByNumber(n pref.EnumNumber) pref.EnumValueDescriptor { - return filedesc.PlaceholderEnumValue(pref.FullName(fmt.Sprintf("UNKNOWN_%d", n))) +func (placeholderEnumValues) ByNumber(n protoreflect.EnumNumber) protoreflect.EnumValueDescriptor { + return filedesc.PlaceholderEnumValue(protoreflect.FullName(fmt.Sprintf("UNKNOWN_%d", n))) } // legacyMarshaler is the proto.Marshaler interface superseded by protoiface.Methoder. @@ -383,7 +381,7 @@ type legacyMerger interface { Merge(protoiface.MessageV1) } -var aberrantProtoMethods = &piface.Methods{ +var aberrantProtoMethods = &protoiface.Methods{ Marshal: legacyMarshal, Unmarshal: legacyUnmarshal, Merge: legacyMerge, @@ -392,40 +390,40 @@ var aberrantProtoMethods = &piface.Methods{ // supports deterministic serialization or not, but this // preserves the v1 implementation's behavior of always // calling Marshal methods when present. - Flags: piface.SupportMarshalDeterministic, + Flags: protoiface.SupportMarshalDeterministic, } -func legacyMarshal(in piface.MarshalInput) (piface.MarshalOutput, error) { +func legacyMarshal(in protoiface.MarshalInput) (protoiface.MarshalOutput, error) { v := in.Message.(unwrapper).protoUnwrap() marshaler, ok := v.(legacyMarshaler) if !ok { - return piface.MarshalOutput{}, errors.New("%T does not implement Marshal", v) + return protoiface.MarshalOutput{}, errors.New("%T does not implement Marshal", v) } out, err := marshaler.Marshal() if in.Buf != nil { out = append(in.Buf, out...) } - return piface.MarshalOutput{ + return protoiface.MarshalOutput{ Buf: out, }, err } -func legacyUnmarshal(in piface.UnmarshalInput) (piface.UnmarshalOutput, error) { +func legacyUnmarshal(in protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { v := in.Message.(unwrapper).protoUnwrap() unmarshaler, ok := v.(legacyUnmarshaler) if !ok { - return piface.UnmarshalOutput{}, errors.New("%T does not implement Unmarshal", v) + return protoiface.UnmarshalOutput{}, errors.New("%T does not implement Unmarshal", v) } - return piface.UnmarshalOutput{}, unmarshaler.Unmarshal(in.Buf) + return protoiface.UnmarshalOutput{}, unmarshaler.Unmarshal(in.Buf) } -func legacyMerge(in piface.MergeInput) piface.MergeOutput { +func legacyMerge(in protoiface.MergeInput) protoiface.MergeOutput { // Check whether this supports the legacy merger. dstv := in.Destination.(unwrapper).protoUnwrap() merger, ok := dstv.(legacyMerger) if ok { merger.Merge(Export{}.ProtoMessageV1Of(in.Source)) - return piface.MergeOutput{Flags: piface.MergeComplete} + return protoiface.MergeOutput{Flags: protoiface.MergeComplete} } // If legacy merger is unavailable, implement merge in terms of @@ -433,29 +431,29 @@ func legacyMerge(in piface.MergeInput) piface.MergeOutput { srcv := in.Source.(unwrapper).protoUnwrap() marshaler, ok := srcv.(legacyMarshaler) if !ok { - return piface.MergeOutput{} + return protoiface.MergeOutput{} } dstv = in.Destination.(unwrapper).protoUnwrap() unmarshaler, ok := dstv.(legacyUnmarshaler) if !ok { - return piface.MergeOutput{} + return protoiface.MergeOutput{} } if !in.Source.IsValid() { // Legacy Marshal methods may not function on nil messages. // Check for a typed nil source only after we confirm that // legacy Marshal/Unmarshal methods are present, for // consistency. - return piface.MergeOutput{Flags: piface.MergeComplete} + return protoiface.MergeOutput{Flags: protoiface.MergeComplete} } b, err := marshaler.Marshal() if err != nil { - return piface.MergeOutput{} + return protoiface.MergeOutput{} } err = unmarshaler.Unmarshal(b) if err != nil { - return piface.MergeOutput{} + return protoiface.MergeOutput{} } - return piface.MergeOutput{Flags: piface.MergeComplete} + return protoiface.MergeOutput{Flags: protoiface.MergeComplete} } // aberrantMessageType implements MessageType for all types other than pointer-to-struct. @@ -463,19 +461,19 @@ type aberrantMessageType struct { t reflect.Type } -func (mt aberrantMessageType) New() pref.Message { +func (mt aberrantMessageType) New() protoreflect.Message { if mt.t.Kind() == reflect.Ptr { return aberrantMessage{reflect.New(mt.t.Elem())} } return aberrantMessage{reflect.Zero(mt.t)} } -func (mt aberrantMessageType) Zero() pref.Message { +func (mt aberrantMessageType) Zero() protoreflect.Message { return aberrantMessage{reflect.Zero(mt.t)} } func (mt aberrantMessageType) GoType() reflect.Type { return mt.t } -func (mt aberrantMessageType) Descriptor() pref.MessageDescriptor { +func (mt aberrantMessageType) Descriptor() protoreflect.MessageDescriptor { return LegacyLoadMessageDesc(mt.t) } @@ -499,56 +497,56 @@ func (m aberrantMessage) Reset() { } } -func (m aberrantMessage) ProtoReflect() pref.Message { +func (m aberrantMessage) ProtoReflect() protoreflect.Message { return m } -func (m aberrantMessage) Descriptor() pref.MessageDescriptor { +func (m aberrantMessage) Descriptor() protoreflect.MessageDescriptor { return LegacyLoadMessageDesc(m.v.Type()) } -func (m aberrantMessage) Type() pref.MessageType { +func (m aberrantMessage) Type() protoreflect.MessageType { return aberrantMessageType{m.v.Type()} } -func (m aberrantMessage) New() pref.Message { +func (m aberrantMessage) New() protoreflect.Message { if m.v.Type().Kind() == reflect.Ptr { return aberrantMessage{reflect.New(m.v.Type().Elem())} } return aberrantMessage{reflect.Zero(m.v.Type())} } -func (m aberrantMessage) Interface() pref.ProtoMessage { +func (m aberrantMessage) Interface() protoreflect.ProtoMessage { return m } -func (m aberrantMessage) Range(f func(pref.FieldDescriptor, pref.Value) bool) { +func (m aberrantMessage) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { return } -func (m aberrantMessage) Has(pref.FieldDescriptor) bool { +func (m aberrantMessage) Has(protoreflect.FieldDescriptor) bool { return false } -func (m aberrantMessage) Clear(pref.FieldDescriptor) { +func (m aberrantMessage) Clear(protoreflect.FieldDescriptor) { panic("invalid Message.Clear on " + string(m.Descriptor().FullName())) } -func (m aberrantMessage) Get(fd pref.FieldDescriptor) pref.Value { +func (m aberrantMessage) Get(fd protoreflect.FieldDescriptor) protoreflect.Value { if fd.Default().IsValid() { return fd.Default() } panic("invalid Message.Get on " + string(m.Descriptor().FullName())) } -func (m aberrantMessage) Set(pref.FieldDescriptor, pref.Value) { +func (m aberrantMessage) Set(protoreflect.FieldDescriptor, protoreflect.Value) { panic("invalid Message.Set on " + string(m.Descriptor().FullName())) } -func (m aberrantMessage) Mutable(pref.FieldDescriptor) pref.Value { +func (m aberrantMessage) Mutable(protoreflect.FieldDescriptor) protoreflect.Value { panic("invalid Message.Mutable on " + string(m.Descriptor().FullName())) } -func (m aberrantMessage) NewField(pref.FieldDescriptor) pref.Value { +func (m aberrantMessage) NewField(protoreflect.FieldDescriptor) protoreflect.Value { panic("invalid Message.NewField on " + string(m.Descriptor().FullName())) } -func (m aberrantMessage) WhichOneof(pref.OneofDescriptor) pref.FieldDescriptor { +func (m aberrantMessage) WhichOneof(protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { panic("invalid Message.WhichOneof descriptor on " + string(m.Descriptor().FullName())) } -func (m aberrantMessage) GetUnknown() pref.RawFields { +func (m aberrantMessage) GetUnknown() protoreflect.RawFields { return nil } -func (m aberrantMessage) SetUnknown(pref.RawFields) { +func (m aberrantMessage) SetUnknown(protoreflect.RawFields) { // SetUnknown discards its input on messages which don't support unknown field storage. } func (m aberrantMessage) IsValid() bool { @@ -557,7 +555,7 @@ func (m aberrantMessage) IsValid() bool { } return false } -func (m aberrantMessage) ProtoMethods() *piface.Methods { +func (m aberrantMessage) ProtoMethods() *protoiface.Methods { return aberrantProtoMethods } func (m aberrantMessage) protoUnwrap() interface{} { diff --git a/vendor/google.golang.org/protobuf/internal/impl/merge.go b/vendor/google.golang.org/protobuf/internal/impl/merge.go index c65bbc0446ea8..7e65f64f28e37 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/merge.go +++ b/vendor/google.golang.org/protobuf/internal/impl/merge.go @@ -9,8 +9,8 @@ import ( "reflect" "google.golang.org/protobuf/proto" - pref "google.golang.org/protobuf/reflect/protoreflect" - piface "google.golang.org/protobuf/runtime/protoiface" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/runtime/protoiface" ) type mergeOptions struct{} @@ -20,17 +20,17 @@ func (o mergeOptions) Merge(dst, src proto.Message) { } // merge is protoreflect.Methods.Merge. -func (mi *MessageInfo) merge(in piface.MergeInput) piface.MergeOutput { +func (mi *MessageInfo) merge(in protoiface.MergeInput) protoiface.MergeOutput { dp, ok := mi.getPointer(in.Destination) if !ok { - return piface.MergeOutput{} + return protoiface.MergeOutput{} } sp, ok := mi.getPointer(in.Source) if !ok { - return piface.MergeOutput{} + return protoiface.MergeOutput{} } mi.mergePointer(dp, sp, mergeOptions{}) - return piface.MergeOutput{Flags: piface.MergeComplete} + return protoiface.MergeOutput{Flags: protoiface.MergeComplete} } func (mi *MessageInfo) mergePointer(dst, src pointer, opts mergeOptions) { @@ -64,7 +64,7 @@ func (mi *MessageInfo) mergePointer(dst, src pointer, opts mergeOptions) { continue } dx := (*dext)[num] - var dv pref.Value + var dv protoreflect.Value if dx.Type() == sx.Type() { dv = dx.Value() } @@ -85,15 +85,15 @@ func (mi *MessageInfo) mergePointer(dst, src pointer, opts mergeOptions) { } } -func mergeScalarValue(dst, src pref.Value, opts mergeOptions) pref.Value { +func mergeScalarValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value { return src } -func mergeBytesValue(dst, src pref.Value, opts mergeOptions) pref.Value { - return pref.ValueOfBytes(append(emptyBuf[:], src.Bytes()...)) +func mergeBytesValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value { + return protoreflect.ValueOfBytes(append(emptyBuf[:], src.Bytes()...)) } -func mergeListValue(dst, src pref.Value, opts mergeOptions) pref.Value { +func mergeListValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value { dstl := dst.List() srcl := src.List() for i, llen := 0, srcl.Len(); i < llen; i++ { @@ -102,29 +102,29 @@ func mergeListValue(dst, src pref.Value, opts mergeOptions) pref.Value { return dst } -func mergeBytesListValue(dst, src pref.Value, opts mergeOptions) pref.Value { +func mergeBytesListValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value { dstl := dst.List() srcl := src.List() for i, llen := 0, srcl.Len(); i < llen; i++ { sb := srcl.Get(i).Bytes() db := append(emptyBuf[:], sb...) - dstl.Append(pref.ValueOfBytes(db)) + dstl.Append(protoreflect.ValueOfBytes(db)) } return dst } -func mergeMessageListValue(dst, src pref.Value, opts mergeOptions) pref.Value { +func mergeMessageListValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value { dstl := dst.List() srcl := src.List() for i, llen := 0, srcl.Len(); i < llen; i++ { sm := srcl.Get(i).Message() dm := proto.Clone(sm.Interface()).ProtoReflect() - dstl.Append(pref.ValueOfMessage(dm)) + dstl.Append(protoreflect.ValueOfMessage(dm)) } return dst } -func mergeMessageValue(dst, src pref.Value, opts mergeOptions) pref.Value { +func mergeMessageValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value { opts.Merge(dst.Message().Interface(), src.Message().Interface()) return dst } diff --git a/vendor/google.golang.org/protobuf/internal/impl/message.go b/vendor/google.golang.org/protobuf/internal/impl/message.go index a104e28e858fa..4f5fb67a0ddb6 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/message.go +++ b/vendor/google.golang.org/protobuf/internal/impl/message.go @@ -14,8 +14,7 @@ import ( "google.golang.org/protobuf/internal/genid" "google.golang.org/protobuf/reflect/protoreflect" - pref "google.golang.org/protobuf/reflect/protoreflect" - preg "google.golang.org/protobuf/reflect/protoregistry" + "google.golang.org/protobuf/reflect/protoregistry" ) // MessageInfo provides protobuf related functionality for a given Go type @@ -29,7 +28,7 @@ type MessageInfo struct { GoReflectType reflect.Type // pointer to struct // Desc is the underlying message descriptor type and must be populated. - Desc pref.MessageDescriptor + Desc protoreflect.MessageDescriptor // Exporter must be provided in a purego environment in order to provide // access to unexported fields. @@ -54,7 +53,7 @@ type exporter func(v interface{}, i int) interface{} // is generated by our implementation of protoc-gen-go (for v2 and on). // If it is unable to obtain a MessageInfo, it returns nil. func getMessageInfo(mt reflect.Type) *MessageInfo { - m, ok := reflect.Zero(mt).Interface().(pref.ProtoMessage) + m, ok := reflect.Zero(mt).Interface().(protoreflect.ProtoMessage) if !ok { return nil } @@ -97,7 +96,7 @@ func (mi *MessageInfo) initOnce() { // getPointer returns the pointer for a message, which should be of // the type of the MessageInfo. If the message is of a different type, // it returns ok==false. -func (mi *MessageInfo) getPointer(m pref.Message) (p pointer, ok bool) { +func (mi *MessageInfo) getPointer(m protoreflect.Message) (p pointer, ok bool) { switch m := m.(type) { case *messageState: return m.pointer(), m.messageInfo() == mi @@ -134,10 +133,10 @@ type structInfo struct { extensionOffset offset extensionType reflect.Type - fieldsByNumber map[pref.FieldNumber]reflect.StructField - oneofsByName map[pref.Name]reflect.StructField - oneofWrappersByType map[reflect.Type]pref.FieldNumber - oneofWrappersByNumber map[pref.FieldNumber]reflect.Type + fieldsByNumber map[protoreflect.FieldNumber]reflect.StructField + oneofsByName map[protoreflect.Name]reflect.StructField + oneofWrappersByType map[reflect.Type]protoreflect.FieldNumber + oneofWrappersByNumber map[protoreflect.FieldNumber]reflect.Type } func (mi *MessageInfo) makeStructInfo(t reflect.Type) structInfo { @@ -147,10 +146,10 @@ func (mi *MessageInfo) makeStructInfo(t reflect.Type) structInfo { unknownOffset: invalidOffset, extensionOffset: invalidOffset, - fieldsByNumber: map[pref.FieldNumber]reflect.StructField{}, - oneofsByName: map[pref.Name]reflect.StructField{}, - oneofWrappersByType: map[reflect.Type]pref.FieldNumber{}, - oneofWrappersByNumber: map[pref.FieldNumber]reflect.Type{}, + fieldsByNumber: map[protoreflect.FieldNumber]reflect.StructField{}, + oneofsByName: map[protoreflect.Name]reflect.StructField{}, + oneofWrappersByType: map[reflect.Type]protoreflect.FieldNumber{}, + oneofWrappersByNumber: map[protoreflect.FieldNumber]reflect.Type{}, } fieldLoop: @@ -180,12 +179,12 @@ fieldLoop: for _, s := range strings.Split(f.Tag.Get("protobuf"), ",") { if len(s) > 0 && strings.Trim(s, "0123456789") == "" { n, _ := strconv.ParseUint(s, 10, 64) - si.fieldsByNumber[pref.FieldNumber(n)] = f + si.fieldsByNumber[protoreflect.FieldNumber(n)] = f continue fieldLoop } } if s := f.Tag.Get("protobuf_oneof"); len(s) > 0 { - si.oneofsByName[pref.Name(s)] = f + si.oneofsByName[protoreflect.Name(s)] = f continue fieldLoop } } @@ -208,8 +207,8 @@ fieldLoop: for _, s := range strings.Split(f.Tag.Get("protobuf"), ",") { if len(s) > 0 && strings.Trim(s, "0123456789") == "" { n, _ := strconv.ParseUint(s, 10, 64) - si.oneofWrappersByType[tf] = pref.FieldNumber(n) - si.oneofWrappersByNumber[pref.FieldNumber(n)] = tf + si.oneofWrappersByType[tf] = protoreflect.FieldNumber(n) + si.oneofWrappersByNumber[protoreflect.FieldNumber(n)] = tf break } } @@ -219,7 +218,11 @@ fieldLoop: } func (mi *MessageInfo) New() protoreflect.Message { - return mi.MessageOf(reflect.New(mi.GoReflectType.Elem()).Interface()) + m := reflect.New(mi.GoReflectType.Elem()).Interface() + if r, ok := m.(protoreflect.ProtoMessage); ok { + return r.ProtoReflect() + } + return mi.MessageOf(m) } func (mi *MessageInfo) Zero() protoreflect.Message { return mi.MessageOf(reflect.Zero(mi.GoReflectType).Interface()) @@ -237,7 +240,7 @@ func (mi *MessageInfo) Message(i int) protoreflect.MessageType { fd := mi.Desc.Fields().Get(i) switch { case fd.IsWeak(): - mt, _ := preg.GlobalTypes.FindMessageByName(fd.Message().FullName()) + mt, _ := protoregistry.GlobalTypes.FindMessageByName(fd.Message().FullName()) return mt case fd.IsMap(): return mapEntryType{fd.Message(), mi.fieldTypes[fd.Number()]} diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go index 9488b72613136..d9ea010bef9af 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go +++ b/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go @@ -10,17 +10,17 @@ import ( "google.golang.org/protobuf/internal/detrand" "google.golang.org/protobuf/internal/pragma" - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" ) type reflectMessageInfo struct { - fields map[pref.FieldNumber]*fieldInfo - oneofs map[pref.Name]*oneofInfo + fields map[protoreflect.FieldNumber]*fieldInfo + oneofs map[protoreflect.Name]*oneofInfo // fieldTypes contains the zero value of an enum or message field. // For lists, it contains the element type. // For maps, it contains the entry value type. - fieldTypes map[pref.FieldNumber]interface{} + fieldTypes map[protoreflect.FieldNumber]interface{} // denseFields is a subset of fields where: // 0 < fieldDesc.Number() < len(denseFields) @@ -30,8 +30,8 @@ type reflectMessageInfo struct { // rangeInfos is a list of all fields (not belonging to a oneof) and oneofs. rangeInfos []interface{} // either *fieldInfo or *oneofInfo - getUnknown func(pointer) pref.RawFields - setUnknown func(pointer, pref.RawFields) + getUnknown func(pointer) protoreflect.RawFields + setUnknown func(pointer, protoreflect.RawFields) extensionMap func(pointer) *extensionMap nilMessage atomicNilMessage @@ -52,7 +52,7 @@ func (mi *MessageInfo) makeReflectFuncs(t reflect.Type, si structInfo) { // This code assumes that the struct is well-formed and panics if there are // any discrepancies. func (mi *MessageInfo) makeKnownFieldsFunc(si structInfo) { - mi.fields = map[pref.FieldNumber]*fieldInfo{} + mi.fields = map[protoreflect.FieldNumber]*fieldInfo{} md := mi.Desc fds := md.Fields() for i := 0; i < fds.Len(); i++ { @@ -82,7 +82,7 @@ func (mi *MessageInfo) makeKnownFieldsFunc(si structInfo) { mi.fields[fd.Number()] = &fi } - mi.oneofs = map[pref.Name]*oneofInfo{} + mi.oneofs = map[protoreflect.Name]*oneofInfo{} for i := 0; i < md.Oneofs().Len(); i++ { od := md.Oneofs().Get(i) mi.oneofs[od.Name()] = makeOneofInfo(od, si, mi.Exporter) @@ -117,13 +117,13 @@ func (mi *MessageInfo) makeUnknownFieldsFunc(t reflect.Type, si structInfo) { switch { case si.unknownOffset.IsValid() && si.unknownType == unknownFieldsAType: // Handle as []byte. - mi.getUnknown = func(p pointer) pref.RawFields { + mi.getUnknown = func(p pointer) protoreflect.RawFields { if p.IsNil() { return nil } return *p.Apply(mi.unknownOffset).Bytes() } - mi.setUnknown = func(p pointer, b pref.RawFields) { + mi.setUnknown = func(p pointer, b protoreflect.RawFields) { if p.IsNil() { panic("invalid SetUnknown on nil Message") } @@ -131,7 +131,7 @@ func (mi *MessageInfo) makeUnknownFieldsFunc(t reflect.Type, si structInfo) { } case si.unknownOffset.IsValid() && si.unknownType == unknownFieldsBType: // Handle as *[]byte. - mi.getUnknown = func(p pointer) pref.RawFields { + mi.getUnknown = func(p pointer) protoreflect.RawFields { if p.IsNil() { return nil } @@ -141,7 +141,7 @@ func (mi *MessageInfo) makeUnknownFieldsFunc(t reflect.Type, si structInfo) { } return **bp } - mi.setUnknown = func(p pointer, b pref.RawFields) { + mi.setUnknown = func(p pointer, b protoreflect.RawFields) { if p.IsNil() { panic("invalid SetUnknown on nil Message") } @@ -152,10 +152,10 @@ func (mi *MessageInfo) makeUnknownFieldsFunc(t reflect.Type, si structInfo) { **bp = b } default: - mi.getUnknown = func(pointer) pref.RawFields { + mi.getUnknown = func(pointer) protoreflect.RawFields { return nil } - mi.setUnknown = func(p pointer, _ pref.RawFields) { + mi.setUnknown = func(p pointer, _ protoreflect.RawFields) { if p.IsNil() { panic("invalid SetUnknown on nil Message") } @@ -224,7 +224,7 @@ func (mi *MessageInfo) makeFieldTypes(si structInfo) { } if ft != nil { if mi.fieldTypes == nil { - mi.fieldTypes = make(map[pref.FieldNumber]interface{}) + mi.fieldTypes = make(map[protoreflect.FieldNumber]interface{}) } mi.fieldTypes[fd.Number()] = reflect.Zero(ft).Interface() } @@ -233,7 +233,7 @@ func (mi *MessageInfo) makeFieldTypes(si structInfo) { type extensionMap map[int32]ExtensionField -func (m *extensionMap) Range(f func(pref.FieldDescriptor, pref.Value) bool) { +func (m *extensionMap) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if m != nil { for _, x := range *m { xd := x.Type().TypeDescriptor() @@ -247,7 +247,7 @@ func (m *extensionMap) Range(f func(pref.FieldDescriptor, pref.Value) bool) { } } } -func (m *extensionMap) Has(xt pref.ExtensionType) (ok bool) { +func (m *extensionMap) Has(xt protoreflect.ExtensionType) (ok bool) { if m == nil { return false } @@ -266,10 +266,10 @@ func (m *extensionMap) Has(xt pref.ExtensionType) (ok bool) { } return true } -func (m *extensionMap) Clear(xt pref.ExtensionType) { +func (m *extensionMap) Clear(xt protoreflect.ExtensionType) { delete(*m, int32(xt.TypeDescriptor().Number())) } -func (m *extensionMap) Get(xt pref.ExtensionType) pref.Value { +func (m *extensionMap) Get(xt protoreflect.ExtensionType) protoreflect.Value { xd := xt.TypeDescriptor() if m != nil { if x, ok := (*m)[int32(xd.Number())]; ok { @@ -278,7 +278,7 @@ func (m *extensionMap) Get(xt pref.ExtensionType) pref.Value { } return xt.Zero() } -func (m *extensionMap) Set(xt pref.ExtensionType, v pref.Value) { +func (m *extensionMap) Set(xt protoreflect.ExtensionType, v protoreflect.Value) { xd := xt.TypeDescriptor() isValid := true switch { @@ -302,9 +302,9 @@ func (m *extensionMap) Set(xt pref.ExtensionType, v pref.Value) { x.Set(xt, v) (*m)[int32(xd.Number())] = x } -func (m *extensionMap) Mutable(xt pref.ExtensionType) pref.Value { +func (m *extensionMap) Mutable(xt protoreflect.ExtensionType) protoreflect.Value { xd := xt.TypeDescriptor() - if xd.Kind() != pref.MessageKind && xd.Kind() != pref.GroupKind && !xd.IsList() && !xd.IsMap() { + if xd.Kind() != protoreflect.MessageKind && xd.Kind() != protoreflect.GroupKind && !xd.IsList() && !xd.IsMap() { panic("invalid Mutable on field with non-composite type") } if x, ok := (*m)[int32(xd.Number())]; ok { @@ -320,7 +320,6 @@ func (m *extensionMap) Mutable(xt pref.ExtensionType) pref.Value { // in an allocation-free way without needing to have a shadow Go type generated // for every message type. This technique only works using unsafe. // -// // Example generated code: // // type M struct { @@ -351,12 +350,11 @@ func (m *extensionMap) Mutable(xt pref.ExtensionType) pref.Value { // It has access to the message info as its first field, and a pointer to the // MessageState is identical to a pointer to the concrete message value. // -// // Requirements: -// • The type M must implement protoreflect.ProtoMessage. -// • The address of m must not be nil. -// • The address of m and the address of m.state must be equal, -// even though they are different Go types. +// - The type M must implement protoreflect.ProtoMessage. +// - The address of m must not be nil. +// - The address of m and the address of m.state must be equal, +// even though they are different Go types. type MessageState struct { pragma.NoUnkeyedLiterals pragma.DoNotCompare @@ -368,8 +366,8 @@ type MessageState struct { type messageState MessageState var ( - _ pref.Message = (*messageState)(nil) - _ unwrapper = (*messageState)(nil) + _ protoreflect.Message = (*messageState)(nil) + _ unwrapper = (*messageState)(nil) ) // messageDataType is a tuple of a pointer to the message data and @@ -387,16 +385,16 @@ type ( ) var ( - _ pref.Message = (*messageReflectWrapper)(nil) - _ unwrapper = (*messageReflectWrapper)(nil) - _ pref.ProtoMessage = (*messageIfaceWrapper)(nil) - _ unwrapper = (*messageIfaceWrapper)(nil) + _ protoreflect.Message = (*messageReflectWrapper)(nil) + _ unwrapper = (*messageReflectWrapper)(nil) + _ protoreflect.ProtoMessage = (*messageIfaceWrapper)(nil) + _ unwrapper = (*messageIfaceWrapper)(nil) ) // MessageOf returns a reflective view over a message. The input must be a // pointer to a named Go struct. If the provided type has a ProtoReflect method, // it must be implemented by calling this method. -func (mi *MessageInfo) MessageOf(m interface{}) pref.Message { +func (mi *MessageInfo) MessageOf(m interface{}) protoreflect.Message { if reflect.TypeOf(m) != mi.GoReflectType { panic(fmt.Sprintf("type mismatch: got %T, want %v", m, mi.GoReflectType)) } @@ -421,7 +419,7 @@ func (m *messageIfaceWrapper) Reset() { rv.Elem().Set(reflect.Zero(rv.Type().Elem())) } } -func (m *messageIfaceWrapper) ProtoReflect() pref.Message { +func (m *messageIfaceWrapper) ProtoReflect() protoreflect.Message { return (*messageReflectWrapper)(m) } func (m *messageIfaceWrapper) protoUnwrap() interface{} { @@ -430,7 +428,7 @@ func (m *messageIfaceWrapper) protoUnwrap() interface{} { // checkField verifies that the provided field descriptor is valid. // Exactly one of the returned values is populated. -func (mi *MessageInfo) checkField(fd pref.FieldDescriptor) (*fieldInfo, pref.ExtensionType) { +func (mi *MessageInfo) checkField(fd protoreflect.FieldDescriptor) (*fieldInfo, protoreflect.ExtensionType) { var fi *fieldInfo if n := fd.Number(); 0 < n && int(n) < len(mi.denseFields) { fi = mi.denseFields[n] @@ -455,7 +453,7 @@ func (mi *MessageInfo) checkField(fd pref.FieldDescriptor) (*fieldInfo, pref.Ext if !mi.Desc.ExtensionRanges().Has(fd.Number()) { panic(fmt.Sprintf("extension %v extends %v outside the extension range", fd.FullName(), mi.Desc.FullName())) } - xtd, ok := fd.(pref.ExtensionTypeDescriptor) + xtd, ok := fd.(protoreflect.ExtensionTypeDescriptor) if !ok { panic(fmt.Sprintf("extension %v does not implement protoreflect.ExtensionTypeDescriptor", fd.FullName())) } diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go index 343cf872197f7..5e736c60efc73 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go +++ b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go @@ -11,24 +11,24 @@ import ( "sync" "google.golang.org/protobuf/internal/flags" - pref "google.golang.org/protobuf/reflect/protoreflect" - preg "google.golang.org/protobuf/reflect/protoregistry" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" ) type fieldInfo struct { - fieldDesc pref.FieldDescriptor + fieldDesc protoreflect.FieldDescriptor // These fields are used for protobuf reflection support. has func(pointer) bool clear func(pointer) - get func(pointer) pref.Value - set func(pointer, pref.Value) - mutable func(pointer) pref.Value - newMessage func() pref.Message - newField func() pref.Value + get func(pointer) protoreflect.Value + set func(pointer, protoreflect.Value) + mutable func(pointer) protoreflect.Value + newMessage func() protoreflect.Message + newField func() protoreflect.Value } -func fieldInfoForMissing(fd pref.FieldDescriptor) fieldInfo { +func fieldInfoForMissing(fd protoreflect.FieldDescriptor) fieldInfo { // This never occurs for generated message types. // It implies that a hand-crafted type has missing Go fields // for specific protobuf message fields. @@ -40,19 +40,19 @@ func fieldInfoForMissing(fd pref.FieldDescriptor) fieldInfo { clear: func(p pointer) { panic("missing Go struct field for " + string(fd.FullName())) }, - get: func(p pointer) pref.Value { + get: func(p pointer) protoreflect.Value { return fd.Default() }, - set: func(p pointer, v pref.Value) { + set: func(p pointer, v protoreflect.Value) { panic("missing Go struct field for " + string(fd.FullName())) }, - mutable: func(p pointer) pref.Value { + mutable: func(p pointer) protoreflect.Value { panic("missing Go struct field for " + string(fd.FullName())) }, - newMessage: func() pref.Message { + newMessage: func() protoreflect.Message { panic("missing Go struct field for " + string(fd.FullName())) }, - newField: func() pref.Value { + newField: func() protoreflect.Value { if v := fd.Default(); v.IsValid() { return v } @@ -61,7 +61,7 @@ func fieldInfoForMissing(fd pref.FieldDescriptor) fieldInfo { } } -func fieldInfoForOneof(fd pref.FieldDescriptor, fs reflect.StructField, x exporter, ot reflect.Type) fieldInfo { +func fieldInfoForOneof(fd protoreflect.FieldDescriptor, fs reflect.StructField, x exporter, ot reflect.Type) fieldInfo { ft := fs.Type if ft.Kind() != reflect.Interface { panic(fmt.Sprintf("field %v has invalid type: got %v, want interface kind", fd.FullName(), ft)) @@ -102,7 +102,7 @@ func fieldInfoForOneof(fd pref.FieldDescriptor, fs reflect.StructField, x export } rv.Set(reflect.Zero(rv.Type())) }, - get: func(p pointer) pref.Value { + get: func(p pointer) protoreflect.Value { if p.IsNil() { return conv.Zero() } @@ -113,7 +113,7 @@ func fieldInfoForOneof(fd pref.FieldDescriptor, fs reflect.StructField, x export rv = rv.Elem().Elem().Field(0) return conv.PBValueOf(rv) }, - set: func(p pointer, v pref.Value) { + set: func(p pointer, v protoreflect.Value) { rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() if rv.IsNil() || rv.Elem().Type().Elem() != ot || rv.Elem().IsNil() { rv.Set(reflect.New(ot)) @@ -121,7 +121,7 @@ func fieldInfoForOneof(fd pref.FieldDescriptor, fs reflect.StructField, x export rv = rv.Elem().Elem().Field(0) rv.Set(conv.GoValueOf(v)) }, - mutable: func(p pointer) pref.Value { + mutable: func(p pointer) protoreflect.Value { if !isMessage { panic(fmt.Sprintf("field %v with invalid Mutable call on field with non-composite type", fd.FullName())) } @@ -131,20 +131,20 @@ func fieldInfoForOneof(fd pref.FieldDescriptor, fs reflect.StructField, x export } rv = rv.Elem().Elem().Field(0) if rv.Kind() == reflect.Ptr && rv.IsNil() { - rv.Set(conv.GoValueOf(pref.ValueOfMessage(conv.New().Message()))) + rv.Set(conv.GoValueOf(protoreflect.ValueOfMessage(conv.New().Message()))) } return conv.PBValueOf(rv) }, - newMessage: func() pref.Message { + newMessage: func() protoreflect.Message { return conv.New().Message() }, - newField: func() pref.Value { + newField: func() protoreflect.Value { return conv.New() }, } } -func fieldInfoForMap(fd pref.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo { +func fieldInfoForMap(fd protoreflect.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo { ft := fs.Type if ft.Kind() != reflect.Map { panic(fmt.Sprintf("field %v has invalid type: got %v, want map kind", fd.FullName(), ft)) @@ -166,7 +166,7 @@ func fieldInfoForMap(fd pref.FieldDescriptor, fs reflect.StructField, x exporter rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() rv.Set(reflect.Zero(rv.Type())) }, - get: func(p pointer) pref.Value { + get: func(p pointer) protoreflect.Value { if p.IsNil() { return conv.Zero() } @@ -176,7 +176,7 @@ func fieldInfoForMap(fd pref.FieldDescriptor, fs reflect.StructField, x exporter } return conv.PBValueOf(rv) }, - set: func(p pointer, v pref.Value) { + set: func(p pointer, v protoreflect.Value) { rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() pv := conv.GoValueOf(v) if pv.IsNil() { @@ -184,20 +184,20 @@ func fieldInfoForMap(fd pref.FieldDescriptor, fs reflect.StructField, x exporter } rv.Set(pv) }, - mutable: func(p pointer) pref.Value { + mutable: func(p pointer) protoreflect.Value { v := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() if v.IsNil() { v.Set(reflect.MakeMap(fs.Type)) } return conv.PBValueOf(v) }, - newField: func() pref.Value { + newField: func() protoreflect.Value { return conv.New() }, } } -func fieldInfoForList(fd pref.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo { +func fieldInfoForList(fd protoreflect.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo { ft := fs.Type if ft.Kind() != reflect.Slice { panic(fmt.Sprintf("field %v has invalid type: got %v, want slice kind", fd.FullName(), ft)) @@ -219,7 +219,7 @@ func fieldInfoForList(fd pref.FieldDescriptor, fs reflect.StructField, x exporte rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() rv.Set(reflect.Zero(rv.Type())) }, - get: func(p pointer) pref.Value { + get: func(p pointer) protoreflect.Value { if p.IsNil() { return conv.Zero() } @@ -229,7 +229,7 @@ func fieldInfoForList(fd pref.FieldDescriptor, fs reflect.StructField, x exporte } return conv.PBValueOf(rv) }, - set: func(p pointer, v pref.Value) { + set: func(p pointer, v protoreflect.Value) { rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() pv := conv.GoValueOf(v) if pv.IsNil() { @@ -237,11 +237,11 @@ func fieldInfoForList(fd pref.FieldDescriptor, fs reflect.StructField, x exporte } rv.Set(pv.Elem()) }, - mutable: func(p pointer) pref.Value { + mutable: func(p pointer) protoreflect.Value { v := p.Apply(fieldOffset).AsValueOf(fs.Type) return conv.PBValueOf(v) }, - newField: func() pref.Value { + newField: func() protoreflect.Value { return conv.New() }, } @@ -252,7 +252,7 @@ var ( emptyBytes = reflect.ValueOf([]byte{}) ) -func fieldInfoForScalar(fd pref.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo { +func fieldInfoForScalar(fd protoreflect.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo { ft := fs.Type nullable := fd.HasPresence() isBytes := ft.Kind() == reflect.Slice && ft.Elem().Kind() == reflect.Uint8 @@ -300,7 +300,7 @@ func fieldInfoForScalar(fd pref.FieldDescriptor, fs reflect.StructField, x expor rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() rv.Set(reflect.Zero(rv.Type())) }, - get: func(p pointer) pref.Value { + get: func(p pointer) protoreflect.Value { if p.IsNil() { return conv.Zero() } @@ -315,7 +315,7 @@ func fieldInfoForScalar(fd pref.FieldDescriptor, fs reflect.StructField, x expor } return conv.PBValueOf(rv) }, - set: func(p pointer, v pref.Value) { + set: func(p pointer, v protoreflect.Value) { rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() if nullable && rv.Kind() == reflect.Ptr { if rv.IsNil() { @@ -332,23 +332,23 @@ func fieldInfoForScalar(fd pref.FieldDescriptor, fs reflect.StructField, x expor } } }, - newField: func() pref.Value { + newField: func() protoreflect.Value { return conv.New() }, } } -func fieldInfoForWeakMessage(fd pref.FieldDescriptor, weakOffset offset) fieldInfo { +func fieldInfoForWeakMessage(fd protoreflect.FieldDescriptor, weakOffset offset) fieldInfo { if !flags.ProtoLegacy { panic("no support for proto1 weak fields") } var once sync.Once - var messageType pref.MessageType + var messageType protoreflect.MessageType lazyInit := func() { once.Do(func() { messageName := fd.Message().FullName() - messageType, _ = preg.GlobalTypes.FindMessageByName(messageName) + messageType, _ = protoregistry.GlobalTypes.FindMessageByName(messageName) if messageType == nil { panic(fmt.Sprintf("weak message %v for field %v is not linked in", messageName, fd.FullName())) } @@ -368,18 +368,18 @@ func fieldInfoForWeakMessage(fd pref.FieldDescriptor, weakOffset offset) fieldIn clear: func(p pointer) { p.Apply(weakOffset).WeakFields().clear(num) }, - get: func(p pointer) pref.Value { + get: func(p pointer) protoreflect.Value { lazyInit() if p.IsNil() { - return pref.ValueOfMessage(messageType.Zero()) + return protoreflect.ValueOfMessage(messageType.Zero()) } m, ok := p.Apply(weakOffset).WeakFields().get(num) if !ok { - return pref.ValueOfMessage(messageType.Zero()) + return protoreflect.ValueOfMessage(messageType.Zero()) } - return pref.ValueOfMessage(m.ProtoReflect()) + return protoreflect.ValueOfMessage(m.ProtoReflect()) }, - set: func(p pointer, v pref.Value) { + set: func(p pointer, v protoreflect.Value) { lazyInit() m := v.Message() if m.Descriptor() != messageType.Descriptor() { @@ -390,7 +390,7 @@ func fieldInfoForWeakMessage(fd pref.FieldDescriptor, weakOffset offset) fieldIn } p.Apply(weakOffset).WeakFields().set(num, m.Interface()) }, - mutable: func(p pointer) pref.Value { + mutable: func(p pointer) protoreflect.Value { lazyInit() fs := p.Apply(weakOffset).WeakFields() m, ok := fs.get(num) @@ -398,20 +398,20 @@ func fieldInfoForWeakMessage(fd pref.FieldDescriptor, weakOffset offset) fieldIn m = messageType.New().Interface() fs.set(num, m) } - return pref.ValueOfMessage(m.ProtoReflect()) + return protoreflect.ValueOfMessage(m.ProtoReflect()) }, - newMessage: func() pref.Message { + newMessage: func() protoreflect.Message { lazyInit() return messageType.New() }, - newField: func() pref.Value { + newField: func() protoreflect.Value { lazyInit() - return pref.ValueOfMessage(messageType.New()) + return protoreflect.ValueOfMessage(messageType.New()) }, } } -func fieldInfoForMessage(fd pref.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo { +func fieldInfoForMessage(fd protoreflect.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo { ft := fs.Type conv := NewConverter(ft, fd) @@ -433,47 +433,47 @@ func fieldInfoForMessage(fd pref.FieldDescriptor, fs reflect.StructField, x expo rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() rv.Set(reflect.Zero(rv.Type())) }, - get: func(p pointer) pref.Value { + get: func(p pointer) protoreflect.Value { if p.IsNil() { return conv.Zero() } rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() return conv.PBValueOf(rv) }, - set: func(p pointer, v pref.Value) { + set: func(p pointer, v protoreflect.Value) { rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() rv.Set(conv.GoValueOf(v)) if fs.Type.Kind() == reflect.Ptr && rv.IsNil() { panic(fmt.Sprintf("field %v has invalid nil pointer", fd.FullName())) } }, - mutable: func(p pointer) pref.Value { + mutable: func(p pointer) protoreflect.Value { rv := p.Apply(fieldOffset).AsValueOf(fs.Type).Elem() if fs.Type.Kind() == reflect.Ptr && rv.IsNil() { rv.Set(conv.GoValueOf(conv.New())) } return conv.PBValueOf(rv) }, - newMessage: func() pref.Message { + newMessage: func() protoreflect.Message { return conv.New().Message() }, - newField: func() pref.Value { + newField: func() protoreflect.Value { return conv.New() }, } } type oneofInfo struct { - oneofDesc pref.OneofDescriptor - which func(pointer) pref.FieldNumber + oneofDesc protoreflect.OneofDescriptor + which func(pointer) protoreflect.FieldNumber } -func makeOneofInfo(od pref.OneofDescriptor, si structInfo, x exporter) *oneofInfo { +func makeOneofInfo(od protoreflect.OneofDescriptor, si structInfo, x exporter) *oneofInfo { oi := &oneofInfo{oneofDesc: od} if od.IsSynthetic() { fs := si.fieldsByNumber[od.Fields().Get(0).Number()] fieldOffset := offsetOf(fs, x) - oi.which = func(p pointer) pref.FieldNumber { + oi.which = func(p pointer) protoreflect.FieldNumber { if p.IsNil() { return 0 } @@ -486,7 +486,7 @@ func makeOneofInfo(od pref.OneofDescriptor, si structInfo, x exporter) *oneofInf } else { fs := si.oneofsByName[od.Name()] fieldOffset := offsetOf(fs, x) - oi.which = func(p pointer) pref.FieldNumber { + oi.which = func(p pointer) protoreflect.FieldNumber { if p.IsNil() { return 0 } diff --git a/vendor/google.golang.org/protobuf/internal/impl/validate.go b/vendor/google.golang.org/protobuf/internal/impl/validate.go index 08cfb6054b431..a24e6bbd7a5f9 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/validate.go +++ b/vendor/google.golang.org/protobuf/internal/impl/validate.go @@ -16,9 +16,9 @@ import ( "google.golang.org/protobuf/internal/flags" "google.golang.org/protobuf/internal/genid" "google.golang.org/protobuf/internal/strs" - pref "google.golang.org/protobuf/reflect/protoreflect" - preg "google.golang.org/protobuf/reflect/protoregistry" - piface "google.golang.org/protobuf/runtime/protoiface" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" + "google.golang.org/protobuf/runtime/protoiface" ) // ValidationStatus is the result of validating the wire-format encoding of a message. @@ -56,20 +56,20 @@ func (v ValidationStatus) String() string { // of the message type. // // This function is exposed for testing. -func Validate(mt pref.MessageType, in piface.UnmarshalInput) (out piface.UnmarshalOutput, _ ValidationStatus) { +func Validate(mt protoreflect.MessageType, in protoiface.UnmarshalInput) (out protoiface.UnmarshalOutput, _ ValidationStatus) { mi, ok := mt.(*MessageInfo) if !ok { return out, ValidationUnknown } if in.Resolver == nil { - in.Resolver = preg.GlobalTypes + in.Resolver = protoregistry.GlobalTypes } o, st := mi.validate(in.Buf, 0, unmarshalOptions{ flags: in.Flags, resolver: in.Resolver, }) if o.initialized { - out.Flags |= piface.UnmarshalInitialized + out.Flags |= protoiface.UnmarshalInitialized } return out, st } @@ -106,22 +106,22 @@ const ( validationTypeMessageSetItem ) -func newFieldValidationInfo(mi *MessageInfo, si structInfo, fd pref.FieldDescriptor, ft reflect.Type) validationInfo { +func newFieldValidationInfo(mi *MessageInfo, si structInfo, fd protoreflect.FieldDescriptor, ft reflect.Type) validationInfo { var vi validationInfo switch { case fd.ContainingOneof() != nil && !fd.ContainingOneof().IsSynthetic(): switch fd.Kind() { - case pref.MessageKind: + case protoreflect.MessageKind: vi.typ = validationTypeMessage if ot, ok := si.oneofWrappersByNumber[fd.Number()]; ok { vi.mi = getMessageInfo(ot.Field(0).Type) } - case pref.GroupKind: + case protoreflect.GroupKind: vi.typ = validationTypeGroup if ot, ok := si.oneofWrappersByNumber[fd.Number()]; ok { vi.mi = getMessageInfo(ot.Field(0).Type) } - case pref.StringKind: + case protoreflect.StringKind: if strs.EnforceUTF8(fd) { vi.typ = validationTypeUTF8String } @@ -129,7 +129,7 @@ func newFieldValidationInfo(mi *MessageInfo, si structInfo, fd pref.FieldDescrip default: vi = newValidationInfo(fd, ft) } - if fd.Cardinality() == pref.Required { + if fd.Cardinality() == protoreflect.Required { // Avoid overflow. The required field check is done with a 64-bit mask, with // any message containing more than 64 required fields always reported as // potentially uninitialized, so it is not important to get a precise count @@ -142,22 +142,22 @@ func newFieldValidationInfo(mi *MessageInfo, si structInfo, fd pref.FieldDescrip return vi } -func newValidationInfo(fd pref.FieldDescriptor, ft reflect.Type) validationInfo { +func newValidationInfo(fd protoreflect.FieldDescriptor, ft reflect.Type) validationInfo { var vi validationInfo switch { case fd.IsList(): switch fd.Kind() { - case pref.MessageKind: + case protoreflect.MessageKind: vi.typ = validationTypeMessage if ft.Kind() == reflect.Slice { vi.mi = getMessageInfo(ft.Elem()) } - case pref.GroupKind: + case protoreflect.GroupKind: vi.typ = validationTypeGroup if ft.Kind() == reflect.Slice { vi.mi = getMessageInfo(ft.Elem()) } - case pref.StringKind: + case protoreflect.StringKind: vi.typ = validationTypeBytes if strs.EnforceUTF8(fd) { vi.typ = validationTypeUTF8String @@ -175,33 +175,33 @@ func newValidationInfo(fd pref.FieldDescriptor, ft reflect.Type) validationInfo case fd.IsMap(): vi.typ = validationTypeMap switch fd.MapKey().Kind() { - case pref.StringKind: + case protoreflect.StringKind: if strs.EnforceUTF8(fd) { vi.keyType = validationTypeUTF8String } } switch fd.MapValue().Kind() { - case pref.MessageKind: + case protoreflect.MessageKind: vi.valType = validationTypeMessage if ft.Kind() == reflect.Map { vi.mi = getMessageInfo(ft.Elem()) } - case pref.StringKind: + case protoreflect.StringKind: if strs.EnforceUTF8(fd) { vi.valType = validationTypeUTF8String } } default: switch fd.Kind() { - case pref.MessageKind: + case protoreflect.MessageKind: vi.typ = validationTypeMessage if !fd.IsWeak() { vi.mi = getMessageInfo(ft) } - case pref.GroupKind: + case protoreflect.GroupKind: vi.typ = validationTypeGroup vi.mi = getMessageInfo(ft) - case pref.StringKind: + case protoreflect.StringKind: vi.typ = validationTypeBytes if strs.EnforceUTF8(fd) { vi.typ = validationTypeUTF8String @@ -314,11 +314,11 @@ State: break } messageName := fd.Message().FullName() - messageType, err := preg.GlobalTypes.FindMessageByName(messageName) + messageType, err := protoregistry.GlobalTypes.FindMessageByName(messageName) switch err { case nil: vi.mi, _ = messageType.(*MessageInfo) - case preg.NotFound: + case protoregistry.NotFound: vi.typ = validationTypeBytes default: return out, ValidationUnknown @@ -335,7 +335,7 @@ State: // unmarshaling to begin failing. Supporting this requires some way to // determine if the resolver is frozen. xt, err := opts.resolver.FindExtensionByNumber(st.mi.Desc.FullName(), num) - if err != nil && err != preg.NotFound { + if err != nil && err != protoregistry.NotFound { return out, ValidationUnknown } if err == nil { @@ -513,7 +513,7 @@ State: } xt, err := opts.resolver.FindExtensionByNumber(st.mi.Desc.FullName(), typeid) switch { - case err == preg.NotFound: + case err == protoregistry.NotFound: b = b[n:] case err != nil: return out, ValidationUnknown diff --git a/vendor/google.golang.org/protobuf/internal/impl/weak.go b/vendor/google.golang.org/protobuf/internal/impl/weak.go index 009cbefd1ed2c..eb79a7ba94c09 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/weak.go +++ b/vendor/google.golang.org/protobuf/internal/impl/weak.go @@ -7,7 +7,7 @@ package impl import ( "fmt" - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" ) @@ -17,32 +17,32 @@ import ( // defined directly on it. type weakFields WeakFields -func (w weakFields) get(num pref.FieldNumber) (pref.ProtoMessage, bool) { +func (w weakFields) get(num protoreflect.FieldNumber) (protoreflect.ProtoMessage, bool) { m, ok := w[int32(num)] return m, ok } -func (w *weakFields) set(num pref.FieldNumber, m pref.ProtoMessage) { +func (w *weakFields) set(num protoreflect.FieldNumber, m protoreflect.ProtoMessage) { if *w == nil { *w = make(weakFields) } (*w)[int32(num)] = m } -func (w *weakFields) clear(num pref.FieldNumber) { +func (w *weakFields) clear(num protoreflect.FieldNumber) { delete(*w, int32(num)) } -func (Export) HasWeak(w WeakFields, num pref.FieldNumber) bool { +func (Export) HasWeak(w WeakFields, num protoreflect.FieldNumber) bool { _, ok := w[int32(num)] return ok } -func (Export) ClearWeak(w *WeakFields, num pref.FieldNumber) { +func (Export) ClearWeak(w *WeakFields, num protoreflect.FieldNumber) { delete(*w, int32(num)) } -func (Export) GetWeak(w WeakFields, num pref.FieldNumber, name pref.FullName) pref.ProtoMessage { +func (Export) GetWeak(w WeakFields, num protoreflect.FieldNumber, name protoreflect.FullName) protoreflect.ProtoMessage { if m, ok := w[int32(num)]; ok { return m } @@ -53,7 +53,7 @@ func (Export) GetWeak(w WeakFields, num pref.FieldNumber, name pref.FullName) pr return mt.Zero().Interface() } -func (Export) SetWeak(w *WeakFields, num pref.FieldNumber, name pref.FullName, m pref.ProtoMessage) { +func (Export) SetWeak(w *WeakFields, num protoreflect.FieldNumber, name protoreflect.FullName, m protoreflect.ProtoMessage) { if m != nil { mt, _ := protoregistry.GlobalTypes.FindMessageByName(name) if mt == nil { diff --git a/vendor/google.golang.org/protobuf/internal/order/order.go b/vendor/google.golang.org/protobuf/internal/order/order.go index 2a24953f6a47a..33745ed062541 100644 --- a/vendor/google.golang.org/protobuf/internal/order/order.go +++ b/vendor/google.golang.org/protobuf/internal/order/order.go @@ -5,12 +5,12 @@ package order import ( - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" ) // FieldOrder specifies the ordering to visit message fields. // It is a function that reports whether x is ordered before y. -type FieldOrder func(x, y pref.FieldDescriptor) bool +type FieldOrder func(x, y protoreflect.FieldDescriptor) bool var ( // AnyFieldOrder specifies no specific field ordering. @@ -18,9 +18,9 @@ var ( // LegacyFieldOrder sorts fields in the same ordering as emitted by // wire serialization in the github.com/golang/protobuf implementation. - LegacyFieldOrder FieldOrder = func(x, y pref.FieldDescriptor) bool { + LegacyFieldOrder FieldOrder = func(x, y protoreflect.FieldDescriptor) bool { ox, oy := x.ContainingOneof(), y.ContainingOneof() - inOneof := func(od pref.OneofDescriptor) bool { + inOneof := func(od protoreflect.OneofDescriptor) bool { return od != nil && !od.IsSynthetic() } @@ -41,14 +41,14 @@ var ( } // NumberFieldOrder sorts fields by their field number. - NumberFieldOrder FieldOrder = func(x, y pref.FieldDescriptor) bool { + NumberFieldOrder FieldOrder = func(x, y protoreflect.FieldDescriptor) bool { return x.Number() < y.Number() } // IndexNameFieldOrder sorts non-extension fields before extension fields. // Non-extensions are sorted according to their declaration index. // Extensions are sorted according to their full name. - IndexNameFieldOrder FieldOrder = func(x, y pref.FieldDescriptor) bool { + IndexNameFieldOrder FieldOrder = func(x, y protoreflect.FieldDescriptor) bool { // Non-extension fields sort before extension fields. if x.IsExtension() != y.IsExtension() { return !x.IsExtension() && y.IsExtension() @@ -64,7 +64,7 @@ var ( // KeyOrder specifies the ordering to visit map entries. // It is a function that reports whether x is ordered before y. -type KeyOrder func(x, y pref.MapKey) bool +type KeyOrder func(x, y protoreflect.MapKey) bool var ( // AnyKeyOrder specifies no specific key ordering. @@ -72,7 +72,7 @@ var ( // GenericKeyOrder sorts false before true, numeric keys in ascending order, // and strings in lexicographical ordering according to UTF-8 codepoints. - GenericKeyOrder KeyOrder = func(x, y pref.MapKey) bool { + GenericKeyOrder KeyOrder = func(x, y protoreflect.MapKey) bool { switch x.Interface().(type) { case bool: return !x.Bool() && y.Bool() diff --git a/vendor/google.golang.org/protobuf/internal/order/range.go b/vendor/google.golang.org/protobuf/internal/order/range.go index c8090e0c547f6..1665a68e5b7c4 100644 --- a/vendor/google.golang.org/protobuf/internal/order/range.go +++ b/vendor/google.golang.org/protobuf/internal/order/range.go @@ -9,12 +9,12 @@ import ( "sort" "sync" - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" ) type messageField struct { - fd pref.FieldDescriptor - v pref.Value + fd protoreflect.FieldDescriptor + v protoreflect.Value } var messageFieldPool = sync.Pool{ @@ -25,8 +25,8 @@ type ( // FieldRnger is an interface for visiting all fields in a message. // The protoreflect.Message type implements this interface. FieldRanger interface{ Range(VisitField) } - // VisitField is called everytime a message field is visited. - VisitField = func(pref.FieldDescriptor, pref.Value) bool + // VisitField is called every time a message field is visited. + VisitField = func(protoreflect.FieldDescriptor, protoreflect.Value) bool ) // RangeFields iterates over the fields of fs according to the specified order. @@ -47,7 +47,7 @@ func RangeFields(fs FieldRanger, less FieldOrder, fn VisitField) { }() // Collect all fields in the message and sort them. - fs.Range(func(fd pref.FieldDescriptor, v pref.Value) bool { + fs.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { fields = append(fields, messageField{fd, v}) return true }) @@ -64,8 +64,8 @@ func RangeFields(fs FieldRanger, less FieldOrder, fn VisitField) { } type mapEntry struct { - k pref.MapKey - v pref.Value + k protoreflect.MapKey + v protoreflect.Value } var mapEntryPool = sync.Pool{ @@ -76,8 +76,8 @@ type ( // EntryRanger is an interface for visiting all fields in a message. // The protoreflect.Map type implements this interface. EntryRanger interface{ Range(VisitEntry) } - // VisitEntry is called everytime a map entry is visited. - VisitEntry = func(pref.MapKey, pref.Value) bool + // VisitEntry is called every time a map entry is visited. + VisitEntry = func(protoreflect.MapKey, protoreflect.Value) bool ) // RangeEntries iterates over the entries of es according to the specified order. @@ -98,7 +98,7 @@ func RangeEntries(es EntryRanger, less KeyOrder, fn VisitEntry) { }() // Collect all entries in the map and sort them. - es.Range(func(k pref.MapKey, v pref.Value) bool { + es.Range(func(k protoreflect.MapKey, v protoreflect.Value) bool { entries = append(entries, mapEntry{k, v}) return true }) diff --git a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go index 56a8a4ed3c9d1..61a84d34185a4 100644 --- a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go +++ b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go @@ -10,7 +10,7 @@ package strs import ( "unsafe" - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" ) type ( @@ -59,7 +59,7 @@ type Builder struct { // AppendFullName is equivalent to protoreflect.FullName.Append, // but optimized for large batches where each name has a shared lifetime. -func (sb *Builder) AppendFullName(prefix pref.FullName, name pref.Name) pref.FullName { +func (sb *Builder) AppendFullName(prefix protoreflect.FullName, name protoreflect.Name) protoreflect.FullName { n := len(prefix) + len(".") + len(name) if len(prefix) == 0 { n -= len(".") @@ -68,7 +68,7 @@ func (sb *Builder) AppendFullName(prefix pref.FullName, name pref.Name) pref.Ful sb.buf = append(sb.buf, prefix...) sb.buf = append(sb.buf, '.') sb.buf = append(sb.buf, name...) - return pref.FullName(sb.last(n)) + return protoreflect.FullName(sb.last(n)) } // MakeString is equivalent to string(b), but optimized for large batches @@ -87,7 +87,7 @@ func (sb *Builder) grow(n int) { // Unlike strings.Builder, we do not need to copy over the contents // of the old buffer since our builder provides no API for // retrieving previously created strings. - sb.buf = make([]byte, 2*(cap(sb.buf)+n)) + sb.buf = make([]byte, 0, 2*(cap(sb.buf)+n)) } func (sb *Builder) last(n int) string { diff --git a/vendor/google.golang.org/protobuf/internal/version/version.go b/vendor/google.golang.org/protobuf/internal/version/version.go index 3d40d5249e965..f7014cd51cd73 100644 --- a/vendor/google.golang.org/protobuf/internal/version/version.go +++ b/vendor/google.golang.org/protobuf/internal/version/version.go @@ -12,47 +12,46 @@ import ( // These constants determine the current version of this module. // -// // For our release process, we enforce the following rules: -// * Tagged releases use a tag that is identical to String. -// * Tagged releases never reference a commit where the String -// contains "devel". -// * The set of all commits in this repository where String -// does not contain "devel" must have a unique String. -// +// - Tagged releases use a tag that is identical to String. +// - Tagged releases never reference a commit where the String +// contains "devel". +// - The set of all commits in this repository where String +// does not contain "devel" must have a unique String. // // Steps for tagging a new release: -// 1. Create a new CL. // -// 2. Update Minor, Patch, and/or PreRelease as necessary. -// PreRelease must not contain the string "devel". +// 1. Create a new CL. // -// 3. Since the last released minor version, have there been any changes to -// generator that relies on new functionality in the runtime? -// If yes, then increment RequiredGenerated. +// 2. Update Minor, Patch, and/or PreRelease as necessary. +// PreRelease must not contain the string "devel". // -// 4. Since the last released minor version, have there been any changes to -// the runtime that removes support for old .pb.go source code? -// If yes, then increment SupportMinimum. +// 3. Since the last released minor version, have there been any changes to +// generator that relies on new functionality in the runtime? +// If yes, then increment RequiredGenerated. // -// 5. Send out the CL for review and submit it. -// Note that the next CL in step 8 must be submitted after this CL -// without any other CLs in-between. +// 4. Since the last released minor version, have there been any changes to +// the runtime that removes support for old .pb.go source code? +// If yes, then increment SupportMinimum. // -// 6. Tag a new version, where the tag is is the current String. +// 5. Send out the CL for review and submit it. +// Note that the next CL in step 8 must be submitted after this CL +// without any other CLs in-between. // -// 7. Write release notes for all notable changes -// between this release and the last release. +// 6. Tag a new version, where the tag is is the current String. // -// 8. Create a new CL. +// 7. Write release notes for all notable changes +// between this release and the last release. // -// 9. Update PreRelease to include the string "devel". -// For example: "" -> "devel" or "rc.1" -> "rc.1.devel" +// 8. Create a new CL. // -// 10. Send out the CL for review and submit it. +// 9. Update PreRelease to include the string "devel". +// For example: "" -> "devel" or "rc.1" -> "rc.1.devel" +// +// 10. Send out the CL for review and submit it. const ( Major = 1 - Minor = 28 + Minor = 30 Patch = 0 PreRelease = "" ) @@ -60,6 +59,7 @@ const ( // String formats the version string for this module in semver format. // // Examples: +// // v1.20.1 // v1.21.0-rc.1 func String() string { diff --git a/vendor/google.golang.org/protobuf/proto/decode.go b/vendor/google.golang.org/protobuf/proto/decode.go index 11bf7173be922..48d47946bb1ad 100644 --- a/vendor/google.golang.org/protobuf/proto/decode.go +++ b/vendor/google.golang.org/protobuf/proto/decode.go @@ -19,7 +19,8 @@ import ( // UnmarshalOptions configures the unmarshaler. // // Example usage: -// err := UnmarshalOptions{DiscardUnknown: true}.Unmarshal(b, m) +// +// err := UnmarshalOptions{DiscardUnknown: true}.Unmarshal(b, m) type UnmarshalOptions struct { pragma.NoUnkeyedLiterals diff --git a/vendor/google.golang.org/protobuf/proto/doc.go b/vendor/google.golang.org/protobuf/proto/doc.go index c52d8c4ab79ff..ec71e717fe7d1 100644 --- a/vendor/google.golang.org/protobuf/proto/doc.go +++ b/vendor/google.golang.org/protobuf/proto/doc.go @@ -5,19 +5,15 @@ // Package proto provides functions operating on protocol buffer messages. // // For documentation on protocol buffers in general, see: -// -// https://developers.google.com/protocol-buffers +// https://protobuf.dev. // // For a tutorial on using protocol buffers with Go, see: -// -// https://developers.google.com/protocol-buffers/docs/gotutorial +// https://protobuf.dev/getting-started/gotutorial. // // For a guide to generated Go protocol buffer code, see: +// https://protobuf.dev/reference/go/go-generated. // -// https://developers.google.com/protocol-buffers/docs/reference/go-generated -// -// -// Binary serialization +// # Binary serialization // // This package contains functions to convert to and from the wire format, // an efficient binary serialization of protocol buffers. @@ -30,8 +26,7 @@ // • Unmarshal converts a message from the wire format. // The UnmarshalOptions type provides more control over wire unmarshaling. // -// -// Basic message operations +// # Basic message operations // // • Clone makes a deep copy of a message. // @@ -45,8 +40,7 @@ // // • CheckInitialized reports whether all required fields in a message are set. // -// -// Optional scalar constructors +// # Optional scalar constructors // // The API for some generated messages represents optional scalar fields // as pointers to a value. For example, an optional string field has the @@ -61,16 +55,14 @@ // // Optional scalar fields are only supported in proto2. // -// -// Extension accessors +// # Extension accessors // // • HasExtension, GetExtension, SetExtension, and ClearExtension // access extension field values in a protocol buffer message. // // Extension fields are only supported in proto2. // -// -// Related packages +// # Related packages // // • Package "google.golang.org/protobuf/encoding/protojson" converts messages to // and from JSON. diff --git a/vendor/google.golang.org/protobuf/proto/encode.go b/vendor/google.golang.org/protobuf/proto/encode.go index d18239c23723a..bf7f816d0e862 100644 --- a/vendor/google.golang.org/protobuf/proto/encode.go +++ b/vendor/google.golang.org/protobuf/proto/encode.go @@ -16,7 +16,8 @@ import ( // MarshalOptions configures the marshaler. // // Example usage: -// b, err := MarshalOptions{Deterministic: true}.Marshal(m) +// +// b, err := MarshalOptions{Deterministic: true}.Marshal(m) type MarshalOptions struct { pragma.NoUnkeyedLiterals @@ -101,7 +102,9 @@ func (o MarshalOptions) Marshal(m Message) ([]byte, error) { // otherwise it returns a non-nil empty buffer. // // This is to assist the edge-case where user-code does the following: +// // m1.OptionalBytes, _ = proto.Marshal(m2) +// // where they expect the proto2 "optional_bytes" field to be populated // if any only if m2 is a valid message. func emptyBytesForMessage(m Message) []byte { diff --git a/vendor/google.golang.org/protobuf/proto/equal.go b/vendor/google.golang.org/protobuf/proto/equal.go index 4dba2b9699729..1a0be1b03c73d 100644 --- a/vendor/google.golang.org/protobuf/proto/equal.go +++ b/vendor/google.golang.org/protobuf/proto/equal.go @@ -5,163 +5,53 @@ package proto import ( - "bytes" - "math" "reflect" - "google.golang.org/protobuf/encoding/protowire" - pref "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoreflect" ) -// Equal reports whether two messages are equal. -// If two messages marshal to the same bytes under deterministic serialization, -// then Equal is guaranteed to report true. +// Equal reports whether two messages are equal, +// by recursively comparing the fields of the message. // -// Two messages are equal if they belong to the same message descriptor, -// have the same set of populated known and extension field values, -// and the same set of unknown fields values. If either of the top-level -// messages are invalid, then Equal reports true only if both are invalid. +// - Bytes fields are equal if they contain identical bytes. +// Empty bytes (regardless of nil-ness) are considered equal. // -// Scalar values are compared with the equivalent of the == operator in Go, -// except bytes values which are compared using bytes.Equal and -// floating point values which specially treat NaNs as equal. -// Message values are compared by recursively calling Equal. -// Lists are equal if each element value is also equal. -// Maps are equal if they have the same set of keys, where the pair of values -// for each key is also equal. +// - Floating-point fields are equal if they contain the same value. +// Unlike the == operator, a NaN is equal to another NaN. +// +// - Other scalar fields are equal if they contain the same value. +// +// - Message fields are equal if they have +// the same set of populated known and extension field values, and +// the same set of unknown fields values. +// +// - Lists are equal if they are the same length and +// each corresponding element is equal. +// +// - Maps are equal if they have the same set of keys and +// the corresponding value for each key is equal. +// +// An invalid message is not equal to a valid message. +// An invalid message is only equal to another invalid message of the +// same type. An invalid message often corresponds to a nil pointer +// of the concrete message type. For example, (*pb.M)(nil) is not equal +// to &pb.M{}. +// If two valid messages marshal to the same bytes under deterministic +// serialization, then Equal is guaranteed to report true. func Equal(x, y Message) bool { if x == nil || y == nil { return x == nil && y == nil } + if reflect.TypeOf(x).Kind() == reflect.Ptr && x == y { + // Avoid an expensive comparison if both inputs are identical pointers. + return true + } mx := x.ProtoReflect() my := y.ProtoReflect() if mx.IsValid() != my.IsValid() { return false } - return equalMessage(mx, my) -} - -// equalMessage compares two messages. -func equalMessage(mx, my pref.Message) bool { - if mx.Descriptor() != my.Descriptor() { - return false - } - - nx := 0 - equal := true - mx.Range(func(fd pref.FieldDescriptor, vx pref.Value) bool { - nx++ - vy := my.Get(fd) - equal = my.Has(fd) && equalField(fd, vx, vy) - return equal - }) - if !equal { - return false - } - ny := 0 - my.Range(func(fd pref.FieldDescriptor, vx pref.Value) bool { - ny++ - return true - }) - if nx != ny { - return false - } - - return equalUnknown(mx.GetUnknown(), my.GetUnknown()) -} - -// equalField compares two fields. -func equalField(fd pref.FieldDescriptor, x, y pref.Value) bool { - switch { - case fd.IsList(): - return equalList(fd, x.List(), y.List()) - case fd.IsMap(): - return equalMap(fd, x.Map(), y.Map()) - default: - return equalValue(fd, x, y) - } -} - -// equalMap compares two maps. -func equalMap(fd pref.FieldDescriptor, x, y pref.Map) bool { - if x.Len() != y.Len() { - return false - } - equal := true - x.Range(func(k pref.MapKey, vx pref.Value) bool { - vy := y.Get(k) - equal = y.Has(k) && equalValue(fd.MapValue(), vx, vy) - return equal - }) - return equal -} - -// equalList compares two lists. -func equalList(fd pref.FieldDescriptor, x, y pref.List) bool { - if x.Len() != y.Len() { - return false - } - for i := x.Len() - 1; i >= 0; i-- { - if !equalValue(fd, x.Get(i), y.Get(i)) { - return false - } - } - return true -} - -// equalValue compares two singular values. -func equalValue(fd pref.FieldDescriptor, x, y pref.Value) bool { - switch fd.Kind() { - case pref.BoolKind: - return x.Bool() == y.Bool() - case pref.EnumKind: - return x.Enum() == y.Enum() - case pref.Int32Kind, pref.Sint32Kind, - pref.Int64Kind, pref.Sint64Kind, - pref.Sfixed32Kind, pref.Sfixed64Kind: - return x.Int() == y.Int() - case pref.Uint32Kind, pref.Uint64Kind, - pref.Fixed32Kind, pref.Fixed64Kind: - return x.Uint() == y.Uint() - case pref.FloatKind, pref.DoubleKind: - fx := x.Float() - fy := y.Float() - if math.IsNaN(fx) || math.IsNaN(fy) { - return math.IsNaN(fx) && math.IsNaN(fy) - } - return fx == fy - case pref.StringKind: - return x.String() == y.String() - case pref.BytesKind: - return bytes.Equal(x.Bytes(), y.Bytes()) - case pref.MessageKind, pref.GroupKind: - return equalMessage(x.Message(), y.Message()) - default: - return x.Interface() == y.Interface() - } -} - -// equalUnknown compares unknown fields by direct comparison on the raw bytes -// of each individual field number. -func equalUnknown(x, y pref.RawFields) bool { - if len(x) != len(y) { - return false - } - if bytes.Equal([]byte(x), []byte(y)) { - return true - } - - mx := make(map[pref.FieldNumber]pref.RawFields) - my := make(map[pref.FieldNumber]pref.RawFields) - for len(x) > 0 { - fnum, _, n := protowire.ConsumeField(x) - mx[fnum] = append(mx[fnum], x[:n]...) - x = x[n:] - } - for len(y) > 0 { - fnum, _, n := protowire.ConsumeField(y) - my[fnum] = append(my[fnum], y[:n]...) - y = y[n:] - } - return reflect.DeepEqual(mx, my) + vx := protoreflect.ValueOfMessage(mx) + vy := protoreflect.ValueOfMessage(my) + return vx.Equal(vy) } diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go index cebb36cdade61..27d7e35012d3a 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go @@ -155,9 +155,9 @@ func (r *resolver) findTarget(k protoreflect.Kind, scope protoreflect.FullName, // // Suppose the scope was "fizz.buzz" and the reference was "Foo.Bar", // then the following full names are searched: -// * fizz.buzz.Foo.Bar -// * fizz.Foo.Bar -// * Foo.Bar +// - fizz.buzz.Foo.Bar +// - fizz.Foo.Bar +// - Foo.Bar func (r *resolver) findDescriptor(scope protoreflect.FullName, ref partialName) (protoreflect.Descriptor, error) { if !ref.IsValid() { return nil, errors.New("invalid name reference: %q", ref) diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go index dd85915bd4bfb..55aa14922b015 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go @@ -8,8 +8,7 @@ // defined in proto source files and value interfaces which provide the // ability to examine and manipulate the contents of messages. // -// -// Protocol Buffer Descriptors +// # Protocol Buffer Descriptors // // Protobuf descriptors (e.g., EnumDescriptor or MessageDescriptor) // are immutable objects that represent protobuf type information. @@ -26,8 +25,7 @@ // The "google.golang.org/protobuf/reflect/protodesc" package converts between // google.protobuf.DescriptorProto messages and protobuf descriptors. // -// -// Go Type Descriptors +// # Go Type Descriptors // // A type descriptor (e.g., EnumType or MessageType) is a constructor for // a concrete Go type that represents the associated protobuf descriptor. @@ -41,8 +39,7 @@ // The "google.golang.org/protobuf/types/dynamicpb" package can be used to // create Go type descriptors from protobuf descriptors. // -// -// Value Interfaces +// # Value Interfaces // // The Enum and Message interfaces provide a reflective view over an // enum or message instance. For enums, it provides the ability to retrieve @@ -55,13 +52,11 @@ // The "github.com/golang/protobuf/proto".MessageReflect function can be used // to obtain a reflective view on older messages. // -// -// Relationships +// # Relationships // // The following diagrams demonstrate the relationships between // various types declared in this package. // -// // ┌───────────────────────────────────┐ // V │ // ┌────────────── New(n) ─────────────┐ │ @@ -83,7 +78,6 @@ // // • An Enum is a concrete enum instance. Generated enums implement Enum. // -// // ┌──────────────── New() ─────────────────┐ // │ │ // │ ┌─── Descriptor() ─────┐ │ ┌── Interface() ───┐ @@ -98,12 +92,22 @@ // // • A MessageType describes a concrete Go message type. // It has a MessageDescriptor and can construct a Message instance. +// Just as how Go's reflect.Type is a reflective description of a Go type, +// a MessageType is a reflective description of a Go type for a protobuf message. // // • A MessageDescriptor describes an abstract protobuf message type. -// -// • A Message is a concrete message instance. Generated messages implement -// ProtoMessage, which can convert to/from a Message. -// +// It has no understanding of Go types. In order to construct a MessageType +// from just a MessageDescriptor, you can consider looking up the message type +// in the global registry using protoregistry.GlobalTypes.FindMessageByName +// or constructing a dynamic MessageType using dynamicpb.NewMessageType. +// +// • A Message is a reflective view over a concrete message instance. +// Generated messages implement ProtoMessage, which can convert to a Message. +// Just as how Go's reflect.Value is a reflective view over a Go value, +// a Message is a reflective view over a concrete protobuf message instance. +// Using Go reflection as an analogy, the ProtoReflect method is similar to +// calling reflect.ValueOf, and the Message.Interface method is similar to +// calling reflect.Value.Interface. // // ┌── TypeDescriptor() ──┐ ┌───── Descriptor() ─────┐ // │ V │ V diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/source.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/source.go index 121ba3a07bba9..0b99428855fe9 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/source.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/source.go @@ -87,6 +87,7 @@ func (p1 SourcePath) Equal(p2 SourcePath) bool { // in a future version of this module. // // Example output: +// // .message_type[6].nested_type[15].field[3] func (p SourcePath) String() string { b := p.appendFileDescriptorProto(nil) diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go index b03c1223c4a49..54ce326df94e3 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go @@ -35,6 +35,8 @@ func (p *SourcePath) appendFileDescriptorProto(b []byte) []byte { b = p.appendSingularField(b, "source_code_info", (*SourcePath).appendSourceCodeInfo) case 12: b = p.appendSingularField(b, "syntax", nil) + case 13: + b = p.appendSingularField(b, "edition", nil) } return b } @@ -236,6 +238,8 @@ func (p *SourcePath) appendMessageOptions(b []byte) []byte { b = p.appendSingularField(b, "deprecated", nil) case 7: b = p.appendSingularField(b, "map_entry", nil) + case 11: + b = p.appendSingularField(b, "deprecated_legacy_json_field_conflicts", nil) case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) } @@ -279,6 +283,8 @@ func (p *SourcePath) appendEnumOptions(b []byte) []byte { b = p.appendSingularField(b, "allow_alias", nil) case 3: b = p.appendSingularField(b, "deprecated", nil) + case 6: + b = p.appendSingularField(b, "deprecated_legacy_json_field_conflicts", nil) case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) } @@ -345,10 +351,18 @@ func (p *SourcePath) appendFieldOptions(b []byte) []byte { b = p.appendSingularField(b, "jstype", nil) case 5: b = p.appendSingularField(b, "lazy", nil) + case 15: + b = p.appendSingularField(b, "unverified_lazy", nil) case 3: b = p.appendSingularField(b, "deprecated", nil) case 10: b = p.appendSingularField(b, "weak", nil) + case 16: + b = p.appendSingularField(b, "debug_redact", nil) + case 17: + b = p.appendSingularField(b, "retention", nil) + case 18: + b = p.appendSingularField(b, "target", nil) case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) } diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go index 8e53c44a9188a..3867470d30ac0 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go @@ -480,6 +480,7 @@ type ExtensionDescriptors interface { // relative to the parent that it is declared within. // // For example: +// // syntax = "proto2"; // package example; // message FooMessage { diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go index f31981077827f..37601b7819972 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value.go @@ -148,7 +148,7 @@ type Message interface { // be preserved in marshaling or other operations. IsValid() bool - // ProtoMethods returns optional fast-path implementions of various operations. + // ProtoMethods returns optional fast-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_equal.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_equal.go new file mode 100644 index 0000000000000..591652541f288 --- /dev/null +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_equal.go @@ -0,0 +1,168 @@ +// Copyright 2022 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 protoreflect + +import ( + "bytes" + "fmt" + "math" + "reflect" + + "google.golang.org/protobuf/encoding/protowire" +) + +// Equal reports whether v1 and v2 are recursively equal. +// +// - Values of different types are always unequal. +// +// - Bytes values are equal if they contain identical bytes. +// Empty bytes (regardless of nil-ness) are considered equal. +// +// - Floating point values are equal if they contain the same value. +// Unlike the == operator, a NaN is equal to another NaN. +// +// - Enums are equal if they contain the same number. +// Since Value does not contain an enum descriptor, +// enum values do not consider the type of the enum. +// +// - Other scalar values are equal if they contain the same value. +// +// - Message values are equal if they belong to the same message descriptor, +// have the same set of populated known and extension field values, +// and the same set of unknown fields values. +// +// - Lists are equal if they are the same length and +// each corresponding element is equal. +// +// - Maps are equal if they have the same set of keys and +// the corresponding value for each key is equal. +func (v1 Value) Equal(v2 Value) bool { + return equalValue(v1, v2) +} + +func equalValue(x, y Value) bool { + eqType := x.typ == y.typ + switch x.typ { + case nilType: + return eqType + case boolType: + return eqType && x.Bool() == y.Bool() + case int32Type, int64Type: + return eqType && x.Int() == y.Int() + case uint32Type, uint64Type: + return eqType && x.Uint() == y.Uint() + case float32Type, float64Type: + return eqType && equalFloat(x.Float(), y.Float()) + case stringType: + return eqType && x.String() == y.String() + case bytesType: + return eqType && bytes.Equal(x.Bytes(), y.Bytes()) + case enumType: + return eqType && x.Enum() == y.Enum() + default: + switch x := x.Interface().(type) { + case Message: + y, ok := y.Interface().(Message) + return ok && equalMessage(x, y) + case List: + y, ok := y.Interface().(List) + return ok && equalList(x, y) + case Map: + y, ok := y.Interface().(Map) + return ok && equalMap(x, y) + default: + panic(fmt.Sprintf("unknown type: %T", x)) + } + } +} + +// equalFloat compares two floats, where NaNs are treated as equal. +func equalFloat(x, y float64) bool { + if math.IsNaN(x) || math.IsNaN(y) { + return math.IsNaN(x) && math.IsNaN(y) + } + return x == y +} + +// equalMessage compares two messages. +func equalMessage(mx, my Message) bool { + if mx.Descriptor() != my.Descriptor() { + return false + } + + nx := 0 + equal := true + mx.Range(func(fd FieldDescriptor, vx Value) bool { + nx++ + vy := my.Get(fd) + equal = my.Has(fd) && equalValue(vx, vy) + return equal + }) + if !equal { + return false + } + ny := 0 + my.Range(func(fd FieldDescriptor, vx Value) bool { + ny++ + return true + }) + if nx != ny { + return false + } + + return equalUnknown(mx.GetUnknown(), my.GetUnknown()) +} + +// equalList compares two lists. +func equalList(x, y List) bool { + if x.Len() != y.Len() { + return false + } + for i := x.Len() - 1; i >= 0; i-- { + if !equalValue(x.Get(i), y.Get(i)) { + return false + } + } + return true +} + +// equalMap compares two maps. +func equalMap(x, y Map) bool { + if x.Len() != y.Len() { + return false + } + equal := true + x.Range(func(k MapKey, vx Value) bool { + vy := y.Get(k) + equal = y.Has(k) && equalValue(vx, vy) + return equal + }) + return equal +} + +// equalUnknown compares unknown fields by direct comparison on the raw bytes +// of each individual field number. +func equalUnknown(x, y RawFields) bool { + if len(x) != len(y) { + return false + } + if bytes.Equal([]byte(x), []byte(y)) { + return true + } + + mx := make(map[FieldNumber]RawFields) + my := make(map[FieldNumber]RawFields) + for len(x) > 0 { + fnum, _, n := protowire.ConsumeField(x) + mx[fnum] = append(mx[fnum], x[:n]...) + x = x[n:] + } + for len(y) > 0 { + fnum, _, n := protowire.ConsumeField(y) + my[fnum] = append(my[fnum], y[:n]...) + y = y[n:] + } + return reflect.DeepEqual(mx, my) +} diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go index eb7764c307c05..08e5ef73fc0e8 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go @@ -50,14 +50,15 @@ import ( // always references the source object. // // For example: +// // // Append a 0 to a "repeated int32" field. // // Since the Value returned by Mutable is guaranteed to alias // // the source message, modifying the Value modifies the message. -// message.Mutable(fieldDesc).(List).Append(protoreflect.ValueOfInt32(0)) +// message.Mutable(fieldDesc).List().Append(protoreflect.ValueOfInt32(0)) // // // Assign [0] to a "repeated int32" field by creating a new Value, // // modifying it, and assigning it. -// list := message.NewField(fieldDesc).(List) +// list := message.NewField(fieldDesc).List() // list.Append(protoreflect.ValueOfInt32(0)) // message.Set(fieldDesc, list) // // ERROR: Since it is not defined whether Set aliases the source, @@ -392,6 +393,7 @@ func (v Value) MapKey() MapKey { // ╚═════════╧═════════════════════════════════════╝ // // A MapKey is constructed and accessed through a Value: +// // k := ValueOf("hash").MapKey() // convert string to MapKey // s := k.String() // convert MapKey to string // diff --git a/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go b/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go index 59f024c444fc8..aeb559774469f 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go +++ b/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go @@ -30,9 +30,11 @@ import ( // conflictPolicy configures the policy for handling registration conflicts. // // It can be over-written at compile time with a linker-initialized variable: +// // go build -ldflags "-X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn" // // It can be over-written at program execution with an environment variable: +// // GOLANG_PROTOBUF_REGISTRATION_CONFLICT=warn ./main // // Neither of the above are covered by the compatibility promise and @@ -44,7 +46,7 @@ var conflictPolicy = "panic" // "panic" | "warn" | "ignore" // It is a variable so that the behavior is easily overridden in another file. var ignoreConflict = func(d protoreflect.Descriptor, err error) bool { const env = "GOLANG_PROTOBUF_REGISTRATION_CONFLICT" - const faq = "https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict" + const faq = "https://protobuf.dev/reference/go/faq#namespace-conflict" policy := conflictPolicy if v := os.Getenv(env); v != "" { policy = v diff --git a/vendor/google.golang.org/protobuf/runtime/protoimpl/version.go b/vendor/google.golang.org/protobuf/runtime/protoimpl/version.go index ff094e1ba44b2..a105cb23e0331 100644 --- a/vendor/google.golang.org/protobuf/runtime/protoimpl/version.go +++ b/vendor/google.golang.org/protobuf/runtime/protoimpl/version.go @@ -26,16 +26,19 @@ const ( // EnforceVersion is used by code generated by protoc-gen-go // to statically enforce minimum and maximum versions of this package. // A compilation failure implies either that: -// * the runtime package is too old and needs to be updated OR -// * the generated code is too old and needs to be regenerated. +// - the runtime package is too old and needs to be updated OR +// - the generated code is too old and needs to be regenerated. // // The runtime package can be upgraded by running: +// // go get google.golang.org/protobuf // // The generated code can be regenerated by running: +// // protoc --go_out=${PROTOC_GEN_GO_ARGS} ${PROTO_FILES} // // Example usage by generated code: +// // const ( // // Verify that this generated code is sufficiently up-to-date. // _ = protoimpl.EnforceVersion(genVersion - protoimpl.MinVersion) @@ -49,6 +52,7 @@ const ( type EnforceVersion uint // This enforces the following invariant: +// // MinVersion ≤ GenVersion ≤ MaxVersion const ( _ = EnforceVersion(GenVersion - MinVersion) diff --git a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go index abe4ab5115bb2..dac5671db0037 100644 --- a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go +++ b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go @@ -406,6 +406,152 @@ func (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 1} } +// If set to RETENTION_SOURCE, the option will be omitted from the binary. +// Note: as of January 2023, support for this is in progress and does not yet +// have an effect (b/264593489). +type FieldOptions_OptionRetention int32 + +const ( + FieldOptions_RETENTION_UNKNOWN FieldOptions_OptionRetention = 0 + FieldOptions_RETENTION_RUNTIME FieldOptions_OptionRetention = 1 + FieldOptions_RETENTION_SOURCE FieldOptions_OptionRetention = 2 +) + +// Enum value maps for FieldOptions_OptionRetention. +var ( + FieldOptions_OptionRetention_name = map[int32]string{ + 0: "RETENTION_UNKNOWN", + 1: "RETENTION_RUNTIME", + 2: "RETENTION_SOURCE", + } + FieldOptions_OptionRetention_value = map[string]int32{ + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2, + } +) + +func (x FieldOptions_OptionRetention) Enum() *FieldOptions_OptionRetention { + p := new(FieldOptions_OptionRetention) + *p = x + return p +} + +func (x FieldOptions_OptionRetention) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FieldOptions_OptionRetention) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[5].Descriptor() +} + +func (FieldOptions_OptionRetention) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[5] +} + +func (x FieldOptions_OptionRetention) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *FieldOptions_OptionRetention) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = FieldOptions_OptionRetention(num) + return nil +} + +// Deprecated: Use FieldOptions_OptionRetention.Descriptor instead. +func (FieldOptions_OptionRetention) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 2} +} + +// This indicates the types of entities that the field may apply to when used +// as an option. If it is unset, then the field may be freely used as an +// option on any kind of entity. Note: as of January 2023, support for this is +// in progress and does not yet have an effect (b/264593489). +type FieldOptions_OptionTargetType int32 + +const ( + FieldOptions_TARGET_TYPE_UNKNOWN FieldOptions_OptionTargetType = 0 + FieldOptions_TARGET_TYPE_FILE FieldOptions_OptionTargetType = 1 + FieldOptions_TARGET_TYPE_EXTENSION_RANGE FieldOptions_OptionTargetType = 2 + FieldOptions_TARGET_TYPE_MESSAGE FieldOptions_OptionTargetType = 3 + FieldOptions_TARGET_TYPE_FIELD FieldOptions_OptionTargetType = 4 + FieldOptions_TARGET_TYPE_ONEOF FieldOptions_OptionTargetType = 5 + FieldOptions_TARGET_TYPE_ENUM FieldOptions_OptionTargetType = 6 + FieldOptions_TARGET_TYPE_ENUM_ENTRY FieldOptions_OptionTargetType = 7 + FieldOptions_TARGET_TYPE_SERVICE FieldOptions_OptionTargetType = 8 + FieldOptions_TARGET_TYPE_METHOD FieldOptions_OptionTargetType = 9 +) + +// Enum value maps for FieldOptions_OptionTargetType. +var ( + FieldOptions_OptionTargetType_name = map[int32]string{ + 0: "TARGET_TYPE_UNKNOWN", + 1: "TARGET_TYPE_FILE", + 2: "TARGET_TYPE_EXTENSION_RANGE", + 3: "TARGET_TYPE_MESSAGE", + 4: "TARGET_TYPE_FIELD", + 5: "TARGET_TYPE_ONEOF", + 6: "TARGET_TYPE_ENUM", + 7: "TARGET_TYPE_ENUM_ENTRY", + 8: "TARGET_TYPE_SERVICE", + 9: "TARGET_TYPE_METHOD", + } + FieldOptions_OptionTargetType_value = map[string]int32{ + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9, + } +) + +func (x FieldOptions_OptionTargetType) Enum() *FieldOptions_OptionTargetType { + p := new(FieldOptions_OptionTargetType) + *p = x + return p +} + +func (x FieldOptions_OptionTargetType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FieldOptions_OptionTargetType) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[6].Descriptor() +} + +func (FieldOptions_OptionTargetType) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[6] +} + +func (x FieldOptions_OptionTargetType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *FieldOptions_OptionTargetType) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = FieldOptions_OptionTargetType(num) + return nil +} + +// Deprecated: Use FieldOptions_OptionTargetType.Descriptor instead. +func (FieldOptions_OptionTargetType) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 3} +} + // Is this method side-effect-free (or safe in HTTP parlance), or idempotent, // or neither? HTTP based RPC implementation may choose GET verb for safe // methods, and PUT verb for idempotent methods instead of the default POST. @@ -442,11 +588,11 @@ func (x MethodOptions_IdempotencyLevel) String() string { } func (MethodOptions_IdempotencyLevel) Descriptor() protoreflect.EnumDescriptor { - return file_google_protobuf_descriptor_proto_enumTypes[5].Descriptor() + return file_google_protobuf_descriptor_proto_enumTypes[7].Descriptor() } func (MethodOptions_IdempotencyLevel) Type() protoreflect.EnumType { - return &file_google_protobuf_descriptor_proto_enumTypes[5] + return &file_google_protobuf_descriptor_proto_enumTypes[7] } func (x MethodOptions_IdempotencyLevel) Number() protoreflect.EnumNumber { @@ -468,6 +614,70 @@ func (MethodOptions_IdempotencyLevel) EnumDescriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{17, 0} } +// Represents the identified object's effect on the element in the original +// .proto file. +type GeneratedCodeInfo_Annotation_Semantic int32 + +const ( + // There is no effect or the effect is indescribable. + GeneratedCodeInfo_Annotation_NONE GeneratedCodeInfo_Annotation_Semantic = 0 + // The element is set or otherwise mutated. + GeneratedCodeInfo_Annotation_SET GeneratedCodeInfo_Annotation_Semantic = 1 + // An alias to the element is returned. + GeneratedCodeInfo_Annotation_ALIAS GeneratedCodeInfo_Annotation_Semantic = 2 +) + +// Enum value maps for GeneratedCodeInfo_Annotation_Semantic. +var ( + GeneratedCodeInfo_Annotation_Semantic_name = map[int32]string{ + 0: "NONE", + 1: "SET", + 2: "ALIAS", + } + GeneratedCodeInfo_Annotation_Semantic_value = map[string]int32{ + "NONE": 0, + "SET": 1, + "ALIAS": 2, + } +) + +func (x GeneratedCodeInfo_Annotation_Semantic) Enum() *GeneratedCodeInfo_Annotation_Semantic { + p := new(GeneratedCodeInfo_Annotation_Semantic) + *p = x + return p +} + +func (x GeneratedCodeInfo_Annotation_Semantic) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GeneratedCodeInfo_Annotation_Semantic) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[8].Descriptor() +} + +func (GeneratedCodeInfo_Annotation_Semantic) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[8] +} + +func (x GeneratedCodeInfo_Annotation_Semantic) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *GeneratedCodeInfo_Annotation_Semantic) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = GeneratedCodeInfo_Annotation_Semantic(num) + return nil +} + +// Deprecated: Use GeneratedCodeInfo_Annotation_Semantic.Descriptor instead. +func (GeneratedCodeInfo_Annotation_Semantic) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{20, 0, 0} +} + // The protocol compiler can output a FileDescriptorSet containing the .proto // files it parses. type FileDescriptorSet struct { @@ -544,8 +754,12 @@ type FileDescriptorProto struct { // development tools. SourceCodeInfo *SourceCodeInfo `protobuf:"bytes,9,opt,name=source_code_info,json=sourceCodeInfo" json:"source_code_info,omitempty"` // The syntax of the proto file. - // The supported values are "proto2" and "proto3". + // The supported values are "proto2", "proto3", and "editions". + // + // If `edition` is present, this value must be "editions". Syntax *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"` + // The edition of the proto file, which is an opaque string. + Edition *string `protobuf:"bytes,13,opt,name=edition" json:"edition,omitempty"` } func (x *FileDescriptorProto) Reset() { @@ -664,6 +878,13 @@ func (x *FileDescriptorProto) GetSyntax() string { return "" } +func (x *FileDescriptorProto) GetEdition() string { + if x != nil && x.Edition != nil { + return *x.Edition + } + return "" +} + // Describes a message type. type DescriptorProto struct { state protoimpl.MessageState @@ -860,7 +1081,6 @@ type FieldDescriptorProto struct { // For booleans, "true" or "false". // For strings, contains the default text contents (not escaped in any way). // For bytes, contains the C escaped value. All bytes >= 128 are escaped. - // TODO(kenton): Base-64 encode? DefaultValue *string `protobuf:"bytes,7,opt,name=default_value,json=defaultValue" json:"default_value,omitempty"` // If set, gives the index of a oneof in the containing type's oneof_decl // list. This field is a member of that oneof. @@ -1382,22 +1602,22 @@ type FileOptions struct { // inappropriate because proto packages do not normally start with backwards // domain names. JavaPackage *string `protobuf:"bytes,1,opt,name=java_package,json=javaPackage" json:"java_package,omitempty"` - // If set, all the classes from the .proto file are wrapped in a single - // outer class with the given name. This applies to both Proto1 - // (equivalent to the old "--one_java_file" option) and Proto2 (where - // a .proto always translates to a single class, but you may want to - // explicitly choose the class name). + // Controls the name of the wrapper Java class generated for the .proto file. + // That class will always contain the .proto file's getDescriptor() method as + // well as any top-level extensions defined in the .proto file. + // If java_multiple_files is disabled, then all the other classes from the + // .proto file will be nested inside the single wrapper outer class. JavaOuterClassname *string `protobuf:"bytes,8,opt,name=java_outer_classname,json=javaOuterClassname" json:"java_outer_classname,omitempty"` - // If set true, then the Java code generator will generate a separate .java + // If enabled, then the Java code generator will generate a separate .java // file for each top-level message, enum, and service defined in the .proto - // file. Thus, these types will *not* be nested inside the outer class - // named by java_outer_classname. However, the outer class will still be + // file. Thus, these types will *not* be nested inside the wrapper class + // named by java_outer_classname. However, the wrapper class will still be // generated to contain the file's getDescriptor() method as well as any // top-level extensions defined in the file. JavaMultipleFiles *bool `protobuf:"varint,10,opt,name=java_multiple_files,json=javaMultipleFiles,def=0" json:"java_multiple_files,omitempty"` // This option does nothing. // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash" json:"java_generate_equals_and_hash,omitempty"` // If set true, then the Java2 code generator will generate code that // throws an exception whenever an attempt is made to assign a non-UTF-8 @@ -1531,7 +1751,7 @@ func (x *FileOptions) GetJavaMultipleFiles() bool { return Default_FileOptions_JavaMultipleFiles } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. func (x *FileOptions) GetJavaGenerateEqualsAndHash() bool { if x != nil && x.JavaGenerateEqualsAndHash != nil { return *x.JavaGenerateEqualsAndHash @@ -1670,10 +1890,12 @@ type MessageOptions struct { // efficient, has fewer features, and is more complicated. // // The message must be defined exactly as follows: - // message Foo { - // option message_set_wire_format = true; - // extensions 4 to max; - // } + // + // message Foo { + // option message_set_wire_format = true; + // extensions 4 to max; + // } + // // Note that the message cannot have any defined fields; MessageSets only // have extensions. // @@ -1692,28 +1914,44 @@ type MessageOptions struct { // for the message, or it will be completely ignored; in the very least, // this is a formalization for deprecating messages. Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // NOTE: Do not set the option in .proto files. Always use the maps syntax + // instead. The option should only be implicitly set by the proto compiler + // parser. + // // Whether the message is an automatically generated map entry type for the // maps field. // // For maps fields: - // map map_field = 1; + // + // map map_field = 1; + // // The parsed descriptor looks like: - // message MapFieldEntry { - // option map_entry = true; - // optional KeyType key = 1; - // optional ValueType value = 2; - // } - // repeated MapFieldEntry map_field = 1; + // + // message MapFieldEntry { + // option map_entry = true; + // optional KeyType key = 1; + // optional ValueType value = 2; + // } + // repeated MapFieldEntry map_field = 1; // // Implementations may choose not to generate the map_entry=true message, but // use a native map in the target language to hold the keys and values. // The reflection APIs in such implementations still need to work as // if the field is a repeated message field. - // - // NOTE: Do not set the option in .proto files. Always use the maps syntax - // instead. The option should only be implicitly set by the proto compiler - // parser. MapEntry *bool `protobuf:"varint,7,opt,name=map_entry,json=mapEntry" json:"map_entry,omitempty"` + // Enable the legacy handling of JSON field name conflicts. This lowercases + // and strips underscored from the fields before comparison in proto3 only. + // The new behavior takes `json_name` into account and applies to proto2 as + // well. + // + // This should only be used as a temporary measure against broken builds due + // to the change in behavior for JSON field name conflicts. + // + // TODO(b/261750190) This is legacy behavior we plan to remove once downstream + // teams have had time to migrate. + // + // Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. + DeprecatedLegacyJsonFieldConflicts *bool `protobuf:"varint,11,opt,name=deprecated_legacy_json_field_conflicts,json=deprecatedLegacyJsonFieldConflicts" json:"deprecated_legacy_json_field_conflicts,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` } @@ -1785,6 +2023,14 @@ func (x *MessageOptions) GetMapEntry() bool { return false } +// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. +func (x *MessageOptions) GetDeprecatedLegacyJsonFieldConflicts() bool { + if x != nil && x.DeprecatedLegacyJsonFieldConflicts != nil { + return *x.DeprecatedLegacyJsonFieldConflicts + } + return false +} + func (x *MessageOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption @@ -1838,7 +2084,6 @@ type FieldOptions struct { // call from multiple threads concurrently, while non-const methods continue // to require exclusive access. // - // // Note that implementations may choose not to check required fields within // a lazy sub-message. That is, calling IsInitialized() on the outer message // may return true even if the inner message has missing required fields. @@ -1849,7 +2094,14 @@ type FieldOptions struct { // implementation must either *always* check its required fields, or *never* // check its required fields, regardless of whether or not the message has // been parsed. + // + // As of May 2022, lazy verifies the contents of the byte stream during + // parsing. An invalid byte stream will cause the overall parsing to fail. Lazy *bool `protobuf:"varint,5,opt,name=lazy,def=0" json:"lazy,omitempty"` + // unverified_lazy does no correctness checks on the byte stream. This should + // only be used where lazy with verification is prohibitive for performance + // reasons. + UnverifiedLazy *bool `protobuf:"varint,15,opt,name=unverified_lazy,json=unverifiedLazy,def=0" json:"unverified_lazy,omitempty"` // Is this field deprecated? // Depending on the target platform, this can emit Deprecated annotations // for accessors, or it will be completely ignored; in the very least, this @@ -1857,17 +2109,24 @@ type FieldOptions struct { Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` // For Google-internal migration only. Do not use. Weak *bool `protobuf:"varint,10,opt,name=weak,def=0" json:"weak,omitempty"` + // Indicate that the field value should not be printed out when using debug + // formats, e.g. when the field contains sensitive credentials. + DebugRedact *bool `protobuf:"varint,16,opt,name=debug_redact,json=debugRedact,def=0" json:"debug_redact,omitempty"` + Retention *FieldOptions_OptionRetention `protobuf:"varint,17,opt,name=retention,enum=google.protobuf.FieldOptions_OptionRetention" json:"retention,omitempty"` + Target *FieldOptions_OptionTargetType `protobuf:"varint,18,opt,name=target,enum=google.protobuf.FieldOptions_OptionTargetType" json:"target,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` } // Default values for FieldOptions fields. const ( - Default_FieldOptions_Ctype = FieldOptions_STRING - Default_FieldOptions_Jstype = FieldOptions_JS_NORMAL - Default_FieldOptions_Lazy = bool(false) - Default_FieldOptions_Deprecated = bool(false) - Default_FieldOptions_Weak = bool(false) + Default_FieldOptions_Ctype = FieldOptions_STRING + Default_FieldOptions_Jstype = FieldOptions_JS_NORMAL + Default_FieldOptions_Lazy = bool(false) + Default_FieldOptions_UnverifiedLazy = bool(false) + Default_FieldOptions_Deprecated = bool(false) + Default_FieldOptions_Weak = bool(false) + Default_FieldOptions_DebugRedact = bool(false) ) func (x *FieldOptions) Reset() { @@ -1930,6 +2189,13 @@ func (x *FieldOptions) GetLazy() bool { return Default_FieldOptions_Lazy } +func (x *FieldOptions) GetUnverifiedLazy() bool { + if x != nil && x.UnverifiedLazy != nil { + return *x.UnverifiedLazy + } + return Default_FieldOptions_UnverifiedLazy +} + func (x *FieldOptions) GetDeprecated() bool { if x != nil && x.Deprecated != nil { return *x.Deprecated @@ -1944,6 +2210,27 @@ func (x *FieldOptions) GetWeak() bool { return Default_FieldOptions_Weak } +func (x *FieldOptions) GetDebugRedact() bool { + if x != nil && x.DebugRedact != nil { + return *x.DebugRedact + } + return Default_FieldOptions_DebugRedact +} + +func (x *FieldOptions) GetRetention() FieldOptions_OptionRetention { + if x != nil && x.Retention != nil { + return *x.Retention + } + return FieldOptions_RETENTION_UNKNOWN +} + +func (x *FieldOptions) GetTarget() FieldOptions_OptionTargetType { + if x != nil && x.Target != nil { + return *x.Target + } + return FieldOptions_TARGET_TYPE_UNKNOWN +} + func (x *FieldOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption @@ -2014,6 +2301,15 @@ type EnumOptions struct { // for the enum, or it will be completely ignored; in the very least, this // is a formalization for deprecating enums. Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // Enable the legacy handling of JSON field name conflicts. This lowercases + // and strips underscored from the fields before comparison in proto3 only. + // The new behavior takes `json_name` into account and applies to proto2 as + // well. + // TODO(b/261750190) Remove this legacy behavior once downstream teams have + // had time to migrate. + // + // Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. + DeprecatedLegacyJsonFieldConflicts *bool `protobuf:"varint,6,opt,name=deprecated_legacy_json_field_conflicts,json=deprecatedLegacyJsonFieldConflicts" json:"deprecated_legacy_json_field_conflicts,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` } @@ -2069,6 +2365,14 @@ func (x *EnumOptions) GetDeprecated() bool { return Default_EnumOptions_Deprecated } +// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. +func (x *EnumOptions) GetDeprecatedLegacyJsonFieldConflicts() bool { + if x != nil && x.DeprecatedLegacyJsonFieldConflicts != nil { + return *x.DeprecatedLegacyJsonFieldConflicts + } + return false +} + func (x *EnumOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption @@ -2399,43 +2703,48 @@ type SourceCodeInfo struct { // tools. // // For example, say we have a file like: - // message Foo { - // optional string foo = 1; - // } + // + // message Foo { + // optional string foo = 1; + // } + // // Let's look at just the field definition: - // optional string foo = 1; - // ^ ^^ ^^ ^ ^^^ - // a bc de f ghi + // + // optional string foo = 1; + // ^ ^^ ^^ ^ ^^^ + // a bc de f ghi + // // We have the following locations: - // span path represents - // [a,i) [ 4, 0, 2, 0 ] The whole field definition. - // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + // + // span path represents + // [a,i) [ 4, 0, 2, 0 ] The whole field definition. + // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). // // Notes: - // - A location may refer to a repeated field itself (i.e. not to any - // particular index within it). This is used whenever a set of elements are - // logically enclosed in a single code segment. For example, an entire - // extend block (possibly containing multiple extension definitions) will - // have an outer location whose path refers to the "extensions" repeated - // field without an index. - // - Multiple locations may have the same path. This happens when a single - // logical declaration is spread out across multiple places. The most - // obvious example is the "extend" block again -- there may be multiple - // extend blocks in the same scope, each of which will have the same path. - // - A location's span is not always a subset of its parent's span. For - // example, the "extendee" of an extension declaration appears at the - // beginning of the "extend" block and is shared by all extensions within - // the block. - // - Just because a location's span is a subset of some other location's span - // does not mean that it is a descendant. For example, a "group" defines - // both a type and a field in a single declaration. Thus, the locations - // corresponding to the type and field and their components will overlap. - // - Code which tries to interpret locations should probably be designed to - // ignore those that it doesn't understand, as more types of locations could - // be recorded in the future. + // - A location may refer to a repeated field itself (i.e. not to any + // particular index within it). This is used whenever a set of elements are + // logically enclosed in a single code segment. For example, an entire + // extend block (possibly containing multiple extension definitions) will + // have an outer location whose path refers to the "extensions" repeated + // field without an index. + // - Multiple locations may have the same path. This happens when a single + // logical declaration is spread out across multiple places. The most + // obvious example is the "extend" block again -- there may be multiple + // extend blocks in the same scope, each of which will have the same path. + // - A location's span is not always a subset of its parent's span. For + // example, the "extendee" of an extension declaration appears at the + // beginning of the "extend" block and is shared by all extensions within + // the block. + // - Just because a location's span is a subset of some other location's span + // does not mean that it is a descendant. For example, a "group" defines + // both a type and a field in a single declaration. Thus, the locations + // corresponding to the type and field and their components will overlap. + // - Code which tries to interpret locations should probably be designed to + // ignore those that it doesn't understand, as more types of locations could + // be recorded in the future. Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"` } @@ -2715,8 +3024,8 @@ func (x *EnumDescriptorProto_EnumReservedRange) GetEnd() int32 { // The name of the uninterpreted option. Each string represents a segment in // a dot-separated name. is_extension is true iff a segment represents an // extension (denoted with parentheses in options specs in .proto files). -// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents -// "foo.(bar.baz).qux". +// E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents +// "foo.(bar.baz).moo". type UninterpretedOption_NamePart struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2781,23 +3090,34 @@ type SourceCodeInfo_Location struct { // location. // // Each element is a field number or an index. They form a path from - // the root FileDescriptorProto to the place where the definition. For - // example, this path: - // [ 4, 3, 2, 7, 1 ] + // the root FileDescriptorProto to the place where the definition occurs. + // For example, this path: + // + // [ 4, 3, 2, 7, 1 ] + // // refers to: - // file.message_type(3) // 4, 3 - // .field(7) // 2, 7 - // .name() // 1 + // + // file.message_type(3) // 4, 3 + // .field(7) // 2, 7 + // .name() // 1 + // // This is because FileDescriptorProto.message_type has field number 4: - // repeated DescriptorProto message_type = 4; + // + // repeated DescriptorProto message_type = 4; + // // and DescriptorProto.field has field number 2: - // repeated FieldDescriptorProto field = 2; + // + // repeated FieldDescriptorProto field = 2; + // // and FieldDescriptorProto.name has field number 1: - // optional string name = 1; + // + // optional string name = 1; // // Thus, the above path gives the location of a field name. If we removed // the last element: - // [ 4, 3, 2, 7 ] + // + // [ 4, 3, 2, 7 ] + // // this path refers to the whole field declaration (from the beginning // of the label to the terminating semicolon). Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` @@ -2826,34 +3146,34 @@ type SourceCodeInfo_Location struct { // // Examples: // - // optional int32 foo = 1; // Comment attached to foo. - // // Comment attached to bar. - // optional int32 bar = 2; + // optional int32 foo = 1; // Comment attached to foo. + // // Comment attached to bar. + // optional int32 bar = 2; // - // optional string baz = 3; - // // Comment attached to baz. - // // Another line attached to baz. + // optional string baz = 3; + // // Comment attached to baz. + // // Another line attached to baz. // - // // Comment attached to qux. - // // - // // Another line attached to qux. - // optional double qux = 4; + // // Comment attached to moo. + // // + // // Another line attached to moo. + // optional double moo = 4; // - // // Detached comment for corge. This is not leading or trailing comments - // // to qux or corge because there are blank lines separating it from - // // both. + // // Detached comment for corge. This is not leading or trailing comments + // // to moo or corge because there are blank lines separating it from + // // both. // - // // Detached comment for corge paragraph 2. + // // Detached comment for corge paragraph 2. // - // optional string corge = 5; - // /* Block comment attached - // * to corge. Leading asterisks - // * will be removed. */ - // /* Block comment attached to - // * grault. */ - // optional int32 grault = 6; + // optional string corge = 5; + // /* Block comment attached + // * to corge. Leading asterisks + // * will be removed. */ + // /* Block comment attached to + // * grault. */ + // optional int32 grault = 6; // - // // ignored detached comments. + // // ignored detached comments. LeadingComments *string `protobuf:"bytes,3,opt,name=leading_comments,json=leadingComments" json:"leading_comments,omitempty"` TrailingComments *string `protobuf:"bytes,4,opt,name=trailing_comments,json=trailingComments" json:"trailing_comments,omitempty"` LeadingDetachedComments []string `protobuf:"bytes,6,rep,name=leading_detached_comments,json=leadingDetachedComments" json:"leading_detached_comments,omitempty"` @@ -2940,9 +3260,10 @@ type GeneratedCodeInfo_Annotation struct { // that relates to the identified object. Begin *int32 `protobuf:"varint,3,opt,name=begin" json:"begin,omitempty"` // Identifies the ending offset in bytes in the generated code that - // relates to the identified offset. The end offset should be one past + // relates to the identified object. The end offset should be one past // the last relevant byte (so the length of the text = end - begin). - End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"` + End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"` + Semantic *GeneratedCodeInfo_Annotation_Semantic `protobuf:"varint,5,opt,name=semantic,enum=google.protobuf.GeneratedCodeInfo_Annotation_Semantic" json:"semantic,omitempty"` } func (x *GeneratedCodeInfo_Annotation) Reset() { @@ -3005,6 +3326,13 @@ func (x *GeneratedCodeInfo_Annotation) GetEnd() int32 { return 0 } +func (x *GeneratedCodeInfo_Annotation) GetSemantic() GeneratedCodeInfo_Annotation_Semantic { + if x != nil && x.Semantic != nil { + return *x.Semantic + } + return GeneratedCodeInfo_Annotation_NONE +} + var File_google_protobuf_descriptor_proto protoreflect.FileDescriptor var file_google_protobuf_descriptor_proto_rawDesc = []byte{ @@ -3016,7 +3344,7 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x66, 0x69, - 0x6c, 0x65, 0x22, 0xe4, 0x04, 0x0a, 0x13, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x6c, 0x65, 0x22, 0xfe, 0x04, 0x0a, 0x13, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, @@ -3054,330 +3382,391 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{ 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x22, 0xb9, 0x06, 0x0a, 0x0f, 0x44, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x43, - 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, 0x6e, 0x65, 0x73, 0x74, - 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, - 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x09, 0x52, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0xb9, 0x06, 0x0a, 0x0f, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x43, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, + 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, - 0x6e, 0x67, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x64, 0x65, 0x63, - 0x6c, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, - 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x63, 0x6c, 0x12, 0x39, 0x0a, 0x07, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, - 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0d, 0x72, 0x65, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, - 0x1a, 0x7a, 0x0a, 0x0e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, - 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x40, 0x0a, 0x07, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x37, 0x0a, 0x0d, - 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x7c, 0x0a, 0x15, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x58, - 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, - 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, - 0x80, 0x80, 0x02, 0x22, 0xc1, 0x06, 0x0a, 0x14, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x3e, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, - 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x6e, 0x65, - 0x6f, 0x66, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, - 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x6a, 0x73, - 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, - 0x73, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0xb6, 0x02, 0x0a, 0x04, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x4f, 0x55, 0x42, 0x4c, - 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x4f, 0x41, - 0x54, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x36, - 0x34, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, - 0x36, 0x34, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, - 0x33, 0x32, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x58, - 0x45, 0x44, 0x36, 0x34, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, - 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x0b, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x0d, 0x12, 0x0d, 0x0a, 0x09, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x0f, 0x12, 0x11, 0x0a, - 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x10, 0x10, - 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, - 0x11, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, 0x36, 0x34, - 0x10, 0x12, 0x22, 0x43, 0x0a, 0x05, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x0e, 0x4c, - 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, - 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, - 0x44, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x50, - 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, 0x22, 0x63, 0x0a, 0x14, 0x4f, 0x6e, 0x65, 0x6f, 0x66, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xe3, 0x02, 0x0a, - 0x13, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x5d, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x61, - 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x3b, 0x0a, 0x11, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, - 0x6e, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x18, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa7, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, - 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x39, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x22, 0x89, 0x02, 0x0a, 0x15, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x38, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x10, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x30, 0x0a, 0x10, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x22, 0x91, - 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, - 0x0a, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x61, 0x76, 0x61, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, - 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x12, 0x6a, 0x61, 0x76, 0x61, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6d, 0x75, 0x6c, 0x74, - 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, - 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x6a, 0x61, 0x76, 0x61, 0x4d, 0x75, 0x6c, - 0x74, 0x69, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x1d, 0x6a, 0x61, - 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x71, 0x75, 0x61, - 0x6c, 0x73, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x14, 0x20, 0x01, 0x28, - 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x19, 0x6a, 0x61, 0x76, 0x61, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x45, 0x71, 0x75, 0x61, 0x6c, 0x73, 0x41, 0x6e, 0x64, 0x48, 0x61, 0x73, 0x68, - 0x12, 0x3a, 0x0a, 0x16, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x75, 0x74, 0x66, 0x38, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x08, - 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x74, 0x66, 0x38, 0x12, 0x53, 0x0a, 0x0c, - 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x3a, 0x05, 0x53, - 0x50, 0x45, 0x45, 0x44, 0x52, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x46, 0x6f, - 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x6f, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x12, 0x35, 0x0a, 0x13, 0x63, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, - 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x63, 0x63, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x15, 0x6a, 0x61, 0x76, 0x61, 0x5f, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x13, 0x6a, - 0x61, 0x76, 0x61, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x12, 0x35, 0x0a, 0x13, 0x70, 0x79, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, - 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x3a, - 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x70, 0x79, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, - 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x14, 0x70, 0x68, 0x70, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x44, 0x0a, + 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x18, 0x08, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x44, + 0x65, 0x63, 0x6c, 0x12, 0x39, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, + 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, + 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x7a, 0x0a, 0x0e, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x03, 0x65, 0x6e, 0x64, 0x12, 0x40, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x37, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, + 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, + 0x7c, 0x0a, 0x15, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, + 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xc1, 0x06, + 0x0a, 0x14, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x41, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x05, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x3e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x12, 0x23, + 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x73, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x11, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x22, 0xb6, 0x02, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, + 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x02, 0x12, 0x0e, 0x0a, + 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x03, 0x12, 0x0f, 0x0a, + 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x0e, + 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x05, 0x12, 0x10, + 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x10, 0x06, + 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, + 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x10, + 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, + 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, + 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, + 0x47, 0x45, 0x10, 0x0b, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x59, 0x54, + 0x45, 0x53, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, + 0x54, 0x33, 0x32, 0x10, 0x0d, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, + 0x55, 0x4d, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, + 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x0f, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x10, 0x10, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x11, 0x12, 0x0f, 0x0a, 0x0b, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x12, 0x22, 0x43, 0x0a, 0x05, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4f, + 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, + 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x12, 0x12, 0x0a, + 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x50, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, + 0x03, 0x22, 0x63, 0x0a, 0x14, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, + 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xe3, 0x02, 0x0a, 0x13, 0x45, 0x6e, 0x75, 0x6d, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5d, 0x0a, 0x0e, 0x72, + 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x1a, + 0x3b, 0x0a, 0x11, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, + 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x83, 0x01, 0x0a, + 0x18, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0xa7, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x12, 0x39, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x89, 0x02, 0x0a, + 0x15, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, + 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x10, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, + 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x30, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, + 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x22, 0x91, 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, + 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6a, 0x61, 0x76, 0x61, + 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x6a, 0x61, 0x76, 0x61, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6a, + 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6a, 0x61, 0x76, 0x61, 0x4f, + 0x75, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, + 0x13, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, + 0x69, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, + 0x65, 0x52, 0x11, 0x6a, 0x61, 0x76, 0x61, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x46, + 0x69, 0x6c, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x1d, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x73, 0x5f, 0x61, 0x6e, 0x64, + 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, + 0x19, 0x6a, 0x61, 0x76, 0x61, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x45, 0x71, 0x75, + 0x61, 0x6c, 0x73, 0x41, 0x6e, 0x64, 0x48, 0x61, 0x73, 0x68, 0x12, 0x3a, 0x0a, 0x16, 0x6a, 0x61, + 0x76, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, + 0x75, 0x74, 0x66, 0x38, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, + 0x65, 0x52, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x55, 0x74, 0x66, 0x38, 0x12, 0x53, 0x0a, 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, + 0x7a, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6d, + 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x3a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x52, 0x0b, + 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x46, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x67, + 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x67, 0x6f, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x63, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x12, - 0x70, 0x68, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x63, 0x5f, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x18, 0x1f, 0x20, - 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x0e, 0x63, 0x63, 0x45, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x6a, - 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x24, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x18, 0x27, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x77, 0x69, 0x66, 0x74, 0x50, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x12, 0x28, 0x0a, 0x10, 0x70, 0x68, 0x70, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, - 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, - 0x68, 0x70, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x23, 0x0a, - 0x0d, 0x70, 0x68, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x29, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x68, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x68, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x2c, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x14, 0x70, 0x68, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x75, 0x62, 0x79, - 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x72, 0x75, 0x62, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x58, 0x0a, 0x14, 0x75, - 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, - 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x10, 0x01, - 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x10, 0x02, 0x12, - 0x10, 0x0a, 0x0c, 0x4c, 0x49, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, - 0x03, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x26, - 0x10, 0x27, 0x22, 0xd1, 0x02, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x12, 0x4c, 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, - 0x72, 0x64, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, - 0x6c, 0x73, 0x65, 0x52, 0x1c, 0x6e, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, - 0x72, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, - 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, 0x70, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, + 0x63, 0x63, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x12, 0x39, 0x0a, 0x15, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, + 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, + 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x13, + 0x70, 0x79, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, + 0x52, 0x11, 0x70, 0x79, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x14, 0x70, 0x68, 0x70, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x2a, 0x20, 0x01, 0x28, + 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x12, 0x70, 0x68, 0x70, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, + 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, + 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, + 0x72, 0x75, 0x65, 0x52, 0x0e, 0x63, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x72, 0x65, + 0x6e, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, + 0x6f, 0x62, 0x6a, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, + 0x29, 0x0a, 0x10, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x73, 0x68, 0x61, 0x72, + 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x77, + 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x27, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x73, 0x77, 0x69, 0x66, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x28, 0x0a, + 0x10, 0x70, 0x68, 0x70, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x68, 0x70, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x68, 0x70, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x29, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x70, 0x68, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x16, + 0x70, 0x68, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x70, 0x68, + 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x75, 0x62, 0x79, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x75, 0x62, 0x79, 0x50, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, - 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, - 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0xe2, 0x03, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x3a, 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, + 0x09, 0x0a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, + 0x44, 0x45, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x49, 0x54, + 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x03, 0x2a, 0x09, 0x08, 0xe8, 0x07, + 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x26, 0x10, 0x27, 0x22, 0xbb, 0x03, 0x0a, + 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x3c, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x77, + 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x53, 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4c, 0x0a, + 0x1f, 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x1c, 0x6e, + 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0a, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, + 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, + 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, + 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, + 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, + 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, + 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, + 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, + 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0xb7, 0x08, 0x0a, 0x0c, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, + 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x06, 0x53, 0x54, 0x52, - 0x49, 0x4e, 0x47, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, - 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x61, 0x63, 0x6b, - 0x65, 0x64, 0x12, 0x47, 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, - 0x4d, 0x41, 0x4c, 0x52, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x04, 0x6c, - 0x61, 0x7a, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, - 0x52, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, - 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, - 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, - 0x04, 0x77, 0x65, 0x61, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, - 0x73, 0x65, 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, - 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x2f, 0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, - 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x52, 0x44, 0x10, - 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x49, 0x45, 0x43, - 0x45, 0x10, 0x02, 0x22, 0x35, 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, - 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, - 0x4a, 0x53, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, - 0x53, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, - 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x73, 0x0a, 0x0c, 0x4f, - 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, + 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x52, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x19, 0x0a, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, + 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x12, 0x2e, 0x0a, 0x0f, 0x75, 0x6e, + 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0e, 0x75, 0x6e, 0x76, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x4c, 0x61, 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, + 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x19, 0x0a, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, + 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x28, 0x0a, 0x0c, + 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x10, 0x20, 0x01, + 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, + 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x4b, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x12, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, - 0x22, 0xc0, 0x01, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x69, 0x61, - 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, - 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, - 0x05, 0x10, 0x06, 0x22, 0x9e, 0x01, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2f, 0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, + 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, + 0x52, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, + 0x49, 0x45, 0x43, 0x45, 0x10, 0x02, 0x22, 0x35, 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, + 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, + 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0x55, 0x0a, + 0x0f, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x14, + 0x0a, 0x10, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, + 0x43, 0x45, 0x10, 0x02, 0x22, 0x8c, 0x02, 0x0a, 0x10, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, + 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x52, 0x47, + 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x54, 0x45, 0x4e, 0x53, 0x49, 0x4f, + 0x4e, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, + 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, + 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, + 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x4e, 0x45, 0x4f, 0x46, 0x10, 0x05, + 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x06, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, + 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x54, + 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, + 0x44, 0x10, 0x09, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, + 0x08, 0x04, 0x10, 0x05, 0x22, 0x73, 0x0a, 0x0c, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, + 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, + 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x98, 0x02, 0x0a, 0x0b, 0x45, 0x6e, + 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, + 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, + 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, + 0x08, 0x05, 0x10, 0x06, 0x22, 0x9e, 0x01, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, + 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, + 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, + 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, + 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9c, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, - 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, + 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, @@ -3385,97 +3774,95 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{ 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, - 0x80, 0x80, 0x80, 0x02, 0x22, 0x9c, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, - 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, - 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x80, 0x80, 0x80, 0x02, 0x22, 0xe0, 0x02, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, + 0x61, 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, + 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, + 0x11, 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, + 0x65, 0x6c, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, + 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, + 0x4f, 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, + 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, + 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, + 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x10, 0x49, 0x64, + 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x17, + 0x0a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x4f, 0x5f, 0x53, 0x49, + 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, 0x53, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, + 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x2a, 0x09, 0x08, 0xe8, + 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9a, 0x03, 0x0a, 0x13, 0x55, 0x6e, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, - 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, - 0x80, 0x80, 0x02, 0x22, 0xe0, 0x02, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, - 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, - 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, - 0x6c, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, - 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, - 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, - 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, - 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, - 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, - 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x10, 0x49, 0x64, 0x65, - 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, - 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x44, - 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, 0x53, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, - 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, - 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9a, 0x03, 0x0a, 0x13, 0x55, 0x6e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, - 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, - 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, - 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, - 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, - 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x4a, 0x0a, 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x50, - 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, - 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, - 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x22, 0xa7, 0x02, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, - 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xce, 0x01, 0x0a, - 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x42, - 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6c, 0x65, 0x61, - 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, - 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, - 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x74, - 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xd1, 0x01, - 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x1a, 0x6d, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, - 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65, 0x67, - 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x12, - 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, - 0x64, 0x42, 0x7e, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, + 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6e, + 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, + 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, + 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x4a, 0x0a, 0x08, 0x4e, 0x61, 0x6d, 0x65, + 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, + 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, + 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa7, 0x02, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, + 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xce, 0x01, + 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, + 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6c, 0x65, + 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, + 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, + 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, + 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xd0, + 0x02, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x1a, 0xeb, 0x01, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, + 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, + 0x65, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, + 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, + 0x65, 0x6e, 0x64, 0x12, 0x52, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, 0x08, 0x73, + 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x22, 0x28, 0x0a, 0x08, 0x53, 0x65, 0x6d, 0x61, 0x6e, + 0x74, 0x69, 0x63, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x07, 0x0a, + 0x03, 0x53, 0x45, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x49, 0x41, 0x53, 0x10, + 0x02, 0x42, 0x7e, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x48, 0x01, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, @@ -3498,7 +3885,7 @@ func file_google_protobuf_descriptor_proto_rawDescGZIP() []byte { return file_google_protobuf_descriptor_proto_rawDescData } -var file_google_protobuf_descriptor_proto_enumTypes = make([]protoimpl.EnumInfo, 6) +var file_google_protobuf_descriptor_proto_enumTypes = make([]protoimpl.EnumInfo, 9) var file_google_protobuf_descriptor_proto_msgTypes = make([]protoimpl.MessageInfo, 27) var file_google_protobuf_descriptor_proto_goTypes = []interface{}{ (FieldDescriptorProto_Type)(0), // 0: google.protobuf.FieldDescriptorProto.Type @@ -3506,84 +3893,90 @@ var file_google_protobuf_descriptor_proto_goTypes = []interface{}{ (FileOptions_OptimizeMode)(0), // 2: google.protobuf.FileOptions.OptimizeMode (FieldOptions_CType)(0), // 3: google.protobuf.FieldOptions.CType (FieldOptions_JSType)(0), // 4: google.protobuf.FieldOptions.JSType - (MethodOptions_IdempotencyLevel)(0), // 5: google.protobuf.MethodOptions.IdempotencyLevel - (*FileDescriptorSet)(nil), // 6: google.protobuf.FileDescriptorSet - (*FileDescriptorProto)(nil), // 7: google.protobuf.FileDescriptorProto - (*DescriptorProto)(nil), // 8: google.protobuf.DescriptorProto - (*ExtensionRangeOptions)(nil), // 9: google.protobuf.ExtensionRangeOptions - (*FieldDescriptorProto)(nil), // 10: google.protobuf.FieldDescriptorProto - (*OneofDescriptorProto)(nil), // 11: google.protobuf.OneofDescriptorProto - (*EnumDescriptorProto)(nil), // 12: google.protobuf.EnumDescriptorProto - (*EnumValueDescriptorProto)(nil), // 13: google.protobuf.EnumValueDescriptorProto - (*ServiceDescriptorProto)(nil), // 14: google.protobuf.ServiceDescriptorProto - (*MethodDescriptorProto)(nil), // 15: google.protobuf.MethodDescriptorProto - (*FileOptions)(nil), // 16: google.protobuf.FileOptions - (*MessageOptions)(nil), // 17: google.protobuf.MessageOptions - (*FieldOptions)(nil), // 18: google.protobuf.FieldOptions - (*OneofOptions)(nil), // 19: google.protobuf.OneofOptions - (*EnumOptions)(nil), // 20: google.protobuf.EnumOptions - (*EnumValueOptions)(nil), // 21: google.protobuf.EnumValueOptions - (*ServiceOptions)(nil), // 22: google.protobuf.ServiceOptions - (*MethodOptions)(nil), // 23: google.protobuf.MethodOptions - (*UninterpretedOption)(nil), // 24: google.protobuf.UninterpretedOption - (*SourceCodeInfo)(nil), // 25: google.protobuf.SourceCodeInfo - (*GeneratedCodeInfo)(nil), // 26: google.protobuf.GeneratedCodeInfo - (*DescriptorProto_ExtensionRange)(nil), // 27: google.protobuf.DescriptorProto.ExtensionRange - (*DescriptorProto_ReservedRange)(nil), // 28: google.protobuf.DescriptorProto.ReservedRange - (*EnumDescriptorProto_EnumReservedRange)(nil), // 29: google.protobuf.EnumDescriptorProto.EnumReservedRange - (*UninterpretedOption_NamePart)(nil), // 30: google.protobuf.UninterpretedOption.NamePart - (*SourceCodeInfo_Location)(nil), // 31: google.protobuf.SourceCodeInfo.Location - (*GeneratedCodeInfo_Annotation)(nil), // 32: google.protobuf.GeneratedCodeInfo.Annotation + (FieldOptions_OptionRetention)(0), // 5: google.protobuf.FieldOptions.OptionRetention + (FieldOptions_OptionTargetType)(0), // 6: google.protobuf.FieldOptions.OptionTargetType + (MethodOptions_IdempotencyLevel)(0), // 7: google.protobuf.MethodOptions.IdempotencyLevel + (GeneratedCodeInfo_Annotation_Semantic)(0), // 8: google.protobuf.GeneratedCodeInfo.Annotation.Semantic + (*FileDescriptorSet)(nil), // 9: google.protobuf.FileDescriptorSet + (*FileDescriptorProto)(nil), // 10: google.protobuf.FileDescriptorProto + (*DescriptorProto)(nil), // 11: google.protobuf.DescriptorProto + (*ExtensionRangeOptions)(nil), // 12: google.protobuf.ExtensionRangeOptions + (*FieldDescriptorProto)(nil), // 13: google.protobuf.FieldDescriptorProto + (*OneofDescriptorProto)(nil), // 14: google.protobuf.OneofDescriptorProto + (*EnumDescriptorProto)(nil), // 15: google.protobuf.EnumDescriptorProto + (*EnumValueDescriptorProto)(nil), // 16: google.protobuf.EnumValueDescriptorProto + (*ServiceDescriptorProto)(nil), // 17: google.protobuf.ServiceDescriptorProto + (*MethodDescriptorProto)(nil), // 18: google.protobuf.MethodDescriptorProto + (*FileOptions)(nil), // 19: google.protobuf.FileOptions + (*MessageOptions)(nil), // 20: google.protobuf.MessageOptions + (*FieldOptions)(nil), // 21: google.protobuf.FieldOptions + (*OneofOptions)(nil), // 22: google.protobuf.OneofOptions + (*EnumOptions)(nil), // 23: google.protobuf.EnumOptions + (*EnumValueOptions)(nil), // 24: google.protobuf.EnumValueOptions + (*ServiceOptions)(nil), // 25: google.protobuf.ServiceOptions + (*MethodOptions)(nil), // 26: google.protobuf.MethodOptions + (*UninterpretedOption)(nil), // 27: google.protobuf.UninterpretedOption + (*SourceCodeInfo)(nil), // 28: google.protobuf.SourceCodeInfo + (*GeneratedCodeInfo)(nil), // 29: google.protobuf.GeneratedCodeInfo + (*DescriptorProto_ExtensionRange)(nil), // 30: google.protobuf.DescriptorProto.ExtensionRange + (*DescriptorProto_ReservedRange)(nil), // 31: google.protobuf.DescriptorProto.ReservedRange + (*EnumDescriptorProto_EnumReservedRange)(nil), // 32: google.protobuf.EnumDescriptorProto.EnumReservedRange + (*UninterpretedOption_NamePart)(nil), // 33: google.protobuf.UninterpretedOption.NamePart + (*SourceCodeInfo_Location)(nil), // 34: google.protobuf.SourceCodeInfo.Location + (*GeneratedCodeInfo_Annotation)(nil), // 35: google.protobuf.GeneratedCodeInfo.Annotation } var file_google_protobuf_descriptor_proto_depIdxs = []int32{ - 7, // 0: google.protobuf.FileDescriptorSet.file:type_name -> google.protobuf.FileDescriptorProto - 8, // 1: google.protobuf.FileDescriptorProto.message_type:type_name -> google.protobuf.DescriptorProto - 12, // 2: google.protobuf.FileDescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto - 14, // 3: google.protobuf.FileDescriptorProto.service:type_name -> google.protobuf.ServiceDescriptorProto - 10, // 4: google.protobuf.FileDescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto - 16, // 5: google.protobuf.FileDescriptorProto.options:type_name -> google.protobuf.FileOptions - 25, // 6: google.protobuf.FileDescriptorProto.source_code_info:type_name -> google.protobuf.SourceCodeInfo - 10, // 7: google.protobuf.DescriptorProto.field:type_name -> google.protobuf.FieldDescriptorProto - 10, // 8: google.protobuf.DescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto - 8, // 9: google.protobuf.DescriptorProto.nested_type:type_name -> google.protobuf.DescriptorProto - 12, // 10: google.protobuf.DescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto - 27, // 11: google.protobuf.DescriptorProto.extension_range:type_name -> google.protobuf.DescriptorProto.ExtensionRange - 11, // 12: google.protobuf.DescriptorProto.oneof_decl:type_name -> google.protobuf.OneofDescriptorProto - 17, // 13: google.protobuf.DescriptorProto.options:type_name -> google.protobuf.MessageOptions - 28, // 14: google.protobuf.DescriptorProto.reserved_range:type_name -> google.protobuf.DescriptorProto.ReservedRange - 24, // 15: google.protobuf.ExtensionRangeOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 10, // 0: google.protobuf.FileDescriptorSet.file:type_name -> google.protobuf.FileDescriptorProto + 11, // 1: google.protobuf.FileDescriptorProto.message_type:type_name -> google.protobuf.DescriptorProto + 15, // 2: google.protobuf.FileDescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto + 17, // 3: google.protobuf.FileDescriptorProto.service:type_name -> google.protobuf.ServiceDescriptorProto + 13, // 4: google.protobuf.FileDescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto + 19, // 5: google.protobuf.FileDescriptorProto.options:type_name -> google.protobuf.FileOptions + 28, // 6: google.protobuf.FileDescriptorProto.source_code_info:type_name -> google.protobuf.SourceCodeInfo + 13, // 7: google.protobuf.DescriptorProto.field:type_name -> google.protobuf.FieldDescriptorProto + 13, // 8: google.protobuf.DescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto + 11, // 9: google.protobuf.DescriptorProto.nested_type:type_name -> google.protobuf.DescriptorProto + 15, // 10: google.protobuf.DescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto + 30, // 11: google.protobuf.DescriptorProto.extension_range:type_name -> google.protobuf.DescriptorProto.ExtensionRange + 14, // 12: google.protobuf.DescriptorProto.oneof_decl:type_name -> google.protobuf.OneofDescriptorProto + 20, // 13: google.protobuf.DescriptorProto.options:type_name -> google.protobuf.MessageOptions + 31, // 14: google.protobuf.DescriptorProto.reserved_range:type_name -> google.protobuf.DescriptorProto.ReservedRange + 27, // 15: google.protobuf.ExtensionRangeOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption 1, // 16: google.protobuf.FieldDescriptorProto.label:type_name -> google.protobuf.FieldDescriptorProto.Label 0, // 17: google.protobuf.FieldDescriptorProto.type:type_name -> google.protobuf.FieldDescriptorProto.Type - 18, // 18: google.protobuf.FieldDescriptorProto.options:type_name -> google.protobuf.FieldOptions - 19, // 19: google.protobuf.OneofDescriptorProto.options:type_name -> google.protobuf.OneofOptions - 13, // 20: google.protobuf.EnumDescriptorProto.value:type_name -> google.protobuf.EnumValueDescriptorProto - 20, // 21: google.protobuf.EnumDescriptorProto.options:type_name -> google.protobuf.EnumOptions - 29, // 22: google.protobuf.EnumDescriptorProto.reserved_range:type_name -> google.protobuf.EnumDescriptorProto.EnumReservedRange - 21, // 23: google.protobuf.EnumValueDescriptorProto.options:type_name -> google.protobuf.EnumValueOptions - 15, // 24: google.protobuf.ServiceDescriptorProto.method:type_name -> google.protobuf.MethodDescriptorProto - 22, // 25: google.protobuf.ServiceDescriptorProto.options:type_name -> google.protobuf.ServiceOptions - 23, // 26: google.protobuf.MethodDescriptorProto.options:type_name -> google.protobuf.MethodOptions + 21, // 18: google.protobuf.FieldDescriptorProto.options:type_name -> google.protobuf.FieldOptions + 22, // 19: google.protobuf.OneofDescriptorProto.options:type_name -> google.protobuf.OneofOptions + 16, // 20: google.protobuf.EnumDescriptorProto.value:type_name -> google.protobuf.EnumValueDescriptorProto + 23, // 21: google.protobuf.EnumDescriptorProto.options:type_name -> google.protobuf.EnumOptions + 32, // 22: google.protobuf.EnumDescriptorProto.reserved_range:type_name -> google.protobuf.EnumDescriptorProto.EnumReservedRange + 24, // 23: google.protobuf.EnumValueDescriptorProto.options:type_name -> google.protobuf.EnumValueOptions + 18, // 24: google.protobuf.ServiceDescriptorProto.method:type_name -> google.protobuf.MethodDescriptorProto + 25, // 25: google.protobuf.ServiceDescriptorProto.options:type_name -> google.protobuf.ServiceOptions + 26, // 26: google.protobuf.MethodDescriptorProto.options:type_name -> google.protobuf.MethodOptions 2, // 27: google.protobuf.FileOptions.optimize_for:type_name -> google.protobuf.FileOptions.OptimizeMode - 24, // 28: google.protobuf.FileOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 24, // 29: google.protobuf.MessageOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 27, // 28: google.protobuf.FileOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 27, // 29: google.protobuf.MessageOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption 3, // 30: google.protobuf.FieldOptions.ctype:type_name -> google.protobuf.FieldOptions.CType 4, // 31: google.protobuf.FieldOptions.jstype:type_name -> google.protobuf.FieldOptions.JSType - 24, // 32: google.protobuf.FieldOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 24, // 33: google.protobuf.OneofOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 24, // 34: google.protobuf.EnumOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 24, // 35: google.protobuf.EnumValueOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 24, // 36: google.protobuf.ServiceOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 5, // 37: google.protobuf.MethodOptions.idempotency_level:type_name -> google.protobuf.MethodOptions.IdempotencyLevel - 24, // 38: google.protobuf.MethodOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 30, // 39: google.protobuf.UninterpretedOption.name:type_name -> google.protobuf.UninterpretedOption.NamePart - 31, // 40: google.protobuf.SourceCodeInfo.location:type_name -> google.protobuf.SourceCodeInfo.Location - 32, // 41: google.protobuf.GeneratedCodeInfo.annotation:type_name -> google.protobuf.GeneratedCodeInfo.Annotation - 9, // 42: google.protobuf.DescriptorProto.ExtensionRange.options:type_name -> google.protobuf.ExtensionRangeOptions - 43, // [43:43] is the sub-list for method output_type - 43, // [43:43] is the sub-list for method input_type - 43, // [43:43] is the sub-list for extension type_name - 43, // [43:43] is the sub-list for extension extendee - 0, // [0:43] is the sub-list for field type_name + 5, // 32: google.protobuf.FieldOptions.retention:type_name -> google.protobuf.FieldOptions.OptionRetention + 6, // 33: google.protobuf.FieldOptions.target:type_name -> google.protobuf.FieldOptions.OptionTargetType + 27, // 34: google.protobuf.FieldOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 27, // 35: google.protobuf.OneofOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 27, // 36: google.protobuf.EnumOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 27, // 37: google.protobuf.EnumValueOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 27, // 38: google.protobuf.ServiceOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 7, // 39: google.protobuf.MethodOptions.idempotency_level:type_name -> google.protobuf.MethodOptions.IdempotencyLevel + 27, // 40: google.protobuf.MethodOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 33, // 41: google.protobuf.UninterpretedOption.name:type_name -> google.protobuf.UninterpretedOption.NamePart + 34, // 42: google.protobuf.SourceCodeInfo.location:type_name -> google.protobuf.SourceCodeInfo.Location + 35, // 43: google.protobuf.GeneratedCodeInfo.annotation:type_name -> google.protobuf.GeneratedCodeInfo.Annotation + 12, // 44: google.protobuf.DescriptorProto.ExtensionRange.options:type_name -> google.protobuf.ExtensionRangeOptions + 8, // 45: google.protobuf.GeneratedCodeInfo.Annotation.semantic:type_name -> google.protobuf.GeneratedCodeInfo.Annotation.Semantic + 46, // [46:46] is the sub-list for method output_type + 46, // [46:46] is the sub-list for method input_type + 46, // [46:46] is the sub-list for extension type_name + 46, // [46:46] is the sub-list for extension extendee + 0, // [0:46] is the sub-list for field type_name } func init() { file_google_protobuf_descriptor_proto_init() } @@ -3940,7 +4333,7 @@ func file_google_protobuf_descriptor_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_google_protobuf_descriptor_proto_rawDesc, - NumEnums: 6, + NumEnums: 9, NumMessages: 27, NumExtensions: 0, NumServices: 0, diff --git a/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go b/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go index 8c10797b905e7..a6c7a33f33368 100644 --- a/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go @@ -37,8 +37,7 @@ // It is functionally a tuple of the full name of the remote message type and // the serialized bytes of the remote message value. // -// -// Constructing an Any +// # Constructing an Any // // An Any message containing another message value is constructed using New: // @@ -48,8 +47,7 @@ // } // ... // make use of any // -// -// Unmarshaling an Any +// # Unmarshaling an Any // // With a populated Any message, the underlying message can be serialized into // a remote concrete message value in a few ways. @@ -95,8 +93,7 @@ // listed in the case clauses are linked into the Go binary and therefore also // registered in the global registry. // -// -// Type checking an Any +// # Type checking an Any // // In order to type check whether an Any message represents some other message, // then use the MessageIs method: @@ -115,7 +112,6 @@ // } // ... // make use of m // } -// package anypb import ( @@ -136,45 +132,49 @@ import ( // // Example 1: Pack and unpack a message in C++. // -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } // // Example 2: Pack and unpack a message in Java. // -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := anypb.New(foo) -// if err != nil { -// ... -// } -// ... -// foo := &pb.Foo{} -// if err := any.UnmarshalTo(foo); err != nil { -// ... -// } +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// // or ... +// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +// foo = any.unpack(Foo.getDefaultInstance()); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(foo); err != nil { +// ... +// } // // The pack methods provided by protobuf library will by default use // 'type.googleapis.com/full.type.name' as the type URL and the unpack @@ -182,35 +182,33 @@ import ( // in the type URL, for example "foo.bar.com/x/y.z" will yield type // name "y.z". // +// # JSON // -// JSON -// ==== // The JSON representation of an `Any` value uses the regular // representation of the deserialized, embedded message, with an // additional field `@type` which contains the type URL. Example: // -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } // -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } // // If the embedded message type is well-known and has a custom JSON // representation, that representation will be embedded adding a field // `value` which holds the custom JSON in addition to the `@type` // field. Example (for message [google.protobuf.Duration][]): // -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } -// +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } type Any struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -228,14 +226,14 @@ type Any struct { // scheme `http`, `https`, or no scheme, one can optionally set up a type // server that maps type URLs to message definitions as follows: // - // * If no scheme is provided, `https` is assumed. - // * An HTTP GET on the URL must yield a [google.protobuf.Type][] - // value in binary format, or produce an error. - // * Applications are allowed to cache lookup results based on the - // URL, or have them precompiled into a binary to avoid any - // lookup. Therefore, binary compatibility needs to be preserved - // on changes to types. (Use versioned type names to manage - // breaking changes.) + // - If no scheme is provided, `https` is assumed. + // - An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // - Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) // // Note: this functionality is not currently available in the official // protobuf release, and it is not used for type URLs beginning with @@ -243,7 +241,6 @@ type Any struct { // // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. - // TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` // Must be a valid serialized protocol buffer of the above specified type. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` diff --git a/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go b/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go index a583ca2f6c771..df709a8dd4c25 100644 --- a/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go @@ -35,8 +35,7 @@ // // The Duration message represents a signed span of time. // -// -// Conversion to a Go Duration +// # Conversion to a Go Duration // // The AsDuration method can be used to convert a Duration message to a // standard Go time.Duration value: @@ -65,15 +64,13 @@ // the resulting value to the closest representable value (e.g., math.MaxInt64 // for positive overflow and math.MinInt64 for negative overflow). // -// -// Conversion from a Go Duration +// # Conversion from a Go Duration // // The durationpb.New function can be used to construct a Duration message // from a standard Go time.Duration value: // // dur := durationpb.New(d) // ... // make use of d as a *durationpb.Duration -// package durationpb import ( @@ -96,43 +93,43 @@ import ( // // Example 1: Compute Duration from two Timestamps in pseudo code. // -// Timestamp start = ...; -// Timestamp end = ...; -// Duration duration = ...; +// Timestamp start = ...; +// Timestamp end = ...; +// Duration duration = ...; // -// duration.seconds = end.seconds - start.seconds; -// duration.nanos = end.nanos - start.nanos; +// duration.seconds = end.seconds - start.seconds; +// duration.nanos = end.nanos - start.nanos; // -// if (duration.seconds < 0 && duration.nanos > 0) { -// duration.seconds += 1; -// duration.nanos -= 1000000000; -// } else if (duration.seconds > 0 && duration.nanos < 0) { -// duration.seconds -= 1; -// duration.nanos += 1000000000; -// } +// if (duration.seconds < 0 && duration.nanos > 0) { +// duration.seconds += 1; +// duration.nanos -= 1000000000; +// } else if (duration.seconds > 0 && duration.nanos < 0) { +// duration.seconds -= 1; +// duration.nanos += 1000000000; +// } // // Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. // -// Timestamp start = ...; -// Duration duration = ...; -// Timestamp end = ...; +// Timestamp start = ...; +// Duration duration = ...; +// Timestamp end = ...; // -// end.seconds = start.seconds + duration.seconds; -// end.nanos = start.nanos + duration.nanos; +// end.seconds = start.seconds + duration.seconds; +// end.nanos = start.nanos + duration.nanos; // -// if (end.nanos < 0) { -// end.seconds -= 1; -// end.nanos += 1000000000; -// } else if (end.nanos >= 1000000000) { -// end.seconds += 1; -// end.nanos -= 1000000000; -// } +// if (end.nanos < 0) { +// end.seconds -= 1; +// end.nanos += 1000000000; +// } else if (end.nanos >= 1000000000) { +// end.seconds += 1; +// end.nanos -= 1000000000; +// } // // Example 3: Compute Duration from datetime.timedelta in Python. // -// td = datetime.timedelta(days=3, minutes=10) -// duration = Duration() -// duration.FromTimedelta(td) +// td = datetime.timedelta(days=3, minutes=10) +// duration = Duration() +// duration.FromTimedelta(td) // // # JSON Mapping // @@ -143,8 +140,6 @@ import ( // encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should // be expressed in JSON format as "3.000000001s", and 3 seconds and 1 // microsecond should be expressed in JSON format as "3.000001s". -// -// type Duration struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/vendor/google.golang.org/protobuf/types/known/emptypb/empty.pb.go b/vendor/google.golang.org/protobuf/types/known/emptypb/empty.pb.go index e7fcea31f6279..9a7277ba394ce 100644 --- a/vendor/google.golang.org/protobuf/types/known/emptypb/empty.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/emptypb/empty.pb.go @@ -44,11 +44,9 @@ import ( // empty messages in your APIs. A typical example is to use it as the request // or the response type of an API method. For instance: // -// service Foo { -// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); -// } -// -// The JSON representation for `Empty` is empty JSON object `{}`. +// service Foo { +// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); +// } type Empty struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go b/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go index 586690522a49e..9577ed593c9ce 100644 --- a/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go @@ -44,8 +44,7 @@ // "google.golang.org/protobuf/encoding/protojson" package // ensures that they will be serialized as their JSON equivalent. // -// -// Conversion to and from a Go interface +// # Conversion to and from a Go interface // // The standard Go "encoding/json" package has functionality to serialize // arbitrary types to a large degree. The Value.AsInterface, Struct.AsMap, and @@ -58,8 +57,7 @@ // forms back as Value, Struct, and ListValue messages, use the NewStruct, // NewList, and NewValue constructor functions. // -// -// Example usage +// # Example usage // // Consider the following example JSON object: // @@ -118,7 +116,6 @@ // ... // handle error // } // ... // make use of m as a *structpb.Value -// package structpb import ( @@ -135,7 +132,7 @@ import ( // `NullValue` is a singleton enumeration to represent the null value for the // `Value` type union. // -// The JSON representation for `NullValue` is JSON `null`. +// The JSON representation for `NullValue` is JSON `null`. type NullValue int32 const ( @@ -218,8 +215,9 @@ func NewStruct(v map[string]interface{}) (*Struct, error) { // AsMap converts x to a general-purpose Go map. // The map values are converted by calling Value.AsInterface. func (x *Struct) AsMap() map[string]interface{} { - vs := make(map[string]interface{}) - for k, v := range x.GetFields() { + f := x.GetFields() + vs := make(map[string]interface{}, len(f)) + for k, v := range f { vs[k] = v.AsInterface() } return vs @@ -274,8 +272,8 @@ func (x *Struct) GetFields() map[string]*Value { // `Value` represents a dynamically typed value which can be either // null, a number, a string, a boolean, a recursive struct value, or a -// list of values. A producer of value is expected to set one of that -// variants, absence of any variant indicates an error. +// list of values. A producer of value is expected to set one of these +// variants. Absence of any variant indicates an error. // // The JSON representation for `Value` is JSON value. type Value struct { @@ -286,6 +284,7 @@ type Value struct { // The kind of value. // // Types that are assignable to Kind: + // // *Value_NullValue // *Value_NumberValue // *Value_StringValue @@ -596,8 +595,9 @@ func NewList(v []interface{}) (*ListValue, error) { // AsSlice converts x to a general-purpose Go slice. // The slice elements are converted by calling Value.AsInterface. func (x *ListValue) AsSlice() []interface{} { - vs := make([]interface{}, len(x.GetValues())) - for i, v := range x.GetValues() { + vals := x.GetValues() + vs := make([]interface{}, len(vals)) + for i, v := range vals { vs[i] = v.AsInterface() } return vs diff --git a/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go b/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go index c9ae92132aade..61f69fc11b16d 100644 --- a/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go @@ -36,8 +36,7 @@ // The Timestamp message represents a timestamp, // an instant in time since the Unix epoch (January 1st, 1970). // -// -// Conversion to a Go Time +// # Conversion to a Go Time // // The AsTime method can be used to convert a Timestamp message to a // standard Go time.Time value in UTC: @@ -59,8 +58,7 @@ // ... // handle error // } // -// -// Conversion from a Go Time +// # Conversion from a Go Time // // The timestamppb.New function can be used to construct a Timestamp message // from a standard Go time.Time value: @@ -72,7 +70,6 @@ // // ts := timestamppb.Now() // ... // make use of ts as a *timestamppb.Timestamp -// package timestamppb import ( @@ -101,52 +98,50 @@ import ( // // Example 1: Compute Timestamp from POSIX `time()`. // -// Timestamp timestamp; -// timestamp.set_seconds(time(NULL)); -// timestamp.set_nanos(0); +// Timestamp timestamp; +// timestamp.set_seconds(time(NULL)); +// timestamp.set_nanos(0); // // Example 2: Compute Timestamp from POSIX `gettimeofday()`. // -// struct timeval tv; -// gettimeofday(&tv, NULL); +// struct timeval tv; +// gettimeofday(&tv, NULL); // -// Timestamp timestamp; -// timestamp.set_seconds(tv.tv_sec); -// timestamp.set_nanos(tv.tv_usec * 1000); +// Timestamp timestamp; +// timestamp.set_seconds(tv.tv_sec); +// timestamp.set_nanos(tv.tv_usec * 1000); // // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. // -// FILETIME ft; -// GetSystemTimeAsFileTime(&ft); -// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; +// FILETIME ft; +// GetSystemTimeAsFileTime(&ft); +// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // -// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z -// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. -// Timestamp timestamp; -// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); -// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); +// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z +// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. +// Timestamp timestamp; +// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); +// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); // // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. // -// long millis = System.currentTimeMillis(); -// -// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) -// .setNanos((int) ((millis % 1000) * 1000000)).build(); +// long millis = System.currentTimeMillis(); // +// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) +// .setNanos((int) ((millis % 1000) * 1000000)).build(); // // Example 5: Compute Timestamp from Java `Instant.now()`. // -// Instant now = Instant.now(); -// -// Timestamp timestamp = -// Timestamp.newBuilder().setSeconds(now.getEpochSecond()) -// .setNanos(now.getNano()).build(); +// Instant now = Instant.now(); // +// Timestamp timestamp = +// Timestamp.newBuilder().setSeconds(now.getEpochSecond()) +// .setNanos(now.getNano()).build(); // // Example 6: Compute Timestamp from current time in Python. // -// timestamp = Timestamp() -// timestamp.GetCurrentTime() +// timestamp = Timestamp() +// timestamp.GetCurrentTime() // // # JSON Mapping // @@ -174,8 +169,6 @@ import ( // the Joda Time's [`ISODateTimeFormat.dateTime()`]( // http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D // ) to obtain a formatter capable of generating timestamps in this format. -// -// type Timestamp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go b/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go index 895a8049e2210..762a87130f83b 100644 --- a/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go @@ -27,7 +27,7 @@ // 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. - +// // Wrappers for primitive (non-message) types. These types are useful // for embedding primitives in the `google.protobuf.Any` type and for places // where we need to distinguish between the absence of a primitive diff --git a/vendor/modules.txt b/vendor/modules.txt index 7766d8e5d84e0..8cad1d78cf7a4 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -3,8 +3,8 @@ github.com/AdaLogics/go-fuzz-headers # github.com/Azure/azure-sdk-for-go v66.0.0+incompatible ## explicit -github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-03-01/compute -github.com/Azure/azure-sdk-for-go/services/network/mgmt/2020-11-01/network +github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-08-01/compute +github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-08-01/network github.com/Azure/azure-sdk-for-go/version # github.com/Azure/go-autorest v14.2.0+incompatible ## explicit @@ -147,11 +147,11 @@ github.com/beorn7/perks/quantile # github.com/blang/semver/v4 v4.0.0 ## explicit; go 1.14 github.com/blang/semver/v4 -# github.com/census-instrumentation/opencensus-proto v0.3.0 -## explicit +# github.com/census-instrumentation/opencensus-proto v0.4.1 +## explicit; go 1.18 github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1 github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1 -# github.com/cespare/xxhash/v2 v2.1.2 +# github.com/cespare/xxhash/v2 v2.2.0 ## explicit; go 1.11 github.com/cespare/xxhash/v2 # github.com/cilium/customvet v0.0.0-20201209211516-9852765c1ac4 @@ -185,63 +185,229 @@ github.com/cilium/lumberjack/v2 ## explicit; go 1.13 github.com/cilium/proxy/go/cilium/api github.com/cilium/proxy/go/contrib/envoy/extensions/filters/network/mysql_proxy/v3 +github.com/cilium/proxy/go/envoy/admin/v3 github.com/cilium/proxy/go/envoy/annotations github.com/cilium/proxy/go/envoy/config/accesslog/v3 github.com/cilium/proxy/go/envoy/config/bootstrap/v3 +github.com/cilium/proxy/go/envoy/config/cluster/redis github.com/cilium/proxy/go/envoy/config/cluster/v3 github.com/cilium/proxy/go/envoy/config/common/key_value/v3 +github.com/cilium/proxy/go/envoy/config/common/matcher/v3 +github.com/cilium/proxy/go/envoy/config/common/mutation_rules/v3 github.com/cilium/proxy/go/envoy/config/core/v3 github.com/cilium/proxy/go/envoy/config/endpoint/v3 +github.com/cilium/proxy/go/envoy/config/grpc_credential/v3 github.com/cilium/proxy/go/envoy/config/listener/v3 github.com/cilium/proxy/go/envoy/config/metrics/v3 github.com/cilium/proxy/go/envoy/config/overload/v3 github.com/cilium/proxy/go/envoy/config/ratelimit/v3 +github.com/cilium/proxy/go/envoy/config/rbac/v3 +github.com/cilium/proxy/go/envoy/config/retry/previous_priorities github.com/cilium/proxy/go/envoy/config/route/v3 +github.com/cilium/proxy/go/envoy/config/tap/v3 github.com/cilium/proxy/go/envoy/config/trace/v3 +github.com/cilium/proxy/go/envoy/data/accesslog/v3 +github.com/cilium/proxy/go/envoy/data/cluster/v3 +github.com/cilium/proxy/go/envoy/data/core/v3 +github.com/cilium/proxy/go/envoy/data/dns/v3 +github.com/cilium/proxy/go/envoy/data/tap/v3 +github.com/cilium/proxy/go/envoy/extensions/access_loggers/file/v3 +github.com/cilium/proxy/go/envoy/extensions/access_loggers/filters/cel/v3 +github.com/cilium/proxy/go/envoy/extensions/access_loggers/grpc/v3 +github.com/cilium/proxy/go/envoy/extensions/access_loggers/stream/v3 +github.com/cilium/proxy/go/envoy/extensions/access_loggers/wasm/v3 +github.com/cilium/proxy/go/envoy/extensions/bootstrap/internal_listener/v3 +github.com/cilium/proxy/go/envoy/extensions/cache/simple_http_cache/v3 +github.com/cilium/proxy/go/envoy/extensions/clusters/aggregate/v3 github.com/cilium/proxy/go/envoy/extensions/clusters/dynamic_forward_proxy/v3 +github.com/cilium/proxy/go/envoy/extensions/clusters/redis/v3 +github.com/cilium/proxy/go/envoy/extensions/common/async_files/v3 github.com/cilium/proxy/go/envoy/extensions/common/dynamic_forward_proxy/v3 +github.com/cilium/proxy/go/envoy/extensions/common/matching/v3 github.com/cilium/proxy/go/envoy/extensions/common/ratelimit/v3 +github.com/cilium/proxy/go/envoy/extensions/common/tap/v3 +github.com/cilium/proxy/go/envoy/extensions/compression/brotli/compressor/v3 +github.com/cilium/proxy/go/envoy/extensions/compression/brotli/decompressor/v3 +github.com/cilium/proxy/go/envoy/extensions/compression/gzip/compressor/v3 +github.com/cilium/proxy/go/envoy/extensions/compression/gzip/decompressor/v3 +github.com/cilium/proxy/go/envoy/extensions/compression/zstd/compressor/v3 +github.com/cilium/proxy/go/envoy/extensions/compression/zstd/decompressor/v3 +github.com/cilium/proxy/go/envoy/extensions/config/validators/minimum_clusters/v3 +github.com/cilium/proxy/go/envoy/extensions/early_data/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/common/dependency/v3 github.com/cilium/proxy/go/envoy/extensions/filters/common/fault/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/common/matcher/action/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/adaptive_concurrency/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/admission_control/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/alternate_protocols_cache/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/aws_lambda/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/aws_request_signing/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/bandwidth_limit/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/buffer/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/cache/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/cdn_loop/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/composite/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/compressor/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/cors/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/csrf/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/decompressor/v3 github.com/cilium/proxy/go/envoy/extensions/filters/http/dynamic_forward_proxy/v3 github.com/cilium/proxy/go/envoy/extensions/filters/http/ext_authz/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/ext_proc/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/fault/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/file_system_buffer/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/gcp_authn/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_http1_bridge/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_http1_reverse_bridge/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_json_transcoder/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_stats/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/grpc_web/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/gzip/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/header_to_metadata/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/health_check/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/ip_tagging/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/jwt_authn/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/kill_request/v3 github.com/cilium/proxy/go/envoy/extensions/filters/http/local_ratelimit/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/lua/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/oauth2/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/on_demand/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/original_src/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/rate_limit_quota/v3 github.com/cilium/proxy/go/envoy/extensions/filters/http/ratelimit/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/rbac/v3 github.com/cilium/proxy/go/envoy/extensions/filters/http/router/v3 github.com/cilium/proxy/go/envoy/extensions/filters/http/set_metadata/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/stateful_session/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/tap/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/http/wasm/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/listener/http_inspector/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/listener/original_dst/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/listener/original_src/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/listener/proxy_protocol/v3 github.com/cilium/proxy/go/envoy/extensions/filters/listener/tls_inspector/v3 github.com/cilium/proxy/go/envoy/extensions/filters/network/connection_limit/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/network/direct_response/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/network/dubbo_proxy/router/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/network/dubbo_proxy/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/network/echo/v3 github.com/cilium/proxy/go/envoy/extensions/filters/network/ext_authz/v3 github.com/cilium/proxy/go/envoy/extensions/filters/network/http_connection_manager/v3 github.com/cilium/proxy/go/envoy/extensions/filters/network/local_ratelimit/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/matcher/action/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/matcher/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/network/meta_protocol_proxy/v3 github.com/cilium/proxy/go/envoy/extensions/filters/network/mongo_proxy/v3 github.com/cilium/proxy/go/envoy/extensions/filters/network/ratelimit/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/network/rbac/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/network/redis_proxy/v3 github.com/cilium/proxy/go/envoy/extensions/filters/network/sni_cluster/v3 github.com/cilium/proxy/go/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3 github.com/cilium/proxy/go/envoy/extensions/filters/network/tcp_proxy/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/filters/header_to_metadata/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/router/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/network/thrift_proxy/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/network/wasm/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/network/zookeeper_proxy/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/udp/dns_filter/v3 +github.com/cilium/proxy/go/envoy/extensions/filters/udp/udp_proxy/v3 +github.com/cilium/proxy/go/envoy/extensions/formatter/metadata/v3 +github.com/cilium/proxy/go/envoy/extensions/formatter/req_without_query/v3 +github.com/cilium/proxy/go/envoy/extensions/health_checkers/redis/v3 +github.com/cilium/proxy/go/envoy/extensions/http/header_formatters/preserve_case/v3 +github.com/cilium/proxy/go/envoy/extensions/http/header_validators/envoy_default/v3 +github.com/cilium/proxy/go/envoy/extensions/http/original_ip_detection/custom_header/v3 +github.com/cilium/proxy/go/envoy/extensions/http/original_ip_detection/xff/v3 +github.com/cilium/proxy/go/envoy/extensions/http/stateful_session/cookie/v3 +github.com/cilium/proxy/go/envoy/extensions/internal_redirect/allow_listed_routes/v3 +github.com/cilium/proxy/go/envoy/extensions/internal_redirect/previous_routes/v3 +github.com/cilium/proxy/go/envoy/extensions/internal_redirect/safe_cross_scheme/v3 +github.com/cilium/proxy/go/envoy/extensions/key_value/file_based/v3 +github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/least_request/v3 +github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/ring_hash/v3 +github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/round_robin/v3 +github.com/cilium/proxy/go/envoy/extensions/load_balancing_policies/wrr_locality/v3 +github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/environment_variable/v3 +github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/network/v3 +github.com/cilium/proxy/go/envoy/extensions/matching/common_inputs/ssl/v3 +github.com/cilium/proxy/go/envoy/extensions/matching/input_matchers/consistent_hashing/v3 +github.com/cilium/proxy/go/envoy/extensions/matching/input_matchers/ip/v3 +github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/apple/v3 +github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/cares/v3 +github.com/cilium/proxy/go/envoy/extensions/network/dns_resolver/getaddrinfo/v3 +github.com/cilium/proxy/go/envoy/extensions/network/socket_interface/v3 +github.com/cilium/proxy/go/envoy/extensions/quic/crypto_stream/v3 +github.com/cilium/proxy/go/envoy/extensions/quic/proof_source/v3 +github.com/cilium/proxy/go/envoy/extensions/rate_limit_descriptors/expr/v3 +github.com/cilium/proxy/go/envoy/extensions/rbac/matchers/upstream_ip_port/v3 +github.com/cilium/proxy/go/envoy/extensions/regex_engines/v3 +github.com/cilium/proxy/go/envoy/extensions/request_id/uuid/v3 +github.com/cilium/proxy/go/envoy/extensions/resource_monitors/fixed_heap/v3 +github.com/cilium/proxy/go/envoy/extensions/resource_monitors/injected_resource/v3 +github.com/cilium/proxy/go/envoy/extensions/retry/host/omit_canary_hosts/v3 +github.com/cilium/proxy/go/envoy/extensions/retry/host/omit_host_metadata/v3 +github.com/cilium/proxy/go/envoy/extensions/retry/host/previous_hosts/v3 +github.com/cilium/proxy/go/envoy/extensions/retry/priority/previous_priorities/v3 +github.com/cilium/proxy/go/envoy/extensions/stat_sinks/graphite_statsd/v3 +github.com/cilium/proxy/go/envoy/extensions/stat_sinks/wasm/v3 +github.com/cilium/proxy/go/envoy/extensions/transport_sockets/alts/v3 +github.com/cilium/proxy/go/envoy/extensions/transport_sockets/http_11_proxy/v3 +github.com/cilium/proxy/go/envoy/extensions/transport_sockets/internal_upstream/v3 +github.com/cilium/proxy/go/envoy/extensions/transport_sockets/proxy_protocol/v3 +github.com/cilium/proxy/go/envoy/extensions/transport_sockets/quic/v3 +github.com/cilium/proxy/go/envoy/extensions/transport_sockets/raw_buffer/v3 +github.com/cilium/proxy/go/envoy/extensions/transport_sockets/s2a/v3 +github.com/cilium/proxy/go/envoy/extensions/transport_sockets/starttls/v3 +github.com/cilium/proxy/go/envoy/extensions/transport_sockets/tap/v3 +github.com/cilium/proxy/go/envoy/extensions/transport_sockets/tcp_stats/v3 github.com/cilium/proxy/go/envoy/extensions/transport_sockets/tls/v3 +github.com/cilium/proxy/go/envoy/extensions/udp_packet_writer/v3 +github.com/cilium/proxy/go/envoy/extensions/upstreams/http/generic/v3 github.com/cilium/proxy/go/envoy/extensions/upstreams/http/http/v3 github.com/cilium/proxy/go/envoy/extensions/upstreams/http/tcp/v3 github.com/cilium/proxy/go/envoy/extensions/upstreams/http/v3 +github.com/cilium/proxy/go/envoy/extensions/upstreams/tcp/generic/v3 +github.com/cilium/proxy/go/envoy/extensions/wasm/v3 +github.com/cilium/proxy/go/envoy/extensions/watchdog/profile_action/v3 +github.com/cilium/proxy/go/envoy/service/accesslog/v3 +github.com/cilium/proxy/go/envoy/service/auth/v3 github.com/cilium/proxy/go/envoy/service/cluster/v3 github.com/cilium/proxy/go/envoy/service/discovery/v3 github.com/cilium/proxy/go/envoy/service/endpoint/v3 +github.com/cilium/proxy/go/envoy/service/event_reporting/v3 +github.com/cilium/proxy/go/envoy/service/ext_proc/v3 +github.com/cilium/proxy/go/envoy/service/extension/v3 +github.com/cilium/proxy/go/envoy/service/health/v3 github.com/cilium/proxy/go/envoy/service/listener/v3 +github.com/cilium/proxy/go/envoy/service/load_stats/v3 +github.com/cilium/proxy/go/envoy/service/metrics/v3 +github.com/cilium/proxy/go/envoy/service/rate_limit_quota/v3 +github.com/cilium/proxy/go/envoy/service/ratelimit/v3 github.com/cilium/proxy/go/envoy/service/route/v3 +github.com/cilium/proxy/go/envoy/service/runtime/v3 github.com/cilium/proxy/go/envoy/service/secret/v3 +github.com/cilium/proxy/go/envoy/service/status/v3 +github.com/cilium/proxy/go/envoy/service/tap/v3 +github.com/cilium/proxy/go/envoy/service/trace/v3 +github.com/cilium/proxy/go/envoy/type github.com/cilium/proxy/go/envoy/type/http/v3 +github.com/cilium/proxy/go/envoy/type/matcher github.com/cilium/proxy/go/envoy/type/matcher/v3 github.com/cilium/proxy/go/envoy/type/metadata/v3 github.com/cilium/proxy/go/envoy/type/tracing/v3 github.com/cilium/proxy/go/envoy/type/v3 +github.com/cilium/proxy/go/envoy/watchdog/v3 # github.com/cilium/workerpool v1.1.3 ## explicit; go 1.15 github.com/cilium/workerpool -# github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490 +# github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 ## explicit; go 1.11 github.com/cncf/xds/go/udpa/annotations github.com/cncf/xds/go/xds/annotations/v3 github.com/cncf/xds/go/xds/core/v3 github.com/cncf/xds/go/xds/type/matcher/v3 +github.com/cncf/xds/go/xds/type/v3 # github.com/containernetworking/cni v1.1.1 ## explicit; go 1.14 github.com/containernetworking/cni/pkg/invoke @@ -334,8 +500,8 @@ github.com/eapache/queue ## explicit github.com/emicklei/go-restful github.com/emicklei/go-restful/log -# github.com/envoyproxy/protoc-gen-validate v0.6.2 -## explicit; go 1.12 +# github.com/envoyproxy/protoc-gen-validate v0.10.1 +## explicit; go 1.19 github.com/envoyproxy/protoc-gen-validate/validate # github.com/evanphx/json-patch v5.6.0+incompatible ## explicit @@ -450,13 +616,14 @@ github.com/golang-jwt/jwt/v4 # github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da ## explicit github.com/golang/groupcache/lru -# github.com/golang/protobuf v1.5.2 +# github.com/golang/protobuf v1.5.3 ## explicit; go 1.9 github.com/golang/protobuf/jsonpb github.com/golang/protobuf/proto github.com/golang/protobuf/ptypes github.com/golang/protobuf/ptypes/any github.com/golang/protobuf/ptypes/duration +github.com/golang/protobuf/ptypes/struct github.com/golang/protobuf/ptypes/timestamp github.com/golang/protobuf/ptypes/wrappers # github.com/golang/snappy v0.0.4 @@ -897,7 +1064,7 @@ go.universe.tf/metallb/pkg/k8s go.universe.tf/metallb/pkg/k8s/types go.universe.tf/metallb/pkg/layer2 go.universe.tf/metallb/pkg/speaker -# golang.org/x/crypto v0.1.0 +# golang.org/x/crypto v0.14.0 ## explicit; go 1.17 golang.org/x/crypto/blake2s golang.org/x/crypto/blowfish @@ -905,7 +1072,6 @@ golang.org/x/crypto/chacha20 golang.org/x/crypto/chacha20poly1305 golang.org/x/crypto/curve25519 golang.org/x/crypto/curve25519/internal/field -golang.org/x/crypto/ed25519 golang.org/x/crypto/internal/alias golang.org/x/crypto/internal/poly1305 golang.org/x/crypto/pkcs12 @@ -918,16 +1084,15 @@ golang.org/x/crypto/ssh/internal/bcrypt_pbkdf ## explicit; go 1.20 golang.org/x/exp/constraints golang.org/x/exp/slices -# golang.org/x/mod v0.6.0 +# golang.org/x/mod v0.9.0 ## explicit; go 1.17 golang.org/x/mod/internal/lazyregexp golang.org/x/mod/module golang.org/x/mod/semver -# golang.org/x/net v0.7.0 +# golang.org/x/net v0.17.0 ## explicit; go 1.17 golang.org/x/net/bpf golang.org/x/net/context -golang.org/x/net/context/ctxhttp golang.org/x/net/html golang.org/x/net/html/atom golang.org/x/net/html/charset @@ -945,27 +1110,26 @@ golang.org/x/net/ipv6 golang.org/x/net/netutil golang.org/x/net/proxy golang.org/x/net/trace -# golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 -## explicit; go 1.11 +# golang.org/x/oauth2 v0.7.0 +## explicit; go 1.17 golang.org/x/oauth2 golang.org/x/oauth2/internal -# golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 +# golang.org/x/sync v0.1.0 ## explicit golang.org/x/sync/errgroup golang.org/x/sync/semaphore -# golang.org/x/sys v0.5.0 +# golang.org/x/sys v0.13.0 ## explicit; go 1.17 golang.org/x/sys/cpu golang.org/x/sys/execabs -golang.org/x/sys/internal/unsafeheader golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows golang.org/x/sys/windows/registry -# golang.org/x/term v0.5.0 +# golang.org/x/term v0.13.0 ## explicit; go 1.17 golang.org/x/term -# golang.org/x/text v0.7.0 +# golang.org/x/text v0.13.0 ## explicit; go 1.17 golang.org/x/text/encoding golang.org/x/text/encoding/charmap @@ -990,35 +1154,38 @@ golang.org/x/text/unicode/norm # golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 ## explicit golang.org/x/time/rate -# golang.org/x/tools v0.2.0 +# golang.org/x/tools v0.7.0 ## explicit; go 1.18 golang.org/x/tools/cmd/goimports golang.org/x/tools/go/analysis golang.org/x/tools/go/analysis/internal/analysisflags golang.org/x/tools/go/analysis/internal/checker -golang.org/x/tools/go/analysis/internal/facts golang.org/x/tools/go/analysis/multichecker golang.org/x/tools/go/analysis/passes/inspect golang.org/x/tools/go/analysis/unitchecker golang.org/x/tools/go/ast/astutil golang.org/x/tools/go/ast/inspector golang.org/x/tools/go/gcexportdata -golang.org/x/tools/go/internal/gcimporter golang.org/x/tools/go/internal/packagesdriver -golang.org/x/tools/go/internal/pkgbits golang.org/x/tools/go/packages golang.org/x/tools/go/types/objectpath golang.org/x/tools/imports -golang.org/x/tools/internal/analysisinternal +golang.org/x/tools/internal/diff +golang.org/x/tools/internal/diff/lcs golang.org/x/tools/internal/event golang.org/x/tools/internal/event/core golang.org/x/tools/internal/event/keys golang.org/x/tools/internal/event/label +golang.org/x/tools/internal/facts golang.org/x/tools/internal/fastwalk +golang.org/x/tools/internal/gcimporter golang.org/x/tools/internal/gocommand golang.org/x/tools/internal/gopathwalk golang.org/x/tools/internal/imports golang.org/x/tools/internal/packagesinternal +golang.org/x/tools/internal/pkgbits +golang.org/x/tools/internal/robustio +golang.org/x/tools/internal/tokeninternal golang.org/x/tools/internal/typeparams golang.org/x/tools/internal/typesinternal # golang.zx2c4.com/wireguard v0.0.0-20211017052713-f87e87af0d9a @@ -1056,12 +1223,14 @@ google.golang.org/appengine/internal/log google.golang.org/appengine/internal/remote_api google.golang.org/appengine/internal/urlfetch google.golang.org/appengine/urlfetch -# google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd -## explicit; go 1.15 +# google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 +## explicit; go 1.19 +google.golang.org/genproto/googleapis/api google.golang.org/genproto/googleapis/api/annotations +google.golang.org/genproto/googleapis/api/expr/v1alpha1 google.golang.org/genproto/googleapis/rpc/status -# google.golang.org/grpc v1.47.0 -## explicit; go 1.14 +# google.golang.org/grpc v1.56.3 +## explicit; go 1.17 google.golang.org/grpc google.golang.org/grpc/attributes google.golang.org/grpc/backoff @@ -1115,7 +1284,7 @@ google.golang.org/grpc/serviceconfig google.golang.org/grpc/stats google.golang.org/grpc/status google.golang.org/grpc/tap -# google.golang.org/protobuf v1.28.0 +# google.golang.org/protobuf v1.30.0 ## explicit; go 1.11 google.golang.org/protobuf/encoding/protojson google.golang.org/protobuf/encoding/prototext